-
Notifications
You must be signed in to change notification settings - Fork 19
Description
Query GUID
1d9c6ae3-38fc-4089-b5ad-fc3be0fa8eec
Query content
MATCH p=(n:Base)-[r:GenericAll|GenericWrite|WriteOwner|WriteDacl|ForceChangePassword|AllExtendedRights|AddMember|AllowedToDelegate|AllowedToAct|AdminTo|CanPSRemote|CanRDP|ExecuteDCOM|AddSelf|DCSync|ReadLAPSPassword|ReadGMSAPassword|DumpSMSAPassword|AddAllowedToAct|WriteSPN|AddKeyCredentialLink|SyncLAPSPassword|WriteAccountRestrictions|WriteGPLink|ADCSESC1|ADCSESC3|ADCSESC4|ADCSESC6a|ADCSESC6b|ADCSESC9a|ADCSESC9b|ADCSESC10a|ADCSESC10b|ADCSESC13]->(:Base)
WHERE (n:User OR n:Computer)
RETURN p
LIMIT 1000
Issue description
First off - top notch query. Great way to check if RBAC is implemented correctly. Kudos to you guys.
However, if I run the query as is, I get 1000 (due to the Limit in line four) different objects, including groups etc, which made no sense to me. After checking it, there seems to be a typo in there.
When I change the third line to "RETURN n", I get a bunch of users and computers, that either have some sort of execution privileges or outbound object control directly assigned to them. This seems to be the output as intended I assume.
I also included a check for enabled users and computers only, since I usually get too many results otherwise. It's optional however, feel free to remove it if you don't see the need.
So the query that works great for me looks like this:
MATCH p=(n:Base)-[r:GenericAll|GenericWrite|WriteOwner|WriteDacl|ForceChangePassword|AllExtendedRights|AddMember|AllowedToDelegate|AllowedToAct|AdminTo|CanPSRemote|CanRDP|ExecuteDCOM|AddSelf|DCSync|ReadLAPSPassword|ReadGMSAPassword|DumpSMSAPassword|AddAllowedToAct|WriteSPN|AddKeyCredentialLink|SyncLAPSPassword|WriteAccountRestrictions|WriteGPLink|ADCSESC1|ADCSESC3|ADCSESC4|ADCSESC6a|ADCSESC6b|ADCSESC9a|ADCSESC9b|ADCSESC10a|ADCSESC10b|ADCSESC13]->(:Base)
WHERE (n:User OR n:Computer)
AND n.enabled = TRUE
RETURN n
LIMIT 1000
Cheers guys
BloodHound version
latest version
BloodHound DB
default Neo4j