CIS_conformance_pack.aws.cft 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288
  1. ################################################################################
  2. #
  3. # Conformance Pack:
  4. # Operational Best Practices for CIS
  5. #
  6. # This conformance pack helps verify compliance with CIS requirements. Note that
  7. # this will not cover all CIS requirements but only those that can be covered
  8. # using AWS Config Rules.
  9. #
  10. # XDR Notes:
  11. #
  12. # Source: https://docs.aws.amazon.com/config/latest/developerguide/cis-conformance-pack.html
  13. #
  14. # Changelog:
  15. # * 2020-08-26 FTD Added these notes
  16. # * 2020-08-27 FTD Removed ROOT_ACCOUNT_HARDWARE_MFA_ENABLED and ROOT_ACCOUNT_MFA_ENABLED
  17. #
  18. # Recommend you do a 'diff' with the .dist to see all changes
  19. #
  20. ################################################################################
  21. Resources:
  22. MFAEnabledForIamConsoleAccess:
  23. Type: AWS::Config::ConfigRule
  24. Properties:
  25. ConfigRuleName: MFAEnabledForIamConsoleAccess
  26. Description: Checks whether AWS Multi-Factor Authentication (MFA) is enabled
  27. for all AWS Identity and Access Management (IAM) users that use a console
  28. password. The rule is compliant if MFA is enabled.
  29. Source:
  30. Owner: AWS
  31. SourceIdentifier: MFA_ENABLED_FOR_IAM_CONSOLE_ACCESS
  32. MaximumExecutionFrequency: Twelve_Hours
  33. IAMUserUnusedCredentialCheck:
  34. Type: AWS::Config::ConfigRule
  35. Properties:
  36. ConfigRuleName: IAMUserUnusedCredentialCheck
  37. Description: Checks whether your AWS Identity and Access Management (IAM) users
  38. have passwords or active access keys that have not been used within the specified
  39. number of days you provided.
  40. InputParameters:
  41. maxCredentialUsageAge: 90
  42. Source:
  43. Owner: AWS
  44. SourceIdentifier: IAM_USER_UNUSED_CREDENTIALS_CHECK
  45. MaximumExecutionFrequency: Twelve_Hours
  46. AccessKeysRotated:
  47. Type: AWS::Config::ConfigRule
  48. Properties:
  49. ConfigRuleName: AccessKeysRotated
  50. Description: Checks whether the active access keys are rotated within the number
  51. of days specified in maxAccessKeyAge. The rule is non-compliant if the access
  52. keys have not been rotated for more than maxAccessKeyAge number of days.
  53. InputParameters:
  54. maxAccessKeyAge: 90
  55. Source:
  56. Owner: AWS
  57. SourceIdentifier: ACCESS_KEYS_ROTATED
  58. MaximumExecutionFrequency: Twelve_Hours
  59. IAMPasswordPolicyCheck:
  60. Type: AWS::Config::ConfigRule
  61. Properties:
  62. ConfigRuleName: IAMPasswordPolicyCheck
  63. Description: Checks whether the account password policy for IAM users meets
  64. the specified requirements.
  65. InputParameters:
  66. RequireUppercaseCharacters: true
  67. RequireLowercaseCharacters: true
  68. RequireSymbols: true
  69. RequireNumbers: true
  70. MinimumPasswordLength: 14
  71. PasswordReusePrevention: 24
  72. MaxPasswordAge: 90
  73. Source:
  74. Owner: AWS
  75. SourceIdentifier: IAM_PASSWORD_POLICY
  76. MaximumExecutionFrequency: Twelve_Hours
  77. IAMRootAccessKeyCheck:
  78. Type: AWS::Config::ConfigRule
  79. Properties:
  80. ConfigRuleName: IAMRootAccessKeyCheck
  81. Description: Checks whether the root user access key is available.
  82. The rule is compliant if the user access key does not exist.
  83. Source:
  84. Owner: AWS
  85. SourceIdentifier: IAM_ROOT_ACCESS_KEY_CHECK
  86. MaximumExecutionFrequency: Twelve_Hours
  87. # These next two are only in commercial, since no root logon is allowed in govcloud.
  88. RootAccountMFAEnabled:
  89. Type: AWS::Config::ConfigRule
  90. Properties:
  91. ConfigRuleName: RootAccountMFAEnabled
  92. Description: Checks whether the root user of your AWS account requires multi-factor
  93. authentication for console sign-in.
  94. Source:
  95. Owner: AWS
  96. SourceIdentifier: ROOT_ACCOUNT_MFA_ENABLED
  97. MaximumExecutionFrequency: Twelve_Hours
  98. RootAccountHardwareMFAEnabled:
  99. Type: AWS::Config::ConfigRule
  100. Properties:
  101. ConfigRuleName: RootAccountHardwareMFAEnabled
  102. Description: Checks whether your AWS account is enabled to use multi-factor
  103. authentication (MFA) hardware device to sign in with root credentials.
  104. Source:
  105. Owner: AWS
  106. SourceIdentifier: ROOT_ACCOUNT_HARDWARE_MFA_ENABLED
  107. MaximumExecutionFrequency: Twelve_Hours
  108. # Resuming rules in both govcloud and commercial
  109. IAMUserNoPoliciesCheck:
  110. Type: AWS::Config::ConfigRule
  111. Properties:
  112. ConfigRuleName: IAMUserNoPoliciesCheck
  113. Description: Checks that none of your IAM users have policies attached. IAM
  114. users must inherit permissions from IAM groups or roles.
  115. Scope:
  116. ComplianceResourceTypes:
  117. - AWS::IAM::User
  118. Source:
  119. Owner: AWS
  120. SourceIdentifier: IAM_USER_NO_POLICIES_CHECK
  121. IAMSupportPolicyInUse:
  122. Type: AWS::Config::ConfigRule
  123. Properties:
  124. ConfigRuleName: IAMSupportPolicyInUse
  125. Description: Checks that the 'AWSSupportAccess' managed policy is attached to any IAM user, group, or role
  126. InputParameters:
  127. policyARN: arn:aws:iam::aws:policy/AWSSupportAccess
  128. policyUsageType: ANY
  129. Source:
  130. Owner: AWS
  131. SourceIdentifier: IAM_POLICY_IN_USE
  132. MaximumExecutionFrequency: Twelve_Hours
  133. IAMPolicyNoStatementWithAdminAccess:
  134. Type: AWS::Config::ConfigRule
  135. Properties:
  136. ConfigRuleName: IAMPolicyNoStatementWithAdminAccess
  137. Description: Checks whether the default version of AWS Identity and Access
  138. Management (IAM) policies do not have administrator access.
  139. Scope:
  140. ComplianceResourceTypes:
  141. - AWS::IAM::Policy
  142. Source:
  143. Owner: AWS
  144. SourceIdentifier: IAM_POLICY_NO_STATEMENTS_WITH_ADMIN_ACCESS
  145. MultiRegionCloudTrailEnabled:
  146. Type: AWS::Config::ConfigRule
  147. Properties:
  148. ConfigRuleName: MultiRegionCloudTrailEnabled
  149. Description: Checks that there is at least one multi-region AWS CloudTrail.
  150. The rule is non-compliant if the trails do not match input parameters
  151. Source:
  152. Owner: AWS
  153. SourceIdentifier: MULTI_REGION_CLOUD_TRAIL_ENABLED
  154. MaximumExecutionFrequency: Twelve_Hours
  155. CloudTrailLogFileValidationEnabled:
  156. Type: AWS::Config::ConfigRule
  157. Properties:
  158. ConfigRuleName: CloudTrailLogFileValidationEnabled
  159. Description: Checks whether AWS CloudTrail creates a signed digest file with
  160. logs
  161. Source:
  162. Owner: AWS
  163. SourceIdentifier: CLOUD_TRAIL_LOG_FILE_VALIDATION_ENABLED
  164. MaximumExecutionFrequency: Twelve_Hours
  165. S3BucketPublicReadProhibited:
  166. Type: AWS::Config::ConfigRule
  167. Properties:
  168. ConfigRuleName: S3BucketPublicReadProhibited
  169. Description: Checks that your Amazon S3 buckets do not allow public read access.
  170. The rule checks the Block Public Access settings, the bucket policy, and the
  171. bucket access control list (ACL).
  172. Scope:
  173. ComplianceResourceTypes:
  174. - AWS::S3::Bucket
  175. Source:
  176. Owner: AWS
  177. SourceIdentifier: S3_BUCKET_PUBLIC_READ_PROHIBITED
  178. MaximumExecutionFrequency: Twelve_Hours
  179. S3BucketPublicWriteProhibited:
  180. Type: AWS::Config::ConfigRule
  181. Properties:
  182. ConfigRuleName: S3BucketPublicWriteProhibited
  183. Description: Checks that your Amazon S3 buckets do not allow public write access.
  184. The rule checks the Block Public Access settings, the bucket policy, and the
  185. bucket access control list (ACL).
  186. Scope:
  187. ComplianceResourceTypes:
  188. - AWS::S3::Bucket
  189. Source:
  190. Owner: AWS
  191. SourceIdentifier: S3_BUCKET_PUBLIC_WRITE_PROHIBITED
  192. MaximumExecutionFrequency: Twelve_Hours
  193. CloudTrailCloudWatchLogsEnabled:
  194. Type: AWS::Config::ConfigRule
  195. Properties:
  196. ConfigRuleName: CloudTrailCloudWatchLogsEnabled
  197. Description: Checks whether AWS CloudTrail trails are configured to send logs
  198. to Amazon CloudWatch logs.
  199. Source:
  200. Owner: AWS
  201. SourceIdentifier: CLOUD_TRAIL_CLOUD_WATCH_LOGS_ENABLED
  202. MaximumExecutionFrequency: Twelve_Hours
  203. S3BucketLoggingEnabled:
  204. Type: AWS::Config::ConfigRule
  205. Properties:
  206. ConfigRuleName: S3BucketLoggingEnabled
  207. Description: Checks whether logging is enabled for your S3 buckets.
  208. Scope:
  209. ComplianceResourceTypes:
  210. - AWS::S3::Bucket
  211. Source:
  212. Owner: AWS
  213. SourceIdentifier: S3_BUCKET_LOGGING_ENABLED
  214. CloudTrailEncryptionEnabled:
  215. Type: AWS::Config::ConfigRule
  216. Properties:
  217. ConfigRuleName: CloudTrailEncryptionEnabled
  218. Description: Checks whether AWS CloudTrail is configured to use the server side
  219. encryption (SSE) AWS Key Management Service (AWS KMS) customer master key
  220. (CMK) encryption.
  221. Source:
  222. Owner: AWS
  223. SourceIdentifier: CLOUD_TRAIL_ENCRYPTION_ENABLED
  224. MaximumExecutionFrequency: Twelve_Hours
  225. CMKBackingKeyRotationEnabled:
  226. Type: AWS::Config::ConfigRule
  227. Properties:
  228. ConfigRuleName: CMKBackingKeyRotationEnabled
  229. Description: Checks that key rotation is enabled for each key and matches to
  230. the key ID of the customer created customer master key (CMK). The rule is
  231. compliant, if the key rotation is enabled for specific key object.
  232. Source:
  233. Owner: AWS
  234. SourceIdentifier: CMK_BACKING_KEY_ROTATION_ENABLED
  235. MaximumExecutionFrequency: Twelve_Hours
  236. VPCFlowLogsEnabled:
  237. Type: AWS::Config::ConfigRule
  238. Properties:
  239. ConfigRuleName: VPCFlowLogsEnabled
  240. Description: Checks whether Amazon Virtual Private Cloud flow logs are found
  241. and enabled for Amazon VPC.
  242. InputParameters:
  243. trafficType: REJECT
  244. Source:
  245. Owner: AWS
  246. SourceIdentifier: VPC_FLOW_LOGS_ENABLED
  247. MaximumExecutionFrequency: Twelve_Hours
  248. IncomingSSHDisabled:
  249. Type: AWS::Config::ConfigRule
  250. Properties:
  251. ConfigRuleName: IncomingSSHDisabled
  252. Description: Checks whether the incoming SSH traffic for the security groups is accessible.
  253. The rule is COMPLIANT when the IP addresses of the incoming SSH traffic in the security
  254. groups are restricted. This rule applies only to IPv4.
  255. Scope:
  256. ComplianceResourceTypes:
  257. - AWS::EC2::SecurityGroup
  258. Source:
  259. Owner: AWS
  260. SourceIdentifier: INCOMING_SSH_DISABLED
  261. RestrictedIncomingTraffic:
  262. Type: AWS::Config::ConfigRule
  263. Properties:
  264. ConfigRuleName: RestrictedIncomingTraffic
  265. Description: Checks whether security groups that are in use disallow unrestricted
  266. incoming TCP traffic to the specified ports.
  267. InputParameters:
  268. blockedPort1: 3389
  269. Scope:
  270. ComplianceResourceTypes:
  271. - AWS::EC2::SecurityGroup
  272. Source:
  273. Owner: AWS
  274. SourceIdentifier: RESTRICTED_INCOMING_TRAFFIC
  275. VPCDefaultSecurityGroupClosed:
  276. Type: AWS::Config::ConfigRule
  277. Properties:
  278. ConfigRuleName: VPCDefaultSecurityGroupClosed
  279. Description: Checks that the default security group of any Amazon Virtual Private
  280. Cloud (VPC) does not allow inbound or outbound traffic. The rule is non-compliant
  281. if the default security group has one or more inbound or outbound traffic.
  282. Scope:
  283. ComplianceResourceTypes:
  284. - AWS::EC2::SecurityGroup
  285. Source:
  286. Owner: AWS
  287. SourceIdentifier: VPC_DEFAULT_SECURITY_GROUP_CLOSED