Securing Web Apps Flashcards

(60 cards)

1
Q

What are the three components of a web transaction?

A

Server computer, client computer, network.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the goal of web app testing?

A

Gather information, including by attacking the app.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What should be attacked in web app testing?

A

HTML comments, sensitive info, error messages, HTTP responses.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Why are HTML comments a security risk?

A

May reveal insights about code to attackers.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How should comments be secured?

A

Place in server-side code like PHP, not HTML.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What sensitive info might HTML source reveal?

A

Database names, user logins, passwords.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What tools map web app pages?

A

Web crawlers like wget or BlackWidow.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Why manually map web app pages?

A

More efficient for apps with fewer than thousands of pages.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How to start manual web app testing?

A

Click every link from the start page, document all pages.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What to check in the homepage source?

A

Comments for clues about app structure.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Why are misplaced server-side comments risky?

A

May end up in HTML due to errors, like ColdFusion’s 3-dash comments.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is a ColdFusion comment issue?

A

Uses 3 dashes instead of 2, easily mistaken by programmers.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What can old code in comments reveal?

A

Sensitive app details to attackers.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What tool searches for string patterns?

A

grep, available on *NIX, Cygwin, or MinGW.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is The Regulator?

A

A tool for creating regular-expression searches.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What info might database error pages reveal?

A

Table names, database names, or code snippets.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What happens in ColdFusion/Java Servlet crashes?

A

Server may reveal function traces or code snippets.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

How to defend against error message leaks?

A

Log errors, don’t display queries or code.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Why disable PHP error messages?

A

Prevents exposing sensitive app details.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What are the three user access mechanisms?

A

Authentication, session management, access control.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

What is the weakest link in user access?

A

A single defect can compromise the entire app.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

What is authentication?

A

Verifying a user’s identity.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

What is conventional authentication?

A

Username and password.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

What enhances authentication security?

A

Securekey, multistage login, client certificates, smartcards.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
What are authentication defects?
Username enumeration, password guessing, login bypass.
26
What is session management?
Tracking an authenticated user’s interaction with the app.
27
How does an app handle multiple users?
Processes requests from authenticated and anonymous users.
28
What is a session in web apps?
Server-side data tracking user interaction state.
29
What is a session token?
A unique string mapping to a user’s session.
30
How are session tokens sent?
Via HTTP cookies in each request.
31
Why encrypt HTTP cookies?
Prevents sidejacking, as shown by Firesheep.
32
What is access control?
Deciding whether to approve or reject user requests.
33
How does access control use identity?
Bases decisions on the authenticated user’s identity.
34
What are user roles in access control?
Define specific privileges for different users.
35
Why is access control vulnerable?
Complex requirements lead to developer oversights.
36
How to test for access control issues?
Probe each function repeatedly for missing checks.
37
Why is all user input untrusted?
Can introduce vulnerabilities if not validated.
38
What is input validation?
Restricting input to expected formats, like valid email.
39
Why allow attack strings in input?
Legitimate blog posts may contain such strings.
40
How should apps handle attack strings?
Store and display them safely, not reject them.
41
Why validate cookies and hidden fields?
Detects tampering indicating vulnerability probing.
42
What should apps do with tampered data?
Reject the request and log the incident.
43
What is the reject known bad method?
Blocks blacklisted attack patterns, allows rest.
44
What is a flaw of reject known bad?
May miss new attacks, requires constant updates.
45
What is accept known good?
Allows only predefined safe input, blocks rest.
46
Why is accept known good effective?
Blocks all non-matching input if criteria are strict.
47
What is sanitation in input handling?
Removes or encodes malicious characters.
48
When is sanitation necessary?
When unsafe data must be accepted for processing.
49
What is safe data handling?
Uses inherently safe processing, like parameterized queries.
50
How does safe data handling prevent SQL injection?
Uses parameterized queries for database access.
51
What are semantic checks?
Validate input context, not just syntax.
52
Why are semantic checks needed?
Malicious input may mimic legitimate input.
53
What is an example of a semantic check?
Verify an account belongs to the submitting user.
54
What is boundary validation?
Validates inputs at each app component, not just externally.
55
Why is frontier validation inadequate?
Assumes server-side app is trusted, missing internal threats.
56
How does boundary validation work?
Each component treats inputs as potentially malicious.
57
What is SOAP in web apps?
Simple Object Access Protocol for web services.
58
Why log tampered input incidents?
Aids investigation of potential attacks.
59
What reduces app value if input is rejected?
Blocking legitimate but suspicious input, like blog comments.
60
Why are access control checks complex?
Vary by user role and data subset permissions.