Attacks Flashcards

1
Q

IP Flooding

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

TCP Attacks

A
  • 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.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Denial of Service (DoS)

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

SUID Vulnerabilities

A
  • 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)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What happens if you can modify $PATH for a SUID program?

A

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)

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

File Descriptor Vulnerabilities

A

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

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

Cross-Site Scripting (XSS)

A
  • 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!
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Reflected XSS

A

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.

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

Stored XSS

A

1) Attacker submits code to server.
2) Server persists code to storage.
3) Victim accesses page that includes and runs stored code.

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

Cross-Site Request Forgery (CSRF)

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Confused Deputy Problem & CSRF

A
  • 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.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

XSS vs CSRF

A

In XSS, client trust in the server is violated.
In CSRF, server trust in the client is violated.

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

Black Hats

A

Bad guys.
Break into systems for fun/profit

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

White Hats

A

Good guys.
Ethical Hackers
Try to protect systems, advance security

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

Gray Hats

A

“Chaotic good” guys, often good intent, but legal/ethical trouble.
Break things first, then ask questions.

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

Virus

A
  • malware that infects other host files and lives inside them
  • can infect boot sector on disk, data files, executable files, etc.
  • trade-off b/w propagation success and detection risk
17
Q

Worms

A
  • self-propagation over the network by exploiting vulnerable services
  • self-contained program, no infection
  • fully automated, no need for user interaction
18
Q

Trojans

A
  • malicious software pretending to be benign
  • self-contained program, no infection
  • tricks users into thinking it is a benign application and interacting with it
19
Q

Rootkits

A
  • live inside the kernel, modules, drivers…
  • can easily hide from anti-virus
  • since TCB can no longer be trusted, throw your computer out the window
20
Q

Botnets

A
  • overlay of compromised hosts (bots, zombies)
  • easy to monetize
  • remote command and control
  • distributed command execution
  • botmaster: controls network, issues commands through C&C server(s)
21
Q

Domain Generation Algorithms (DGA)

A
  • many bots use DNS to resolve to C&C server
  • if a single name is used, easy to take down the botnet by blocklisting that name
  • solution: generate many names, botnet rotates b/w them
  • Fast flux used to rapidly change IP addresses that DNS record map to, used to prevent IP blocklisting
22
Q

Botnet Defenses

A
  • sinkholes and blocklisting (may need to reverse engineer DGA)
  • identify C&C traffic, look for periodic behavior
  • identify crowd behavior, all bot-infected hosts in a network will receive and react to a command in the same way
23
Q

Ransomware

A
  • encrypt files, lock screen, ask for a ransom
  • solution: backup your files
24
Q

Advanced Persistent Threats (APT)

A
  • attackers may have advanced capabilities
  • persistent: covert activity over a long period of time
  • threat: capability + intent
  • targeted malware is a more useful term!
25
Q

Catching Malware

A
  • traditional technique: static signatures (analysts extract patterns from known malware, anti-virus software checks for these patterns)
  • heuristics: generic signatures, involves dynamic behavioral analysis at runtime
  • signatures are not very sophisticated, don’t protect against unknown variations of malware
  • behavioral analysis prone to false positives –> BAD
26
Q

Avoiding Static Analysis (reverse engineering malware)

A
  • packed executables (hide code)
  • obfuscation: polymorphism and metamorphism
27
Q

Polymorphic Malware

A
  • encrypt malware with a new key (maybe after each infection) –> signatures dont match
  • key and decryptor loop within malware
  • same code, but looks different (different registers, equivalent but different instructions, add dead code)
28
Q

Metamorphic Malware

A
  • similar to polymorphic but not encryption
  • entire malware is mutated/rewritten
  • every generation looks different in binary but behaves the same way
29
Q

Dynamic Analysis

A
  • run malware and see what it does (network endpoints contacted, files accessed, registry keys changes, order….)
  • create fingerprints and cluster samples into malware families
  • sandboxes used as execution environment, highly automated, can catch brand new malware
  • obfuscation does not work against sandboxes!
30
Q

Evasive Malware

A
  • goal: prevent malware analyst from understanding what the code does by trying to detect if running in sandbox
  • if in sandbox, don’t run
  • relies on fingerprinting sandbox environment through various artifacts
31
Q

Name issues with dynamic and static analysis

A
  1. Dynamic analysis vulnerable to evasive malware
  2. Static analysis vulnerable to obfuscation
32
Q

Process of reversing software

A
  • extract code from binary representation
  • extract data from binary representation
  • recover control flow abstractions
  • recover program semantics