1
1

00:00:00,120  -->  00:00:01,050
<v Instructor>In this lesson,</v>
2

2

00:00:01,050  -->  00:00:03,570
we're going to explore how you can audit cloud services
3

3

00:00:03,570  -->  00:00:06,210
using some common tools during your engagements.
4

4

00:00:06,210  -->  00:00:09,180
This includes tools like ScoutSuite, Prowler,
5

5

00:00:09,180  -->  00:00:12,570
Pacu, CloudBrute, and Cloud Custodian.
6

6

00:00:12,570  -->  00:00:14,730
First, we have ScoutSuite.
7

7

00:00:14,730  -->  00:00:17,850
ScoutSuite is an open-source tool written in Python
8

8

00:00:17,850  -->  00:00:20,310
that can be used to audit instances and policies
9

9

00:00:20,310  -->  00:00:23,610
created on multi-cloud platforms such as AWS,
10

10

00:00:23,610  -->  00:00:25,830
Microsoft Azure, and Google Cloud
11

11

00:00:25,830  -->  00:00:28,500
by collecting data using API calls.
12

12

00:00:28,500  -->  00:00:31,110
After being run, ScoutSuite will compile a report
13

13

00:00:31,110  -->  00:00:33,210
that lists out all the VM instances,
14

14

00:00:33,210  -->  00:00:37,530
storage containers, IAM accounts, data, and firewall ACLs,
15

15

00:00:37,530  -->  00:00:39,780
that's able to gather information about.
16

16

00:00:39,780  -->  00:00:42,600
This tool allows you to write custom rule sets as well
17

17

00:00:42,600  -->  00:00:44,400
that you can use during your scans.
18

18

00:00:44,400  -->  00:00:46,620
This way, you can highlight or flag things
19

19

00:00:46,620  -->  00:00:49,080
when there's a policy violation that exists.
20

20

00:00:49,080  -->  00:00:51,660
For instance, you can create a rule in ScoutSuite
21

21

00:00:51,660  -->  00:00:53,190
to identify any users
22

22

00:00:53,190  -->  00:00:56,190
who do not have multifactor authentication enabled.
23

23

00:00:56,190  -->  00:00:58,560
To do this, you'll create a rule like this,
24

24

00:00:58,560  -->  00:01:00,990
description: Users without MFA,
25

25

00:01:00,990  -->  00:01:02,850
dashboard_name: Users,
26

26

00:01:02,850  -->  00:01:05,790
path: iam.users.id,
27

27

00:01:05,790  -->  00:01:07,590
conditions: and.
28

28

00:01:07,590  -->  00:01:11,850
We want IAM users ID with key and login profile
29

29

00:01:11,850  -->  00:01:16,740
also having IAM users ID MFA devices being empty.
30

30

00:01:16,740  -->  00:01:18,240
If we have these two conditions,
31

31

00:01:18,240  -->  00:01:21,210
that tells me that we don't have MFA enabled.
32

32

00:01:21,210  -->  00:01:26,210
keys: iam.users.id and id_suffix: mfa_enabled.
33

33

00:01:26,490  -->  00:01:29,340
As you can see, setting up these rules is pretty simple
34

34

00:01:29,340  -->  00:01:31,560
and they're basically in JSON format.
35

35

00:01:31,560  -->  00:01:33,480
As long as you understand what the keys are
36

36

00:01:33,480  -->  00:01:35,520
and what the IDs are that you need to add in there,
37

37

00:01:35,520  -->  00:01:38,190
which you can find using AWS' documentation,
38

38

00:01:38,190  -->  00:01:39,023
you'll be able to set up
39

39

00:01:39,023  -->  00:01:41,670
some pretty complex rules pretty quickly.
40

40

00:01:41,670  -->  00:01:44,040
The second tool we have is called Prowler.
41

41

00:01:44,040  -->  00:01:46,140
Prowler is an auditing tool that only works
42

42

00:01:46,140  -->  00:01:48,060
with Amazon Web Services.
43

43

00:01:48,060  -->  00:01:50,670
Prowler is used to evaluate a cloud infrastructure
44

44

00:01:50,670  -->  00:01:52,470
against the Center for Internet Security's
45

45

00:01:52,470  -->  00:01:54,480
benchmarks for AWS,
46

46

00:01:54,480  -->  00:01:57,120
as well as scanning for compliance against GDPR
47

47

00:01:57,120  -->  00:01:59,340
and HIPAA regulations and checklists.
48

48

00:01:59,340  -->  00:02:01,560
Prowler is an open-source security tool
49

49

00:02:01,560  -->  00:02:04,470
that's used to perform security best practice assessments,
50

50

00:02:04,470  -->  00:02:07,560
audits, instant response, continuous monitoring,
51

51

00:02:07,560  -->  00:02:11,730
hardening, and forensic readiness for AWS cloud services.
52

52

00:02:11,730  -->  00:02:13,800
This tool is able to check for compliance
53

53

00:02:13,800  -->  00:02:16,080
against over 200 different controls,
54

54

00:02:16,080  -->  00:02:17,070
and it's really helpful
55

55

00:02:17,070  -->  00:02:19,200
in trying to ensure a target organization
56

56

00:02:19,200  -->  00:02:22,590
is meeting or exceeding their regulatory requirements.
57

57

00:02:22,590  -->  00:02:24,390
Prowler is a command line tool,
58

58

00:02:24,390  -->  00:02:28,890
and it can create a report in HTML, CSV, or JSON formats,
59

59

00:02:28,890  -->  00:02:30,000
as well as having the ability
60

60

00:02:30,000  -->  00:02:31,710
to directly submit their findings
61

61

00:02:31,710  -->  00:02:33,420
to the Security Hub.
62

62

00:02:33,420  -->  00:02:35,670
You could also do specific checks in groups
63

63

00:02:35,670  -->  00:02:36,870
during your assessment,
64

64

00:02:36,870  -->  00:02:40,650
or you can even create your own checks and own rule sets.
65

65

00:02:40,650  -->  00:02:42,060
Prowler is really useful
66

66

00:02:42,060  -->  00:02:45,030
if you need to check multiple AWS accounts in parallel,
67

67

00:02:45,030  -->  00:02:47,580
such as when an organization has multiple accounts
68

68

00:02:47,580  -->  00:02:49,590
or sub-brands that you need to assess
69

69

00:02:49,590  -->  00:02:51,390
in your scope of work.
70

70

00:02:51,390  -->  00:02:54,000
The third tool we have is known as Pacu.
71

71

00:02:54,000  -->  00:02:56,190
Pacu is an exploitation framework
72

72

00:02:56,190  -->  00:02:58,530
that's used to assess the security configuration
73

73

00:02:58,530  -->  00:03:01,950
of Amazon Web Services or AWS accounts.
74

74

00:03:01,950  -->  00:03:03,900
This tool includes several modules
75

75

00:03:03,900  -->  00:03:05,820
so your teams can attempt exploits
76

76

00:03:05,820  -->  00:03:07,590
such as obtaining API keys
77

77

00:03:07,590  -->  00:03:10,230
or gaining control over a VM instance.
78

78

00:03:10,230  -->  00:03:13,020
Pacu focuses on the post-compromised phase,
79

79

00:03:13,020  -->  00:03:15,390
so the team can then drill down into that system
80

80

00:03:15,390  -->  00:03:16,860
and escalate their privileges,
81

81

00:03:16,860  -->  00:03:19,860
launch additional attacks, or install back doors.
82

82

00:03:19,860  -->  00:03:22,080
Personally, I like to think about Pacu
83

83

00:03:22,080  -->  00:03:23,640
as a tool like Metasploit,
84

84

00:03:23,640  -->  00:03:25,770
but one that's focused specifically
85

85

00:03:25,770  -->  00:03:29,820
on attacking AWS-based cloud services and infrastructure.
86

86

00:03:29,820  -->  00:03:31,633
Fourth, we have CloudBrute.
87

87

00:03:31,633  -->  00:03:35,100
CloudBrute is used to find a target's infrastructure, files,
88

88

00:03:35,100  -->  00:03:38,010
and apps across the top cloud service providers
89

89

00:03:38,010  -->  00:03:41,970
including Amazon, Google, Microsoft, DigitalOcean,
90

90

00:03:41,970  -->  00:03:44,700
Alibaba, Vultr, and Linode.
91

91

00:03:44,700  -->  00:03:46,860
This tool works essentially like a web crawler
92

92

00:03:46,860  -->  00:03:50,610
or brute force directory listing tool, much like DirBuster,
93

93

00:03:50,610  -->  00:03:54,450
but it's focused specifically on cloud-based resources.
94

94

00:03:54,450  -->  00:03:56,070
These resources include things
95

95

00:03:56,070  -->  00:03:59,070
like object storage, virtual machines, containers,
96

96

00:03:59,070  -->  00:04:01,950
and other cloud resources and services.
97

97

00:04:01,950  -->  00:04:04,260
Fifth, we have Cloud Custodian.
98

98

00:04:04,260  -->  00:04:07,290
Cloud Custodian is an open-source cloud security,
99

99

00:04:07,290  -->  00:04:09,450
governance, and management tool that's designed
100

100

00:04:09,450  -->  00:04:11,310
to help administrators create policies
101

101

00:04:11,310  -->  00:04:13,470
based on their different resource types.
102

102

00:04:13,470  -->  00:04:16,170
Cloud Custodian is a stateless rules engine
103

103

00:04:16,170  -->  00:04:19,260
that we can use to manage AWS environments by validating
104

104

00:04:19,260  -->  00:04:22,470
and enforcing the environment against set standards.
105

105

00:04:22,470  -->  00:04:23,940
By using Cloud Custodian,
106

106

00:04:23,940  -->  00:04:26,430
you can run a scan against a target's cloud environment,
107

107

00:04:26,430  -->  00:04:28,500
identify which policies are being enforced,
108

108

00:04:28,500  -->  00:04:30,930
and which vulnerabilities may exist.
109

109

00:04:30,930  -->  00:04:32,370
As a network defender,
110

110

00:04:32,370  -->  00:04:35,130
you can use Cloud Custodian to also automatically correct
111

111

00:04:35,130  -->  00:04:36,630
the vulnerabilities that are found
112

112

00:04:36,630  -->  00:04:40,320
by enforcing new security policies in the cloud environment.
113

113

00:04:40,320  -->  00:04:42,210
Cloud Custodian is a great tool
114

114

00:04:42,210  -->  00:04:43,950
for defining rules that can enable
115

115

00:04:43,950  -->  00:04:46,680
a well-managed cloud infrastructure that is secure
116

116

00:04:46,680  -->  00:04:49,410
and optimized to save your organization money
117

117

00:04:49,410  -->  00:04:50,790
by turning off resources
118

118

00:04:50,790  -->  00:04:53,310
outside of normal business hours as well.
119

119

00:04:53,310  -->  00:04:55,260
This is known as garbage collection
120

120

00:04:55,260  -->  00:04:58,560
where unused or underutilized resources can be deleted
121

121

00:04:58,560  -->  00:05:01,320
and free up more of your budget for useful cloud services
122

122

00:05:01,320  -->  00:05:03,220
that your organization actually needs.
