Click here to Skip to main content
16,022,238 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 22-Jul-24 5:55am
v2
Comments
Dave Kreskowiak 21-Jul-24 12:36pm    
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 23-Jul-24 8:47am    
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