【16】CS161 Midterm 2 Cheatsheet

  1. 7 layers: The application layer, The presentation layer, The session layer, The transport layer, The network layer, The data-link layer, The physical layer

  2. IP Packet: SrcIP, DstIP, Length, ID, TTL

  3. TCP Packet: SrcPort, DstPort, Seq, Ack, Flag

  4. TCP: RST, Data Injection, Disruption, Blind Hijacking, Blind Spoofing. (guess port and seq)

  5. UDP: User Datagram Protocol

  6. DHCP (Dynamic Host Configuration Protocol): offer message includes IP address, DNS server, gateway router, and how long client can have these (lease time). Adv can fake DNS, gateway and be MITM.

  7. ARP: Address Resolution Protocol

  8. WPA2 (4-way Handshake): AP and client have same pre-shared key (PSK key). Goal is to create a shared key called PTK (Pairwise Transient Key). This key is derived from both password and SSID using PBKDF.

  9. WPA Enterprise: before 4-way handshake, your computer first handshakes with the authentication server using public key cryptography, then authenticates to this server with your username and password. The server now generates a unique key.

  10. DNS Packet: SrcPort, DstPort, ID, TTL. Cache poisoning, spoof, blind spoof.

  11. Bailiwick checking: Don’t accept Additional records unless they’re for the domain we’re looking up.

  12. The Kaminski Attack: First try to poison some other sub domains.

  13. DOS: SYN flood (don’t allocate anything until see ACK, SYN-cookies)

  14. CA: Revocation(expiration dates, cert revocation list (CRL))

  15. TLS/SSL:

    • Browser (client) connects via TCP to Amazon’s HTTPS server • Client picks 256-bit random number RB, sends over list of crypto protocols it supports • Server picks 256-bit random number RS, selects protocols to use for this session • Server sends over its certificate • Client now validates cert

    • For RSA, browser constructs “Premaster Secret” PS • Browser sends PS encrypted using Amazon’s public RSA key KAmazon • Using PS, RB, and RS, browser & server derive symmetric cipher keys (CB, CS) & MAC integrity keys (IB, IS) (One pair to use in each direction)

    • For Diffie-Hellman, server generates random a, sends public parameters and ga mod p (Signed with server’s private key) • Browser verifies signature • Browser generates random b, computes PS = gab mod p, sends gb mod p to server • Server also computes PS = gab mod p • From PS, RB, and RS, browser & server derive symm. cipher keys (CB, CS) and MAC integrity keys (IB, IS).

  16. Prevent replay attack: don’t reuse random numbers

  17. DOS Amplification: DNS lookups

  18. Application-Layer DoS: Algorithmic complexity attacks

  19. DNSSEC: Designed to prove the value of an answer, or that there is no answer.

  20. The Key Signing Key (KSK) is used only to sign the DNSKEY RRSET, The Zone Signing Key (ZSK) is used to sign everything else. The client has hardwired in one key for . (This is the root’s KSK)

  21. NSEC: Proof that a name exists but no type exists for that name, Proof that a name does not exist. NSEC3: use a hash of the name.

  22. OPT records to say “I want DNSSEC”, RRSIG records are certificates, DNSKEY records hold public keys, DS records hold key fingerprints, Used by the parent to tell the child’s keys, NSEC/NSEC3 records to prove that a name doesn’t exist or there is no record of that type.

  23. Same-origin Policy special case: Javascript runs with the origin of the page that loaded it.

  24. sanitizing user input

  25. The same-origin policy does not prevent XSS (Cross-site scripting attack)

  26. Two main types of XSS: Stored XSS(using images), Reflected XSS.

  27. XSS prevention: Content-security policy (CSP)

  28. cookie scope: any domain-suffix of URL-hostname, except TLD(top-level domains)

  29. Client side read/write: document.cookie

  30. Cross Site Request Forgery(CSRF): hidden CSRF token, Referer Validation(indicates which URL initiated the request)

  31. Cookies: NAME, domain, path, secure, expires, HttpOnly.

  32. DHCP: discover, offer, request, pack


Courses

604 Words

2019-05-05 12:45 +0800

本文阅读量
本站访客量