Username: 
Password: 
Restrict session to IP 
Questions  |  score: 3  |  3.45 4.88 4.07 |  Solved By 1108 People  |  120734 views  |  since Maaliskuu 23, 2009 - 23:26:12

htmlspecialchars (Exploit, PHP, XSS)

Tehtäväsi...
On hyödyntää tätä koodi riviä, joka on altis XSS:lle:
GeSHi`ed PHP code for htmlspecialchars.php
1
echo "<a href='http://".htmlspecialchars(Common::getPost('input'))."'>Exploit Me</a>";

Common::getPost vain hakee merkkijonon $_POST muuttujat, jotka koskevat stripslashes(), siinä tapauksessa, että magic_quotes_gpc() ovat mahdollistettu.
Voit ohittaa Common::getPost kokonaan, korvaat $_POST['input'], Olettaen että magic_quotes_gpc() on estetty.

Syötelaatikon alla on koodin syöte, testataksesi hyökkäyksiäsi.
Sinä kuitenkin epäonnistut jokatapauksessa, koska käytin htmlspecialchars() estääkseni XSS:n.

Gizmore - March, 23th 2009
Input box
Input:
Your output
Here is the output of your input:
Use the form above, to exploit the link.
Click me

Your solution is the same line of code, but with an easy fix for it.



© 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023 ja 2024 by Gizmore ja Kender