Attacks Flashcards
IP Flooding
- simple DoS attack
- many coordinated attackers ping arbitrary machines with a spoofed IP address that belongs to victim
- all machines will send responses (acknowledgements) to the victim flooding its bandwidth
- SMURF attack is example of IP flooding where pings are sent to reserved broadcast address
TCP Attacks
- TCP packets are not secured in any way. Most headers can be guessed and forged.
- Attacker on a machine that packets are routed through can easily interfere with packets in any way.
- Can observe packets on the wire, and inject new ones, but can’t intercept the original traffic.
Denial of Service (DoS)
- asymmetry of resources is key: attacker needs to spend relatively low resources but cause high-cost damage to target
- defend using: firewalls (filtering/scrubbing), CDNs
SUID Vulnerabilities
- SUID bit inherits owner’s UID on execution
- GUID bit inherits owner’s GUID on execution
- SUID allows processes to launch with EUID > UID (more privileges than those assigned to the user)
What happens if you can modify $PATH for a SUID program?
You can make a program with higher privileges execute your own program with those high privileges. (And the program that you write can do something malicious with high privileges)
File Descriptor Vulnerabilities
Example:
1)SUID program opens a file only readable by root. 2)Program forks a user-controlled, unprivileged process. 3)Child will inherit the open file descriptor!
Close file descriptors to defend against this
Cross-Site Scripting (XSS)
- XSS allows an attacker to inject code into a vulnerable web page. Victims visiting the page will inadvertently run code from an untrusted origin.
- Injected code runs in the vulnerable site’s context. Can access all data without violating SOP!
Reflected XSS
1) Attacker includes code in malicious link.
2) Attacker tricks victim into clicking on the link.
3) Code is reflected & run on the visited page.
Stored XSS
1) Attacker submits code to server.
2) Server persists code to storage.
3) Victim accesses page that includes and runs stored code.
Cross-Site Request Forgery (CSRF)
- allows an attacker to perform actions on behalf of a legitimate, authenticated user of a web application
- via social engineering, phishing, by injecting a CSRF payload that will trigger the attack automatically.
- attacker doesn’t need to steal cookie because browser automatically includes session cookie, which authenticates and authorizes the action
- defend using a CSRF token: add a secret to the request so the attacker cannot predict the value needed to trigger a sensitive action
Confused Deputy Problem & CSRF
- Confused deputy’s are tricked into performing a malicious action that they had the permission to perform, but should not have performed!
- CSRF is an example of the confused deputy problem.
- Web browser is the deputy
- confused into misusing the user’s legit authority under the attacker’s control.
XSS vs CSRF
In XSS, client trust in the server is violated.
In CSRF, server trust in the client is violated.
Black Hats
Bad guys.
Break into systems for fun/profit
White Hats
Good guys.
Ethical Hackers
Try to protect systems, advance security
Gray Hats
“Chaotic good” guys, often good intent, but legal/ethical trouble.
Break things first, then ask questions.