Commit Graph

10477 Commits

Author SHA1 Message Date
Mike Salvatore a01785838d Agent: Pass keep_tunnel_open timeout as new_client_timeout 2022-09-12 10:24:26 -04:00
Mike Salvatore 67893b7825 Agent: Find/check island servers concurrently 2022-09-12 10:16:54 -04:00
Mike Salvatore a9edbb2874 Agent: Add ThreadSafeIterator 2022-09-12 10:16:51 -04:00
Ilija Lazoroski 0ca13eb93d Island: Add subscribe_to_topics on server setup 2022-09-12 15:59:58 +02:00
Ilija Lazoroski b834bfe7f7 Island: Publish RESET_AGENT_CONFIGURATION from endpoint 2022-09-12 15:22:09 +02:00
Mike Salvatore 191ee1a5f9 Agent: Change order of spawn pipe and add relay user
If we were unsuccessful in starting the pipe, we don't want to sit
around and wait for a relay user to connect.
2022-09-12 08:12:17 -04:00
vakarisz 7ff61423dc Agent: Log uncaught errors in tcp_connection_handler.py thread
If there's an uncaught error in the thread, the error won't propagate to the caller and we wouldn't know what went wrong from the logs. This fixes things and all uncaught errors get logged
2022-09-12 12:02:34 +00:00
Kekoa Kaaikala 9ff92d2128 Agent: Fix ident not available in constructor 2022-09-12 11:59:22 +00:00
Kekoa Kaaikala 756bfe488b Agent: Provide address as string to connect() 2022-09-12 11:59:22 +00:00
Ilija Lazoroski f9b1c5ebd2 Island: Export reset_agent_configuration from __init__ 2022-09-12 13:21:52 +02:00
Ilija Lazoroski e50b034324 Island: Create callable reset_agent_configuration class 2022-09-12 13:21:44 +02:00
Mike Salvatore bc769ee6b8 Common: Define del_key() in terms of MutableMapping.pop() 2022-09-11 22:59:58 -04:00
vakarisz c756c7ace2 BB: Add tunneling test diagrams 2022-09-09 17:51:37 +03:00
vakarisz 46152c0cd2 Island, Agent: Update pydantic to 1.10
Without this update SecretStr is of an unhashable type
2022-09-09 17:04:47 +03:00
Ilija Lazoroski e690eb7c61 Project: Lock the windows pipenv version to 2022.7.4 2022-09-09 09:16:45 -04:00
Ilija Lazoroski a4b6e2157b Agent: Cast cmd_island_port to int 2022-09-09 14:28:14 +02:00
Ilija Lazoroski 2b4b462c1a Agent: Relock Pipfile 2022-09-09 08:23:00 -04:00
Ilija Lazoroski 867a3a83e7 Agent: Use get_plaintext in SSHExploiter login with password 2022-09-09 08:22:56 -04:00
Ilija Lazoroski 6171b66282 Agent: Fix SSHCollector to publish list of Credentials
Previously it was publish list of lists of Credentials
2022-09-09 08:22:53 -04:00
Kekoa Kaaikala 093e2c79dc Agent: Add relay to servers list for exploited hosts 2022-09-09 08:19:56 -04:00
Mike Salvatore 20649b5e3c Merge pull request #2263 from guardicore/2216-remove-unused-code
2216 remove unused code
2022-09-09 08:19:56 -04:00
Mike Salvatore 0246f6b981 Agent: Convert _cmd_island_port to int in one place 2022-09-09 08:19:56 -04:00
Kekoa Kaaikala 4a2297b097 Island: Remove TunnelTelem 2022-09-09 08:19:56 -04:00
Kekoa Kaaikala 3516fa1fec Agent: Fix: Pass port as int 2022-09-09 08:19:56 -04:00
Kekoa Kaaikala cb45cd8873 Agent: Remove TunnelTelem 2022-09-09 08:19:56 -04:00
Kekoa Kaaikala d335c4081a Agent: Fix TCPRelay missing _interrupted member 2022-09-09 08:19:56 -04:00
Shreya Malviya 7530a89152 Agent: Remove usage of proxies 2022-09-09 08:19:56 -04:00
Kekoa Kaaikala 6051cfa29a Agent: Fix log call exhausting iterator 2022-09-09 08:19:56 -04:00
Kekoa Kaaikala 1c805184fe Agent: Remove unused proxy classes 2022-09-09 08:19:56 -04:00
Mike Salvatore 2fadfd1b31 Merge pull request #2257 from guardicore/2216-notify-relay-when-finished
2216 notify relay when finished
2022-09-09 08:19:56 -04:00
Kekoa Kaaikala d7cabc2f5e Agent: Get rid of default_tunnel 2022-09-09 08:19:56 -04:00
Mike Salvatore 1d58ce36e7 Agent: Use a finally clause to ensure singleton is always unlocked 2022-09-09 08:19:56 -04:00
Kekoa Kaaikala dcb77d6285 Agent: Remove MonkeyTunnel 2022-09-09 08:19:56 -04:00
Kekoa Kaaikala 6c2cab9950 Agent: Disconnect from upstream relay 2022-09-09 08:19:41 -04:00
Kekoa Kaaikala baeb0c9460 Agent: Add function to disconnect from relay 2022-09-09 08:18:17 -04:00
Mike Salvatore 5366bba389 Merge branch '2216-modify-controlclient-find-server' into 2216-tcp-relay
PR #2250
2022-09-09 08:18:14 -04:00
Mike Salvatore f3ff4176b2 Merge pull request #2251 from guardicore/2216-use-tcprelay-in-agent
2216 use tcprelay in agent
2022-09-09 08:13:02 -04:00
Shreya Malviya e1759a7906 UT: Simplify parametrize logic in test_find_server() 2022-09-09 08:13:02 -04:00
Mike Salvatore 9f5aa5a055 Agent: Drop DEFAULT_DISCONNECT_TIMEOUT to 2 minutes
Agents should be sending data back to the island very frequently. 2
minutes should be plenty.

Consider adding a heartbeat and reducing this timeout further.
2022-09-09 08:13:02 -04:00
Kekoa Kaaikala 0398b31ece Agent: Use set in get_free_tcp_port() 2022-09-09 08:13:02 -04:00
Shreya Malviya fac179bbda UT: Simplify test logic in test_find_server() 2022-09-09 08:13:02 -04:00
Kekoa Kaaikala 0b27e12b0f Merge pull request #2249 from guardicore/2216-wait-for-relay-users-to-disconnect
Agent: Wait for relay users to disconnect
2022-09-09 08:13:02 -04:00
Kekoa Kaaikala 33da121465 Agent: Use 'relay_port' for relay local port 2022-09-09 08:13:02 -04:00
Shreya Malviya 45d1cc78c1 UT: Use requests_mock in test_find_server 2022-09-09 08:13:02 -04:00
Mike Salvatore 5a83401a02 Agent: Add RelayUserHandler._remove_expired_users() 2022-09-09 08:13:02 -04:00
Kekoa Kaaikala b74c42ff07 Agent: Add join timeout for the relay thread 2022-09-09 08:13:02 -04:00
Shreya Malviya 451d2d0694 UT: Use RELAY_CONTROL_MESSAGE_REMOVE_FROM_WAITLIST in place of RELAY_CONTROL_MESSAGE 2022-09-09 08:13:02 -04:00
Mike Salvatore e2736a9273 Agent: Lock RelayUserHandler.has_*_users() 2022-09-09 08:13:02 -04:00
Kekoa Kaaikala 33aac19831 Agent: Try well-known ports before other ports 2022-09-09 08:13:02 -04:00
Shreya Malviya aa1c31efb2 Agent: Rename RELAY_CONTROL_MESSAGE -> RELAY_CONTROL_MESSAGE_REMOVE_FROM_WAITLIST 2022-09-09 08:13:02 -04:00