Commit Graph

2827 Commits

Author SHA1 Message Date
Mike Salvatore 2d422f157e island: Add `umask 377` to create_certificate.sh
By setting the umask to 377 in create_certificate.sh, we ensure that the
TLS key file that is created is readable only by the user that created
it, and not world readable (as is the default on some linux distros).
2021-05-11 19:22:43 -04:00
Mike Salvatore 0b21dac261 Merge branch 'untangle-logger-config' into develop 2021-05-11 14:40:39 -04:00
Mike Salvatore b13839d7ba island: Add debug log level to server_config.json.develop 2021-05-11 14:01:43 -04:00
Mike Salvatore 08668f3eae island: Handle lower case log levels in server config 2021-05-11 13:40:58 -04:00
Mike Salvatore 5ea241f120 island: Simplify logic in add_default_values_to_config() 2021-05-11 13:29:53 -04:00
Mike Salvatore de7865aa21 island: Add tests for default server config values 2021-05-11 13:25:22 -04:00
Mike Salvatore 990244c3ac island: Return config dict from load_server_config()
As the number of configuration items will increase in the future, return
the config dict instead of individual config properties.
2021-05-11 13:18:24 -04:00
Mike Salvatore 5847674d92 island: Add unit test for load_server_config() 2021-05-11 13:14:07 -04:00
Mike Salvatore f7bef76f39 island: Move load_server_config() to config_loader.py
Because `monkey_island.py` has the same name as the `monkey_island`
module, pytest can't import monkey_island.py and run any tests against
its code.
2021-05-11 13:00:44 -04:00
Shreya 83a235bb5d Rename unit test functions in test_island_logger.py 2021-05-11 19:08:28 +05:30
Shreya 5f8145e3d1 Add tests for console logging (test_island_logger.py) 2021-05-11 19:06:38 +05:30
Shreya c5ba48db53 Modify/add unit tests (test_island_logger.py) 2021-05-11 18:57:24 +05:30
Shreya e8c1c81edf Move `DEFAULT_LOG_LEVEL` and add function `load_server_config` to monkey_island.py 2021-05-11 18:16:45 +05:30
Shreya 3c7687a405 Catch and print errors instead of creating a default server config 2021-05-11 18:08:07 +05:30
Shreya 805ab989b9 Remove "__author__" field 2021-05-11 17:58:07 +05:30
Shreya 8dc84ee0f7 Assume configured data directory exists when configuring the logger 2021-05-11 17:56:49 +05:30
Mike Salvatore b5c9828ddc island: Remove errant space in manual run windows command
Fixes #1153
2021-05-10 11:52:31 -04:00
Shreya 6d04e7cbb4 Fix unit tests and modify code based on failed tests (tests/monkey_island/cc/server_utils/test_island_logger.py) 2021-05-10 14:52:07 +05:30
Shreya f84e4aed2c Set log filename in config before expanding its paths 2021-05-10 14:04:07 +05:30
Shreya 785f2ef77d Replace `json_setup_logging()` with `setup_logging()` to configure logger 2021-05-10 13:49:33 +05:30
Shreya ab89590389 Remove `--logger-config` command-line argument, add "log_level" to server_config.json 2021-05-10 13:05:06 +05:30
Mike Salvatore 69af8a8662 island: Remove MongoClient() call from BootloaderHttpServer 2021-05-07 08:12:09 -04:00
Shreya e1ef807c2c Remove unused import in infection_monkey/network/info.py 2021-05-06 22:42:28 +05:30
Shreya 060b7fd921 Remove unused `TEST_SALT` from `tests/monkey_island/cc/environment/test_user_creds.py` 2021-05-06 22:27:52 +05:30
Shreya 6c80335509 Remove unused `get_regions`, `get_session`, and `test_client` in `common/cloud/aws/aws_service.py` 2021-05-06 22:25:23 +05:30
Shreya 897a92b961 Remove unused `run_command` in `common/cmd/cmd_runner.py` 2021-05-06 17:25:08 +05:30
Shreya 9b6ecd508c Remove unused `SCOUTSUITE_COLLECTOR` in `common/common_consts/system_info_collectors_names.py` 2021-05-06 17:05:24 +05:30
Shreya df8f9c81e6 Remove unused `format_time()` in `common/utils/attack_utils.py` 2021-05-06 17:03:17 +05:30
Shreya 81f785ea74 Remove unused `OTHER` in `common/utils/exploit_enum.py` 2021-05-06 16:58:03 +05:30
Shreya aed9c4ae56 Remove unused `should_exploit` in `infection_monkey/config.py` and `infection_monkey/example.conf` 2021-05-06 16:54:11 +05:30
Shreya 67d7ad8834 Remove unused `SAMBACRY_MONKEY_COPY_FILENAME_32` and `SAMBACRY_MONKEY_COPY_FILENAME_64` in `infection_monkey/exploit/sambacry.py` 2021-05-06 16:51:40 +05:30
Shreya e30c37f3ca Remove unused `DceRpcException` in `infection_monkey/exploit/tools/wmi_tools.py` 2021-05-06 16:49:54 +05:30
Shreya 0c3e385c86 Remove unused `check_if_port_open` in `infection_monkey/exploit/web_rce.py` 2021-05-06 16:46:23 +05:30
Shreya 5f8547a7ee Remove unused `set_vulnerable_port_from_url()` from `infection_monkey/exploit/web_rce.py` 2021-05-06 16:33:37 +05:30
Shreya 1cd746ce76 Remove unused `_dropper_path` and `_depth` in `infection_monkey/monkey.py` 2021-05-06 16:20:58 +05:30
Shreya adb90d14af Remove unused `_mode` in `infection_monkey/monkeyfs.py` 2021-05-06 16:16:20 +05:30
Shreya dd1eaab6f8 Remove unused `IP_ADDR_RE`, and `IP_ADDR_PARENTHESES_RE` from `infection_monkey/network/tools.py` 2021-05-06 15:54:58 +05:30
Shreya 3a8591ee00 Remove unused `_get_traceroute_bin_path`, and `_parse_traceroute` in `infection_monkey/network/tools.py` 2021-05-06 14:24:22 +05:30
Shreya e59f7a587e Remove unused const `WMI_LDAP_CLASSES` in `infection_monkey/system_info/wmi_consts.py` 2021-05-06 14:13:55 +05:30
Shreya e33288a05b Remove unused property `locked` in `infection_monkey/system_singleton.py` 2021-05-06 14:09:28 +05:30
Shreya 962e785134 Remove unused `proxy_via` in `infection_monkey/transport/http.py` 2021-05-06 14:02:32 +05:30
Shreya 3a346b5112 Remove unused `NoInheritance` in `infection_monkey/utils/plugins/pluginTests/ComboFile.py` 2021-05-06 13:30:45 +05:30
Shreya 635418b8f5 Remove unused `get_logon_handle()` from `infection_monkey/utils/windows/users.py` 2021-05-06 13:28:02 +05:30
Shreya b59213fb8b Delete unused file `monkey_island/scripts/island_password_hasher.py` 2021-05-05 19:34:15 +05:30
Shreya c848581115 Remove unused `hash_secret()` from `monkey_island/cc/environment/__init__.py` 2021-05-05 19:25:34 +05:30
Shreya edff2c5c08 Remove unused `set_deployment()` in `monkey_island/cc/environment/__init__.py` 2021-05-05 19:20:05 +05:30
Shreya 8c97f32fbc Remove unused `_instance_id`, `region`, `_get_instance_id()`, and `_get_region()` from `monkey_island/cc/environment/aws.py` 2021-05-05 19:20:05 +05:30
Shreya 380afa675a Remove unused `report_generating_lock` in `monkey_island/cc/resources/root.py` 2021-05-05 19:20:05 +05:30
Shreya 536d0bc75c Remove unused `mongo_client` in `monkey_island/cc/server_utils/bootloader_server.py` 2021-05-05 19:20:05 +05:30
Shreya 0dc6005114 Remove unused variable `os_is_linux` in `infection_monkey/post_breach/post_breach_handler.py` 2021-05-05 19:20:05 +05:30