Hackerpraktikum SS 202 Philipp Schwarte, Lars Fischer Universität Siegen April 17, 2012 Philipp Schwarte, Lars Fischer 1/18
Organisation wöchentliche Übung mit Vorlesungsanteil alle zwei Wochen neue Aufgaben Abgabe der Aufgaben ist verpflichtender Teil Schein: Ausarbeitung über einen Teilbereich nach Absprache Kurzvortrag darüber in letzter Übung Philipp Schwarte, Lars Fischer 2/18
Introduction Philipp Schwarte Dr. Lars Fischer fischer@wiwi.usi... Studium: Uni Bremen Rechnernetze Betriebssysteme Syntaktische Bilderzeugung Promotion: TU-Darmstadt Verkettbarkeitsmetriken IT-Sicherheit Hackerpraktika IT-Sec Berater Philipp Schwarte, Lars Fischer 3/18
Contents of Lecture (vorläufig) 1. Web 2. Code Injection 3. Network Discovery 4. Network Games 5. Rootkits/Bots 6. Scripten und Coden Philipp Schwarte, Lars Fischer 4/18
Literature Howard, LeBlanc, Viega: 24 deadly sins of software security Gary McGraw: Software Security Information Systems Security Framework (ISSAF) Open Source Testing Security Testing Methodology Manual (OSSTM 3) http://phrack.com https://www.owasp.org The Internet Philipp Schwarte, Lars Fischer 5/18
Werkzeugkiste Shell, Script & Code z.b. Bash, Ruby, Python, Erlang, C Editor (Code, Hex, low level... ) Disassembler (Ida, ndisasm, objdump) nc, nmap, tcpdump, curl, john... Browser-Erweiterungen Frameworks burpsuite, metasploit Backtrack Philipp Schwarte, Lars Fischer 6/18
Overview Lesson 01 Organisation Remember the WWW Philipp Schwarte, Lars Fischer 7/18
Network Stack ISO/OSI: 7. Application 6. Presentation 5. Session 4. Transport 3. Network 2. Data Link 1. Physical Philipp Schwarte, Lars Fischer 8/18
HTTP Request Client-Server GET, POST, PUT, DELETE, OPTIONS,... Dokumente Header GET / l o g i n HTTP/ 1.1 Name : Wert Body Philipp Schwarte, Lars Fischer 9/18
HTTP Response Response Codes (200, 404,... ) Header (z.b. Cookie) HTTP/1.1 200 OK Set Cookie : K e k s s c h a c h t e l <html><body></body></html> Philipp Schwarte, Lars Fischer 10/18
Main Web Follies Missing Output Validation Philipp Schwarte, Lars Fischer 11/18
Main Web Follies Missing Output Validation Cross-Side-Script (XSS) Session-Fixation User-determined Input Cross-Side-Request-Forgery (CSRF) Path Vulnerability Logical Errors Range/Type Errors Code Injection... Philipp Schwarte, Lars Fischer 12/18
Input Validation Which Input is expected? Whitelisting What is the input used for? Typecasting Philipp Schwarte, Lars Fischer 13/18
HTML Hypertext Markup Language brought us links logical markup <html> <head><s c r i p t s r c =./ s c r i p t. j s /></head> <body>some Text </body> </html> Philipp Schwarte, Lars Fischer 14/18
Example: XSS Write script somewhere Executed if displayed by other Philipp Schwarte, Lars Fischer 15/18
Session-Fixation predictable/prepared Session Id attacker fixes Id before Authentication URL-ID special link Hidden-Form Field special Form Philipp Schwarte, Lars Fischer 16/18
Injection Methodology 1. break out (e.g. parantheses) 2. insert commands 3. clean finish (e.g. comment) HTML-Injection Server-Side Code User defined variable close mark, insert stuff, clean up SQL-Injection... Philipp Schwarte, Lars Fischer 17/18
Today s Assignment Email writing Setup Virtual Box Setup VPN-Keys WWW-beginnings Philipp Schwarte, Lars Fischer 18/18