forked from p15670423/monkey
UT: Remove unused fixtures and data
This commit is contained in:
parent
49fbb6a128
commit
4e6aac2153
|
@ -1,113 +0,0 @@
|
||||||
{
|
|
||||||
"basic": {
|
|
||||||
"exploiters": {
|
|
||||||
"exploiter_classes": [
|
|
||||||
"SmbExploiter",
|
|
||||||
"WmiExploiter",
|
|
||||||
"SSHExploiter",
|
|
||||||
"HadoopExploiter",
|
|
||||||
"MSSQLExploiter"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"credentials": {
|
|
||||||
"exploit_user_list": [
|
|
||||||
"Administrator",
|
|
||||||
"root",
|
|
||||||
"user"
|
|
||||||
],
|
|
||||||
"exploit_password_list": [
|
|
||||||
"root",
|
|
||||||
"123456",
|
|
||||||
"password",
|
|
||||||
"123456789",
|
|
||||||
"qwerty",
|
|
||||||
"111111",
|
|
||||||
"iloveyou"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"basic_network": {
|
|
||||||
"scope": {
|
|
||||||
"blocked_ips": [],
|
|
||||||
"local_network_scan": true,
|
|
||||||
"depth": 2,
|
|
||||||
"subnet_scan_list": []
|
|
||||||
},
|
|
||||||
"network_analysis": {
|
|
||||||
"inaccessible_subnets": []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"internal": {
|
|
||||||
"general": {
|
|
||||||
"keep_tunnel_open_time": 60
|
|
||||||
},
|
|
||||||
"network": {
|
|
||||||
"tcp_scanner": {
|
|
||||||
"HTTP_PORTS": [
|
|
||||||
80,
|
|
||||||
8080,
|
|
||||||
443,
|
|
||||||
8008,
|
|
||||||
7001,
|
|
||||||
9200
|
|
||||||
],
|
|
||||||
"tcp_target_ports": [
|
|
||||||
22,
|
|
||||||
2222,
|
|
||||||
445,
|
|
||||||
135,
|
|
||||||
3389,
|
|
||||||
80,
|
|
||||||
8080,
|
|
||||||
443,
|
|
||||||
8008,
|
|
||||||
3306,
|
|
||||||
7001,
|
|
||||||
8088
|
|
||||||
],
|
|
||||||
"tcp_scan_timeout": 3000
|
|
||||||
},
|
|
||||||
"ping_scanner": {
|
|
||||||
"ping_scan_timeout": 1000
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"classes": {
|
|
||||||
"finger_classes": [
|
|
||||||
"SMBFinger",
|
|
||||||
"SSHFinger",
|
|
||||||
"HTTPFinger",
|
|
||||||
"MSSQLFinger",
|
|
||||||
"ElasticFinger"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"exploits": {
|
|
||||||
"exploit_lm_hash_list": [],
|
|
||||||
"exploit_ntlm_hash_list": [],
|
|
||||||
"exploit_ssh_keys": []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"monkey": {
|
|
||||||
"post_breach": {
|
|
||||||
"custom_pba_linux_cmd": "",
|
|
||||||
"custom_pba_windows_cmd": "",
|
|
||||||
"pba_windows_filename": "",
|
|
||||||
"pba_linux_filename": "",
|
|
||||||
"post_breach_actions": [
|
|
||||||
"communicateasbackdooruser",
|
|
||||||
"modifyshellstartupfiles",
|
|
||||||
"hiddenfiles",
|
|
||||||
"trapcommand",
|
|
||||||
"changesetuidsetgid",
|
|
||||||
"schedulejobs",
|
|
||||||
"timestomping",
|
|
||||||
"accountdiscovery"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"system_info": {
|
|
||||||
"system_info_collector_classes": [
|
|
||||||
"MimikatzCollector",
|
|
||||||
"SSHCollector"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,28 +1,14 @@
|
||||||
# Without these imports pytests can't use fixtures,
|
|
||||||
# because they are not found
|
|
||||||
import json
|
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from tests.unit_tests.monkey_island.cc.mongomock_fixtures import * # noqa: F401,F403,E402
|
from tests.unit_tests.monkey_island.cc.mongomock_fixtures import * # noqa: F401,F403,E402
|
||||||
|
|
||||||
from monkey_island.cc.server_utils.encryption import unlock_datastore_encryptor
|
from monkey_island.cc.server_utils.encryption import unlock_datastore_encryptor
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
|
||||||
def monkey_config(load_monkey_config):
|
|
||||||
return load_monkey_config("monkey_config_standard.json")
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def flat_monkey_config(load_monkey_config):
|
def flat_monkey_config(load_monkey_config):
|
||||||
return load_monkey_config("flat_config.json")
|
return load_monkey_config("flat_config.json")
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
|
||||||
def monkey_config_json(monkey_config):
|
|
||||||
return json.dumps(monkey_config)
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def uses_encryptor(data_for_tests_dir):
|
def uses_encryptor(data_for_tests_dir):
|
||||||
secret = "m0nk3y_u53r:3cr3t_p455w0rd"
|
secret = "m0nk3y_u53r:3cr3t_p455w0rd"
|
||||||
|
|
Loading…
Reference in New Issue