12/12/2022 - THM Severside Request Forgery and XSS Flashcards
What does SSRF stand for?
Server-side Request Forgery
What is a SSRF?
A vulnerability that allows a user to cause the webserver to make an additional/edited HTTP request.
What are the impacts to SSRF?
Unauthorized access
Access to customer/organizational data
Ability to scale to internal networks
Reveal authentication tokens/credentials
What is a common attack technique used within SSRF?
What pattern is used to stop a webservers mitigation filter after malicious code is injected?
“&x” - stops remaining path from being appended to attackers URL
Directory Traversal: Accessing another directory not intended to be searched
What are common SSRF vulnerability locations?
Form input values
Partial URL showing just a hostname
URL showing the whole path
*If working with blind SSRF you will need to use external HTTP logging tool
What are two high-attack strategies for SSRF
*Hint think higher than cookies and attacks
Blind; vulnerability occurs but with no information returned to the attacker’s screen
Regular; vulnerability is returned to the attacker screen
Ways to defeat SSRF mitigations
If the defense uses…
- Deny Lists: leverage other names to get the same result (ie deny localhost.. 0.0.0.0,127....,0,0000,etc.. (check notes for more)
- Allow List: Locate pattern allowed and comment it out
- Use Open Redirect: redirect the url to attackers server
What are four high level attack schemes for XSS attacks?
Session Steal
Proof of Concept
Key Logger
Business Logic
Which JS document property contains the users session token?
document.cookie
Which JS document property captures keystrokes?
document.onkeypress
What JS functions convert and decode base64 encoding
BTOA()
ATOB()
Types of XSS attacks?
Stored
Reflected
DOM
Blind
What is a stored XSS attack and common attack areas?
Malicious information stored on the web app
- Look for comments in a blog
- User profile information
- Website listing
- changing form data (the form is drop-down selecting only integers but you send string)
What is a DOM based attack?
Programming interface flaw for HTML or XML
Impact of Stored XSS attack
Redirect user
Steal session cookie
Perform other website action while acting as the visting user