CIS_conformance_pack.cft.dist 11 KB

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