|
|
@ -40,7 +40,7 @@ class EtherThief(DetectionModule): |
|
|
|
swc_id = UNPROTECTED_ETHER_WITHDRAWAL |
|
|
|
swc_id = UNPROTECTED_ETHER_WITHDRAWAL |
|
|
|
description = DESCRIPTION |
|
|
|
description = DESCRIPTION |
|
|
|
entry_point = EntryPoint.CALLBACK |
|
|
|
entry_point = EntryPoint.CALLBACK |
|
|
|
pre_hooks = ["STOP"] |
|
|
|
pre_hooks = ["CALL", "STATICCALL"] |
|
|
|
|
|
|
|
|
|
|
|
def reset_module(self): |
|
|
|
def reset_module(self): |
|
|
|
""" |
|
|
|
""" |
|
|
@ -70,16 +70,16 @@ class EtherThief(DetectionModule): |
|
|
|
""" |
|
|
|
""" |
|
|
|
state = copy(state) |
|
|
|
state = copy(state) |
|
|
|
instruction = state.get_current_instruction() |
|
|
|
instruction = state.get_current_instruction() |
|
|
|
|
|
|
|
to = state.mstate.stack[-2] |
|
|
|
|
|
|
|
|
|
|
|
constraints = copy(state.world_state.constraints) |
|
|
|
constraints = copy(state.world_state.constraints) |
|
|
|
|
|
|
|
|
|
|
|
attacker_address_bitvec = ACTORS.attacker |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
constraints += [ |
|
|
|
constraints += [ |
|
|
|
|
|
|
|
to == ACTORS.attacker, |
|
|
|
UGT( |
|
|
|
UGT( |
|
|
|
state.world_state.balances[attacker_address_bitvec], |
|
|
|
state.world_state.balances[ACTORS.attacker], |
|
|
|
state.world_state.starting_balances[attacker_address_bitvec], |
|
|
|
state.world_state.starting_balances[ACTORS.attacker], |
|
|
|
) |
|
|
|
), |
|
|
|
] |
|
|
|
] |
|
|
|
|
|
|
|
|
|
|
|
potential_issue = PotentialIssue( |
|
|
|
potential_issue = PotentialIssue( |
|
|
|