OWASP Flashcards
DDOS
Disrupt normal traffic to a server, service, network.
HTTP Flood - Layer 7 Attack
This attack is similar to pressing refresh in a web browser over and over on many different computers at once – large numbers of HTTP requests flood the server, resulting in denial-of-service. Comes from bot.
SYN Flood - protocol attack
This attack exploits the TCP handshake by sending a target a large number of TCP “Initial Connection Request” SYN packets with spoofed source IP addresses. The target machine responds to each connection request and then waits for the final step in the handshake, which never occurs, exhausting the target’s resources in the process.
DNS Flood - volumetric attack
A DNS Amplification is like if someone were to call a restaurant and say “I’ll have one of everything, please call me back and tell me my whole order,” where the callback phone number they give is the target’s number.
By making a request to an open DNS server with a spoofed IP address (the real IP address of the target), the target IP address then receives a response from the server. The attacker structures the request such that the DNS server responds to the target with a large amount of data. As a result, the target receives an amplification of the attacker’s initial query.
DDoS mitigation
Rate limiting, WAF , black hole routing, anycast network diffusion (diffuse traffic within the network)
A1 - Injection Attack
Attack Description
SQL, NoSQL, OS and LDAP injections
Untrusted data is sent as query or command
Execute command and access data without proper authorization
Where?
text box, u/pwd field, feedback/comment field, URL
select id from users where username=‘’ or 1=1# and password=‘”.md5($MD5PREFIX.$password).”’
Threat:SQL InjectionURL:/api/v1/auth(GET)Query String:?=%28select%20extractvalue%28xmltype%28%27%3c…Attempted on:URLThreat Pattern:stage-my.nutanix.com/api/v1/auth
Countermeasures - input sanitization, parameterized queries.
A2 - Broken Authentication
Attack Description Broken authentication occurs when the application mismanages session related information such that user’s identity gets compromised. Credential Stuffing Dictionary Attack Default, weak or well-known passwords Expose session ID’s in the URL Session hijacking Do not properly invalidate session ID’s after logout and inactivity
Countermeasures
- MFA
- Enforce strict password policy
- Harden by using same message for all outcomes
- Session ID’s should not be in the URL. Session ID’s should be securely stored and invalidated after logout, idle and absolute timeout.
A3 - Sensitive Data Exposure
Attackers can sniff the data if not handled securely
- Man in the middle attack
- Downgrading ciphers
- Weak encryption keys
- Weak TLS
Countermeasures
- Encrypt sensitive data in transit and at rest
- Disable caching of response with sensitive data. Hackers might get cached copies and steal information.
A4 – XML External Entity (XXE)
Billion laughs this small (< 1 KB) block of XML will actually contain 109= a billion "lol"s, taking up almost 3gigabytesof memory.[
Countermeasures
- Avoid serialization of sensitive data
- Implement whitelist to prevent malicious XML upload
- WAF block XXE
A5 - Broken Access Control
Able to access restricted page, directory or database.
Countermeasures
- Invalidate token and cookies after logout
- Forced login/logout after a password change
- Server side resource restriction
A6 – Security Misconfiguration
Security misconfigurations are weak passwords, default passwords, default scripts stored on the server, default error messages.
Web Server
DB Server
Hardening process for application Ensure defaults are all changed Install only the required features from a framework All servers – same config Repeatable process
A7 – Cross Site Scripting (XSS)
Attack Description
Client side injection of untrusted data or scripts into a web page
Script gets executed in the browser.
Used to steal users data, deface websites.
Threat:Cross Site ScriptingURL:/samlsso(GET)Query String:?spEntityID=nutanix.portal.relayware.com%22%3e…Attempted on:request parameter spEntityIDThreat Pattern:spEntityID=nutanix.portal.relayware.com%22%3e%…
Countermeasures
Output encoding and escaping of untrusted characters
Enable Content-Security-Policy
modern browsers do not execute untrusted scripts
A8 – Insecure Deserialization
Attack Description
Altering the serialized objects in the cookies for privilege escalation.
X:x:{z:z:”Name”:r:”User”} -> Normal cookie
X:x:{z:z :”Name”:r:”Admin”} -> Altered cookie object
Encryption of serialized data
Deserializers to run with least privileges
X-Frame-Options: SAMEORIGIN
To allow request only from the same domain
ALLOW, DENY, SAMEORIGIN
X-Content-Type-Options: nosniff
- browsers would try to guess the content type of a request using content sniffing