Skip to content

Commit

Permalink
Add logic to exclude GMSA/MSA from Kerberoastable (#947)
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenHinck authored Nov 8, 2024
1 parent 9caec51 commit bcfe50d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/javascript/bh-shared-ui/src/commonSearches.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,11 @@ export const CommonSearches: CommonSearchType[] = [
},
{
description: 'All Kerberoastable users',
cypher: `MATCH (u:User)\nWHERE u.hasspn=true\nAND u.enabled = true\nAND NOT u.objectid ENDS WITH '-502'\nRETURN u\nLIMIT 100`,
cypher: `MATCH (u:User)\nWHERE u.hasspn=true\nAND u.enabled = true\nAND NOT u.objectid ENDS WITH '-502'\nAND NOT coalesce(u.gmsa, ' ') = true\nAND NOT coalesce(u.msa, ' ') = true\nRETURN u\nLIMIT 100`,
},
{
description: 'Kerberoastable users with most privileges',
cypher: `MATCH (u:User)\nOPTIONAL MATCH (u)-[:AdminTo]->(c1:Computer)\nOPTIONAL MATCH (u)-[:MemberOf*1..]->(:Group)-[:AdminTo]->(c2:Computer)\nWHERE u.hasspn=true\nAND u.enabled = true\nAND NOT u.objectid ENDS WITH '-502'\nWITH u,COLLECT(c1) + COLLECT(c2) AS tempVar\nUNWIND tempVar AS comps\nRETURN u\nLIMIT 100`,
cypher: `MATCH (u:User)\nOPTIONAL MATCH (u)-[:AdminTo]->(c1:Computer)\nOPTIONAL MATCH (u)-[:MemberOf*1..]->(:Group)-[:AdminTo]->(c2:Computer)\nWHERE u.hasspn=true\nAND u.enabled = true\nAND NOT u.objectid ENDS WITH '-502'\nAND NOT coalesce(u.gmsa, ' ') = true\nAND NOT coalesce(u.msa, ' ') = true\nWITH u,COLLECT(c1) + COLLECT(c2) AS tempVar\nUNWIND tempVar AS comps\nRETURN u\nLIMIT 100`,
},
{
description: 'AS-REP Roastable users (DontReqPreAuth)',
Expand Down

0 comments on commit bcfe50d

Please sign in to comment.