Mike Salvatore
48782e79d4
Swimm: update exercise Add a new configuration setting to the Agent ⚙ AzD8XysWg1BBXCjCDkfq
2021-12-01 11:26:00 -05:00
VakarisZ
ad6b309523
Agent: readability and style changes in monkey.py: refactored back from raising exceptions to logging and returning, not storing part of island config options as separate parameters, etc.
2021-12-01 18:13:27 +02:00
VakarisZ
81e61dcea5
Agent: improve the readability of InfectionMonkey constructor by decoupling cmd argument parsing from object parameter setting
2021-12-01 17:08:32 +02:00
VakarisZ
793bb33c8c
Agent: use the refactored startup instead of legacy methods (monkey.start() instead of monkey.legacy_start(), etc.)
2021-12-01 17:04:45 +02:00
VakarisZ
0806afed1a
Agent: rename PlannedShutdownException to PlannedShutdownError
...
This will stay consistent with python and our own codebase
2021-12-01 12:49:50 +02:00
VakarisZ
89436a4cd9
Agent: remove behavioral methods from monkey.py and leave only setup/teardown related code
...
Behavior is handled by master, monkey.py should only setup/teardown the agent
2021-12-01 12:45:44 +02:00
Ilija Lazoroski
f8441f2d7f
Agent: Refactor the new start and cleanup function
2021-11-29 19:57:25 +01:00
Ilija Lazoroski
72f4fc1ef6
Agent: Remove intialize both from monkey and dropper
...
Add legacy start and cleanup to the agent which
are the same code reformated in the previous commits.
Reformat start function.
2021-11-29 18:54:52 +01:00
Shreya Malviya
75226bdf6e
Agent: Comment out mock master things in monkey.py
...
So that both 'masters' don't run at the same time.
To test the mock master, un-comment the lines in this commit and
comment the lines `self._start_post_breach_async()` and `self._start_propagation()`
in `start()`.
2021-11-29 15:26:12 +05:30
Ilija Lazoroski
1ee6d10b4c
Agent: Refactor agent startup
...
Reorder and rename functions.
2021-11-26 13:34:06 +01:00
Ilija Lazoroski
3c13324e8a
Agent: Change send_exploit_telemetry for host exploiter
2021-11-26 13:32:41 +01:00
Ilija Lazoroski
fb007e9cc8
Agent: Initial refactoring of monkey including mocked puppet and a master
2021-11-25 17:17:23 +01:00
Ilija Lazoroski
44d3ad8586
Agent: Add realistic puppet exploit telemetry info and attempts
...
Fix logging consistency in mock master.
2021-11-25 17:14:24 +01:00
Mike Salvatore
137afa6473
Agent: Don't register new signal handler in monkey.py (for now)
...
The signal handler is not quite ready for prime time. Issue #1595 and
issue #1597 will need to be resolved before the signal handler can be
fully ready. For now, don't register the signal handler.
2021-11-24 13:46:18 -05:00
Mike Salvatore
d31fd2c811
Agent: Improve Windows signal handler
2021-11-24 13:42:28 -05:00
Mike Salvatore
e04e8d3177
Merge pull request #1628 from guardicore/1593-i-master
...
Add IMaster and MockMaster
2021-11-24 07:59:55 -05:00
Mike Salvatore
0ec8fca766
Agent: Add start/finish logging to phases of MockMaster execution
2021-11-24 07:45:40 -05:00
Mike Salvatore
8c36b1925f
Merge pull request #1629 from guardicore/1599-unused-python-dependencies
...
1599 unused python dependencies
2021-11-24 06:46:21 -05:00
VakarisZ
8a88949d1a
Island: re-add cffi explicit requirement
...
Docker island is showing ModuleNotFoundError: No module named '_cffi_backend'without it
2021-11-24 11:12:34 +02:00
VakarisZ
474e1adbf5
Merge pull request #1627 from guardicore/1594-signal-handlers
...
Agent: register signal handlers
2021-11-24 10:54:53 +02:00
VakarisZ
3f7c4a8859
Agent: add a comment warning that windows will terminate the process 5s after CTRL_CLOSE_EVENT signal
...
The comment will warn us that in case that particular signal is raised, the cleanup shouldn't take longer than 5s
2021-11-24 10:52:55 +02:00
Mike Salvatore
73329e9729
Agent: Remove input() call in monkey.py
...
The call to input() was used to pause the execution of the agent while
testing the new signal handlers. It is no longer needed.
2021-11-24 10:52:55 +02:00
Mike Salvatore
6149ef630b
Agent: Improve signal handler log message
2021-11-24 10:52:55 +02:00
Mike Salvatore
068307f0eb
Agent: Handle window close event on Windows
2021-11-24 10:52:55 +02:00
Mike Salvatore
27ef06c546
Agent: Call IMaster.terminate() from signal handler
2021-11-24 10:52:55 +02:00
VakarisZ
9d36f20b42
Agent: register signal handlers
...
Agent will now handle interrupt and break signals on linux and windows
2021-11-24 10:52:55 +02:00
Shreya Malviya
e00fd64530
Agent: Fix PBA return value
2021-11-24 13:54:49 +05:30
Shreya Malviya
d0b9fca4d7
Agent: Fix return types and statements in mock puppet for PBA and exploiters
2021-11-24 13:54:49 +05:30
Shreya Malviya
57b710fb10
UT: Modify unit tests for ExploitTelem and PostBreachTelem based on previous changes
2021-11-24 13:54:49 +05:30
Shreya Malviya
8c2eab4c2a
Agent: Remove stray issue comment in MockMaster which was solved
2021-11-24 13:54:49 +05:30
Shreya Malviya
7b0f08ee54
Agent: Finish implementing MockMaster
...
Also modified ExploitTelem and PostBreachTelem internals, and
MockPuppet.
2021-11-24 13:54:46 +05:30
Shreya Malviya
b48ddd055a
Agent: Progress implementing MockMaster
2021-11-24 13:54:06 +05:30
Mike Salvatore
ea8be28a72
Agent: Log a message in MockMaster.terminate()
2021-11-24 13:54:06 +05:30
Ilija Lazoroski
357f749557
Agent: Fix typo in puppet ping function that messed with node states
2021-11-24 13:54:05 +05:30
Mike Salvatore
612668f43b
Agent: Add partially completed MockMaster
2021-11-24 13:54:05 +05:30
Mike Salvatore
082f034d58
Agent: Change the method docstrings for IMaster
2021-11-24 13:54:05 +05:30
Shreya Malviya
bd31cfd947
Agent: Add IMaster
2021-11-24 13:54:05 +05:30
Mike Salvatore
e9749dd826
Agent: Move control_channel.py to master/
2021-11-23 11:08:05 -05:00
Mike Salvatore
6a2a796ae5
Merge pull request #1623 from guardicore/1596-check-for-stop
...
Implement ControlChannel
2021-11-23 09:52:52 -05:00
Ilija Lazoroski
839024f243
Island: Fix formatting in config
2021-11-23 15:20:19 +01:00
Ilija Lazoroski
56f07e0188
Agent: Add control channel server property
2021-11-23 15:17:01 +01:00
Ilija Lazoroski
65bc0efc5a
Agent: Implement get config and get propagation credentials
2021-11-23 15:17:01 +01:00
Ilija Lazoroski
3aad64dff7
Island: Add endpoint to retrive propagation credentials
2021-11-23 15:17:01 +01:00
Ilija Lazoroski
0d8070080a
Agent: Implement ControlChannel should_agent_stop
2021-11-23 15:17:01 +01:00
Ilija Lazoroski
7766e27f16
Island: Add mock endpoint to check if the agent should stop
2021-11-23 15:17:01 +01:00
Mike Salvatore
4da7c1ab5f
Merge pull request #1626 from guardicore/1592-i-puppet
...
Create IPuppet interface
2021-11-23 07:57:08 -05:00
VakarisZ
933cafe997
Agent: remove unused python dependencies and add comments explaining indirect usages of packages
2021-11-23 14:36:10 +02:00
Mike Salvatore
a4a9de6a8d
Agent: Add a timeout parameter to scan_tcp_port()
2021-11-23 07:16:06 -05:00
Mike Salvatore
6e6c3f6133
Agent: Fix capitalization of Dict type hints in IPuppet
2021-11-23 06:32:31 -05:00
VakarisZ
11b84bd80d
Island: remove unused island dependencies
2021-11-23 12:49:27 +02:00