Mike Salvatore
f79d2fd8a6
Island: Add AgentID type alias
2022-09-01 10:21:40 -04:00
Ilija Lazoroski
15dee35aa4
Agent: Add RelayUserHandler
2022-09-01 16:02:27 +02:00
Kekoa Kaaikala
1f723b174e
Agent: Add TCPConnectionHandler
2022-09-01 13:54:17 +00:00
Kekoa Kaaikala
2e7be823a1
Agent: Revert old TcpProxy and create a new one
2022-09-01 13:14:07 +00:00
Ilija Lazoroski
c9b7f924a3
UT: Fix ExploitingInterceptingTelemetryMessenger tests
2022-09-01 13:58:14 +02:00
Ilija Lazoroski
eee06467f6
Agent: Add TODO to rethink on_user_disconnected
2022-09-01 13:44:39 +02:00
Ilija Lazoroski
508b811939
Agent: Rename on_user_connected to add_relay_user
2022-09-01 13:41:50 +02:00
Ilija Lazoroski
43a1ddb714
Agent: Rename on_potential_new_user to add_potential_user
2022-09-01 13:38:31 +02:00
Ilija Lazoroski
a754963222
Agent: Remove on_user_disconnected in TCPRelay
2022-09-01 13:32:07 +02:00
Ilija Lazoroski
6e0dc0ca13
Agent: Use super().__init__(...) in TCPRelay
2022-09-01 13:27:40 +02:00
Ilija Lazoroski
9fae6cca20
Agent: Use dictionary for relay and potential users in TCPRelay
2022-09-01 12:56:26 +02:00
Ilija Lazoroski
9a3afb051d
Agent: Use IPv4Address for RelayUser.address
2022-09-01 12:10:21 +02:00
Ilija Lazoroski
1d394bbd2e
Agent: Fix docstrings in TCPRelay
2022-09-01 11:39:25 +02:00
Ilija Lazoroski
d478e99227
Agent: Make TCPRelay non-optional in ExploitInterceptingTelemetryMessenger
2022-09-01 11:29:03 +02:00
Ilija Lazoroski
ecdf04a85e
Agent: Change relay control message
...
'-' to 'infection-monkey-relay-control-message: -'
2022-09-01 10:35:29 +02:00
Ilija Lazoroski
94fba0fdf0
Agent: Rename RelayUser.time to last_update_time
2022-09-01 10:17:13 +02:00
Ilija Lazoroski
302cdaac70
Agent: Use event.wait() when running TCPRelay
2022-09-01 09:57:46 +02:00
Mike Salvatore
453f45e403
Merge pull request #2232 from guardicore/2218-get-network-interfaces
...
2218 get network interfaces
2022-08-31 15:54:13 -04:00
Kekoa Kaaikala
a954df3ed8
Agent: Replace get_local_network_interfaces
...
Replaced get_local_network_interfaces() with get_network_interfaces()
2022-08-31 19:25:42 +00:00
Mike Salvatore
973a82e087
Merge branch 'machine-repository' into develop
...
PR #2228
2022-08-31 10:54:54 -04:00
Mike Salvatore
ba7dab26d7
Island: Refactor how Machine objects are managed by IMachineRepository
...
- Replace `create_machine()` with `get_new_id()`
- Replace `update_machine()` with `upsert_machine()`
Benefits:
The repository doesn't store Machine objects that only have the ID
populated (unless that is the caller's desire).
Upsert instead of update allows the interface to be more permissive.
2022-08-31 10:17:20 -04:00
Kekoa Kaaikala
31ff85ad3c
Agent: Add timeout to wait for pending clients
2022-08-31 13:51:54 +00:00
Kekoa Kaaikala
4b5d93beb0
Agent: Add disconnect protocol to TCPRelay
2022-08-31 12:06:13 +00:00
Kekoa Kaaikala
cd0b3077cf
Agent: Notify TCPRelay of exploit
2022-08-30 21:31:06 +00:00
Kekoa Kaaikala
9425a9463a
Agent: Track relay users in TCPRelay
2022-08-30 20:53:16 +00:00
Kekoa Kaaikala
79d5b8bed1
Agent: Add TCPRelay class
2022-08-30 20:08:54 +00:00
Kekoa Kaaikala
b10327af5c
Agent: Register agent interfaces
2022-08-30 15:36:30 +00:00
Mike Salvatore
4cbefedad2
Merge pull request #2222 from guardicore/2135-use-ipaddress
...
2135 use ipaddress
2022-08-30 10:04:21 -04:00
Kekoa Kaaikala
70a9251c5b
Agent: Fix type hints
2022-08-30 13:44:32 +00:00
Mike Salvatore
81128a4842
Island: Don't use Field() for simple defaults in Machine
2022-08-30 09:34:17 -04:00
Mike Salvatore
b538842e84
Island: Remove display_name from MongoMachineRepository._find_one()
2022-08-30 09:32:47 -04:00
Kekoa Kaaikala
fedfe4e45d
Agent: Use str(interface) instead of building string
2022-08-30 11:58:57 +00:00
Kekoa Kaaikala
e6663747eb
Agent: Use IPv4Interface's string
2022-08-30 11:36:51 +00:00
Kekoa Kaaikala
2b55c35a65
Agent: Use str() instead of .compressed
2022-08-30 11:36:51 +00:00
Kekoa Kaaikala
01c508e248
Agent: Replace NetworkInterface with IPv4Interface
2022-08-30 11:36:51 +00:00
Kekoa Kaaikala
f31ba824c6
UT: Fix tests
2022-08-30 11:36:51 +00:00
Kekoa Kaaikala
d8beba17fd
Agent: Update NetworkInterface to be IPv4Interface
2022-08-30 11:36:51 +00:00
Kekoa Kaaikala
75ba889f57
Agent: Fix typing issues
2022-08-30 11:36:51 +00:00
Kekoa Kaaikala
06ae6a8b90
Project: Add ipaddress types for mypy
2022-08-30 11:36:51 +00:00
Mike Salvatore
bf5e54ebc9
Island: Raise RemovalError from IMachineRepository.reset()
2022-08-30 07:34:20 -04:00
Mike Salvatore
383cfdfefe
Island: Rename `id_` parameter to `machine_id` in IMachineRepository
2022-08-30 07:30:41 -04:00
Mike Salvatore
0adf9d8467
Island: Add MongoMachineRepository
2022-08-30 05:03:47 -04:00
Mike Salvatore
1383332d33
Merge branch 'machine-model-defaults' into machine-repository
2022-08-29 20:31:44 -04:00
Mike Salvatore
5713d1c99b
UT: Add test_hardware_id_default()
2022-08-29 20:30:07 -04:00
Mike Salvatore
ac1cda40a8
Island: Add default value for Machine.hostname
2022-08-29 20:27:57 -04:00
Mike Salvatore
5d51b40475
Island: Add default value for Machine.operating_system_version
2022-08-29 20:26:11 -04:00
Mike Salvatore
3e2244cd62
UT: Add test_operating_system_default_value()
2022-08-29 20:26:11 -04:00
Mike Salvatore
40601b955c
Island: Add default value for Machine.network_interfaces
2022-08-29 20:26:05 -04:00
Mike Salvatore
da8ed9e6db
Island: Fix ICredentialsRepository import in MongoCredentialsRepository
2022-08-29 19:35:04 -04:00
Mike Salvatore
10d8d8e756
Island: Use MONGO_OBJECT_ID_KEY in MongoCredentialsRepository
2022-08-29 19:32:40 -04:00