Alles Flashcards
Differentiate “Safety” und “Security”
Safety: Defense against non-deliberate threats.
Security: Defense against deliberate threats.
Gib Beispiele für “Safety”
Hardware malfunction, software bugs, erroneous user input, power loss, .
Gib Beispiele für “Security”
Hardware manipulation, software manipulation, malicious user, physical attack
Bringe Asset, Threat und Attacks in Einklang
Assets
Something we want to protect in respect to certain principles.
Threat
Something challenging the protection of an asset.
Attack
An (attempt to) realize a threat.
Was sind die Prinzipien der Sicherheit? (Security Triangle)
Confidentiality - Vertraulichkeit (Third parties do not get to know data.)
Integrity - Integrität (Third parties cannot manipulate data.
Availability - Verfügbarkeit (Third parties cannot prevent legitimate parties from using data.)
Was sollte bei der Nutzung von Kryptographie beachtet werden?
Do not invent cryptography!
Use standards!
Do not implement cryptography!
Use libraries!
How many rounds do AES, DES, GOST?
AES 10-14
DES 16
GOST 32
Was ist einer der Vorteile von AES?
Ist in modernen CPUS eingebaut und damit schnell
Charakterisiere AES
Blocksize: 128 bit
Keysize: 128, 192 or 256 bit
Rounds: 10, 12 or 14
Welche drei Splits bzgl. Verschllüsselungen gibt es?
ECB - Electronic Code Block
CBC - Cipher Block Chaining
CTR - Counter Mode
Erkläre ECB
Split message in blocks of 128 bit each. Encode each block separately.
–> Ganz simple: Plain —-Verschlüsselung—> Cipher
Was ist das Problem an ECB?
Identical 128 bit plain text block are encrypted to identical cipher text block.
=> Structures in plain text are preserved in cipher text!
Beispiel Pinguinbild
Erkläre CBC
Xor plain text block with cipher text of previous block.
Plain – Xor mit Initialization Vector oder cipher text of previous block – Verschlüsselung –> Cipher
Erkläre CTR
This key stream is xored with the plain text of the message, like using a one-time pad.
CTR — Verschlüsselung –> Xor mit Plain –> Cipher
Was sind die Vorteile von CTR gegenüber CBC? Was ist der Nachteil von CTR?
Bit errors in ciphertext only affect the corresponding plain text bits.
Each block can be en-/decrypted independent of each other block.
Less information leakage
CTR mode does not require padding – just encrypt your message and throw away the rest of your key stream.)
Nachteil: The same counter value must never be used more than once with each key.
Was ist eine Herausforderung bei Block Ciphers (Länge) und wie wird dies gelöst?
Block ciphers require message length to be a multiple of the block length.
Welche beiden Arten der Random Number Generators gibt es?
Pseudo Random Number Generators (PRNG)
True Random Number Generators (TRNG)
Für was sind Random Number Generators wichtig?
- Start value of counter in CTR mode.
* Initialization vector in CBC mode.
Wie funktioniert einfacher Integritätssicherheit?
Hashing:
• He gets the file and a hash value of the file.
• He re-calculates the hash.
• If both hash values are the same, the file has not been manipulated.
Was ist das Problem beim einfachen Hashing?
What if Mallory changes the file and the hash?
Was ist Message Authentication Code? (MAC)
A cryptographic checksum is called a Message Authentication Codes (MAC).
Wie funktioniert Message Authentication Code? (MAC)?
Instead of calculating h(M) calculate h(K||M)
A secret is incorporated into the calculation of the hash.
Only Alice and Bob now the secret.
Secret required to calculate the hash
Mallory does not know the secret.
=> Only Alice and Bob can calculate and verify checksum.
Was ist Preimage Resistance?
Given hash value h(M), it is impossible to learn anything about M.
–> Finde zu einem Geburtstag eine Person, die dann Geburtstag hat
Was ist Second preimage Resistance?
Given a message M, it is impossible to find a message M′ such that h(M) = h(M′)
Finde zu einer bestimmten! Person eine zweite Person, die am gleichen Geburtstag hat
Was ist Collision Resistance?
It is impossible to find message M and M′ with
h(M) = h(M′)
Implizit aus Second preimage Resistance: Finde überhaupt zwei Personen, die am gleichen Tag Geburtstag haben
Wieso reicht MAC allein nicht aus?
Since the attacker knows h(K||M), she can append data to the message and calculate the corresponding MAC without knowing the key!
Wie sieht HMAC aus?
Calculate
h(K a||h(K b||M))
with suitable constants a and b. This prevents message appending attack.
Bei der Realisierung von Integrität und Vertraulichkeit: Welche Kombination aus Encrypt und MAC sollte genommen werden?
IPsec: Encrypt then MAC!
Was für konkrete Lösungen gibt es für Encryption und MAC?
AES + SHA256
Welche Komponenten bedarf es für die Verschlüsselung bzw. Entschlüsselung? (Variablen)
Welche sind öffentich und welche Privat?
p A large prime (Private) q Another larger prime (Private) n = p · q Modulus (Public) e Public exponent (Public) d = e^−1 mod ((p − 1) · (q − 1)) Private exponent (Private)
Wie ist die Formel zum Verschlüsseln und Entschlüsseln?
C = M^e (mod n) M = C^d (mod n)
Wieso ist RSA sicher?
The best known way for an attacker who only knows n and e to get d is based on prime factorization.
Was ist der Nachteil der asymetrischen Verschlüsselung und wie wird es gelöst?
RSA encrypts only one big number and it is slow.
All practical implementations are hybrids of symmetric and asymmetric cryptosystems.
First, the message is encrypted symmetrically with a random key.
Then, the random key is encrypted asymmetrically.
Aus welchen Komponenten bestehen die Public und Private Keys?
Public: (e,n)
Private: (d,n)
Wie funktioniert die Signierung?
RSA in reverse order.
Let (n; e) be Alice’s public key and (n, d) Alice’s private key.
Alice generates signature S for message M.
S = M^d (mod n)
Bob verifies the signature
M′ = S^e (mod n)
Bob checks if M = M′.
Was gibt es zur Bit-Länge von RSA-Keys zu sagen?
Keys must be a lot longer than the desired security level! Security Bits --> RSA Key Bits 80 --> 1024 112 --> 2048 128 --> 3072 192 --> 7680 256 --> 15360
Wie wird bei RSA mit MITM-Attacks umgegangen?
Um eine vertrauenswürdige Dritt-Stelle, die öffentliche Schlüssel verifiziert:
Öffentliche Stelle signiert den öffentlichen Schlüssel der fraglichen Stelle
Was ist der Unterschied zwischen Softwarequalität und Softwaresicherheit?
Software Quality
Prevent random errors. Ensure that functionality is
available.`
Software Security
Prevent deliberate attacks. Ensure that functionality is
not available.
Was ist ein Buffer Overflow?
Zu einem Buffer Overflow oder zu Deutsch Pufferüberlauf kommt es, wenn ein Programm oder ein Prozess versucht, mehr Daten in einem Puffer (temporärer Datenspeicher) zu speichern, als dort vorgesehen ist.
Wer kann Buffer Overflows verursachen?
• external interfaces (data provided by user / attacker)
and
• internal interfaces (internal function / method calls).
Nenne die guten Conterparty zu strcat, scanf, strcpy…
strlcat, strlcpy, …
Was sollte bzgl. Buffer Overflows nicht vergessen werden?
Even if you allocate a buffer of the right size, computer memory is still finite.
Was ist Stack Smashing?
Buffer overflows on local variables can overwrite old frame pointer and return address!
Was sind Canary Values?
Write canary values between allocated memory. When canary value is overwritten, a buffer overflow occurred.
Erkläre “Injection”
“Injection-Fehler, wie SQL-, NoSQL-, OS- und LDAP-Injection
treten auf, wenn nicht vertrauenswürdige Daten an einen Interpreter als Teil eines eines Befehls oder einer Abfrage gesendet werden. Die feindlichen Daten des Angreifers können den Interpreter dazu bringen, unbeabsichtigte Befehle auszuführen oder auf Daten zuzugreifen
ohne die richtige” Autorisierung.
Erkläre “Cross-Site Scripting XSS”
Inject scripts into third party web page.
Typisch:
• Hide script in form data passed as HTTP GET request.
• Poison websites database (e.g. a guestbook) with malformed data containing script code.
Was gibt es bzgl. Operating Systems und Standard Libraries zu beachten?
Operating System and standard libraries are optimized for performance, not security.
Example: Secure file deletion
Performance: Unlink the file (logical deletion)
Security: Erase file (physical deletion)
Speichern von Passwörtern als Hash-Codes ist gut. Was gibt es aber noch zu beachten/ergänzen?
Many passwords are not build from random characters, but from words occurring in natural language ==> An attacker can try out dictionaries
Add a salt to the password: Calculate h(“EA4y.GMy password”)
Wie kann die Verschlüsselung mittels Hash noch verbesser werden?
- Use slow hash functions!
- hash the hash of the password multiple times (65.000Mal)
Beschreibe “Malware”
Ein Programm, das in ein System eingefügt wird, normalerweise im Verborgenen, mit der der Absicht, die Vertraulichkeit, Integrität oder Verfügbarkeit der Daten, Anwendungen oder des Betriebssystems des Opfers zu gefährden oder das Opfer zu belästigen oder zu stören.
Was für Arten der Verbreitung von Malware gibt es?
- Mass Attacks –> “low hanging fruits”
- Advanced Persistent Threats (APT) –> “specific target”
Gib zu den Kategorien Social Engineering, Exploits und Phyiscal Access Beispiele (Hinweis: Drei Kreise-Diagramm)
Social Engineering - Phishing, Trojan Horses
Exploits - Drive-by-Download, Worms, Trojan Horses
Physical Access - Trojan Horses
Welche Arten von Trojanischen Pferden gibt es?
- Continuing function of original program and add a separate malicious activity
- Continuing function but modifying to malicious function (collects passwords)
- Replaces function
Was sind die beiden Eigenschaften eines Virus
- Inject own code into program
* Replicate
Wie werden Viren vertrieben?
- Email and other networked communication.
- Shared files
- Program downloads
- USB sticks
- . . .
Documents are exchanged more often than programs
=> Attach virus to documents
=> Macro virus
Was sind die Eigenschaften eines Wurms?
Use network connection to spread from computer to computer.
Wie werden Viren vertrieben?
- Emails/IM
- File sharing
- Remote access (by exploit or found usernames/passwords)
- Drive-by-download
Was ist (auch) für Spam verantwortlich?
Botnets
Was wird mit Spam bezweckt?
• Push advertisements (pharmaceuticals, stocks)
• Distribute malware
Documents with malicious macros, executables, . . .
• Phishing
Direct user to malicious website
Was ist Phishing/Spear-Phishing?
Phishing: Trick (Spear: spcific) user to visit malicious website or to execute malicious attachments
Was wird mit Phishing bezweckt?
Get personal information (identity theft).
PINs, TANs, . . .
• Get control of computer
Use as bot in botnet, blackmail user, . . .
• 419
Was ist ein Drive-by Download?
Unintentional download of malicious file(s).
Spread vector
• Compromised web pages
• Advertisements (“Malvertising”)
Was ist ein Watering Hole Attack und wie unterscheidet sich diese von bspw. Drive-by Download?
Watering Hole Attack nutzt Drive-by Download, aber übernimmt vorerst eine geringfügig gesicherte Internetseite, die vom Ziel häufig genutzt wird.
Welche Manipulationen der Kernel mode rootkits call table gibt es?
- Modify table
- Modify function referenced in table
- Change pointer to table (replace table)
Was sind Kernel mode rootkits?
as Rootkit installiert eine virtuelle Maschine und startet darin das eigentliche Betriebssystem des angegriffenen Rechners. Ein bösartiges Rootkit dieses Typs könnte dann Schadsoftware in weiteren virtuellen Maschinen ausführen, ohne dass die (oder das Rootkit selbst) von herkömmlichen Virenscannern erkannt werden können.
Was sind Ausprägungen der Payloads von Angriffen?
Persistenz, System Corruption, Cryptocoin Mining, Zombie/Bot, Spyware