L2 - Client-side Attack Flashcards
OWASP Risk Rating Methodology Equation
Risk = Likelihood * Impact
Steps in OWASP Risk Rating Methodology
Step 1: Identifying a Risk
Step 2: Factors for Estimating Likelihood
Step 3: Factors for Estimating Impact
Step 4: Determining Severity of the Risk
Step 5: Deciding what to Fix
Step 6: Customizing Your Risk Rating Model
Step 1: Identifying a Risk
Identifying a security Risk
– List from OWASP, SANS top 25 e.g
Step 2: Factors for Estimating Likelihood
- Skill Level
- Motive
- Opportunity
- Size
- Ease of discovery
- Ease of exploit
- Awareness
- Intrusion detection
Step 3: Factors for Estimating Impact
- Loss of confidentiality
- Loss of integrity
- Loss of availability
- Loss of accountability
- Financial damage
- Reputation damage
- Non-compliance
- Privacy violation
Step 4: Determining the Severity of the Risk
0 to <3 : low
3 to <6: medium
6 to 9: high
Step 5 : Deciding what to Fix
- The most severe risks should be fixed first.
- Not all risks are worth fixing.
- Some loss is not only expected, but justifiable based upon the cost of fixing the issue.
Step 6: Customzing Your Risk Rating Model
o Adding factors
o Customizing options
Cross-Site Scripting (XSS)
A client-side code injection attack allowing the injection of malicious code into a website
When do XSS happen?
XSS flaws occur when an application includes untrusted data in a web page without proper validation or escaping, or updates an existing web page with user-supplied data using a browser API that can create HTML or JavaScript
Impact of XSS
It allows attackers to execute scripts in the victim’s browser.
- He can steal the user’s cookies, allowing for someone to use the website pretending to be that user.
- He can steal the user’s session, steal sensitive data, rewrite webpage, redirect user to phishing or malware sit
Types of XSS attacks
- Reflected XSS (non-persistent), where the malicious string originates from the victim’s request. (form field, hidden field, URL, etc…). The website then includes this malicious string in the response sent back to the user.
- DOM-based XSS, where the vulnerability is in the client-side code rather than the server-side code.
- Persistent (Stored) XSS, where the malicious string originates from the website’s database.
Reflected XSS Attack
- The attacker crafts a URL containing a malicious string and sends it to the victim (by various means e.g phishing email, an injected link in a vulnerable website).
- The victim is tricked by the attacker into requesting the URL from the vulnerable website.
- The vulnerable website includes the malicious string from the URL in the response.
- The victim’s browser executes the malicious script inside the response, sending the victim’s cookies to the attacker’s server.
Persistent XSS Attack
- The attacker uses one of the website’s forms to insert a malicious string into the website’s database.
- The victim requests a page from the website.
- The website includes the malicious string from the database in the response and sends it to the victim.
- The victim’s browser executes the malicious script inside the response, sending the victim’s cookies to the attacker’s server.
Source
A source is a Javascript property that contains data that an attacker could potentially control.