information leakage
play

Information Leakage CS 161: Computer Security Prof. Vern Paxson - PowerPoint PPT Presentation

Information Leakage CS 161: Computer Security Prof. Vern Paxson TAs: Jethro Beekman, Mobin Javed, Antonio Lupher, Paul Pearce & Matthias Vallentin http://inst.eecs.berkeley.edu/~cs161/ April 25, 2013 Announcements / Goals HKN


  1. Information Leakage CS 161: Computer Security Prof. Vern Paxson TAs: Jethro Beekman, Mobin Javed, Antonio Lupher, Paul Pearce & Matthias Vallentin http://inst.eecs.berkeley.edu/~cs161/ April 25, 2013

  2. Announcements / Goals • HKN surveys at the end of next Thursday’s lecture (May 2nd) • Next Thursday’s lecture will be course review: flag what you’d liked covered! • Today’s topic: information leakage – Sneaky ways of communicating – Sneaky ways of extracting information – Privacy: ways in which sites track information about users

  3. Covert Channels • Communication between two cooperating parties that uses a hidden (secret) channel • Goal: evade inspection by a reference monitor (“warden”) – Warden doesn’t realize communication is possible • Main requirement is agreement between sender and receiver (established in advance) • Example: suppose (unprivileged) process A wants to send 128 bits of secret data to (unprivileged) process B … – But can’t use pipes, sockets, signals, or shared memory; and can only read files, can’t write them

  4. Covert Channels, con’t • Method #1: A syslog ’s data, B reads via /var/log/… • Method #2: select 128 files in advance. A opens for read only those corresponding to 1-bit’s in secret. – B recovers bit values by inspecting access times on files • Method #3: divide A ’s running time up into 128 slots. A either runs CPU-bound - or idle - in a slot depending on corresponding bit in the secret. B monitors A ’s CPU usage in each slot. • Method #4: Suppose A can run 128 times. Each time it either exits after 2 seconds (0 bit) or after 5 seconds (1 bit). • Method #5: … – There are zillions of Method #5’s!

  5. Covert Channels, con’t • Defenses? • #1 challenge is identifying the channels – Can then prevent sender or receiver from accessing them • Some mechanisms can be very hard to completely remove – E.g., duration of program execution • Fundamental issue is the covert channel’s capacity – Bits (or bit-rate) that adversary can obtain using it • Crucial for defenders to consider their threat model – (also true for Side Channels as we’ll discuss next) • Usual assumption is that Attacker Wins (can’t effectively stop communication, esp. if very low rate )

  6. Side Channels • Inferring information meant to be hidden / private by exploiting how system is structured – Note: unlike for steganography & covert channels, here we do not assume a cooperating sender / receiver • Can be difficult to recognize because often system builders “abstract away” seemingly irrelevant elements of system structure • Side channels can arise from physical structure …

  7. Side Channels • Inferring information meant to be hidden / private by exploiting how system is structured – Note: unlike for steganography & covert channels, here we do not assume a cooperating sender / receiver • Can be difficult to recognize because often system builders “abstract away” seemingly irrelevant elements of system structure • Side channel can arise from physical structure … – … or higher-layer abstractions

  8. /* ¡Returns ¡true ¡if ¡the ¡password ¡from ¡the ¡* ¡user, ¡'p', ¡matches ¡the ¡correct ¡master ¡* ¡password. ¡*/ Attacker knows code, bool ¡check_password(char ¡*p) but not this value { static ¡char ¡*master_pw ¡= ¡"T0p$eCRET"; int ¡i; for(i=0; ¡p[i] ¡&& ¡master_pw[i]; ¡++i) if(p[i] ¡!= ¡master_pw[i]) return ¡FALSE; /* ¡Ensure ¡both ¡strings ¡are ¡same ¡len. ¡*/ return ¡p[i] ¡== ¡master_pw[i]; }

  9. Inferring Password via Side Channel • Suppose the attacker’s code can call check_password many times (but not billions/trillions) – But attacker can’t breakpoint or inspect the code • How could the attacker infer the master password using side channel information? • Consider layout of p in memory: ... if(check_password(p)) wildGUe$s BINGO(); ...

  10. Spread p across different memory pages: wildGUe$s Arrange for this page to be paged out If master password doesn’t start with ‘w’, then loop exits on first iteration ( i=0 ): for(i=0; ¡p[i] ¡&& ¡master_pw[i]; ¡++i) if(p[i] ¡!= ¡master_pw[i]) return ¡FALSE; If it does start with ‘w’, then loop proceeds to next iteration, generating a page fault that the caller can observe

  11. T0p$eCRET ? No page Ajunk.... fault No page Bjunk.... fault … Page Tjunk.... fault! No page TAunk.... fault No page TBunk.... fault … Page T0unk.... fault! Fix? No page T0Ank.... fault …

  12. bool ¡check_password2(char ¡*p) { static ¡char ¡*master_pw ¡= ¡"T0p$eCRET”; int ¡i; bool ¡is_correct ¡= ¡TRUE; for(i=0; ¡p[i] ¡&& ¡master_pw[i]; ¡++i) if(p[i] ¡!= ¡master_pw[i]) is_correct ¡= ¡FALSE; ¡ if(p[i] ¡!= ¡master_pw[i]) is_correct ¡= ¡FALSE; return ¡is_correct; } Note: still leaks length of master password

  13. Exploiting Side Channels For Stealth Scanning • Can attacker using system A scan victim V ’s system to see what services V runs … • … without V being able to learn A ’s IP address? • Seems impossible: how can A receive the results of probes A sends to V , unless probes include A ’s IP address for V ’s replies?

  14. IP Header Side Channel 4-bit 8-bit 4-bit 16-bit Total Length (Bytes) Header Type of Service Version Length (TOS) 3-bit 16-bit Identification 13-bit Fragment Offset Flags 8-bit Time to 8-bit Protocol 16-bit Header Checksum Live (TTL) ID field is supposed to be 32-bit Source IP Address unique per IP packet. 32-bit Destination IP Address One easy way to Payload do this: increment it each time system sends a new packet.

  15. SYN-ACK

  16. SYN-ACK

  17. SYN-ACK

  18. SYN-ACK

  19. Spoofed SYN-ACK

  20. SYN-ACK

  21. SYN-ACK

  22. Upon receiving RST, Patsy ignores it and does nothing , per TCP spec. SYN-ACK

  23. SYN-ACK

  24. SYN-ACK

  25. SYN-ACK

  26. SYN-ACK Spoofed

  27. SYN-ACK

  28. SYN-ACK

  29. UI Side Channel Snooping • Scenario: Ann the Attacker works in a building across the street from Victor the Victim. Late one night Ann can see Victor hard at work in his office, but can’t see his CRT display, just the glow of it on his face. • Can Ann still somehow snoop on what Victor’s display is showing?

  30. CRT display is made up of an array of phosphor pixels 640x480 (say)

  31. Electron gun sweeps across row of pixels, illuminating each that should be lit one after the other

  32. When done with row, proceeds to next. When done with screen, starts over.

  33. Thus, if image isn’t changing, each pixel is periodically illuminated at its own unique time

  34. Illumination is actually short-lived (100s of nsec).

  35. So if Ann can synchronize a high-precision clock with when the beam starts up here …

  36. Then by looking for changes in light level (flicker) matched with high-precision timing, she can tell whether say this pixel is on or off …

  37. … or for that matter, the values of all of the pixels

  38. Photomultiplier + high-precision timing + deconvolution to remove noise

  39. Information Leakage via Inducing Faults • Suppose there’s a sealed black box that performs RSA decryption: – X → → Y Y = X d mod N (N = pq) • Attacker gets access to box, can play with it freely – Knows N …. but not d, p or q – Can repeatedly feed it X’s, observe corresponding Y’s • Suppose for efficiency box computes X d mod N using Chinese Remainder Theorem (CRT) – Number theory trick that’s faster than repeated exponentiation – (Note, this is a common performance approach)

  40. Inducing Faults, con’t • CRT works by first computing: – y 1 = (X mod p) d mod (p-1) – y 2 = (X mod q) d mod (q-1) • Given that, CRT provides a cheap function f so that for Y = f(y 1 , y 2 ) we have: – Y = y 1 mod p; Y = y 2 mod q • … and that gives us our goal, Y = X d mod N • Suppose now attacker repeatedly feeds the same X into the box, observing resulting Y … – … but can induce the box to sometimes glitch (causes one computation step to work incorrectly )

  41. Inducing Faults, con’t • Assume glitch induces a random fault • Most likely it occurs during computation of either y 1 = (X mod p) d mod (p-1) or y 2 = (X mod q) d mod (q-1) • Attacker tell glitch occurs since will observe box produce Y' != Y • Suppose glitch occurs when computing y 1 … • Then Y' is incorrect mod p … – … but correct mod q (since y 2 okay)

  42. Inducing Faults, con’t • Attacker has Y' != Y mod p, Y' = Y mod q – Y-Y' is a multiple of q but not p • Attacker computes Z = GCD(Y-Y', N) (fast!) • Z = ? – Well, must be either 1, p, q, or N (since N = pq) – But Y-Y' is a multiple of q, so it’s either q or N – But Y-Y' is not a multiple of p, so it’s q • Whoops! – Attacker just factored N! • Fix? – Box could check that Y e mod N = X

  43. Information Leakage: Tracking Web Usage

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend