forked from p15670423/monkey
Merge pull request #1585 from guardicore/1537-delete-on-cleanup
1537 delete on cleanup
This commit is contained in:
commit
5f4a762cad
|
@ -19,6 +19,7 @@ Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||||
- "Kill file" option in the config. #1536
|
- "Kill file" option in the config. #1536
|
||||||
- Netstat collector, because network connection information wasn't used anywhere. #1535
|
- Netstat collector, because network connection information wasn't used anywhere. #1535
|
||||||
- Checkbox to disable/enable sending log to server. #1537
|
- Checkbox to disable/enable sending log to server. #1537
|
||||||
|
- Checkbox for self deleting a monkey agent on cleanup. #1537
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- A bug in network map page that caused delay of telemetry log loading. #1545
|
- A bug in network map page that caused delay of telemetry log loading. #1545
|
||||||
|
|
|
@ -101,9 +101,6 @@ class Configuration(object):
|
||||||
# sets whether or not the monkey is alive. if false will stop scanning and exploiting
|
# sets whether or not the monkey is alive. if false will stop scanning and exploiting
|
||||||
alive = True
|
alive = True
|
||||||
|
|
||||||
# sets whether or not to self delete the monkey executable when stopped
|
|
||||||
self_delete_in_cleanup = False
|
|
||||||
|
|
||||||
# string of the mutex name for single instance
|
# string of the mutex name for single instance
|
||||||
singleton_mutex_name = "{2384ec59-0df8-4ab9-918c-843740924a28}"
|
singleton_mutex_name = "{2384ec59-0df8-4ab9-918c-843740924a28}"
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,6 @@
|
||||||
"smb_service_name": "InfectionMonkey",
|
"smb_service_name": "InfectionMonkey",
|
||||||
"retry_failed_explotation": true,
|
"retry_failed_explotation": true,
|
||||||
"self_delete_in_cleanup": true,
|
"self_delete_in_cleanup": true,
|
||||||
"serialize_config": false,
|
|
||||||
"singleton_mutex_name": "{2384ec59-0df8-4ab9-918c-843740924a28}",
|
"singleton_mutex_name": "{2384ec59-0df8-4ab9-918c-843740924a28}",
|
||||||
"skip_exploit_if_file_exist": false,
|
"skip_exploit_if_file_exist": false,
|
||||||
"exploit_user_list": [],
|
"exploit_user_list": [],
|
||||||
|
|
|
@ -343,7 +343,7 @@ class InfectionMonkey(object):
|
||||||
status = ScanStatus.USED if remove_monkey_dir() else ScanStatus.SCANNED
|
status = ScanStatus.USED if remove_monkey_dir() else ScanStatus.SCANNED
|
||||||
T1107Telem(status, get_monkey_dir_path()).send()
|
T1107Telem(status, get_monkey_dir_path()).send()
|
||||||
|
|
||||||
if WormConfiguration.self_delete_in_cleanup and -1 == sys.executable.find("python"):
|
if -1 == sys.executable.find("python"):
|
||||||
try:
|
try:
|
||||||
status = None
|
status = None
|
||||||
if "win32" == sys.platform:
|
if "win32" == sys.platform:
|
||||||
|
|
|
@ -60,12 +60,6 @@ INTERNAL = {
|
||||||
"monkey propagating to "
|
"monkey propagating to "
|
||||||
"a high number of machines",
|
"a high number of machines",
|
||||||
},
|
},
|
||||||
"self_delete_in_cleanup": {
|
|
||||||
"title": "Self delete on cleanup",
|
|
||||||
"type": "boolean",
|
|
||||||
"default": True,
|
|
||||||
"description": "Should the monkey delete its executable when going down",
|
|
||||||
},
|
|
||||||
"use_file_logging": {
|
"use_file_logging": {
|
||||||
"title": "Use file logging",
|
"title": "Use file logging",
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
|
|
|
@ -52,7 +52,6 @@
|
||||||
"monkey": {
|
"monkey": {
|
||||||
"victims_max_find": 100,
|
"victims_max_find": 100,
|
||||||
"victims_max_exploit": 100,
|
"victims_max_exploit": 100,
|
||||||
"self_delete_in_cleanup": true,
|
|
||||||
"use_file_logging": true,
|
"use_file_logging": true,
|
||||||
"serialize_config": false,
|
"serialize_config": false,
|
||||||
"alive": true,
|
"alive": true,
|
||||||
|
|
Loading…
Reference in New Issue