Skip to content

Commit

Permalink
Add AffectsGeneric definition option
Browse files Browse the repository at this point in the history
  • Loading branch information
beatro0t committed Jul 25, 2021
1 parent eb6f822 commit 6c09fcc
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/aws/attacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -706,15 +706,16 @@ def _pattern_cypher(self, name, definition,
}

options = {
"AffectsGeneric": False,
"CreateAction": False,
"Transitive": True,
** dict(definition["Options"]
if "Options" in definition
else {}),
"Admin": bool(True
if "Grants" in attack
and attack["Grants"] == "Admin"
else False),
** dict(definition["Options"]
if "Options" in definition
else {}),
}

def cypher_resolve_commands(history=False):
Expand Down Expand Up @@ -1099,7 +1100,7 @@ def cypher_inject():
# Assert: cypher includes source, targets, options, grants, admin; where options, targets
# and grants comprise of (destination, commands) tuples.

if options["CreateAction"]:
if options["AffectsGeneric"] or options["CreateAction"]:

# Reduce result set to Generics only when a CreateAction has been specified.

Expand Down

0 comments on commit 6c09fcc

Please sign in to comment.