Commit Graph

4980 Commits

Author SHA1 Message Date
Shreya 51b996ce18 Generate password randomly when creating a new user for Create User PBA and exploit MS08_67 using https://docs.python.org/3.7/library/secrets.html#secrets.token_urlsafe 2021-05-17 19:10:40 +05:30
Shreya 8dc72b2aae Swimm: update exercise Add a simple Post Breach action (id: tbxb2cGgUiJQ8Btma0fp). 2021-05-17 18:53:32 +05:30
VakarisZ ce6b658a15
Merge pull request #1166 from guardicore/small_bb_improvements
Small bb improvements
2021-05-17 14:59:11 +03:00
VakarisZ b79ef1680c
Update envs/monkey_zoo/blackbox/README.md
Co-authored-by: Shreya Malviya <shreya.malviya@gmail.com>
2021-05-17 14:39:30 +03:00
Mike Salvatore 3205d8344c Merge branch 'environment-config-section' into develop 2021-05-13 08:02:55 -04:00
Mike Salvatore f0bd6e10d3 island: Remove duplicate deployment from server_config.json.develop 2021-05-13 07:59:32 -04:00
VakarisZ f247dd7daa Updated documentation root link in documentation config.toml 2021-05-13 07:31:36 -04:00
VakarisZ c40465d6fd
Merge pull request #1160 from guardicore/no-global-data-dir
No global data dir
2021-05-13 13:02:54 +03:00
VakarisZ 2e2fd0a53c Changed blackbox tests to fail and stop if they can't connect to the island. 2021-05-13 09:15:33 +03:00
VakarisZ fbbce0cd99 Small improvements in readme of blackbox tests. 2021-05-13 09:14:50 +03:00
Mike Salvatore acc6f41a35 appimage: Remove references to nonexistant island_logger_config.json 2021-05-12 13:36:37 -04:00
Mike Salvatore 1418671aa3 appimage: Add environment config section to server config 2021-05-12 13:36:37 -04:00
Mike Salvatore b8d4452e70 island: Rename RunLocalMonkeyService -> LocalMonkeyRunService 2021-05-12 12:09:46 -04:00
Mike Salvatore 79eb7442ae island: Move the specifics of saving pba files to pba service 2021-05-12 11:53:10 -04:00
Mike Salvatore 253588b3ac island: Move PBA filename paths to config_value_paths.py 2021-05-12 11:53:07 -04:00
VakarisZ 4acf5a0e4b
Merge pull request #1155 from guardicore/bb_test_gcp_authentication_fix
BlackBox test GCP handling fixes
2021-05-12 17:04:41 +03:00
VakarisZ 45f2702403 Reverted back to fetching file directory first when resolving GCP keys. This is to make gcp key file relative to utils directory, not the current file. This will make it less confusing, because people usually navigate directories, not files. 2021-05-12 16:58:46 +03:00
VakarisZ 7a03a9504d Removed the `relative_key_path` parameter from GCPHandler class because it's unused and has a misleading name. 2021-05-12 16:33:52 +03:00
Mike Salvatore 2485c85d59 island: Don't use `shell=True` when running local monkey 2021-05-12 08:42:12 -04:00
Mike Salvatore f86bc7f943 island: Move run_local_monkey() to its own service 2021-05-12 08:35:46 -04:00
Mike Salvatore db14285934 island: Add `dir_is_empty()` to clarify intent of `test_remove_pba_files()` 2021-05-12 08:10:01 -04:00
Mike Salvatore e3449d17c7 Remove file that was accidentally added 2021-05-12 08:07:04 -04:00
VakarisZ c45de9dae7 Improved readability of gcp_machine_handlers.py 2021-05-12 10:41:52 +03:00
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 2af2fd4a55 Minor changelog maintenance 2021-05-11 15:03:18 -04:00
Mike Salvatore ff510e3e4c Add changelog entry for "environment" section 2021-05-11 15:00:51 -04:00
Mike Salvatore b4dfba294b island: Pass data_dir to main() 2021-05-11 14:56:50 -04:00
Mike Salvatore c832738a8a island: Remove all references to data_dir in EnvironmentConfig 2021-05-11 14:41:00 -04:00
Mike Salvatore fb3e66f75e island: Add "environment" section to server_config.json
Put the environment config inside its own "environment" object in the
server_config.json to provide a logical separation between the
environment config, logger config, data directory, etc.
2021-05-11 14:41:00 -04:00
Mike Salvatore 9476441526 island: Remove circular dep btw ConfigService and PostBreachFilesService 2021-05-11 14:40:53 -04:00
Mike Salvatore ea82e86df5 island: Add tests for PostBreachFilesService 2021-05-11 14:40:53 -04:00
Mike Salvatore 4364a48561 island: Simplify remove_PBA_files() 2021-05-11 14:40:53 -04:00
Mike Salvatore 5742e85ff5 island: Consolidate duplicate delete post breach file functionality 2021-05-11 14:40:53 -04:00
Mike Salvatore 71029cb7f9 island: Decouple FileUpload resource from environment_singleton 2021-05-11 14:40:53 -04:00
Mike Salvatore ca65330e86 island: Create custom PBA directory on PostBreachFilesService init 2021-05-11 14:40:53 -04:00
Mike Salvatore be0f7ac881 island: Decouple PBAFileDownload from environment_singleton 2021-05-11 14:40:53 -04:00
Mike Salvatore 4190797ca2 island: Add PostBreachFilesService.get_custom_pba_directory() 2021-05-11 14:40:53 -04:00
Mike Salvatore ee19eed596 island: Decouple PostBreachFilesService from environment_singleton 2021-05-11 14:40:53 -04:00
Mike Salvatore a7f2e023b8 island: Wrap services/post_breach_files.py functions in a static class 2021-05-11 14:40:53 -04:00
Mike Salvatore ba86ba0395 island: Decouple Database service from services.post_breach_files
Since Database.reset_db() calls ConfigService.init_config() which calls
ConfigService.reset_config() which calls
services.post_breach_files.remove_PBA_files(), it is redundant to call
remove_PBA_files() from Database.reset_db(). Removing this call has the
added benefit of reducing the coupling between the Database service and
services.post_breach_files
2021-05-11 14:40:53 -04:00
Mike Salvatore f048cf313c island: Pass data_dir to LocalRun instead of using global singleton 2021-05-11 14:40:53 -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
VakarisZ d385778828 Documented why windows and osx doesn't support docker deployment options. 2021-05-11 11:35:35 -04:00