Software Security Flashcards
1
Q
Untargeted attacks on a system
A
- Botnets, crypto trojans, Bitcoin mining, …
- All targets are equal or prioritized on a technical level
- Reap the weakest (or most unlucky ones)
- Attack strategy: Phishing campaigns, IP scanning, automated attacks
- Defending strategy: Don’t be trivial to attack
2
Q
Targeted attacks on high-value systems
A
- Unavoidable
- Deter the attacker: cost, complexity, visibility/attribution
- Attack strategy: detailed analysis, 0-day exploits
- Defending strategy: per-system, per-attacker analysis
- Attacks are costly
3
Q
Trust Models
A
- Intra-System Controls: Network Segregation, Authentication, Encryption, …
- Development Principles: Don’t trust any service/machine, input data filtering, output sanitization
- Goal: Restrict lateral movement
-> e.g. Zero Trust vs. Perimeter Principle (Gesamtes System ist vom Internet getrennt)
4
Q
Planning the attack - reconnaissance
A
- Target platform
- Libraries/Platforms(+ Versions!)
- Conceptual Mistakes
- Programming Antipatterns
5
Q
Attacking the database
A
- Some databases support plugins and load them dynamically
-> Find a way to upload a file
-> Place the file on the search path
-> Register the plugin
-> Call the plugin code
6
Q
Interpretation
A
- Read the code, perform/simulate the equivalent low-level actions
- Attack vectors:
-> Use language features (code injection)
-> Exploit vulnerability in interpreter
7
Q
Compilation
A
- Translate code from one language to another
-> Assembler translates mnemonics to binary - Execution directly on host CPU
- Exploiting the binary means exploiting the assembler code
8
Q
JIT Compilation
A
- Also called hotspot compilation
-> Interpret most code
-> Compile hotspots to native code once, then execute many times
-> Much faster for frequently-run code - Attack: Bridge from managed to unmanaged code
-> Escape from JavaScript sandbox
-> JIT-compiled code runs natively on CPU
-> Manipulate the compiler output
9
Q
Mitigation Strategies for attacks on memory
A
- Memory pages either executable or writeable
-> Make stack non-executable
-> Protect some heap portions - Hardware and OS support, set flags correctly
- Most common: NX-flag (no execute)
10
Q
libc Exploit
A
- Man manipuliert die Return Address so (z.B. durch Buffer Overflow), dass eine beliebige (schädliche) Funktion ausgeführt wird
- Über die lib libc kann man z.B. die Funktion “system()” benutzen
- Eine Gegenmaßnahme ist allocaten von random return addresses oder das Schreiben eines secrets, was rekonstruiert werden müsste
11
Q
Code Reuse Attacken Mitigation
A
- Control Flow Integrity
-> define accepted control flows
-> check for deviations at runtime
12
Q
Definitionen Vulnerability, Threat, Attack
A
- Vulnerability: Ein Fehler in der Gestaltung, Umsetzung oder Konfiguration eines Systems, der eine Attacke erst ermöglicht
- Threat: Eine Person oder eine andere Ursache, die die Schutzziele beeinträchtigen könnte
- Attack: Eine bestimmte Methode, die eine Schwachstelle ausnutzt