From 25a8bdd4978173cf11a6fef2b9a6ad0e3d9d2cf9 Mon Sep 17 00:00:00 2001 From: mgeeky Date: Fri, 15 Apr 2022 14:29:41 +0200 Subject: [PATCH] updates --- red-teaming/bloodhound/getOutboundControlled.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/red-teaming/bloodhound/getOutboundControlled.py b/red-teaming/bloodhound/getOutboundControlled.py index f154950..e98b237 100644 --- a/red-teaming/bloodhound/getOutboundControlled.py +++ b/red-teaming/bloodhound/getOutboundControlled.py @@ -35,19 +35,19 @@ config = { # =========================================== # -nodesToCheckPerStep = 5 +nodesToCheckPerStep = 10 columns1 = 'name,outbound_first_degree' -columns2 = 'name,outbound_first_degree,outbount_group_delegated' +columns2 = 'name,outbound_first_degree,outbound_group_delegated' query_first_degree_outbound = ''' -MATCH p=(u)-[r1]->(n) WHERE r1.isacl=true AND (CONDITION) +MATCH p=(u)-[r1]->(n) WHERE r1.isacl=true AND (__CONDITION__) WITH u.name as name, COUNT(DISTINCT(n)) as controlled RETURN name, controlled ''' query_group_delegated_outbound = ''' -MATCH p=(u)-[r1:MemberOf*1..]->(g:Group)-[r2]->(n) WHERE r2.isacl=true AND (CONDITION) +MATCH p=(u)-[r1:MemberOf*1..]->(g:Group)-[r2]->(n) WHERE r2.isacl=true AND (__CONDITION__) WITH u.name as name, COUNT(DISTINCT(n)) as controlled RETURN name, controlled ''' @@ -80,7 +80,7 @@ def checkNodes(tx, nodes): } # first-degree - query = query_first_degree_outbound.replace('CONDITION', condition).strip().replace('\t', ' ').replace('\n', ' ') + query = query_first_degree_outbound.replace('__CONDITION__', condition).strip().replace('\t', ' ').replace('\n', ' ') result1 = list(tx.run(query)) for result in result1: @@ -88,7 +88,7 @@ def checkNodes(tx, nodes): if config['include_group_delegated']: # group delegated - query = query_group_delegated_outbound.replace('CONDITION', condition).strip().replace('\t', ' ').replace('\n', ' ') + query = query_group_delegated_outbound.replace('__CONDITION__', condition).strip().replace('\t', ' ').replace('\n', ' ') result2 = list(tx.run(query)) for result in result2: