Mike Salvatore
82ce091063
Common: Export InvalidCredentialComponent from common.credentials
2022-07-06 19:32:18 -04:00
Mike Salvatore
d3859debbe
UT: Use valid NTLM hashes in test_mimikatz_collector.py
2022-07-06 19:28:36 -04:00
Mike Salvatore
82fb693f06
Common: Simplify raising of InvalidConfigurationError
2022-07-06 16:03:12 -04:00
Mike Salvatore
92416cb079
Common: Add validation to LMHash and NTHash
2022-07-06 16:02:31 -04:00
Mike Salvatore
0d477cef7c
Common: Add SSHKeypairSchema
2022-07-06 12:32:11 -04:00
Mike Salvatore
e92de42da9
UT: Use dict for key,value in credential components tests
...
The SSHKeypair credential component has two fields (public, private),
not just a single value. This commit modifies the tests to be able to
support credential components with multiple fields.
2022-07-06 12:27:39 -04:00
Mike Salvatore
58fcc3761c
UT: Add NTHashSchema
2022-07-06 12:07:44 -04:00
Mike Salvatore
def2381da6
Common: Add LMHashSchema
2022-07-06 12:02:49 -04:00
Mike Salvatore
68e52eb512
Common: Add ntlm_hash_validator
2022-07-06 12:02:25 -04:00
Mike Salvatore
031fce9fd8
UT: Add test_invalid_values()
2022-07-06 11:50:54 -04:00
Mike Salvatore
be9889c9d1
UT: Use parametrization to remove duplicate credential component tests
2022-07-06 11:31:24 -04:00
Mike Salvatore
9a45d777ca
Common: Add CredentialTypeField
2022-07-06 11:07:46 -04:00
Mike Salvatore
a8747c9d5d
Common: Add CredentialComponentSchema
...
Extract common _strip_credential_type() post_load function from
PasswordSchema and UsernameSchema into a parent class.
2022-07-06 11:02:07 -04:00
Mike Salvatore
037b4ef8c5
Common: Add UsernameSchema
2022-07-06 10:52:13 -04:00
Mike Salvatore
0b887a2704
UT: Add unit_tests/common/credentials/__init__.py
2022-07-06 10:48:44 -04:00
Mike Salvatore
0be43157cf
Common: Add PasswordSchema
2022-07-06 10:46:05 -04:00
Ilija Lazoroski
439b4aca86
Island: Reformat ConfigService using black
2022-07-06 16:43:52 +02:00
Ilija Lazoroski
bbf40e446f
Island: Remove default_config and validator function from ConfigService
2022-07-06 16:05:42 +02:00
Ilija Lazoroski
0cb8cfb078
Island: Remove typographic symbols
2022-07-06 16:05:42 +02:00
Ilija Lazoroski
9f0029d040
Common: Remove credential collector names and validation formats
2022-07-06 16:05:42 +02:00
Ilija Lazoroski
16e8443134
Island: Add TODO to return default config in reporting
...
Notes in services for not fixing the failing tests until we remove
the ConfigService
2022-07-06 16:05:42 +02:00
Shreya Malviya
9b23cc0bef
UT: Remove tests related to config schema per attack technique
2022-07-06 16:05:42 +02:00
Shreya Malviya
98fbc7592c
Island: Hardcode unscanned message for ATT&CK techniques
...
Remove logic for config schema per attack technique which set the unscanned message previously
2022-07-06 16:05:42 +02:00
Shreya Malviya
cbc5e99140
Island: Add TODO to fix comment in Config model
2022-07-06 16:05:42 +02:00
Shreya Malviya
4eb7472977
Island: Remove functions from ConfigService that used the old config
...
schema
This breaks some stuff: the IslandConfiguration resource, the reset
config functionality, and probably some other things. However, this
isn't too much of a concern since all of this will be reimplemented in
the coming weeks. It's just really broken for now.
2022-07-06 16:05:42 +02:00
Shreya Malviya
b883f502ed
Island: Remove old configuration schema
2022-07-06 16:05:42 +02:00
Shreya Malviya
2d960fc4d2
Island: Remove old configuration schema's properties
2022-07-06 16:05:42 +02:00
Shreya Malviya
ff17237ea7
Island: Remove old configuration schema's definitions
2022-07-06 16:05:42 +02:00
Mike Salvatore
3f3494e5d4
Common: Move DIContainer._del_key() to code_utils
2022-07-06 10:01:26 -04:00
ilija-lazoroski
568a10e2f9
Merge pull request #2061 from guardicore/file-repository-decorators
...
File repository decorators
2022-07-06 15:18:45 +02:00
Mike Salvatore
e4edfd8ded
Agent: Remove shallow i_puppet.credential_collection subpackage
2022-07-05 14:41:59 -04:00
Mike Salvatore
33b04934aa
Island: Use common.credentials.Credentials in ICredentialsRepository
2022-07-05 13:30:55 -04:00
Mike Salvatore
7bc8ed649a
Common: Add common.credentials package
...
Migrate all objects that represent credentials from their present home
in the agent to their new home in common. This allows these classes to
be shared by the island. Furthermore, it will simplify
serialization/deserialization and clear a path to remove other redundant
classes in the Island.
2022-07-05 13:28:17 -04:00
Mike Salvatore
545f35710f
Island: Add class docstrings for IFileRepository decorators
2022-07-05 11:24:34 -04:00
Mike Salvatore
a8b54f69f9
Island: Use read/write lock in FileRepositoryLockingDecorator
2022-07-05 11:17:03 -04:00
Mike Salvatore
1efea21269
Merge pull request #2060 from guardicore/1965-modify-i-stolen-credentials-repository
...
Modify IStolenCredentialsRepository
2022-07-05 11:07:47 -04:00
Mike Salvatore
0ab30d02a2
Island: Add class docstring for ICredentialsRepository
2022-07-05 11:02:27 -04:00
Mike Salvatore
64e548957f
Island: Reorder methods in ICredentialsRepository
2022-07-05 10:59:28 -04:00
Mike Salvatore
cbed178549
Island: Reword docstrings in ICredentialsRepository
2022-07-05 10:57:36 -04:00
Mike Salvatore
035734992c
Island: Change parameter names in ICredentialsRepository.save_*()
2022-07-05 10:50:28 -04:00
Mike Salvatore
2736f058d7
Island: Fix docstring formatting in ICredentialsRepository
2022-07-05 10:50:07 -04:00
Mike Salvatore
48cc6d6dd2
Island: Add readerwriterlock as a dependency
2022-07-05 10:42:06 -04:00
Ilija Lazoroski
6695e5b4ac
Island: Modify IStolenCredentialsRepository
...
* Rename to ICredentialsRepository
* Add {get/remove/save}_{stolen/configured}_credentials
2022-07-05 16:25:39 +02:00
Mike Salvatore
4f6978c732
Island: Add TODO regarding gevent.lock()
2022-07-05 09:53:18 -04:00
ilija-lazoroski
8873ef891b
Merge pull request #2051 from guardicore/2003-define-new-json-schema
...
2003 define new json schema
2022-07-05 13:34:20 +02:00
vakarisz
d0612f06d8
UI: Fix incorrect allPluginNames in AdvancedMultiSelect.js
...
All plugin names were in fact only the initially selected values
2022-07-05 10:32:07 +03:00
Ilija Lazoroski
3bbbca783d
UI: Fix UiSchema manipulators to use payloads section
2022-07-04 15:33:23 +02:00
Ilija Lazoroski
a37157b086
UI: Rename custom PBA filename options
2022-07-04 14:47:19 +02:00
Ilija Lazoroski
66c2bc492c
UI: Fix custom pbas in the schema
2022-07-04 14:47:19 +02:00
vakarisz
a1f4a6978a
UI: Remove unneeded console logs from ConfigurePage.js
2022-07-04 15:23:38 +03:00
Ilija Lazoroski
51609e9491
UI: Fix missaligned items in propagation
2022-07-04 13:47:57 +02:00
vakarisz
df7e43d796
UI: Fix SafeOptionValidator.js for the new schema
2022-07-04 14:46:55 +03:00
Mike Salvatore
353605d672
Island: Reorder components in log statement
...
* Since file and function names differ wildly in length, moving the log
leve right after the timestamps makes the log easier for a human being
to parse.
* The length of function names can vary wildly. The 10 character padding
to attempt to align other parts of the log message just didn't achive
its goal. It made the log harder to read and added a lot of dead
space.
2022-07-04 07:23:21 -04:00
Mike Salvatore
df8132c86c
Island: Change the order of FileRepository decorators
...
The caching decorator was suppressing debug log messages. Reversing
their order resolves the issue.
2022-07-04 07:14:11 -04:00
Ilija Lazoroski
88663f5276
UI: Add defaults for the payloads section
2022-07-04 13:13:30 +02:00
Ilija Lazoroski
a4e66a0c9e
UI: Add ransomware to config schema
2022-07-04 13:13:30 +02:00
vakarisz
d527881770
UI: Fix info pane in AdvancedMultiSelect.js
2022-07-04 13:54:07 +03:00
vakarisz
20f091ff4e
UI: Fix reset button in AdvancedMultiSelect.js
...
Reset button will reset to all safe values
2022-07-04 13:00:36 +03:00
vakarisz
ed46538137
UI: Improve state contents in AdvancedMultiSelect.js
2022-07-04 12:37:35 +03:00
vakarisz
61eaa48988
UI: Fix formatting in UiSchema.js
2022-07-04 12:20:36 +03:00
vakarisz
7df10f7730
UI: Fix a bug in ConfigurePage.js responsible for lacking re-render
...
key property makes the component unique and causes a re-construction. This solves a bug where different configuration page tabs remain with the same data on switch
2022-07-04 12:20:36 +03:00
vakarisz
26f51d1540
UI: Fix a bug in ConfigurePage.js responsible for lacking re-render
...
key property makes the component unique and causes a re-construction. This solves a bug where different configuration page tabs remain with the same data on switch
2022-07-04 12:20:36 +03:00
vakarisz
ab720a5a55
UI: Refactor AdvancedMultiSelect.js to use props more
2022-07-04 12:20:36 +03:00
Mike Salvatore
18f995919d
Island: Add TODO about read/write lock
2022-07-03 09:38:31 -04:00
Mike Salvatore
9cb79c119c
Island: Decorate the FileRepository for AgentBinaryRepository
2022-07-03 09:35:19 -04:00
Mike Salvatore
3c85a89702
Island: Change log level in FileRepositoryLoggingDecorator to debug
...
Most log statements in repositories should probably be at debug.
Services and resources could potentially log at info.
2022-07-02 20:04:10 -04:00
Mike Salvatore
6cc3689ab4
Island: Remove unnecesary logging from LocalStorageFileRepository
...
Most logging is now handled by FileRepositoryLoggingDecorator, which
makes the logging reusable across different implementations of
`IFileRepository`.
2022-07-02 20:02:53 -04:00
Mike Salvatore
a329177b49
Island: Decorate LocalStorageFileRepository
2022-07-02 19:59:50 -04:00
Mike Salvatore
9affe10f67
Island: Add FileRepositoryCachingDecorator
2022-07-02 19:59:43 -04:00
Mike Salvatore
d4883c6e44
Island: Specify "read-only" in IFileRepository.open_file() docstring
2022-07-02 10:32:12 -04:00
Mike Salvatore
e3b5e0c01a
Island: Add FileRepositoryLockingDecorator
2022-07-02 09:53:18 -04:00
Mike Salvatore
bc0c4a1c8e
Island: Add FileRepositoryLoggingDecorator
2022-07-02 09:50:34 -04:00
Mike Salvatore
c00249fc17
Island: Change FileNotFoundError import in LocalStorageFileRepository
2022-07-02 09:38:28 -04:00
Mike Salvatore
48ccf467e0
Island: Remove repository.file_storage subpackage
2022-07-02 09:32:37 -04:00
Shreya Malviya
6b15889e7d
Island: Remove old logic for resetting config
2022-07-01 20:15:03 -04:00
Mike Salvatore
1421b5624c
Island: Add missing newline in ISimulationRepository
2022-07-01 16:31:55 -04:00
Mike Salvatore
410401a319
Island; Remove disused IslandMode mongo document
2022-07-01 13:11:05 -04:00
Mike Salvatore
f78fa73563
Island: Rename IslandModeEnum -> IslandMode
2022-07-01 13:11:05 -04:00
Mike Salvatore
d88fc86d90
Island: Remove disused mode subpackage
2022-07-01 13:11:05 -04:00
Mike Salvatore
63a69b047d
Island: Move IslandModeEnum to monkey_island.cc.models
2022-07-01 13:11:05 -04:00
Mike Salvatore
7ec558a5f4
Island: Move IslandModeService out of unnecessary subpackage
2022-07-01 13:11:05 -04:00
Mike Salvatore
77baf08ea3
Island: Remove disused MANIPULATOR_PER_MODE "service"
2022-07-01 13:11:05 -04:00
Mike Salvatore
6459da1d15
Island: Remove disused config_manipulator "service"
2022-07-01 13:11:05 -04:00
Mike Salvatore
c1994f5d60
Island: Extract registration methods from initialize_services()
2022-07-01 13:11:05 -04:00
Mike Salvatore
fc76bb2d83
Island: Set config on mode set in IslandModeService
2022-07-01 13:11:05 -04:00
Mike Salvatore
9990cdc6a8
UT: Parametrize test_save_simulation()
2022-07-01 13:11:05 -04:00
Mike Salvatore
4a91777019
Island: Add tests for IslandModeService
2022-07-01 13:11:05 -04:00
Mike Salvatore
8f7e7f98e7
Island: Use new IslandModeService in IslandMode resource
2022-07-01 13:11:03 -04:00
Mike Salvatore
50a982672e
Island: Chande method order in ISimulationRepository
2022-07-01 13:10:01 -04:00
Mike Salvatore
bdc5b8fa7b
Island: Refactor IslandModeService to use ISimulationRepository
2022-07-01 13:10:01 -04:00
Mike Salvatore
942e97cf18
Island: Decouple ConfigService.reset_config() from island_mode_service
2022-07-01 13:10:01 -04:00
Mike Salvatore
350ac6957f
Island: Register FileSimulationRepository with the DIContainer
2022-07-01 13:10:01 -04:00
Mike Salvatore
d2906ef23b
Island: Add docstrings to {get,save}_simulation()
2022-07-01 13:10:01 -04:00
Mike Salvatore
c58bbb3f8a
Island: Add FileSimulationRepository
2022-07-01 13:10:01 -04:00
Mike Salvatore
a18b5ef9b7
Island: Add missing return typehint to get_simulation()
2022-07-01 13:10:01 -04:00
Mike Salvatore
55eb9b39a2
Island: Set default value for Simulation.mode
2022-07-01 13:10:01 -04:00
Mike Salvatore
c221a9810d
Island: Add missing newline in ISimulationRepository
2022-07-01 13:10:01 -04:00
Mike Salvatore
28e75319b0
Island: Make ISimulationRepository methods abstract
2022-07-01 13:10:01 -04:00
Mike Salvatore
a24bf921c1
Island: Add {get,set}_mode() to ISimulationRepository
2022-07-01 13:10:01 -04:00
Mike Salvatore
8b10d81d48
Island: Use Simulation in ISimulationRepository
2022-07-01 13:10:01 -04:00
Mike Salvatore
a3f3fd96f7
Island: Export Simulation from models package
2022-07-01 13:10:01 -04:00
Mike Salvatore
0137c89158
Island: Add preliminary Simulation class
...
Includes just the island's mode for now.
2022-07-01 13:10:01 -04:00
Ilija Lazoroski
611818080a
UI: Fix some typos in json schema
2022-07-01 18:12:58 +02:00
Ilija Lazoroski
7cf64e798a
UI: Add plugin definitions for vulnerability exploiters
2022-07-01 18:06:42 +02:00
Ilija Lazoroski
1f3bffbabe
UI: Add fingerprinters to the schema
2022-07-01 16:47:04 +02:00
vakarisz
cb1360f5af
UI: AdvancedMultiSelect.js make option list depend on props
2022-07-01 17:26:11 +03:00
vakarisz
79afb9bc07
UI: Fix master checkbox in AdvancedMultiSelect.js
2022-07-01 16:57:05 +03:00
Mike Salvatore
e14101998f
Merge pull request #2054 from guardicore/2036-use-new-reset-endpoints
...
2036 use new reset endpoints
2022-07-01 09:29:54 -04:00
Mike Salvatore
a53fda39ce
UI: Throw exception from resetAll()
2022-07-01 09:09:40 -04:00
Mike Salvatore
d8a7ac3fb6
UI: Throw error if resetAll() fails
2022-07-01 09:05:42 -04:00
Mike Salvatore
05129c9d6b
UI: Add missing semicolons
2022-07-01 08:55:57 -04:00
Ilija Lazoroski
e28cb30366
UI: Add custom pbas and pbas to the UiSchema
2022-07-01 14:38:55 +02:00
Ilija Lazoroski
b0ca99d1f4
UI: Add another tab for custom PBAs
2022-07-01 14:38:16 +02:00
Ilija Lazoroski
5a367181f9
UI: Add custom PBAs and PBAs to the json schema
...
Remove data-url from the custom-pbas
Fix small things the the credential collectors
2022-07-01 14:36:58 +02:00
Ilija Lazoroski
67aa7d95a3
UI: Add vulnerability exploiters to the schema
2022-07-01 13:44:48 +02:00
Ilija Lazoroski
c254a94fc0
UI: Add credential collectors to the json schema
2022-07-01 13:32:05 +02:00
vakarisz
3339a2a957
UI: Change advanced multi select to work with plugins
2022-07-01 13:24:57 +03:00
Ilija Lazoroski
6a7dce50f0
UI: Use AdvancedMultiSelect on the exploiters
2022-06-30 22:46:15 +02:00
Ilija Lazoroski
c4f34939ec
UI: Add exploiter classes to the json schema
2022-06-30 22:45:41 +02:00
Mike Salvatore
6206196eda
UT: Fix formatting of test_island_mode.py
2022-06-30 15:16:18 -04:00
Mike Salvatore
ddc3f2012d
UI: Use new reset endpoints to reset all data
2022-06-30 14:50:44 -04:00
Mike Salvatore
e8f76f39e1
UI: Use new `/api/clear-simulation-data` endpoint
2022-06-30 14:50:25 -04:00
Mike Salvatore
8a52ad8951
Island: Add /api/clear-simulation-data
2022-06-30 14:46:24 -04:00
Mike Salvatore
301f2fc89c
UI: Use new "unset" island mode
2022-06-30 14:46:22 -04:00
Mike Salvatore
2b60b4ed81
Island: Remove comment in IslandMode resource
...
The HTTP response status codes seem reasonable.
2022-06-30 14:26:05 -04:00
Mike Salvatore
6fa52d0637
Island: Remove ModeNotSetError
2022-06-30 14:26:03 -04:00
Ilija Lazoroski
afbd3789e8
UI: Use the new JSON schema in the Configure page
2022-06-30 19:27:46 +02:00
Ilija Lazoroski
22bb423d0d
UI: Add propagation to the UI schema
2022-06-30 19:27:46 +02:00
Ilija Lazoroski
0b18d93869
UI: Change the configuration tabs per the new schema
2022-06-30 19:27:46 +02:00
Ilija Lazoroski
f6d0482c2e
UI: Initialize a new json schema
2022-06-30 19:27:45 +02:00
Mike Salvatore
d4c7b97229
Island: Add UNSET to IslandModeEnum
2022-06-30 13:12:26 -04:00
Mike Salvatore
6d4920e47f
Island: Add /api/reset-agent-configuration RPC endpoint
2022-06-30 13:12:25 -04:00
Mike Salvatore
03ec893e97
Island: Separate initialization of RESTful and RPC endpoints
2022-06-30 12:31:26 -04:00
Mike Salvatore
41b1c56fd0
UT: Add reset_to_default() to InMemoryAgentConfigurationRepository
2022-06-30 12:18:45 -04:00
Mike Salvatore
e293639a22
Island: Add reset_to_default() to FileAgentConfigurationRepository
2022-06-30 12:18:43 -04:00
Mike Salvatore
aa7509e49f
Island: Add reset_to_default() to IAgentConfigurationRepository
2022-06-30 10:02:01 -04:00
Mike Salvatore
ebaa68ad51
Island: Add TODO about cryptography.fernet
2022-06-30 08:45:20 -04:00
Mike Salvatore
3d5d563164
Island: Add TODO about using secrets vs pycryptodome
2022-06-30 08:30:54 -04:00
vakarisz
9f0169e812
UI: Rename saveConfig to tryImport in ImportConfigModal.tsx
...
tryImport better reflects what the function is doing
2022-06-30 12:26:57 +03:00
vakarisz
f75f1ced68
UI: Simplify config import request handling
...
Statement if showPassword then showPassword is redundant
2022-06-30 12:11:47 +03:00
vakarisz
565f02a534
UI: Replace " with ' in ImportConfigModal.tsx
2022-06-30 12:10:00 +03:00
vakarisz
53626c3a79
UI: Replace " with ' in ExportConfigModal.tsx
2022-06-30 12:07:01 +03:00
vakarisz
37152c2589
UI: Change configuration import to validate and decrypt on UI
2022-06-30 11:32:03 +03:00
vakarisz
5a531bcb04
UI: Change config export to include metadata about encryption
...
New format of {metadata: {encrypted: true}, contents: {...}} will simplify the logic of configuration import since we'll know if it's encrypted beforehand
2022-06-30 11:32:03 +03:00
vakarisz
6cef18b92f
UI: Change ExportConfigModal.tsx to encrypt config on UI
2022-06-30 11:32:01 +03:00
vakarisz
20c68ff25c
UI: Submit config before exporting
...
Previously config was not getting submitted before exporting. This could cause a misunderstanding where user exports a different configuration to the one he sees on the screen
2022-06-30 11:31:14 +03:00
vakarisz
69ca2d541d
UI: Create password based encryptor using crypto-js library
...
Password based encryptor is required for configuration encryption
2022-06-30 11:31:14 +03:00
Mike Salvatore
8cb9c4463a
Island: Add note about #2049 to FileUpload resource
2022-06-28 13:18:58 -04:00
Shreya Malviya
4e6aac2153
UT: Remove unused fixtures and data
2022-06-28 09:28:49 -07:00
Ilija Lazoroski
50351c9e88
Island: Remove ConfigurationExport endpoint
2022-06-28 08:34:12 -07:00
Ilija Lazoroski
de0ab88c3a
Island: Remove ConfigurationImport endpoint
2022-06-28 08:34:12 -07:00
Shreya Malviya
17a9c85199
UT: Remove test file for ConfigurationImport
...
It only had tests related to encrypted configuration.
2022-06-28 08:32:59 -07:00
Shreya Malviya
9b4e6728b0
UT: Remove test file for PasswordBasedStringEncryptor
2022-06-28 08:32:59 -07:00
Shreya Malviya
5c5ae5bb0d
Island: Modify ConfigurationImport and ConfigurationExport to work without PasswordBasedStringEncryptor
2022-06-28 08:32:59 -07:00
Shreya Malviya
3c41bada56
Island: Remove PasswordBasedStringEncryptor
2022-06-28 08:32:59 -07:00
Mike Salvatore
9f2d56259c
Agent: Improve TCP port discovery log message
2022-06-27 17:37:25 -04:00
Mike Salvatore
596bacfa36
Merge pull request #2042 from guardicore/2001-use-new-configuration-endpoint
...
2001 use new configuration endpoint
2022-06-27 11:00:47 -04:00
Mike Salvatore
5a0d891c35
Merge pull request #2045 from guardicore/1960-configuration-object
...
1960 configuration object
2022-06-27 10:58:41 -04:00
Mike Salvatore
cb112d5b4f
Island: Require authentication for POST /api/agent-configuration
...
The agent should not be submitting new configurations to the Island. The
Island commands the agent, not the other way around.
2022-06-27 09:59:01 -04:00
Ilija Lazoroski
181ce399a1
Island: Remove GET method from Monkey endpoint
...
Also removes bunch of unused method from ConfigService
2022-06-27 09:53:56 -04:00
Ilija Lazoroski
b564e71d89
Agent: Modify ControlChannel to use AgentConfiguration endpoint
2022-06-27 09:53:39 -04:00
Ilija Lazoroski
98a9fd3285
Island: Remove jwt_required from agent-configuration resource
...
Can't secure the endpoint because it is used by the agent
2022-06-27 09:51:42 -04:00
Mike Salvatore
b49dfcf79d
Island: Change error -> message in AgentConfiguration resource
2022-06-27 09:30:33 -04:00
Mike Salvatore
08bac8ef39
Island: Added "raises" to store_configuration() docstring
2022-06-27 09:24:32 -04:00
Mike Salvatore
b5d7b800bb
Agent: Add TODO about GUID
2022-06-27 09:15:26 -04:00
Mike Salvatore
2fbab063cd
Common: Remove empty file
2022-06-27 09:12:37 -04:00
Mike Salvatore
851296d5fa
UT: Remove disused automated_master_config
2022-06-27 09:09:07 -04:00
Mike Salvatore
a0de4b8f31
Agent: Use derived current_depth in AutomatedMaster
2022-06-27 09:06:15 -04:00
vakarisz
4ef17ccc9b
Agent: Replace ExploiterConfig with PluginConfig
...
ExploiterConfig was exact match of PluginConfig, so they got merged
2022-06-27 08:42:54 -04:00
Mike Salvatore
e6d3854f74
Common: Remove DEFAULT_AGENT_CONFIGURATION_JSON
...
It's easier to maintain object than a JSON string for the default
configuration.
2022-06-27 08:23:54 -04:00
Mike Salvatore
90259c1b7a
UT: Remove dependency on DEFAULT_AGENT_CONFIGURATION_JSON
2022-06-27 07:07:53 -04:00
Mike Salvatore
bf1d360e50
UT: Remove disused DEFAULT_CONFIG
2022-06-27 06:56:16 -04:00
vakarisz
232d6ba344
Agent: Fix string formatting in http_tools.py
...
Move line 60 to f formatting from the old %s style
2022-06-27 11:20:27 +03:00
vakarisz
c080f03011
Agent: Fix _filter_none_values to be a static method
2022-06-27 10:02:45 +03:00
vakarisz
7179f9128c
Agent: Fix typehints in clear_command_history.py
2022-06-27 10:01:15 +03:00
vakarisz
4b7ab058c6
Agent: Fix typehints in _run_pbas of automated_master.py
...
Typehint was Mapping, when it was using and calling other methods with CustomPBAConfiguration
2022-06-27 09:36:56 +03:00
Mike Salvatore
3305325419
Island: Remove unnecessary aws_service import
2022-06-26 09:42:08 -04:00
Mike Salvatore
e0047e485b
Island: Reformat comments
2022-06-26 09:40:14 -04:00
Mike Salvatore
fefd2daf2b
Agent: Use Mapping instead of Dict
2022-06-24 19:21:48 -04:00
Mike Salvatore
503a0a833f
Agent: Use Sequence instead of List for type hints
2022-06-24 19:19:51 -04:00
Mike Salvatore
4f7d8be6ba
Agent: Use PluginConfiguration in _run_payload()
2022-06-24 15:35:41 -04:00
Mike Salvatore
8886ebc8b8
Agent: Remove unnecessary local variables
2022-06-24 15:33:47 -04:00
Mike Salvatore
dc9b91d430
Agent: Use Iterable instead of List in type hint
2022-06-24 15:32:06 -04:00
Mike Salvatore
33ec4f7ae9
Agent: Log configuration when it's received from the Island
2022-06-24 15:16:43 -04:00
Mike Salvatore
b219ca0917
UT: Fix line that was too long
2022-06-24 14:48:13 -04:00
Mike Salvatore
84fc78cbf8
UT: Remove unused imports from conftest.py
2022-06-24 14:47:15 -04:00
Mike Salvatore
568eb4ff3b
Common: Add docstrings to static methods in AgentConfiguration
2022-06-24 13:30:43 -04:00
Mike Salvatore
8cb045d635
Common: Fix incorrect type hints on AgentConfiguration.from_json()
2022-06-24 13:25:09 -04:00
Mike Salvatore
334d2a790f
Common: Rename from_dict() -> from_mapping()
2022-06-24 13:25:01 -04:00
Mike Salvatore
e2f365a1f9
Common: Rename dict_ -> config_dict
2022-06-24 13:22:41 -04:00
Mike Salvatore
dbd0d3e0dd
Common: Encapsulate MarshmallowError
2022-06-24 13:21:39 -04:00
Mike Salvatore
94524d124c
Common: Add InvalidConfigurationError
2022-06-24 13:05:16 -04:00
Mike Salvatore
fc9d854c72
Common: Add validation to AgentConfiguration construction
2022-06-24 12:56:34 -04:00
Mike Salvatore
ea02bec0b4
Common: Remove circular dependency in agent_configuration.py
2022-06-24 12:42:09 -04:00
Mike Salvatore
4c47eae70b
Common: Encapsulate AgentConfigurationSchema
2022-06-24 12:39:47 -04:00
Mike Salvatore
07d1d9c45a
Island: Use {from,to}_json() in resources
2022-06-24 12:33:12 -04:00
Mike Salvatore
a1baaae76a
Common: Use from_json() in build_default_agent_configuration()
2022-06-24 12:29:54 -04:00
Mike Salvatore
6a927266a4
Island: Use {from,to}_json() in FileAgentConfigurationRepository
2022-06-24 12:28:36 -04:00
Mike Salvatore
e4eee6a5eb
UT: Use from_dict() and from_json() in tests
2022-06-24 12:28:30 -04:00
Mike Salvatore
28250daffe
Common: Add AgentConfiguration.to_json()
2022-06-24 12:19:31 -04:00
Mike Salvatore
1f9a056b0b
Agent: Add AgentConfiguration.from_json()
2022-06-24 11:51:33 -04:00
Mike Salvatore
8605fd40ac
UT: Add a test for AgentConfiguration.from_dict()
2022-06-24 11:50:49 -04:00
Mike Salvatore
5c739716a9
Common: Rename _dict -> dict_
2022-06-24 11:44:00 -04:00
Mike Salvatore
e3cea20cd5
UT: Move test_agent_configuration.py to configuration/
2022-06-24 11:42:24 -04:00
Mike Salvatore
7bba711307
Agent: Revert scan/exploit thread numer change
...
The number of scan and exploit threads was changed accidentally in
6d156b8f
.
2022-06-24 11:08:29 -04:00
Mike Salvatore
02cca3e12a
Agent: Remove unnecessary type hints from IAgentRepository doctring
2022-06-24 07:42:01 -04:00
Mike Salvatore
7b4daaa40f
Agent: Change IAgentRepository to ccept OperatingSystems
...
This was missed in d59dd81f
and ffd3464d
.
2022-06-24 07:40:24 -04:00
Mike Salvatore
a3db4142bf
Common: Add a docstring to OperatingSystems
2022-06-24 07:36:58 -04:00
Mike Salvatore
2eb1691030
Agent: Use operating_system.value in _download_binary_from_island()
2022-06-24 07:34:10 -04:00
Mike Salvatore
858eb2302c
Agent: Rename os -> operating_system in caching_agent_repository
...
The variable name "os" conflicts with the name of Python's `os` library.
2022-06-24 07:23:26 -04:00
Mike Salvatore
ffd3464d8a
Agent: Move enum to string conversion to _download_binary_from_island()
2022-06-24 07:22:07 -04:00
Ilija Lazoroski
e1d5d25e9c
Agent: Use OperatingSystem.WINDOWS in Powershell
2022-06-24 11:18:39 +02:00
Ilija Lazoroski
b605f16c4f
Agent: Use == to compare OperatingSystems enum in Log4Shell
2022-06-24 11:11:19 +02:00
Ilija Lazoroski
fb67586a4c
Agent: Use OperatingSystems.value for urllib.parse.quote
2022-06-24 10:51:58 +02:00
Ilija Lazoroski
d59dd81f43
Agent: Use OperatingSystems in CachingAgentRepository
2022-06-24 10:19:47 +02:00
Ilija Lazoroski
f9445a2c76
Agent: Use == to compare OperatingSystems enum
2022-06-24 10:18:51 +02:00
Ilija Lazoroski
2ff2e5f597
Agent: Fix running of payloads
2022-06-24 08:33:21 +02:00
Mike Salvatore
6d156b8fee
Island: Return config timeouts in seconds
...
The old config scheme stored timeouts as milliseconds, whereas the new
one uses seconds. Seconds are more convenient because most python
methods expecting timeouts are expecting floating-point seconds.
2022-06-23 16:55:10 -04:00
Mike Salvatore
05f640d487
Agent: Rename should_propagate -> maximum_depth_reached
2022-06-23 16:36:01 -04:00
Mike Salvatore
ad0f6946bd
Agent: Decouple should_propagate() and AgentConfiguration
2022-06-23 16:32:55 -04:00
Mike Salvatore
afeca66d92
UT: Use AgentConfiguration in test_propagation.py
2022-06-23 16:27:05 -04:00
Mike Salvatore
5a95aef94c
Agent: Remove unnecessary parameter
2022-06-23 15:57:11 -04:00
Mike Salvatore
bff92ed7ad
UT: Fix erroneously abbreviated fixture
2022-06-23 15:57:06 -04:00
Mike Salvatore
81d3300ec7
Agent: Remove print() that was added by mistake
2022-06-23 15:43:34 -04:00
Mike Salvatore
6e951ed65d
UT: Remove supported_os from default_config.py
...
"supported_os" was removed from the schema in d079d74b
2022-06-23 14:56:24 -04:00
Mike Salvatore
bba7139be6
Agent: Add missing return type hint to _try_communicate_with_island()
2022-06-23 14:51:35 -04:00
Mike Salvatore
aff54232e9
Agent: Remove redundant call to control_channel.get_config()
2022-06-23 14:51:35 -04:00
vakaris_zilius
0f848eb284
Agent: Usa agent config object instead of dict should_propagate
2022-06-23 14:51:35 -04:00
vakaris_zilius
ab67853192
Agent: Usa agent config object instead of dict automated_master.py
2022-06-23 14:51:35 -04:00
vakaris_zilius
86ed174d74
Agent: Usa agent config object instead of dict in option_parsing.py
2022-06-23 14:51:35 -04:00
vakarisz
9286e86900
Agent: Use deserialized in exploiter.py and propagator.py
2022-06-23 14:51:31 -04:00
vakarisz
095e49b543
Agent: Use deserialized config in automated_master.py
2022-06-23 14:47:08 -04:00
vakarisz
ffe8c3451b
Agent: Change scanners to use the config object
2022-06-23 14:47:08 -04:00
vakarisz
6b406ef686
Agent: Change configuration to object in control channel
2022-06-23 14:47:08 -04:00
vakarisz
e83995d962
UT: Add a new fixture for config object
2022-06-23 14:47:08 -04:00
vakarisz
d8ac441c59
Agent: Fix configuration retrieval in _run_simulation
2022-06-23 14:47:08 -04:00
vakarisz
77804caab5
Agent: Add from_dict method to AgentConfiguration
...
Creating AgentConfiguration object from dictionary makes sense because it doesn't couple the configuration to any specific serialization methods. Also, the json sent from the island doesn't match the config structure because it stores config in a dict under "config" key.
2022-06-23 14:47:08 -04:00
Mike Salvatore
d079d74b2c
Merge branch '2000-configuration-resource' into 1960-configuration-object
...
PR #2038
2022-06-23 11:46:13 -04:00
Ilija Lazoroski
1ae3bd4b4f
UT: Rename InMemoryFileAgentConfigurationRepository to
...
InMemoryAgentConfigurationRepository
2022-06-23 17:15:50 +02:00
Ilija Lazoroski
42c4803376
Island: Use schema.loads in AgentConfiguration POST method
2022-06-23 08:12:54 -07:00
Ilija Lazoroski
d7329ea839
UT: Add tests for AgentConfiguration resource
2022-06-23 08:12:54 -07:00
Ilija Lazoroski
b35832b9dd
UT: Add InMemoryFileAgentConfigurationRepository
2022-06-23 08:12:54 -07:00
Ilija Lazoroski
891794d927
Island: Add AgentConfiguration resource to app.py
2022-06-23 08:12:54 -07:00
Ilija Lazoroski
39e4180dfe
Island: Use make_response in GET agent_configuration
2022-06-23 08:12:54 -07:00
Ilija Lazoroski
48fab89e11
Island: Rename configuration.py to agent_configuration.py
...
Per convention it must match class name
2022-06-23 08:12:54 -07:00
Shreya Malviya
452028f221
UT: Replace Hadoop with MSSQL in test data
...
Previously, in the UT data, Hadoop had only windows in the
"supported_os" field in the config. Now that that field is stripped out
from the config, the supported OSes are picked up from the main code
(from `SUPPORTED_OS` in the master's `Exploiter` class) which has both
winodws and linux for Hadoop. This caused the tests to fail.
This commit changes the UT data to include the MSSQL exploiter (windows
only) instead of the Hadoop exploiter. The tests pass now.
2022-06-23 08:10:56 -07:00
vakarisz
68c27969d3
Agent: Fix a bug in incompatible os check
...
web_rce.py checks for incompatible OS on the victim. Bug was that it checked linux twice instead of linux and windows
2022-06-23 16:30:38 +03:00
vakaris_zilius
717801e9ad
Agent: Add telemetry json encoder
...
Telemetry json encoder is needed to encode OperatingSystems enums when sending back telemetries
2022-06-23 11:51:25 +00:00
vakarisz
77f8be523c
UT: Use operating systems consts
2022-06-23 11:51:21 +00:00
vakarisz
4c1c8044cd
Agent: Use operating systems consts
2022-06-23 11:51:17 +00:00
Shreya Malviya
1fc0eae480
UT: Change import order in conftest.py
2022-06-22 09:35:46 -07:00
Shreya Malviya
104c7ac210
Island: Fix function call to load config in new configuration resource
2022-06-22 09:10:47 -07:00
Shreya Malviya
e25eb194a1
UT: Remove `supported_os` for exploiters from all tests
2022-06-22 09:10:47 -07:00
Shreya Malviya
fd41d9179e
Agent: Add `SUPPORTED_OS` dict for exploiters and change checking logic in master
2022-06-22 09:10:41 -07:00
Shreya Malviya
26ece213a2
Island: Remove logic to add `supported_os` for exploiters to configuration
2022-06-22 09:07:02 -07:00
Shreya Malviya
03037b5662
Common: Remove `supported_os` field for exploiters in configuration
2022-06-22 09:06:35 -07:00
Mike Salvatore
665f7e4adf
Merge branch 'fix-depth-logic' into 1960-configuration-object
2022-06-22 11:20:01 -04:00
Shreya Malviya
142eed72ac
Island: Remove logic to remove/add config metadata in new configuration resource
2022-06-22 08:12:09 -07:00
Mike Salvatore
eeba0e0616
UT: Add tests for should_propagate
2022-06-22 10:59:46 -04:00
Shreya Malviya
ec710d9e5f
Island: Get rid of ResponseContents and ImportStatuses in new configuration resource
2022-06-22 07:48:34 -07:00
Mike Salvatore
1199c72f0d
Island: Modify skipping propagation log message
2022-06-22 10:44:02 -04:00
vakarisz
8d2078048c
Agent: Change the positive_int definition to contain 0
2022-06-22 17:39:25 +03:00
Shreya Malviya
d861def86c
Island: Add logic to add metadata to config in new configuration resource's GET
2022-06-22 07:35:19 -07:00
Shreya Malviya
922495785c
Island: Create class variable for agent config schema in new configuration resource
2022-06-22 07:35:19 -07:00
Shreya Malviya
6b45d62d81
Island: Fix logic to remove metadata from config in new configuration resource's POST
2022-06-22 07:35:19 -07:00
Shreya Malviya
32fe7c6a4b
Island: Remove unneeded fields from `ResponseContents` in new configuration resource
2022-06-22 07:35:19 -07:00
Shreya Malviya
63d5330386
Island: Remove unneeded patch function in new configuration resource
2022-06-22 07:35:19 -07:00
Shreya Malviya
00e38391b4
Island: Catch appropriate `marshmallow` error when loading config which could be invalid, in new configuration resource
2022-06-22 07:35:19 -07:00
Shreya Malviya
15615e08c4
Island: Get rid of unsafe config options' check in new configuration resource
2022-06-22 07:35:19 -07:00
Shreya Malviya
8c14423c4e
Island: Prepend 'agent' to everything having 'configuration' in new configuration resource
2022-06-22 07:35:19 -07:00
Shreya Malviya
0d8cc713d2
Island: Rename `file_agent_configuration_repository` to `agent_configuration_repository` in new configuration resource
2022-06-22 07:35:19 -07:00
Shreya Malviya
74bc55e077
Island: Remove config type logic from new configuration resource
2022-06-22 07:35:19 -07:00
Ilija Lazoroski
5f253e79b3
Island: Init Configuration resource
2022-06-22 07:35:18 -07:00
Shreya Malviya
138480f021
Island: Roughly implement POST in new Configuration resource
...
+ lots of questions
2022-06-22 07:35:18 -07:00
Shreya Malviya
5dd27eeea5
Island: Add definition for GET in new Configuration resource
2022-06-22 07:35:18 -07:00
Shreya Malviya
7a28ba4c4d
Island: Create new resource `Configuration`
2022-06-22 07:35:18 -07:00
Mike Salvatore
1f00a13649
Island: Pass default agent configuration to repository constructor
2022-06-22 10:27:53 -04:00
vakaris_zilius
8358253fc7
Agent: Rename depth to current_depth in propagation.py
2022-06-22 13:14:24 +00:00
vakaris_zilius
f0029a0d82
Agent: Close inbound tunnel if one was opened
2022-06-22 13:13:32 +00:00
vakaris_zilius
27bff7e41c
Island: Remove updating agent configuration with stolen credentials
2022-06-22 12:40:55 +00:00
vakarisz
e15206101a
Agent: Fix a bug in should_propagate
2022-06-22 14:42:19 +03:00
vakarisz
552e2100fa
Agent: Set default depth cmd parameter to 0
...
If user runs the agent it should start with depth 0, because usually it means that it's running on the island
2022-06-22 14:33:47 +03:00
vakarisz
5a48bfcfcc
Agent: Fix should_propagate import in automated_master.py
2022-06-22 14:15:24 +03:00
vakarisz
734fc80c92
Agent: Add logging message about maximum depth reached
2022-06-22 13:04:24 +03:00
vakarisz
582328bea8
Agent: Create and use should_propagate method
...
This method is used to determine if the inbound tunnel should be open and if the master should attempt exploiting other machines
2022-06-22 12:31:47 +03:00
vakarisz
3c2d58b5d3
Agent, Common: Add positive_int argument type
2022-06-22 11:52:36 +03:00
Mike Salvatore
f9775f5b54
Island: Improve directory traversal error message
2022-06-21 15:18:51 -04:00
Mike Salvatore
40b192accc
Island: Wrap directory traversal errors in repository errors
...
A given `IFileRepository` may have no concept of directories.
`LocalStorageFileRepository` should wrap the ValueErrors raised to
prevent directory traversal in repository errors.
2022-06-21 15:18:51 -04:00
Mike Salvatore
21be5fc2be
Island: raise RemovalError in Local...FileRepository.delete_all_files()
2022-06-21 15:18:51 -04:00
Mike Salvatore
da1339e410
Island: Raise RemovalError in LocalStorageFileRepository.delete_file()
2022-06-21 15:18:51 -04:00
Mike Salvatore
cd1481e4fe
Island: Add monkey_island.cc.repository.RemovalError
2022-06-21 15:18:51 -04:00
Mike Salvatore
63404c7bed
Island: Raise StorageError in LocalStorageFileRepository.save_file()
2022-06-21 15:18:51 -04:00
Mike Salvatore
3446dbf0aa
Island: Export StorageError from monkey_island.cc.repository
2022-06-21 15:18:51 -04:00
Mike Salvatore
f60c2f1dde
Island: Add ValueError to IFileRepository docstring
2022-06-21 15:18:51 -04:00
Mike Salvatore
5c97d6bdbf
UT: Add tests for AgentBinaryRepository
2022-06-21 15:18:17 -04:00
Mike Salvatore
838a2e742c
Island: Change can -> could in get_configuration()
2022-06-21 10:36:56 -04:00
Mike Salvatore
3bd977ed55
Island: Improve IFileRepository.open_file() docstring
2022-06-21 10:34:27 -04:00
Mike Salvatore
c008db4cf2
Island: Raise RetrievalError in FileAgentConfigurationRepository
2022-06-21 09:40:00 -04:00
Mike Salvatore
4de9f3cb6d
UT: Move OpenErrorFileRepository into tests/monkey_island
2022-06-21 09:35:23 -04:00
Mike Salvatore
47df257545
Island: Raise RetrievalError from IAgentBinaryRepository
2022-06-21 09:22:38 -04:00
Mike Salvatore
22b22c5f0a
Island: Remove testing TODOs from PBAFile{Download,Upload}
2022-06-21 09:11:54 -04:00
Mike Salvatore
63a2527f3f
UT: Add test_file_download_endpoint_500() for PBAFileUpload
2022-06-21 09:11:10 -04:00
Mike Salvatore
8939ca2106
UT: Extract open_error_flask_client into conftest.py
2022-06-21 09:11:10 -04:00
Mike Salvatore
f973c9d6e9
UT: Extract MockFileRepository into its own module
2022-06-21 09:11:10 -04:00
Mike Salvatore
bf2f58aace
UT: Add __init__.py
2022-06-21 09:11:10 -04:00
Mike Salvatore
bcc5265a99
UT: Add test_file_download_endpoint_500() for PBAFileDownload
2022-06-21 09:11:03 -04:00
Ilija Lazoroski
44795531b8
Island: Remove logging TODOs for pba_file upload/download
...
Resources should log the errors
2022-06-21 15:04:34 +02:00
Mike Salvatore
cd34cd5eae
Island: Add repository.FileNotFoundError
2022-06-21 08:49:36 -04:00
Mike Salvatore
c424262f12
Island: Improve description of return value for get_configuration()
2022-06-21 08:22:47 -04:00
Ilija Lazoroski
3cb678ad32
Island: Raise distinct errors when openning a file
...
IFileRepository now distincts between file not found and a file that
could not be retrieved
2022-06-20 14:55:26 +02:00
vakarisz
df77ca4f96
Agent: Change the logic of depth to represent current depth
...
Based on the previous logic the depth parameter represented hops remaining, not current depth.
2022-06-20 15:52:50 +03:00
vakarisz
3757e33180
UT: Use OperatingSystems enum instead of strings
2022-06-20 12:30:25 +03:00
vakarisz
0474e2a5f7
Island: Change json encoding to encode Enums to name string
...
Enum objects couldn't get encoded, so for each enum we had to decide whether the name or the value would be used to represent that enum value. Changing the encoding to name allows us to use enum object on the island without having to worry about encoding.
2022-06-20 12:27:01 +03:00
vakarisz
c0f0d35f0b
Island: Use OperatingSystems enum in config.py
2022-06-20 12:18:03 +03:00
Shreya Malviya
02dcee8bfc
UT: Modify tests to pass with config flattening changes
2022-06-19 23:35:35 -07:00
Shreya Malviya
ab23b3c9cb
Island: Fix exploiters' `supported_os`'s capitalisation in config flattening
2022-06-19 23:13:14 -07:00
Shreya Malviya
ba3af5a9c2
Island: Fix 'exploitation' field of config flattening
2022-06-19 23:13:14 -07:00
Shreya Malviya
f9a7989f5e
Island: Fix 'propagation' field of config flattening
2022-06-19 23:13:09 -07:00
Shreya Malviya
83dd4334b2
UT: Fix flat_config.json to match current config schema
2022-06-19 21:54:54 -07:00
vakarisz
d393a0b3c6
Agent: Change credential collectors, payloads and pbas in flat config
...
Flat config changes are made in order for config object to be serializable
2022-06-19 20:22:42 -07:00
Mike Salvatore
b99ad70774
Island: Add StorageError
2022-06-17 19:56:09 -04:00
Mike Salvatore
cb7dae28bf
Island: Add a docstring for RetrievalError
2022-06-17 19:55:47 -04:00
Mike Salvatore
58733f7572
Merge pull request #2031 from guardicore/1960-configuration-repository
...
1960 configuration repository
2022-06-17 19:44:09 -04:00
Mike Salvatore
58ea11ae9f
Common: Move DEFAULT_AGENT_CONFIGURATION to its own file
2022-06-17 19:16:19 -04:00
Mike Salvatore
e4a2a04765
UT: Remove duplicate SingleFileRepository
...
This was added by mistake. Remove it!
2022-06-17 19:14:38 -04:00
Mike Salvatore
d3a03d2653
Agent: Remove disused constants
2022-06-17 13:11:47 -04:00
Mike Salvatore
e730695407
Agent: Remove disused Configuration class
2022-06-17 13:11:30 -04:00
Mike Salvatore
764bc1559b
Island: Add IAgentConfigurationRepository to the DIContainer
2022-06-17 13:08:22 -04:00
Mike Salvatore
45168b5ba7
Island: Return default configuration from get_configuration()
2022-06-17 12:56:55 -04:00
Mike Salvatore
a3e3e3e324
Common: Add DEFAULT_AGENT_CONFIGURATION
2022-06-17 12:48:54 -04:00
Mike Salvatore
9a216e9c3d
Island: Add "raises" to docstring in get_configuration()
2022-06-17 12:17:22 -04:00
Mike Salvatore
922cb8cea9
Island: Add RetrievalError
2022-06-17 12:17:21 -04:00
Mike Salvatore
30065952a5
Island: Add RetrievalError
2022-06-17 12:13:18 -04:00
Mike Salvatore
73ead3bb26
Island: Rename set_configuration() -> store_configuration()
2022-06-17 12:10:43 -04:00
Mike Salvatore
bdce5f84a6
Island: Add FileAgentConfigurationRepository
2022-06-17 12:09:30 -04:00
Mike Salvatore
5ebdb60ea4
Island: Add @abstractmethod in IAgentConfigurationRepository
2022-06-17 11:41:29 -04:00
Mike Salvatore
a75041e93f
Island: Rename IConfigurationRepository IAgentConfigurationRepository
2022-06-17 11:36:50 -04:00
Mike Salvatore
7cb7f7ab5a
UT: Extract agent configuration from test_agent_configuration.py
2022-06-17 11:33:01 -04:00
Mike Salvatore
ace3eb8718
UT: Extract SingleFileRepository from test_pba_file_upload.py
2022-06-17 11:19:11 -04:00
Mike Salvatore
91476a7a06
Island: Protract config -> configuration in IConfigurationRepository
2022-06-17 11:11:14 -04:00
Mike Salvatore
59e29456c0
Island: Rename i_config_repository.py -> i_configuration_repository.py
2022-06-17 11:10:16 -04:00
Mike Salvatore
ae0c440603
Island: Add documentation for IConfigRepository
2022-06-17 11:08:45 -04:00
Mike Salvatore
62056175a1
Island: Remove unneeded methods in IConfigRepository
...
Also remove stale comments. No encryption is needed here because
configuration does not contain anything sensitive.
2022-06-17 11:06:23 -04:00
Mike Salvatore
84db00b728
Island: Use AgentConfiguration in IConfigRepository
2022-06-17 11:05:10 -04:00
Mike Salvatore
f25a81635c
Merge pull request #2030 from guardicore/1960-configuration-schema
...
1960 configuration schema
2022-06-17 10:31:56 -04:00
Mike Salvatore
ed39d155bf
Common: Remove sub-configuration and sub-schemas from configuration
2022-06-17 10:23:43 -04:00
Mike Salvatore
291b82c28d
Common: Separate agent sub configurations and schemas
2022-06-17 10:20:49 -04:00
vakarisz
f8855d290d
Agent: Remove WormConfiguration and cleanup related infrastructure
2022-06-17 16:40:40 +03:00
Mike Salvatore
e0ae109368
Common: Add AgentConfiguration
2022-06-17 09:27:51 -04:00
Mike Salvatore
7039ccf708
Common: Switch configuration timeouts from ms to floating-point seconds
2022-06-17 09:14:22 -04:00
Mike Salvatore
bd7ea7fdb1
Common: Add maximum_depth to PropagationConfiguration
2022-06-17 09:07:13 -04:00
Mike Salvatore
a41b2e3ea4
Common: Add PropagationConfiguration
2022-06-17 09:04:00 -04:00
Mike Salvatore
9bbf5c8ae7
Common: Add NetworkScanConfiguration
2022-06-17 08:50:48 -04:00
Mike Salvatore
5845bb73af
Common: Reorder scan and exploit configuration classes
2022-06-17 08:33:43 -04:00
Mike Salvatore
3c879f444d
Common: Add ScanTargetConfigurationSchema
2022-06-17 08:30:42 -04:00
Mike Salvatore
7e9c481992
Common: Rename marshmallow post_load methods to be protected
2022-06-17 08:22:31 -04:00
Mike Salvatore
ee8e949a0d
Common: Add ICMPScanConfigurationSchema
2022-06-17 08:20:26 -04:00
Mike Salvatore
0b810f5d56
Common: Add TCPScanConfigurationSchema
2022-06-17 08:14:35 -04:00
vakarisz
2e561181ea
Common: Add TCPScanConfiguration dataclass to agent_configuration.py
2022-06-17 15:10:46 +03:00
vakarisz
af761ea48f
Common: Add ICMPScanConfiguration dataclass to agent_configuration.py
2022-06-17 15:10:45 +03:00
vakarisz
969f916cf5
Common: Add ScanTargetConfiguration dataclass to agent_configuration.py
2022-06-17 15:10:43 +03:00
Mike Salvatore
e8001d8cf7
Merge pull request #2027 from guardicore/register-di-conventions
...
Register di conventions
2022-06-17 07:33:33 -04:00
Mike Salvatore
42f0cb42d2
UT: Use container fixture in test_unregistered_type
2022-06-17 07:25:18 -04:00
Mike Salvatore
a18814a83b
Common: Fix incorrect docstring in DIContainer
2022-06-17 07:16:50 -04:00
Mike Salvatore
df23cc42f4
Common: Fix spelling error
...
Co-authored-by: VakarisZ <36815064+VakarisZ@users.noreply.github.com>
2022-06-17 07:13:07 -04:00
Mike Salvatore
4065bc23fb
Common: Add ExploitationConfiguration
2022-06-16 20:20:35 -04:00
Mike Salvatore
db9d57a526
Common: Remove `class Meta` from marshmallow schemas
...
`RAISE` is the default behavior, so there's no need to copy/paste this
all over the place.
2022-06-16 20:20:35 -04:00
Mike Salvatore
afd3160c2f
Common: Add ExploitationOptionsConfiguration
2022-06-16 20:20:35 -04:00
Mike Salvatore
70e8bca1ea
Common: Use OperatingSystems enum in ExploiterConfigurationSchema
2022-06-16 20:20:35 -04:00
unknown
737aacf0bd
Agent: Add marshmallow-enum to dependencies
2022-06-16 20:20:35 -04:00
unknown
526fe24aa6
Island: Add marshmallow-enum to dependencies
2022-06-16 20:20:35 -04:00
Mike Salvatore
39e18b9c73
Common: Add OperatingSystems enum
...
Enough is enough! I have had it with these monkey-fighting strings on
this Monday to Friday plane! Everybody strap in.
Seriously, it's time to stop using strings all over the place to
identify the OS. An Enum is a better, more strongly-typed solution.
2022-06-16 20:20:35 -04:00
Mike Salvatore
9d73252ff5
Common: Add ExploiterConfiguration
2022-06-16 20:20:35 -04:00
Mike Salvatore
88dbf4feb7
Common: Use Dict instead of dict in PluginConfiguration
2022-06-16 20:20:35 -04:00
Mike Salvatore
bdad41057c
Common: Add CustomPBAConfiguration
2022-06-16 20:20:35 -04:00
Mike Salvatore
c79f62e682
Common: Add PluginConfiguration
2022-06-16 20:20:35 -04:00
unknown
660c1421c0
Agent: Add marshmallow to dependencies
2022-06-16 20:20:35 -04:00
unknown
f9f5861ae3
Island: Add marshmallow to dependencies
2022-06-16 20:20:35 -04:00
Mike Salvatore
1f1c5585f0
Island: Remove HTTP_PORTS from top-level agent configuration
...
Resolves #2028
2022-06-16 20:19:56 -04:00
Mike Salvatore
5db04c3580
Island: Register the data directory as a convention
2022-06-16 09:26:04 -04:00
Mike Salvatore
c53864cdd7
Common: Add release_convention()
2022-06-16 09:26:04 -04:00
Mike Salvatore
8fb97fc8c0
Common: Remove posessive from release()'s docstring
2022-06-16 09:26:04 -04:00
Mike Salvatore
c3789c4766
Common: Document dependency resolution precedence
2022-06-16 09:26:04 -04:00
Mike Salvatore
ab94ddeb88
Commmon: Add register_convention()
2022-06-16 09:26:02 -04:00
vakarisz
0082cd2193
Island: Style improvements in ip_addresses.py
2022-06-16 15:46:08 +03:00
vakarisz
5fbe01a32e
Island: Display tunneling ports in T1065
...
Non standard ports attack technique should include ports agent used for tunneling
2022-06-16 12:11:55 +03:00
Mike Salvatore
6345780182
Common: Add UnregisteredConventionError
2022-06-15 21:02:04 -04:00
Ilija Lazoroski
136747b1c8
Island: Use tunnel or island port in T1065
...
* adds get_tunnel_info in monkey model
2022-06-15 17:45:07 +03:00
Ilija Lazoroski
ed3c369eef
Island: Rename local-ips resource to ip-addresses
2022-06-15 17:45:07 +03:00
Ilija Lazoroski
8ae6bb8c73
UI: Remove testing from InternalConfig
...
* leftover from renaming credential_classes
2022-06-15 17:45:07 +03:00
Ilija Lazoroski
7b415be883
UT: Fix island config tests
2022-06-15 17:45:07 +03:00
Ilija Lazoroski
8af665c0a8
UI: Use local_ips endpoint to get command_servers
2022-06-15 17:45:07 +03:00
Ilija Lazoroski
d76fad9e17
Island: Remove current_server and command_servers from config
...
* It removes whole island_server section from internal config
2022-06-15 17:45:07 +03:00
Ilija Lazoroski
9444f1a9d7
Island: Add local_ips resource
2022-06-15 17:45:07 +03:00
Mike Salvatore
ac172dc81f
Merge pull request #2024 from guardicore/2019-mssql-batch-cleanup
...
Remove temporary "payload" file in MSSQL exploiter
2022-06-15 10:25:38 -04:00
Mike Salvatore
353594f505
Merge pull request #2021 from guardicore/mssql-method-improvements
...
MSSQL method improvements
2022-06-15 10:25:10 -04:00
Mike Salvatore
4e71f4b6e4
Agent: Improve MSSQL command logging
2022-06-15 08:45:56 -04:00
Mike Salvatore
95acfc36ad
Agent: Remove MSSQL temporary file and directory
...
This temporary file was only needed when commands were subject to 128
character limit. Writing commands to a batch file and executing it was a
way to run larger commands. Now that we know single quotes circumvent
this limit, the temporary file and directory are no longer necessary.
2022-06-15 08:37:54 -04:00
Mike Salvatore
f9b3d7f5eb
Agent: Move agent server methods within MSSQLExploiter
2022-06-15 08:33:18 -04:00
Mike Salvatore
c2170ffc4a
Agent: Rename run_agent() -> _run_agent()
2022-06-15 08:32:30 -04:00