Skip to content

Commit

Permalink
temp reward fix
Browse files Browse the repository at this point in the history
kasanari committed Mar 1, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent b686213 commit 95503d8
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions malpzsim/wrappers/wrapper.py
Original file line number Diff line number Diff line change
@@ -38,6 +38,26 @@ def __init__(self, **kwargs):
sim.register_attacker(agent_id, 0)
elif agent_class == "defender":
sim.register_defender(agent_id)

# TODO - This is a temporary fix to set the rewards for the nodes in the attack graph

sim.attack_graph.get_node_by_id('Application:0:notPresent').reward = 2
sim.attack_graph.get_node_by_id('Application:0:supplyChainAuditing').reward = 7
sim.attack_graph.get_node_by_id('Application:1:notPresent').reward = 3
sim.attack_graph.get_node_by_id('Application:1:supplyChainAuditing').reward = 7
sim.attack_graph.get_node_by_id('SoftwareVulnerability:2:notPresent').reward = 4
sim.attack_graph.get_node_by_id('Data:3:notPresent').reward = 1
sim.attack_graph.get_node_by_id('Credentials:4:notPhishable').reward = 7
sim.attack_graph.get_node_by_id('Identity:5:notPresent').reward = 3.5
sim.attack_graph.get_node_by_id('ConnectionRule:6:restricted').reward = 4
sim.attack_graph.get_node_by_id('ConnectionRule:6:payloadInspection').reward = 3
sim.attack_graph.get_node_by_id('Application:7:notPresent').reward = 2
sim.attack_graph.get_node_by_id('Application:7:supplyChainAuditing').reward = 7

sim.attack_graph.get_node_by_id('Application:0:fullAccess').reward = 5
sim.attack_graph.get_node_by_id('Application:1:fullAccess').reward = 2
sim.attack_graph.get_node_by_id('Identity:5:assume').reward = 2
sim.attack_graph.get_node_by_id('Application:7:fullAccess').reward = 6

self.sim = sim

0 comments on commit 95503d8

Please sign in to comment.