Commit Graph

2955 Commits

Author SHA1 Message Date
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
Shreya 35f4515d6e Remove unused `get_pba()` in `infection_monkey/post_breach/pba.py` 2021-05-05 19:20:05 +05:30
Shreya 8391df9114 Remove unused `check_udp_port`, `traceroute()`, `_traceroute_windows()`, and `_traceroute_linux` from `infection_monkey/network/tools.py` 2021-05-05 19:20:05 +05:30
Shreya 2f5d33844c Remove unused variable `PATH_TO_ACTIONS` from `infection_monkey/post_breach/post_breach_handler.py` 2021-05-05 19:20:05 +05:30
Shreya 6cc22afd9b Remove unused `get_ip_for_connection()` in `infection_monkey/network/info.py` 2021-05-05 19:20:05 +05:30
Shreya b7535dccb0 Remove unused variables `GENERAL_CMDLINE_LINUX` and `MONKEY_CMDLINE_HTTP` in `infection_monkey/model/__init__.py` 2021-05-05 19:20:05 +05:30
Shreya b1ce5d3e2e Remove unused variable `MAX_MONKEYS_AMOUNT_TO_CACHE` in `monkey_island/cc/models/monkey.py` 2021-05-05 19:20:05 +05:30
Shreya eeaafc9a3b Remove ununsed variable `user_id_table` in `monkey_island/cc/resources/auth/user_store.py` 2021-05-05 19:20:05 +05:30
Shreya a5481c15f8 Remove unused `get_latest_attack_telem_time()` from `monkey_island/cc/services/attack/attack_report.py` 2021-05-05 19:20:05 +05:30
Shreya e4c45153ea Remove unused `get_monkey_critical_services()` and `get_monkey_label_by_id()` in `monkey_island/cc/services/node.py` 2021-05-05 19:20:05 +05:30
Shreya 9c629f964c Remove unused variable `UPLOADS_DIR_NAME` in `monkey_island/cc/services/post_breach_files.py` 2021-05-05 19:20:05 +05:30
Shreya f32e1e0a0f Remove unused variable `is_auth` in `monkey_island/cc/services/remote_run_aws.py` 2021-05-05 19:20:05 +05:30
Shreya 9bcaa2ef8e Remove unused `did_exploit_type_succeed()` from `monkey_island/cc/services/reporting/report.py` 2021-05-05 19:20:05 +05:30
Shreya df7759e332 Remove unused variable `DETAILS_DTO` from `monkey_island/cc/services/zero_trust/test_common/monkey_finding_data.py` 2021-05-05 19:20:05 +05:30
Shreya 638e70e978 Remove unused code in unit tests 2021-05-05 19:20:05 +05:30
Mike Salvatore 33e74b1f3e agent: Use consistent naming for parameters to __exit__()
Using these specific names prevents Vulture from identifying these
parameters as unused.
2021-05-05 19:20:05 +05:30
Mike Salvatore 9649f90cff agent: Remove unused parameter securityFlags from create_smb() 2021-05-05 19:20:05 +05:30
Mike Salvatore b41a2f2366 travis: Fail build if vulture finds dead code 2021-05-05 19:19:59 +05:30
Mike Salvatore e609094a59 Merge branch 'pwd-hash' into develop 2021-05-05 08:05:15 -04:00
Mike Salvatore 7772ea6e4e island: Add FULL_USER_CREDENTIALS to test_environment.py 2021-05-05 07:45:59 -04:00
Mike Salvatore 9024a512b0 island: Move all bcrypt dependencies to password_utils 2021-05-05 07:45:41 -04:00
Mike Salvatore 0f49a2c96a island: Remove UserCreds.from_cleartext() 2021-05-04 18:53:43 -04:00
Mike Salvatore f73b048169 island: Remove parameter names from UserCreds() init in tests 2021-05-04 17:21:05 -04:00
Mike Salvatore e4dec5501e island: Add constants for user and hash to UserCreds tests 2021-05-04 17:20:03 -04:00
Mike Salvatore c4c0b7217d island: Add test for members of UserCreds 2021-05-04 17:17:54 -04:00
Mike Salvatore e223126c16 island: Add tests for UserCreds.__bool__() 2021-05-04 17:14:54 -04:00
Mike Salvatore d56cb5cd75 island: Simplify UserCreds constructor by removing defaults
The default values were only really used by the test code. We can
simplify the Usercreds's interface and test code by removing
functionality (read: complication) we don't really need.
2021-05-04 17:07:42 -04:00
Mike Salvatore 1aed5f37d1 monkey: Remove coupling between Registration and UserCreds 2021-05-04 17:07:31 -04:00
Mike Salvatore 4b3b7af3d2 island: Remove coupling between EnvironmentConfig and UserCreds 2021-05-04 16:58:30 -04:00
Mike Salvatore 5fa08f0447 island: Add UserCreds.from_cleartext() 2021-05-04 15:14:41 -04:00
Mike Salvatore 1be07a4828 monkey: Rename `get_from...()` methods in UserCreds to be more readable 2021-05-04 14:43:11 -04:00
VakarisZ f28cd5305c Refactored test_user_creds.py to pytest from unittests 2021-05-04 14:26:22 -04:00
Mike Salvatore 502bc3b296 island: Enable standard mode with bcrypted passwords 2021-05-04 14:24:49 -04:00
Mike Salvatore 060c4b0c40 island: Minor formatting fix 2021-05-04 12:32:07 -04:00
Mike Salvatore 904e51a365 island: Replace private static functions in Authenticator with functions
In python, private static methods serve no purpose. Python has
first-class functions; let's use them.
2021-05-04 12:28:17 -04:00
Mike Salvatore c7d47fee9c island: Extract method _create_access_token() from _get_credentials_from_request() 2021-05-04 12:14:25 -04:00
Mike Salvatore a8646fc056 island: Give _authenticate() more descriptive name and remove comment 2021-05-04 12:09:04 -04:00
Mike Salvatore 39c274c4d9 island: Extract method get_credentials_from_request() from post() 2021-05-04 12:04:36 -04:00
Mike Salvatore 83f7f04929 island: Change order of methods in Authenticate to follow stepdown rule 2021-05-04 12:00:10 -04:00
Mike Salvatore 7684a2dcf8 island: Make return values of Authenticate._authenticate() explicit 2021-05-04 11:58:58 -04:00
Mike Salvatore 85b079c1ab agent: Create a temporary directory for zerologon artifacts
Not all users are guaranteed to have a $HOME. Use a temporary directory
instead.
2021-05-04 08:12:35 -04:00
Shreya 02f3b15c64 Split `get_from_dict()` into 2 functions as per usage 2021-05-03 23:28:55 +05:30
Shreya d2083149dd Convert hashed pwd to string before storing in server_config.json 2021-05-03 20:23:54 +05:30
Shreya b5d05a1a78 Add bcrypt to monkey_island/Pipfile and monkey_island/Pipfile.lock 2021-05-03 20:23:54 +05:30
Shreya 09a37292b5 Remove unused import and repeated code in monkey_island/cc/ui/src/services/AuthService.js 2021-05-03 20:23:54 +05:30
Shreya b5236d14c9 Use bcrypt for password hashing for authentication 2021-05-03 20:23:52 +05:30
PrajwalM2212 2ee6315bb8 Changes 2021-05-03 20:16:50 +05:30
PrajwalM2212 9363cadb09 Add functionality to hash passwords on server side 2021-05-03 20:15:24 +05:30
Mike Salvatore c67ed63cc9
Merge pull request #1124 from guardicore/dlint
Add dlint to flake8
2021-04-28 13:24:41 -04:00
Mike Salvatore 78ca2c25b1 deploy: Remove unnecessary recursive chmod 2021-04-28 12:18:26 -04:00
Mike Salvatore e5935e43c1 agent: Add TODOs regarding string templates. 2021-04-28 11:00:53 -04:00
Shreya d4e277c70b Modify what commands are passed to `subprocess.Popen` in the dropper and windows_upgrader 2021-04-28 10:47:47 -04:00
Shreya 9602a67d28 Modify unit tests: tests/infection_monkey/utils/linux/test_users.py 2021-04-28 10:47:28 -04:00
Shreya 410cbadbb3 Fix DUO116 warnings for:
- monkey/infection_monkey/dropper.py
- monkey/infection_monkey/system_info/windows_info_collector.py
- monkey/infection_monkey/utils/windows/users.py
- monkey/infection_monkey/windows_upgrader.py
2021-04-28 10:47:28 -04:00
Shreya 4d88efdd84 Fix DUO116 warnings in post breach actions
by ignoring them
2021-04-28 10:47:28 -04:00
Shreya 6b467fd20b Fix DUO116 warnings in monkey/infection_monkey/utils/linux/users.py 2021-04-28 10:47:28 -04:00
Shreya c0fdc9561f Fix DUO123 warnings 2021-04-28 10:46:41 -04:00
Shreya b0be14193d Fix DUO122 warnings 2021-04-28 10:46:41 -04:00
Shreya af381e062f Fix DUO106 warnings
(Introduces a DUO116 warning)
2021-04-28 10:46:19 -04:00
Shreya a3fa4663cb Fix DUO102 warnings
Added comments to ignore some because:

"Python uses the Mersenne Twister as the core generator. However, being completely
deterministic, it is not suitable for all purposes, and is completely unsuitable for
cryptographic purposes. Because the generator is deterministic this means attackers
can predict future values given a sufficient amount of previous values.

Normal random use is acceptable if the relevant code is not used for security or
cryptographic purposes."
2021-04-28 10:46:14 -04:00
Shreya d8c1bf5cbe Add dlint to Pipfile 2021-04-28 10:45:13 -04:00
Mike Salvatore 9ad694fddf
Merge pull request #1106 from guardicore/pipenv
Requirement migration to pipenv
2021-04-26 11:37:05 -04:00
Mike Salvatore afa412ca47 agent: Add note to readme to run build_linux.sh with `pipenv run` 2021-04-26 10:47:00 -04:00
Shreya 9b38303346 Rearrange functions' order in `monkey_island/cc/resources/pba_file_upload.py` to follow stepdown rule 2021-04-26 16:07:53 +05:30
Shreya 4f94e9de74 Break PBA file deletion into functions: attempt to delete PBA file in another function 2021-04-24 13:18:00 +05:30
Shreya 4854c9cfc9 Attempt to remove custom PBA file when resetting config only if filename exists in DB 2021-04-24 13:18:00 +05:30
Mike Salvatore df67ba554e agent: Add pyinstaller-hooks-contrib and importlib-metadata to Pipfile
Pipenv fails to install these dependencies in the
cdrx/pyinstaller:python3 container when pyinstaller is installed from
our fork. Adding them to the Pipfile ensures they get installed and
resolves the issue.
2021-04-23 11:20:13 -04:00
VakarisZ fd8ef7f39e Refactored test_telems to exported_telems and moved them from the test folder, because they are generated in production 2021-04-23 08:39:19 -04:00
VakarisZ 8121f08aa9 Refactored test_telems to exported_telems and moved them from the test folder, because they are generated in production 2021-04-23 11:12:14 +03:00
Mike Salvatore 3b32ef2f4a Remove PostgreSQL fingerprinter
Issue #1077
2021-04-22 10:33:06 -04:00
Mike Salvatore 6a54c1e85a agent: Add sys_platform == win32 to Pipfile 2021-04-22 09:50:30 -04:00
Mike Salvatore 6412391ff8 docs: Add pipenv instructions to manual monkey setup guide for Windows 2021-04-22 09:50:30 -04:00
Mike Salvatore 57d6552433 docs: Add pipenv instructions to manual monkey setup guide for Linux 2021-04-22 09:50:30 -04:00
VakarisZ 0120c027b0 Fixed run server bat script 2021-04-22 09:50:30 -04:00
Mike Salvatore 051621bdfa Modify monkey_island/linux/run.sh to use pipenv 2021-04-22 09:50:30 -04:00
VakarisZ c2024d06f6 Fixed requirements to use cryptography 2.5, so that linux builds of agents on ubuntu12 could install requirements 2021-04-22 09:50:29 -04:00
VakarisZ ffb761ef4b Updated monkey pipfile and pipfile.lock in attempt to fix brokend jenkins build 2021-04-22 09:50:29 -04:00
VakarisZ c00754a3a4 Moved dev requirements of black, coverage, flake and others to dev dependencies of the island to be a single source of truth 2021-04-22 09:50:29 -04:00
VakarisZ 00e9940a0b Using pymssql v2.2.0 or later results in the following error message:
ImportError: /tmp/_MEISNYzdG/pymssql/_pymssql.cpython-37m-x86_64-linux-gnu.so: ELF load command address/offset not properly aligned
2021-04-22 09:50:29 -04:00
VakarisZ 7f928fa90d Migrated from monkey agents requirements.txt to pipenv requirements 2021-04-22 09:50:29 -04:00
VakarisZ eca26b596b Fixed island requirements frozen in PipFile to better correlate with already deleted requirements.txt 2021-04-22 09:50:29 -04:00
VakarisZ 465023b64d Removed cryptography dependency from infection monkey agent dependencies and added eggs to git dependencies 2021-04-22 09:50:29 -04:00
VakarisZ 33de5aac60 Converted island requirement.txt file to pipenv files 2021-04-22 09:50:29 -04:00
VakarisZ 0f5cda52c2
Merge pull request #1113 from guardicore/import-fix
Fixed a broken import in mitigation.py
2021-04-22 11:44:14 +03:00
VakarisZ 26e10e9ed2 Fixed a broken import in mitigation.py 2021-04-22 11:33:14 +03:00
VakarisZ ffec6f6e8a
Merge pull request #1112 from guardicore/import-fix
Import fix
2021-04-22 11:24:17 +03:00
VakarisZ 2480dc8cdb Fixed a broken import in attack_mitigations.py 2021-04-22 11:13:18 +03:00
Mike Salvatore 7c452d0c6f tests: Remove debug print statement in conftest.py 2021-04-21 08:03:01 -04:00
Mike Salvatore a42e6312b1 tests: Remove unnecessary server configs 2021-04-21 08:00:24 -04:00
Mike Salvatore 753c0586c1 cc: Move config files and other testing resources to tests/ dir 2021-04-20 11:27:30 -04:00
Shreya c37ae1e0ea Modify pytest configuration
Shift it from monkey/pytest.ini to pyproject.toml.
Add conftest.py in tests/ to add monkey directory to sys.path so test files recognize paths.
2021-04-19 17:36:09 +05:30
Shreya 4680193375 Put unit test files in the right directories
Some test files were in their own "tests/" directory. Deleted the extra "tests/" directories.
2021-04-19 13:54:48 +05:30
Shreya a2115e4254 Fix imports for unit test files 2021-04-19 13:54:48 +05:30
Shreya f8936f61bb Move all tests for monkey_island/cc/services/reporting/report.py to one file 2021-04-19 13:54:48 +05:30
Shreya c08dbf9376 Move conftest files to tests/ directory 2021-04-19 13:54:48 +05:30
Shreya fa21336ff2 Move all unit test files to a separate directory 2021-04-19 13:54:48 +05:30
Mike Salvatore 57f8f200b1
Merge pull request #1101 from guardicore/appimage-v2
Appimage v2
2021-04-16 07:45:19 -04:00
Mike Salvatore 5a1a5fc6fe cc: Set cwd when executing monkey binary from the island
Since AppImages are read-only filesystems, the agent cannot create any
files in `./`.  Therefore, setting cwd in the `subprocess.Popen()` call
will change CWD to a writable directory if `data_dir` is set.
2021-04-15 12:19:09 -04:00
Mike Salvatore d507e6f617
Merge pull request #1098 from guardicore/eslint
Add eslint
2021-04-15 07:29:51 -04:00
VakarisZ be693edb55
Merge pull request #888 from VakarisZ/typescript_support
Typescript support implemented
2021-04-15 12:43:15 +03:00
Mike Salvatore 3b4bd7b08c cc: Upload custom PBAs to data_dir instead of MONKEY_ISLAND_ABS_PATH 2021-04-14 11:02:25 -04:00
Shreya 025cb7851c Rename blackbox endpoint classes to match filenames 2021-04-14 15:33:02 +05:30
VakarisZ ea61961ff4 Moved some packages to dev dependencies instead of prod in package.json 2021-04-14 11:05:43 +03:00
VakarisZ 448d846362 Moved dev UI dependencies from prod and changed typescript target to es6 2021-04-14 10:29:34 +03:00
VakarisZ 50c5fdb9fc Typescript support implemented 2021-04-14 10:29:34 +03:00
Shreya 6d43ce900c Rename blackbox test files under monkey_island/cc/resources/blackbox/ 2021-04-14 10:47:00 +05:30
Shreya 86c4f9f63d Rename directory "test" to "blackbox" in monkey_island/cc/resources/ 2021-04-14 10:47:00 +05:30
Shreya 26684bbb4e Rename files having endpoints for blackbox tests 2021-04-13 10:53:19 +05:30
Shreya 5469c7cc41 Match unit tests' class names and file names
Renamed class/file name depending on which was more applicable
2021-04-13 10:43:05 +05:30
Shreya 6e92127807 Rename unit test files from *_test.py to test_*.py 2021-04-13 10:43:05 +05:30
Shreya c736560f09 Fix "Do not access Object.prototype method 'hasOwnProperty' from target object" eslint warnings 2021-04-12 17:31:17 +05:30
Shreya e74e205368 Fix trailing comma eslint warnings 2021-04-12 17:31:17 +05:30
Shreya bbfc0d4130 Fix "Component definition is missing display name" eslint warnings 2021-04-12 17:31:58 +05:30
Shreya f267e5bbc0 Fix unused variable eslint warnings 2021-04-12 17:31:29 +05:30
Shreya 508c562243 Fix singlequotes eslint warnings 2021-04-12 17:31:18 +05:30
Mike Salvatore 76a2dfdf91 cc: Remove unnecessary quotes in post_breach_actions.py 2021-04-11 19:35:40 -04:00
VakarisZ f9d8584910 Shellshock UI bugfix 2021-04-08 11:02:18 -04:00
Mike Salvatore b3c8ce28ed agent: Fix bug caused by unintentional newline in elastic exploiter 2021-04-07 19:10:36 -04:00
Mike Salvatore 13d99a4ccc agent: Fix W291 trailing whitespace warnings 2021-04-07 13:49:37 -04:00
Mike Salvatore 4466ff44cf Run black to resolve E261 warnings 2021-04-07 13:40:01 -04:00
VakarisZ 56e754eddd Manual fixes of long line refactorings gone wrong 2021-04-07 13:40:01 -04:00
VakarisZ 73da6fdc40 Manually fixed long lines not picked up by automatic refactoring 2021-04-07 13:40:01 -04:00
VakarisZ 1c44ada9bb Added noqa to long import which is the outcome of running black 2021-04-07 13:40:01 -04:00
VakarisZ 3149dcc8ec Fixed screwed up formatting with black 2021-04-07 13:40:01 -04:00
VakarisZ 03bcfc97af All E501 errors fixed, but formatting screwed up 2021-04-07 13:40:01 -04:00
Mike Salvatore d5e43fbf51 cc: Remove unused `Dict` import in exploiter_descriptor_enum.py 2021-04-06 18:06:31 -04:00
Mike Salvatore f85e6fc7d0 Sort all imports using isort 5.8.0 2021-04-06 18:01:59 -04:00
Mike Salvatore 661f3907a9 Merge branch 'paint-it-black' into develop
Resolves #1070
2021-04-06 17:42:21 -04:00
Shreya 42db1c497a Mark PostgreSQL fingerprinter safe 2021-04-06 19:04:17 +05:30
Mike Salvatore c40f7bf6c9 Reformat all python with black v20.8b1 2021-04-06 09:20:18 -04:00
Shreya Malviya c7a241e776
Merge pull request #1068 from guardicore/report_refactoring
Report refactoring
2021-04-06 18:43:59 +05:30
Shreya 7973a35338 Fix unit tests 2021-04-06 18:31:02 +05:30
Shreya fa0729881e Remove unused imports 2021-04-06 18:12:03 +05:30
VakarisZ 0b34d30fd6 Improved exploiter descriptors and usage of them in report.py 2021-04-06 11:35:41 +03:00
VakarisZ 6685b24da4 Removed unused annotations import 2021-04-06 10:16:05 +03:00
VakarisZ 87cec0036d Fixed report to show display names instead of class names of exploiters where needed 2021-04-06 10:11:34 +03:00
Mike Salvatore 46be7ae0d4 agent: resolve E741 flake8 warnings 2021-04-05 14:48:33 -04:00
Shreya 3e419478af Fix F841 warnings 2021-04-05 20:33:19 +05:30
Shreya d8e1be7d6f Fix F401 warnings 2021-04-05 20:33:19 +05:30
Shreya d0168dfb9e Fix E722 warnings 2021-04-05 20:33:19 +05:30
Shreya 7bfdc3c7e5 Fix W605 warnings 2021-04-05 20:33:17 +05:30
Shreya 278326e4e4 Fix W293 warnings 2021-04-05 17:46:43 +05:30
Mike Salvatore e616fcdf50 Merge branch 'appimage' into develop 2021-04-04 21:53:06 -04:00
VakarisZ de2581d323 Extended exploiter report info class to have all possible values that exploit processors could add 2021-04-02 12:00:04 +03:00
VakarisZ 72a97e6465 Small style fixes and improvements 2021-04-02 11:59:28 +03:00
Mike Salvatore 3d938f2536 cc: Fix come incorrect import paths 2021-03-31 11:55:21 -04:00
Mike Salvatore 921c4d01ca cc: resolve some flake8 warnings 2021-03-31 08:27:41 -04:00
Mike Salvatore 1fad6b4666 cc: remove unnecessary `config` property from environment_singleton
Introduced in b0d478473fe
2021-03-31 08:27:41 -04:00
Mike Salvatore b5e8d895c8 cc: use data_dir when running monkey agent locally from island 2021-03-31 08:27:41 -04:00
Mike Salvatore e1209dcb4c cc: add data_dir_abs_path property to EnvironmentConfig
EnvironmentConfig needs to handle environment variables and '~' in its
`data_dir` property. Other components that consume `data_dir` need
environment variables and '~' resolved to an absolute path. Add a
property called `data_dir_abs_path` that calculates the absolute path
from `data_dir`. Since `data_dir` remains unchanged, the
EnvironmentConfig can be saved to file without modifying the `data_dir`
option in the file.
2021-03-31 08:27:41 -04:00
Mike Salvatore 29c9c72ef3 cc: rename server_config_data_dir.json -> server_config_with_data_dir.json 2021-03-31 08:27:41 -04:00
Mike Salvatore 45367bb051 cc: add encrypt/decrypt test 2021-03-31 08:27:41 -04:00
Mike Salvatore fdeec3a634 cc: rename data_dir parameter in encryptor to password_file_dir 2021-03-31 08:27:41 -04:00
Mike Salvatore 115368f83d cc: rename DATA_DIR constant in test to WITH_DATA_DIR 2021-03-31 08:27:41 -04:00
Mike Salvatore 044c656543 cc: rename encryptor() -> get_encryptor() 2021-03-31 08:27:41 -04:00
Mike Salvatore a09cd8f497 cc: expanduser in data_dir path in Encryptor 2021-03-31 08:09:32 -04:00
Mike Salvatore d265238107 cc: format encryptor.py with black 2021-03-31 08:09:32 -04:00
Mike Salvatore 3f6c268f40 cc: allow encryptor to store key file in variable locations 2021-03-31 08:09:32 -04:00
Mike Salvatore 438a2701d4 cc: add `data_dir` property to EnvironmentConfig 2021-03-31 07:50:12 -04:00
Mike Salvatore 2d971d95fc build: select server and logger config at runtime in appimage 2021-03-31 07:37:49 -04:00
VakarisZ 64018eb373 Extracted home environment mocking into a reusable fixture and added a todo, to move it to our fixture list 2021-03-31 07:37:49 -04:00
VakarisZ ef1ef3475b Extracted island argument parsing into a separate file 2021-03-31 07:37:49 -04:00
Mike Salvatore 21e0b5170b cc: explicitly cast tmpdir to str in test_island_logger.py 2021-03-31 07:37:49 -04:00
Mike Salvatore 1f57610005 monkey_island.py: Add TODO to refactor argument handling 2021-03-31 07:37:49 -04:00
Mike Salvatore e6bf085d12 address some flake8 errors 2021-03-31 07:37:49 -04:00
Mike Salvatore 5b781c50a4 cc: rename DEFAULT_LOGGING_CONFIG_PATH -> DEFAULT_LOGGER_CONFIG_PATH 2021-03-31 07:37:49 -04:00
Mike Salvatore 74e0dfddc5 cc: expand "~" in log file configuration 2021-03-31 07:37:49 -04:00
Mike Salvatore 8b3703816d run black to format monkey_island.py 2021-03-31 07:37:49 -04:00
Mike Salvatore e8bb2e6be2 cc: allow logger config to be specified at runtime 2021-03-31 07:37:49 -04:00
Mike Salvatore 4cb28db3bc cc: reformat island_logger.py for readability
1. Adjusted some spacing and indentation
2. Reformatted with Black
2021-03-31 07:36:07 -04:00
Mike Salvatore fef44bcd05 cc: deploy "develop" environment by default 2021-03-31 07:36:07 -04:00
Mike Salvatore fc2f8eca45 cc: remove unnecessary private constants in consts.py 2021-03-31 07:33:47 -04:00
Mike Salvatore ea14bcc2f6 cc: rename DEFAULT_STANDARD_SERVER_CONFIG -> DEFAULT_STANDARD_SERVER_CONFIG_PATH 2021-03-31 07:33:47 -04:00