Skip to content

Commit 5a64db4

Browse files
Merge pull request #1699 from guardicore/1669-remove-scoutsuite-integration
Remove scoutsuite
2 parents ee0c98a + 30bbfec commit 5a64db4

File tree

108 files changed

+557
-4016
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+557
-4016
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ Changelog](https://keepachangelog.com/en/1.0.0/).
4242
- MySQL fingerprinter. #1648
4343
- MS08-067 (Conficker) exploiter. #1677
4444
- Agent bootloader. #1676
45+
- Zero Trust integration with ScoutSuite. #1669
4546

4647
### Fixed
4748
- A bug in network map page that caused delay of telemetry log loading. #1545

docs/content/reference/operating_systems_support.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ date: 2020-07-14T08:09:53+03:00
44
draft: false
55
pre: '<i class="fas fa-laptop"></i> '
66
weight: 10
7-
tags: ["setup", "reference", "windows", "linux"]
7+
tags: ["setup", "reference", "windows", "linux"]
88
---
99

1010
The Infection Monkey project supports many popular OSes (but we are always interested in supporting more).

docs/content/usage/integrations/scoutsuite.md

-67
This file was deleted.

docs/content/usage/scenarios/custom-scenario/zero-trust.md

-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ weight: 1
1111
Want to assess your progress in achieving a Zero Trust network? The Infection Monkey can automatically evaluate your readiness across the different
1212
[Zero Trust Extended Framework](https://www.forrester.com/report/The+Zero+Trust+eXtended+ZTX+Ecosystem/-/E-RES137210) principles.
1313

14-
You can additionally scan your cloud infrastructure's compliance to ZeroTrust principles using [ScoutSuite integration.]({{< ref "/usage/integrations/scoutsuite" >}})
15-
1614
## Configuration
1715

1816
- **Exploits -> Credentials** This configuration value will be used for brute-forcing. The Infection Monkey uses the most popular default passwords and usernames, but feel free to adjust it according to the default passwords common in your network. Keep in mind a longer list means longer scanning times.

monkey/common/cloud/scoutsuite_consts.py

-5
This file was deleted.

monkey/common/cmd/aws/aws_cmd_runner.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import logging
2+
import time
23

34
from common.cloud.aws.aws_service import AwsService
45
from common.cmd.aws.aws_cmd_result import AwsCmdResult
@@ -20,6 +21,7 @@ def __init__(self, is_linux, instance_id, region=None):
2021
self.ssm = AwsService.get_client("ssm", region)
2122

2223
def query_command(self, command_id):
24+
time.sleep(2)
2325
return self.ssm.get_command_invocation(CommandId=command_id, InstanceId=self.instance_id)
2426

2527
def get_command_result(self, command_info):

monkey/common/common_consts/telem_categories.py

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ class TelemCategoryEnum:
22
EXPLOIT = "exploit"
33
POST_BREACH = "post_breach"
44
SCAN = "scan"
5-
SCOUTSUITE = "scoutsuite"
65
STATE = "state"
76
SYSTEM_INFO = "system_info"
87
TRACE = "trace"

monkey/common/common_consts/zero_trust_consts.py

-85
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,6 @@
4141
TEST_SEGMENTATION = "segmentation"
4242
TEST_TUNNELING = "tunneling"
4343
TEST_COMMUNICATE_AS_BACKDOOR_USER = "communicate_as_backdoor_user"
44-
TEST_SCOUTSUITE_PERMISSIVE_FIREWALL_RULES = "scoutsuite_permissive_firewall_rules"
45-
TEST_SCOUTSUITE_UNENCRYPTED_DATA = "scoutsuite_unencrypted_data"
46-
TEST_SCOUTSUITE_DATA_LOSS_PREVENTION = "scoutsuite_data_loss_prevention"
47-
TEST_SCOUTSUITE_SECURE_AUTHENTICATION = "scoutsuite_secure_authentication"
48-
TEST_SCOUTSUITE_RESTRICTIVE_POLICIES = "scoutsuite_unrestrictive_policies"
49-
TEST_SCOUTSUITE_LOGGING = "scoutsuite_logging"
50-
TEST_SCOUTSUITE_SERVICE_SECURITY = "scoutsuite_service_security"
5144

5245
TESTS = (
5346
TEST_SEGMENTATION,
@@ -59,13 +52,6 @@
5952
TEST_DATA_ENDPOINT_ELASTIC,
6053
TEST_TUNNELING,
6154
TEST_COMMUNICATE_AS_BACKDOOR_USER,
62-
TEST_SCOUTSUITE_PERMISSIVE_FIREWALL_RULES,
63-
TEST_SCOUTSUITE_UNENCRYPTED_DATA,
64-
TEST_SCOUTSUITE_DATA_LOSS_PREVENTION,
65-
TEST_SCOUTSUITE_SECURE_AUTHENTICATION,
66-
TEST_SCOUTSUITE_RESTRICTIVE_POLICIES,
67-
TEST_SCOUTSUITE_LOGGING,
68-
TEST_SCOUTSUITE_SERVICE_SECURITY,
6955
)
7056

7157
PRINCIPLE_DATA_CONFIDENTIALITY = "data_transit"
@@ -219,77 +205,6 @@
219205
PILLARS_KEY: [PEOPLE, NETWORKS, VISIBILITY_ANALYTICS],
220206
POSSIBLE_STATUSES_KEY: [STATUS_UNEXECUTED, STATUS_FAILED, STATUS_PASSED],
221207
},
222-
TEST_SCOUTSUITE_PERMISSIVE_FIREWALL_RULES: {
223-
TEST_EXPLANATION_KEY: "ScoutSuite assessed cloud firewall rules and settings.",
224-
FINDING_EXPLANATION_BY_STATUS_KEY: {
225-
STATUS_FAILED: "ScoutSuite found overly permissive firewall rules.",
226-
STATUS_PASSED: "ScoutSuite found no problems with cloud firewall rules.",
227-
},
228-
PRINCIPLE_KEY: PRINCIPLE_RESTRICTIVE_NETWORK_POLICIES,
229-
PILLARS_KEY: [NETWORKS],
230-
POSSIBLE_STATUSES_KEY: [STATUS_UNEXECUTED, STATUS_FAILED, STATUS_PASSED],
231-
},
232-
TEST_SCOUTSUITE_UNENCRYPTED_DATA: {
233-
TEST_EXPLANATION_KEY: "ScoutSuite searched for resources containing " "unencrypted data.",
234-
FINDING_EXPLANATION_BY_STATUS_KEY: {
235-
STATUS_FAILED: "ScoutSuite found resources with unencrypted data.",
236-
STATUS_PASSED: "ScoutSuite found no resources with unencrypted data.",
237-
},
238-
PRINCIPLE_KEY: PRINCIPLE_DATA_CONFIDENTIALITY,
239-
PILLARS_KEY: [DATA],
240-
POSSIBLE_STATUSES_KEY: [STATUS_UNEXECUTED, STATUS_FAILED, STATUS_PASSED],
241-
},
242-
TEST_SCOUTSUITE_DATA_LOSS_PREVENTION: {
243-
TEST_EXPLANATION_KEY: "ScoutSuite searched for resources which are not "
244-
"protected against data loss.",
245-
FINDING_EXPLANATION_BY_STATUS_KEY: {
246-
STATUS_FAILED: "ScoutSuite found resources not protected against data loss.",
247-
STATUS_PASSED: "ScoutSuite found that all resources are secured against data loss.",
248-
},
249-
PRINCIPLE_KEY: PRINCIPLE_DISASTER_RECOVERY,
250-
PILLARS_KEY: [DATA],
251-
POSSIBLE_STATUSES_KEY: [STATUS_UNEXECUTED, STATUS_FAILED, STATUS_PASSED],
252-
},
253-
TEST_SCOUTSUITE_SECURE_AUTHENTICATION: {
254-
TEST_EXPLANATION_KEY: "ScoutSuite searched for issues related to users' " "authentication.",
255-
FINDING_EXPLANATION_BY_STATUS_KEY: {
256-
STATUS_FAILED: "ScoutSuite found issues related to users' authentication.",
257-
STATUS_PASSED: "ScoutSuite found no issues related to users' authentication.",
258-
},
259-
PRINCIPLE_KEY: PRINCIPLE_SECURE_AUTHENTICATION,
260-
PILLARS_KEY: [PEOPLE, WORKLOADS],
261-
POSSIBLE_STATUSES_KEY: [STATUS_UNEXECUTED, STATUS_FAILED, STATUS_PASSED],
262-
},
263-
TEST_SCOUTSUITE_RESTRICTIVE_POLICIES: {
264-
TEST_EXPLANATION_KEY: "ScoutSuite searched for permissive user access " "policies.",
265-
FINDING_EXPLANATION_BY_STATUS_KEY: {
266-
STATUS_FAILED: "ScoutSuite found permissive user access policies.",
267-
STATUS_PASSED: "ScoutSuite found no issues related to user access policies.",
268-
},
269-
PRINCIPLE_KEY: PRINCIPLE_USERS_MAC_POLICIES,
270-
PILLARS_KEY: [PEOPLE, WORKLOADS],
271-
POSSIBLE_STATUSES_KEY: [STATUS_UNEXECUTED, STATUS_FAILED, STATUS_PASSED],
272-
},
273-
TEST_SCOUTSUITE_LOGGING: {
274-
TEST_EXPLANATION_KEY: "ScoutSuite searched for issues, related to logging.",
275-
FINDING_EXPLANATION_BY_STATUS_KEY: {
276-
STATUS_FAILED: "ScoutSuite found logging issues.",
277-
STATUS_PASSED: "ScoutSuite found no logging issues.",
278-
},
279-
PRINCIPLE_KEY: PRINCIPLE_MONITORING_AND_LOGGING,
280-
PILLARS_KEY: [AUTOMATION_ORCHESTRATION, VISIBILITY_ANALYTICS],
281-
POSSIBLE_STATUSES_KEY: [STATUS_UNEXECUTED, STATUS_FAILED, STATUS_PASSED],
282-
},
283-
TEST_SCOUTSUITE_SERVICE_SECURITY: {
284-
TEST_EXPLANATION_KEY: "ScoutSuite searched for service security issues.",
285-
FINDING_EXPLANATION_BY_STATUS_KEY: {
286-
STATUS_FAILED: "ScoutSuite found service security issues.",
287-
STATUS_PASSED: "ScoutSuite found no service security issues.",
288-
},
289-
PRINCIPLE_KEY: PRINCIPLE_MONITORING_AND_LOGGING,
290-
PILLARS_KEY: [DEVICES, NETWORKS],
291-
POSSIBLE_STATUSES_KEY: [STATUS_UNEXECUTED, STATUS_FAILED, STATUS_PASSED],
292-
},
293208
}
294209

295210
EVENT_TYPE_MONKEY_NETWORK = "monkey_network"

monkey/common/network/network_utils.py

-13
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,6 @@
33
from urllib.parse import urlparse
44

55

6-
def get_host_from_network_location(network_location: str) -> str:
7-
"""
8-
URL structure is "<scheme>://<net_loc>/<path>;<params>?<query>#<fragment>" (
9-
https://tools.ietf.org/html/rfc1808.html)
10-
And the net_loc is "<user>:<password>@<host>:<port>" (
11-
https://tools.ietf.org/html/rfc1738#section-3.1)
12-
:param network_location: server network location
13-
:return: host part of the network location
14-
"""
15-
url = urlparse("http://" + network_location)
16-
return str(url.hostname)
17-
18-
196
def remove_port(url):
207
parsed = urlparse(url)
218
with_port = f"{parsed.scheme}://{parsed.netloc}"

monkey/common/utils/exceptions.py

-8
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@ class IncorrectCredentialsError(Exception):
2222
""" Raise to indicate that authentication failed """
2323

2424

25-
class RulePathCreatorNotFound(Exception):
26-
""" Raise to indicate that ScoutSuite rule doesn't have a path creator"""
27-
28-
2925
class InvalidAWSKeys(Exception):
3026
""" Raise to indicate that AWS API keys are invalid"""
3127

@@ -34,10 +30,6 @@ class NoInternetError(Exception):
3430
""" Raise to indicate problems caused when no internet connection is present"""
3531

3632

37-
class ScoutSuiteScanError(Exception):
38-
""" Raise to indicate problems ScoutSuite encountered during scanning"""
39-
40-
4133
class UnknownFindingError(Exception):
4234
""" Raise when provided finding is of unknown type"""
4335

monkey/infection_monkey/Pipfile

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ pypykatz = "==0.3.12"
1818
requests = ">=2.24"
1919
urllib3 = "==1.26.5"
2020
WMI = {version = "==1.5.1", sys_platform = "== 'win32'"}
21-
ScoutSuite = {git = "git://github.com/guardicode/ScoutSuite"}
2221
pyopenssl = "==19.0.0" # We can't build 32bit ubuntu12 binary with newer versions of pyopenssl
2322
pypsrp = "*"
2423
typing-extensions = "*" # Allows us to use 3.9 typing features on 3.7 project

0 commit comments

Comments
 (0)