OWASP Top Ten Threats Flashcards

1
Q

Broken Authorization and how to avoid it.

A

Authenticated users without authorization perform horizontal privilege escalation.

Prevention:

  • Enforce Least privilege
  • Default deny
  • Authorize every request
  • Review authorization logic
  • Prefer ABAC over RBAC
  • Avoid IDOR (e.g. https:/mybank.com/?acct_id=901)
  • Protect static resources (e.g. S3 buckets)
  • Auth checks in right location (e.g. not in client side logic).
  • Logging
  • Unit and Integration testing
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

XSS Prevention -Cheat Sheet

A
  • RULE #0 - Never Insert Untrusted Data Except in Allowed Locations
  • RULE #1 - HTML Encode Before Inserting Untrusted Data into HTML Element Content - this essentially turns special characters such as &, , “ and ‘ into encoded elements such as &amp, &lt etc..
  • Other rules are similar but cover Java Script, CSS
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is CSRF?

A
  • Cross-Site Request Forgery (CSRF) is an attack that forces an end user to execute unwanted actions on a web application in which they’re currently authenticated.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How is CSRF different from XSS?

A
  • XSS exploits a user’s trust in the web application

- CSRF exploits a web application’s trust in the user.

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

How can CSRF be prevented?

A
  • On the application side: Using random session tokens
    and CAPTCHAs.
  • On the user side: logout of applications, do not browse at the same time as you use banking applications; do not click on links; do not store passwords in browsers.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is unvalidated redirect and forward?

A

Web application redirects user to a malicious website provided in untrusted input.

  1. User receives phishing email with link to a known page with a redirect parameter to attacker site.
  2. User clicks on link and is redirected to the attacker’s page.

Avoid it by avoidng redirects and forwards.
Train users - since such attempts are often linked with phishing emails.

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

What are the OWASP top 10?

A
  1. Injection SQL/XML/LDAP
  2. Broken Auth & Session Management
  3. XSS
  4. IDOR
  5. Security Misconfiguration
  6. Sensitive Data Exposure
  7. Missing Functional Level Access Control
  8. CSRF
  9. Components with known vulnerability
  10. Unvalidated fwds/requests.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly