Agent: Fix monkey exploitation reporting

This commit is contained in:
Ilija Lazoroski 2022-02-22 19:56:40 +01:00
parent 4dfe0cf7db
commit a0b5ac2330
2 changed files with 5 additions and 5 deletions

View File

@ -56,7 +56,7 @@ def get_exploits_used_on_node(node: dict) -> List[str]:
[
ExploiterDescriptorEnum.get_by_class_name(exploit["exploiter"]).display_name
for exploit in node["exploits"]
if exploit["result"]
if exploit["exploitation_result"]
]
)
)

View File

@ -94,7 +94,7 @@ NODE_DICT = {
"dead": True,
"exploits": [
{
"result": True,
"exploitation_result": True,
"exploiter": "DrupalExploiter",
"info": {
"display_name": "Drupal Server",
@ -109,7 +109,7 @@ NODE_DICT = {
"origin": "MonkeyIsland : 192.168.56.1",
},
{
"result": True,
"exploitation_result": True,
"exploiter": "ElasticGroovyExploiter",
"info": {
"display_name": "Elastic search",
@ -130,8 +130,8 @@ NODE_DICT_DUPLICATE_EXPLOITS = deepcopy(NODE_DICT)
NODE_DICT_DUPLICATE_EXPLOITS["exploits"][1] = NODE_DICT_DUPLICATE_EXPLOITS["exploits"][0]
NODE_DICT_FAILED_EXPLOITS = deepcopy(NODE_DICT)
NODE_DICT_FAILED_EXPLOITS["exploits"][0]["result"] = False
NODE_DICT_FAILED_EXPLOITS["exploits"][1]["result"] = False
NODE_DICT_FAILED_EXPLOITS["exploits"][0]["exploitation_result"] = False
NODE_DICT_FAILED_EXPLOITS["exploits"][1]["exploitation_result"] = False
@pytest.fixture