forked from p15670423/monkey
Agent: Fix monkey exploitation reporting
This commit is contained in:
parent
4dfe0cf7db
commit
a0b5ac2330
|
@ -56,7 +56,7 @@ def get_exploits_used_on_node(node: dict) -> List[str]:
|
||||||
[
|
[
|
||||||
ExploiterDescriptorEnum.get_by_class_name(exploit["exploiter"]).display_name
|
ExploiterDescriptorEnum.get_by_class_name(exploit["exploiter"]).display_name
|
||||||
for exploit in node["exploits"]
|
for exploit in node["exploits"]
|
||||||
if exploit["result"]
|
if exploit["exploitation_result"]
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
|
@ -94,7 +94,7 @@ NODE_DICT = {
|
||||||
"dead": True,
|
"dead": True,
|
||||||
"exploits": [
|
"exploits": [
|
||||||
{
|
{
|
||||||
"result": True,
|
"exploitation_result": True,
|
||||||
"exploiter": "DrupalExploiter",
|
"exploiter": "DrupalExploiter",
|
||||||
"info": {
|
"info": {
|
||||||
"display_name": "Drupal Server",
|
"display_name": "Drupal Server",
|
||||||
|
@ -109,7 +109,7 @@ NODE_DICT = {
|
||||||
"origin": "MonkeyIsland : 192.168.56.1",
|
"origin": "MonkeyIsland : 192.168.56.1",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"result": True,
|
"exploitation_result": True,
|
||||||
"exploiter": "ElasticGroovyExploiter",
|
"exploiter": "ElasticGroovyExploiter",
|
||||||
"info": {
|
"info": {
|
||||||
"display_name": "Elastic search",
|
"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_DUPLICATE_EXPLOITS["exploits"][1] = NODE_DICT_DUPLICATE_EXPLOITS["exploits"][0]
|
||||||
|
|
||||||
NODE_DICT_FAILED_EXPLOITS = deepcopy(NODE_DICT)
|
NODE_DICT_FAILED_EXPLOITS = deepcopy(NODE_DICT)
|
||||||
NODE_DICT_FAILED_EXPLOITS["exploits"][0]["result"] = False
|
NODE_DICT_FAILED_EXPLOITS["exploits"][0]["exploitation_result"] = False
|
||||||
NODE_DICT_FAILED_EXPLOITS["exploits"][1]["result"] = False
|
NODE_DICT_FAILED_EXPLOITS["exploits"][1]["exploitation_result"] = False
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
|
Loading…
Reference in New Issue