Andy Robbins Profile picture
Jan 20 19 tweets 5 min read
In the upcoming #BloodHound 4.1 release, we are introducing 3 new edges. Let me explain why this is actually more impactful than it may sound: 🧵
Let's say you have a basic graph with 3 nodes all connected to each other (this is called a Strongly Connected Graph). We'll call these nodes 1, 2 and 3:
How many possible paths are there? We can determine that by searching through non-cyclic trees originating from each node. For example, if we start at 1, we can visit 2 then 3, or 3 then 2:
We need to do this for nodes 2 and 3 as well. Then we can count up the total number of paths, which is 6:
Let's make a nice table for ourselves to keep track:
With me so far? Good. Let's add another node to our strongly connected graph, Node 4:
And let's explore the possible paths we can take from Node 1:
Here, there are 6 distinct paths (you can count this easily by counting the nodes in the bottom row). Don't forget we must repeat this for each node, so our total number of paths in this graph becomes 24 (6*4):
Let's keep going by adding Node 5 to the graph:
Here's what it looks like to explore possible paths from just one originating node:
We must repeat this for each node, so the possible number of paths grows to 120:
See the pattern yet? You can calculate the number of possible paths for an SCG of 5 nodes with:

5*4*3*2*1 = 120

This is known as the factorial of 5.

Let's keep going.
If we calculate the factorial (number of distinct paths in a strongly connected graph) for up to 10 nodes, our table looks like this:
How bad can this get? The factorial of 100 is approximately 9.3x10¹⁵⁷.

That number is so big, it's actually larger than the estimated number of particles in the observable universe.
Back to BloodHound. Adding 3 new edge types will in fact introduce an unimaginably high number of new attack paths.

In our DerbyCon talk from 2017, we explained, visually, the impact of adding ACLs into the graph here:
We're adding 3 new edges in 4.1, with several other new types planned for this year. Want to hear about it first? Register for and attend our webinar on February 9th: specterops.zoom.us/webinar/regist…
Correction: [1,3,2,3] should be [1,3,2,4]
[2,3,4] and [2,4,3] should be [2,1,3] and [2,3,1], thanks to @derekmelber for pointing this out!

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Andy Robbins

Andy Robbins Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @_wald0

Jan 1
I’m a firm believer in the (cliche) adage, “Outcomes, not output.” It’s not about the number of lines of code you wrote in 2021, but the impact those lines of code had - the outcomes they created. Here’s 5 small things you can do in 2022 to create big AD security outcomes:
#1: Audit the owners of your domain controller computer objects. Update the owner of each object to the Domain Admins group for that domain.

Time required: up to 1 hour
Potential attack path impact: extremely high.
Risk of breaking something: very low
#2: Use BloodHound to find where Domain Users/Everyone/Auth Users has privileged access, and remove all such instances.

Time required: up to 1 week
Potential attack path impact: extremely high.
Risk of breaking something: low
Read 7 tweets
Dec 21, 2021
🧵In May of 2021, we published our manifesto on a new methodology called Attack Path Management - posts.specterops.io/the-attack-pat….

Enough time has passed now that we are starting to see the outcomes of this methodology, which I'd like to talk to you about:
Strip away the brands, the tools, the people, and everything else, and you are left with the only thing that REALLY matters:

The problem.

The problem that APM seeks to solve is the persistent availability and reliability of attack paths.
Pentesters, red teamers, and real attackers have been abusing attack paths, specifically in Active Directory, for over 20 years. AD attack paths are INSANELY reliable. They can be abused with reliable tools, including legitimate admin tools like Powershell and PsExec.
Read 8 tweets
Dec 21, 2021
There are two very interesting new cmdlets in this release:

Invoke-AzureVMUserDataCommand and Invoke-AzureVMUserDataAgent.

In this thread I'll offer my thoughts on how these can be used for extremely hard-to-detect #Azure c2:
This c2 technique is based on Azure IMDS: docs.microsoft.com/en-us/azure/vi….

This service is accessible to every VM in Azure. As far as I know, there's no reason to ever disable this service for a VM, so it should always be accessible to every Azure VM.
IMDS's REST API is available to each VM at the non-routable, local IP of 169.254.169.254.

In April of this year, Microsoft introduced an IMDS feature called "User Data": azure.microsoft.com/en-us/updates/…
Read 9 tweets
Dec 20, 2021
With 2021 almost over, what were some of your favorite blogs, talks, or people you started following this year? I'll go first:
My favorite overall blog post: "Defenders Mindset" by @JohnLaTwC.

This post is packed with profound insights, from the perspective of someone with decades of deep security experience:
My favorite new follow this year: @inversecos.

Lina is writing the technical content our industry needs: deeply technical, clearly explained, and appropriate for both offense and defense audiences. See her writings here: inversecos.com
Read 7 tweets
Dec 6, 2021
Let's talk about tiered administration in AzureAD:

- What it starts with
- How it can be violated
- What you can do about that

In 10 tweets or less. Go:
1/ There are three default admin roles that belong to Tier Zero in AzureAD:

Global Admin
Priv. Role Admin
Priv. Auth Admin

Everything IN tier zero is tier zero. Everything ELSE is not tier zero has has no business controlling anything IN tier zero.
2/ These admin roles aren't of much use if you don't grant them to anyone. Let's grant a service principal the Global Admin role:
Read 11 tweets
Dec 1, 2021
Thread:

API permissions in #Azure can be configured such that attack paths leading to Global Admin emerge. Prior work and links to our work below:
Blog: Azure Privilege Escalation via Azure API Permissions Abuse posts.specterops.io/azure-privileg…
Read 7 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(