
Week 13b

Quiz
•
Computers
•
University
•
Hard
A Moreno
Used 12+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Your application sets a cookie with Secure attribute. What does this mean?
The cookie can not be accessed by JavaScript
The cookie will not be sent cross-domain
Client will send the cookie only over an HTTPS connection
none of these
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
The session ID must be renewed after...
A short idle period (ie. 30 seconds)
When a new window is created
Any privilege level change
A client logs in
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Your web server supports secure (HTTPS) connections. By design, which of the following is the best way to make sure a client will not accidentally request a page over non-secure HTTP connection?
Completely close port 80
Use HTTP Strict-Transport-Security
Redirect all requests for port 80 to port 443
disable port 433
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Your application performs logging queries after certain events. Timestamp, IP address, POST payload and a type of action will be saved to a MySQL database. Is it possible for an adversary to bypass this logging query by sending specifically crafted POST payload?
No, if escaping is used (ie. mysql_real_escape_string() function in PHP)
Yes, further validation is needed on the input data
No, if the SQL query is performed using a prepared statement with correctly set character encoding
Yes, because posts are generally associated with malicious payloads
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
You use a 104-bit, cryptographically strong, random number (hexadecimal encoded, for example) as your password on a web site which stores passwords as plain MD5 hashes: md5 (password). Is it safe to assume your password will be safe if the user database leaks?
Yes
No, because of the broken collision resistance of MD5
maybe...?
No, because of the lack of salting and stretching
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
You are running Apache + PHP server. PHP runs as an Apache module:
AddHandler php5-script .php
You allow users to upload avatar images (in PNG format). Avatar filename is allowed to contain characters: "a-z0-9.-".
Is it safe to assume you are secure against PHP code execution launched via uploaded files?
Yes, if I make sure the filename ends with .png extension
occassionally
No, further configuration is needed on the server-side
Yes, if I reject files that do not pass getimagesize()
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Your PHP application reads user submitted XML documents using DOM. You fetch certain element values from the XML:
$doc = new DOMDocument();
$doc->loadXML($xml);
$params = $doc->getElementsByTagName('parameters');
You display some of those parameters on the user's account settings page. Is it possible to exploit this scenario with a maliciously crafted XML document?
yes
No, if I make sure the user submitted XML is well-formed
maybe?
No, if I escape the data before displaying on the account page
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
Технические основы создания веб-приложений

Quiz
•
University
15 questions
Quiz 2 - Workshop Flutter 2024

Quiz
•
University
12 questions
SGBDs NoSQL orientado a documentos

Quiz
•
University
14 questions
Configuración de Servidores Web Unidad2

Quiz
•
University
12 questions
TY A Web Technologies -II (Chapter 1 and 2) Quiz

Quiz
•
University
15 questions
IWP Digital Assignment 3

Quiz
•
University
8 questions
3.2 Bahasa Penskripan Pelayan

Quiz
•
University
15 questions
Mobile Application Development Quiz1

Quiz
•
University
Popular Resources on Wayground
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
20 questions
PBIS-HGMS

Quiz
•
6th - 8th Grade
10 questions
"LAST STOP ON MARKET STREET" Vocabulary Quiz

Quiz
•
3rd Grade
19 questions
Fractions to Decimals and Decimals to Fractions

Quiz
•
6th Grade
16 questions
Logic and Venn Diagrams

Quiz
•
12th Grade
15 questions
Compare and Order Decimals

Quiz
•
4th - 5th Grade
20 questions
Simplifying Fractions

Quiz
•
6th Grade
20 questions
Multiplication facts 1-12

Quiz
•
2nd - 3rd Grade