29. Dezember 2007

24C3: From Ring 0 to UID 0

Category: CCC,Hacking — Christian @ 23:44

Ich habe mir unter diesem Titel zwar etwas anderes vorgestellt aber insgesamt war ich von den beiden Italienern positiv überrascht.

Insbesondere der erste Teil von Twix war richtig gut. Er hat eine Möglichkeit gefunden in Solaris 8, 9 und 10 verlässlich Kernel-Sicherheitslücken mit Hilfe von Exploits auszunutzen. Die Idee von ihm basiert darauf, 80 Byte mit psargs in die vom Kernel verwaltete Prozesstabelle zu schleusen, die im Gegensatz zum Stack ausführbar ist. Damit lassen sich etwa 19 Befehle, durch Chaining mit mehreren Prozessen sogar komplexere Exploits ausführen. Seine Methode funktioniert grundsätzlich zuverlässig mit allen Kernelexploits die den Stack nicht verändern, andernfalls muss man den Stackzustand manuell wieder herstellen, damit der Kernel nicht abstürzt.

Im zweiten Teil hat sgrakkyu sich mit Windows Race Conditions beschäftigt, insbesondere Kernel Races. Ein Thema sind Programme wie Windows Firewalls oder Virenscanner die sich mittels Kernel Space Hooking in das System einklinken. Das ist jedoch ein fehlerhaftes Design, da eine TOCTOU-Race Condition vorliegt.

Zu einem Zeitpunkt A findet der Hook statt und der Virenscanner prüft die übergebenen Daten. Zu einem späteren Zeitpunkt B findet der Rücksprung auf die echte API statt und die Windows-Funktion wird ausgeführt. Allerdings ist es unter bestimmten Umständen möglich, zwischen A und B die untersuchten Daten zu verändern.

Der Vortrag war sehr sehr technisch, ich habe vermutlich höchstens die Hälfte verstanden. Es lohnt sich jedoch, in den Phrack-Artikel der beiden reinzukucken. Einer der längsten die ich je gesehen habe. In dieser Qualität und auf diesem Niveau waren bisher nur die beiden Vorträge zum Barcode-Hacking und zu Mifare.

2 Comments

  1. Translation for Twix:

    I have expected something different with this title but in summary I as positively surprised from the two guys from Italy.

    The first part from Twix was extraordinary good. He found a way in Solaris 8, 9 and 10 to reliable exploit kernel vulnerabilities. His idea is based on writing some 80 bytes with psargs into the kernel maintained process table. This table is in contrast to the stack executable. With this method one can execute about 19 commands, with chaining through several processes even more complex exploits. His idea works very reliable with all kernel exploits that don’t need to modify the stack. If the stack is modified, the exploit has to reconstruct the stack to avoid a kernel crash.

    The second part from sgrakkyu was about Windows race conditions, in particular kernel races. One issue are programs like Windows firewalls or Antivirus which access the system by kernel space hooking. According to sgrakkyu, this is a bad design decision because one gets a TOCTOU (time of check, time of use) race condition.

    At a point of time A, the hook is executed and the Antivirus verifies the presented file. At a later moment B, the return call to the original API happens and the original Windows function is executed. In special cases however, it’s possible that the verified data has changed between A and B.

    The presentation had a lot of technical details and I probably understood only half of it. It’s quite helpful to look into their Phrack article to understand more of it. This is on of the longest articels I’ve ever seen. This quality and this technologically advanced level was only seen in the two presentations „Toying with Barcodes“ and „Mifare“.

    Comment by Christian — 3. Januar 2008 @ 22:17

  2. Kommentare gesperrt wegen Spam

    Comment by Christian — 4. Oktober 2008 @ 21:09

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.