backdooring x11 with class
play

Backdooring X11 with class Matias Katz @matiaskatz - PowerPoint PPT Presentation

Backdooring X11 with class Matias Katz @matiaskatz matias@matiaskatz.com Andsec Security Conference End of November 2015 Buenos Aires, Argentina www.andsec.org An idea back in 1995... Locking a computer using hardware An idea back in


  1. Backdooring X11 with class Matias Katz @matiaskatz matias@matiaskatz.com

  2. Andsec Security Conference End of November 2015 Buenos Aires, Argentina www.andsec.org

  3. An idea back in 1995... Locking a computer using hardware

  4. An idea back in 1995... 2 steps: 1) Find a way to read a device 2) Find a way to lock a computer

  5. An idea back in 1995... Step 1 Filesystem? NO UUID? YES

  6. Reading the device 2 steps: 1) “/dev/disk/by-id/” enrollment 2) Check if present each 0.1s

  7. Locking the computer Step 2 DBUS

  8. Locking the computer DBUS: - IPC software - Apps communication - SW and HW interruptions

  9. Locking the computer DBUS: - Runs with privileges - Speaks directly to the kernel - Available in most X Display Managers

  10. Demo “locker.py”

  11. What else to do - Sound alarm - Email certain data - Power off - Delete private keys - Encrypt certain files - Shred entire disk

  12. And then I thought... Can I unlock a computer using the same method?

  13. Generating a Backdoor

  14. Unlocking a computer 2 steps: 1) Find a way to unlock a computer 2) Trigger the unlock

  15. A good backdoor 2 main features: 1) Leave small traces 2) Have a stealth trigger

  16. Unlocking a computer Unlocking computer leaving small traces: Binaries? NO Rootkits? NO OS features? YES

  17. Unlocking a computer Unlocking computer leaving small traces: DBUS :)

  18. Unlocking a computer Stealth trigger to unlock: - Not checked by AVs - Execution without suspicion - Available in all computers

  19. Unlocking a computer Stealth trigger to unlock: Keystrokes? NO Open port? NO Hardware? YES

  20. Hardware change Stealth hardware trigger: - Respond while locked - OS must not interfere - Cannot be disruptive

  21. Hardware change Network Connection? NO Screen brightness? NO Power input? NO

  22. So?

  23. Audio Jack :)

  24. Playing with audio jack - Mechanic detection - Notifies the OS - Who checks that?

  25. Playing with audio jack 2 steps: 1) Read “/proc/asound/card0/codec#0” 2) Check for changes

  26. Playing with audio jack Demo “jack.py” (Warning: Playing with the audio jack could damage it)

  27. Playing with audio jack Small problem: What if the victim wants to use the headphones?

  28. Playing with audio jack Simple solution: Create a pattern

  29. Playing with audio jack 2 steps: 1) Set checks each 1s, like “01110” 2) Replicate that with the headphones

  30. Unlocking the computer Demo “back2.2.py”

  31. The aftertaste How to mitigate it? - Remove Dbus (nope) - Disable screen lock (ugly but ok) - Switch to a minimal XDM (ok)

  32. The aftertaste Do you have to run it beforehand? YES (that's why it's called a “backdoor” :D)

  33. The aftertaste Can it be persistent? YES (rc.local)

  34. The aftertaste How big is it? 20 lines (dirty) 1 line (nice)

  35. The aftertaste What's so good about it? - NO Opcodes - Undetectable

  36. The aftertaste >>> import dbus >>> >>> import dbus Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named dbus >>>

  37. The aftertaste Can you do it to 'root' ? YES (but...)

  38. The aftertaste Can you do it on Windows ? YES - WinDBus - COM / RPC / DDE

  39. The aftertaste Can you Shellshock it ? HELL YEAH (however..) (Thanks Chino for the idea and Nutrix for the help implementing)

  40. Backdooring X11 with class Matias Katz @matiaskatz matias@matiaskatz.com

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