password
status
date
icon
category
tags
slug
summary
0x00 信息搜集
autorecon 一把梭
0x01 port-445
看到 445 跑了一波 smb 漏洞,啥都没跑出来。
0x02 port-80
![notion image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F9dbe5948-8639-4543-9668-cc3e90c9e513%2FUntitled.png?table=block&id=831e4e8d-9281-420d-a4aa-c0e7109b9b0f)
80有个搜索框,固定跳转到 error 界面。暴露了一波版本信息。
![notion image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F561c3a9e-a774-40e3-bbac-fff1ac1cf0b8%2FUntitled.png?table=block&id=1e5f0691-c318-41c7-a4dd-1823cab196be)
爆破目录也没什么收获,实在没办法了可以回来试试爆破参数。
0x03 port-50000
![notion image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Feddd76ae-f647-4cc9-900d-020114e63073%2FUntitled.png?table=block&id=4d966ea8-661b-4aa9-940f-03bc448cd876)
爆破出来一个目录,里面有 jenkins。
这样看 80 端口的标题应该是对路径的提示?还好字典里有这个奇怪的路径,不然真不好联想到。
![notion image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F74d08a2a-96a7-4eda-9389-c6fa06c1b18d%2FUntitled.png?table=block&id=8ff61685-05f7-46b2-a9be-6a9954560869)
从右下角可以得知版本为 2.87
![notion image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fe4b44992-c9b3-45b0-8aa0-c258cbb878f2%2FUntitled.png?table=block&id=953a0f1b-c279-4e05-adbc-1fa6c0d3ba31)
试下jenkins未授权执行命令的 攻击方式,可以正常执行。
println "whoami".execute().text
![notion image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fd2023d5d-8848-4761-958f-0b37789f4375%2FUntitled.png?table=block&id=3035c0f6-ec4a-43d4-94eb-fd0df8f1bbd2)
可以执行 powershell 命令,那就反弹个 shell 出来好了
![notion image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fa60671a9-4d6a-42b3-91ca-e946574bfb5f%2FUntitled.png?table=block&id=0c41710b-15da-414a-8ee2-ac7891318f4c)
在线生成个 powershell 反弹命令
![notion image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F4e81c5e9-713f-49d0-82d7-eee2ca4a4283%2FUntitled.png?table=block&id=7844b5e1-0f54-4cc0-8aef-0701e14137f8)
虽然在 Administrator 目录下,但该账号并没有访问其他管理员目录的权限。
0x04 提权-SweetPotato
首先看下特殊权限
whoami /priv
有
SeImpersonatePrivilege
权限,可以使用SweetPotato提权。SweetPotato
uknowsec • Updated Nov 29, 2023
我这里还下载了一个 nc.exe 进行反弹shell,用msf生成或者调用powershell反弹应该也可以。
![notion image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fd28ce176-2d19-44d1-8d0d-44da436f72c1%2FUntitled.png?table=block&id=69f0431c-a664-4c57-b575-05ad5b527cba)
![notion image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F272113bd-2cf3-4b6f-8f01-a7e105624f85%2FUntitled.png?table=block&id=819e5fb6-fa58-4d98-a04a-d7c6fdd9f0e4)
不过在管理员桌面,我们会看到一句
![notion image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fbd074dc0-fccb-4658-b8d6-2d5e6f392f18%2FUntitled.png?table=block&id=8692c33e-cd47-4882-bd03-614febbc9492)
使用
dir /R
可以看到隐藏的 root.txt,隐藏方法为NTFS交换数据流写入文件。more < hm.txt:root.txt
0x04 提权-漏洞提权
使用提权辅助
可知系统存在CVE-2021-1732等漏洞进行提权
0x05 提权-keeppass
粗略翻了下 kohsuke 用户的文件夹(也可以用 dir /s 如果你不嫌弃结果太多的话) 发现了 keepass 的数据库文件
![notion image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Ffe364a64-2e37-40c5-9a96-f77801ad6575%2FUntitled.png?table=block&id=79f39fc1-5eb7-4271-a3cb-6198630b0968)
传输到本地,有三种传输方法
- 用 nc 传输
- 用 smb 传输
- 复制到 web 目录后下载
推荐使用 smb 传输,不过我之前已经使用过 nc 了,这里就试试 nc 传输
nc 传输就是坑,传输完了也不会自动停,得手动断开。
![notion image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fcd341b86-18ce-4aac-a747-9c0b13ed3323%2FUntitled.png?table=block&id=6ddccb4f-7436-45a4-aca4-9e2a8bbaef0a)
很快就跑出来了,知道了 keepass 的密码,我们可以安装一个 keepass 来打开数据库,也可以选择使用在线版
![notion image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fd69e8192-e204-489d-bed4-df52605c567e%2FUntitled.png?table=block&id=b9e88707-7eeb-4a8a-a72d-5e4f6a0c05ed)
很坑的是这里面的密码全部都不对
但是他还给了一份hash,windows hash由 LM Hash 和 NTLM Hash 构成,前面的LM Hash解出来是空,后面的解不出来。
LM Hash全名为“LAN Manager Hash”,其本质是DES加密,尽管加密强度不佳,但是为了保证系统的兼容性,Windows从未移除过该加密,只是将LM Hash禁用了(从Windows Vista和Windows Server 2008版本开始,Windows操作系统默认禁用LM Hash),LM Hash明文密码被限制在14位以内,超过后和禁用后都会为空,所以抓取的LM Hash通常为"aad3b435b51404eeaad3b435b51404ee"。
尝试了下,HASH传递攻击可行。
- 作者:fatekey
- 链接:https://blog.fatekey.icu/article/Jeeves
- 声明:本文采用 CC BY-NC-SA 4.0 许可协议,转载请注明出处。