samedi 27 décembre 2014

Submit form inside iframe (withoud form id)


Hi guys I need to submit a form inside a iframe of a website which I do not own, so I can't change the form code inside there. I know about XSS and I proxyied the website inside my own webapp domain so I can actually change the iframe.


Here you can see the code from the actual page iam iframeing to:



<form action="/infoweb/index.php" method="post">
<input type="hidden" name="csrf" value="b9fff20573bdec83fd8cc4e1d34c6376" />
<table>
<tr>
<td>
Gebruikersnaam:
</td>
<td>
<input class="mooi" autocapitalize="off" autocorrect="off" style="color: #d0d0d0;" type="text" name="user" value="username" onfocus="if (this.value =='username') this.value=''; this.style.color='#000000';" onKeyDown="this.style.color='#000000';">
</td>
</tr>
<tr>
<td>
Wachtwoord:
</td>
<td>
<input class="mooi" style="margin-bottom: 2px; color: #d0d0d0;" type="password" name="paswoord" value="wachtwoord" onfocus="if (this.value =='wachtwoord') this.value=''; this.style.color='#000000';" onKeyDown="this.style.color='#000000';">
</td>
</tr>
<tr>
<td>
Onthouden:
</td>
<td>
<input type="checkbox" name="onthouden" class="mooi" />
</td>
</tr>
<tr>
<td>
<input type="hidden" name="login" value="loginform"> &nbsp;
</td>
<td>
<input type="submit" class="mooi" value="inloggen"><br />
</td>
</tr>
</table>
</form>


And here you can see my code were I'm trying to submit the form.. Please note: I'm new to javascript editing stuff on the page.. Also: I know that the current find by class onloadis not working... But I really have no clue to make it working.



<div class="container">
<div class="row">

<br>
<br>
<br>
<div class="modal-header">
<h3><?php echo 'Welkom' . ' '. $this->session->userdata('username'); ?></h3>

<form id="login" target="frame" method="post" action="http://acr.example.nl/infoweb/index.php">
<input type="hidden" name="user" value="<?php echo $this->session->userdata('username') ?>" />
<input type="hidden" name="paswoord" value="<?php echo $this->session->userdata('password')?>" />
</form>

<iframe src="http://acr.example.nl" width="1000px" height="1000px" name="frame" id="frame" onLoad="window.frames['frame'].class.mooi.submit();" ></iframe>

<script type="text/javascript">
// Submitting the hidden form with login info.
document.getElementById('login').submit();







</script>


</div>
</div>


Hope you guys can help!





Aucun commentaire:

Enregistrer un commentaire