Security Flashcards

1
Q

How many KMS key types are there?

A

Symmetric keys: it’s a single encryption key that is used to encrypt and decrypt for a AWS service that is integrated with KMS using symmetric keys. You never get access to KMS Key

Asymmetric: They are pair of Keys - Public and Private keys. Used to encrypt and decrypt operations. Public key is downloadable, but you don’t have access to the private key. It is used for the use cases that can’t call KMS API.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are different kind of keys in KMS?

A

Customer managed keys are KMS keys in your AWS account that you create, own, and manage.

AWS managed keys are KMS keys in your account that are created, managed, and used on your behalf by an AWS service integrated with AWS KMS

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Copying Snapshot and Encryption keys?

A

You can copy a snapshot that has been encrypted using a KMS key. If you copy an encrypted snapshot, the copy of the snapshot must also be encrypted. If you copy an encrypted snapshot within the same AWS Region, you can decrypt the copy with the same KMS key as the original snapshot. Or you can specify a different KMS key.

If you copy an encrypted snapshot across Regions, you must specify a KMS key valid in the destination AWS Region. It can be a Region-specific KMS key or a multi-Region key. For more information on multi-Region KMS keys, see

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is KMS Multi-Region key?

A
  • AWS KMS supports multi-region keys, which are AWS KMS keys in different AWS Regions that can be used interchangeably – as though you had the same key in multiple Regions.
  • Each set of related multi-Region keys has the same key material and key ID, so you can encrypt data in one AWS Region and decrypt it in a different AWS Region without re-encrypting or making a cross-Region call to AWS KMS.
  • Multi-key region are not global (primary +replica).
  • Each Key is managed independently.

The use cases for multi-region keys are global client-side encryption, Encryption for global DynamoDB or global Aurora.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How S3 replication works with encryption?

A
  • Unencrypted objects and objects encrypted with SSE-S3 are replicated by default.
  • objects encrypted with SSE-C (customer provided key) are never replicated
  • The objects encrypted with SSE - KMS are not replicated by default. You need to enable the option:
    —- you need to specify which KMS key to use to encrypt the objects within the target bucket
    —- which KMS key policy to adapt for the target key
    —- define an IAM role with KMS. This will help decrypt the object using the source KMS key and encrypt the objects with the target KMS key in the target location.

You can also use multi-region AWS Kms, but they are currently treated as independent keys by Amazon S3. That means the objects will still be decrypted and then encrypted.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How to share an encrypted AMI (amazon machine image) with another account?

A
  1. Modify the image attribute to add launch permission to allow the target account to use the AMI.
  2. You must share the KMS keys used to encrypt the AMI with the target account using IAM roles.
  3. the IAM role in the target account must have the permissions to DescribeKey, Re-encrypted, CreateGrant and Decrypt
  4. While launching an EC2 instance from the AMI, optionally the target account can specify a new KMS key in its own account to re-encrypt the volumes.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

what is SSM parameter store?

A

AWS Systems Manager Parameter Store (or SSM Parameter Store) is a convenient way to store hierarchical parameters in AWS. You can use it for any configuration values, including secure values like passwords or API keys. It integrates well with other AWS services too.

These parameters can be encrypted by using KMS
It is serverless, scalable and durable with easy SDK

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are SSM parameter tiers?

A

Standard:
- maximum number of parameters allowed are 10,000
- maximum size of parameter value is 4KB
- parameter policy not available and it’s FREE

Advanced:
- maximum number of parameter allowed are 100,000
- maximum size of parameter allowed is 8 KB

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are SSM parameter tiers?

A

Standard:
- the maximum number of parameters allowed is 10,000
- the maximum size of the parameter value is 4KB
- parameter policy not available, and it’s FREE

Advanced:
- the maximum number of parameter allowed is 100,000
- the maximum size of parameter allowed is 8 KB

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

what is AWS secrets manager?

A

AWS Secrets Manager is a secrets management service that helps you protect access to your applications, services, and IT resources. This service enables you to easily rotate, manage, and retrieve database credentials, API keys, and other secrets throughout their lifecycle.

AWS secret manager can be multi-region and sync the secret across the regions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is AWS CloudFormation?

A

AWS CloudFormation is a service that helps you model and set up your AWS resources so that you can spend less time managing those resources and more time focusing on your applications that run in AWS. You create a template that describes all the AWS resources you want (like Amazon EC2 instances or Amazon RDS DB instances), and CloudFormation provides and configures those resources for you. You don’t need to individually create and configure AWS resources and figure out what’s dependent on what; CloudFormation handles that. The following scenarios demonstrate how CloudFormation can help.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is SES (Simple email service)?

A

Amazon SES offers several methods of sending email, including the Amazon SES console, the Simple Mail Transfer Protocol (SMTP) interface, and the Amazon SES API. You can access the API using the AWS Command Line Interface (AWS CLI), or by using an AWS Software Development Kit (SDK).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is AWS Pinpoint?

A

Amazon Pinpoint is an AWS service to engage with your customers across multiple messaging channels. You can use Amazon Pinpoint to send push notifications, in-app notifications, emails, text messages, voice messages, and messages over custom channels.

It is scalable to weigh marketing communication services. It can send emails, SMS, push notifications, voice, and in-app messaging. It can receive replies on how to stop it can scale to billions of massages per day.

Use case: run campaigns by sending marketing bulk transactional SMS messages.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is SSM - Session Manager?

A

Session Manager is a fully managed AWS Systems Manager capability. With Session Manager, you can manage your Amazon Elastic Compute Cloud (Amazon EC2) instances, edge devices, and on-premises servers and virtual machines (VMs). You can use either an interactive one-click browser-based shell or the AWS Command Line Interface (AWS CLI).

SSM Agent is installed on the EC2 instances so they can be accessed directly without using SSH (or port 22)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is a System Manager - run command

A

Run Command can run the command on multiple EC2 instances. There is no need for SSH. The output can be sent to the AWS console, S3 buckets, and Cloudwatch logs. Send notification to SNS about command status. It is integrated with IAM and cloud trail. It can be invoked using an event bridge.

it can be used to automate batching processes, OS updates, application updates, security updates

System Manager - Automation: it can simplify a common maintenance and deployment task of EC2 instances and other AWS resources.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

what is AWS trusted advisor?

A

AWS Trusted Advisor provides recommendations that help you follow AWS best practices. Trusted Advisor evaluates your account by using checks. These checks identify ways to optimize your AWS infrastructure, improve security and performance, reduce costs, and monitor service quotas.

You need to have a business or enterprise support plan to get the full capabilities of a trusted advisor.

17
Q

What is AWS Cognito?

A

With Amazon Cognito, you can add user sign-up and sign-in features and control access to your web and mobile applications. Amazon Cognito provides an identity store that scales to millions of users, supports social and enterprise identity federation, and offers advanced security features to protect your consumers and business

For exam, look for the word “Hundreds of users”, “mobile users”, “authenticate with SAML”.

18
Q

What is AWS Cognito User Pool?

A

With a user pool,
1. Create a serverless database of users for your application and and mobile application
2. Provide simple login mechanism with user with user name and password. Provide password reset functionality.
3. Provides email phone number verification and functionality
4. Multifactor authentication.
5. Users can sign in to your web or mobile app through Amazon Cognito. Your users can also sign in through social identity providers like Google, Facebook, Amazon, or Apple, and through SAML identity providers.
6. It integrates with API gateway and application load balancer

19
Q

What is AWS Cognito identity pool?

A

Amazon Cognito identity pools provide temporary AWS credentials for users who are guests (unauthenticated) and for users who have been authenticated and received a token. An identity pool is a store of user identity data specific to your account.

  1. Users source can be Cognito User Pools, 3rd party logins, etc…
  2. Users can then access AWS services directly or through API Gateway
  3. The IAM policies applied to the credentials are defined in Cognito
  4. They can be customized based on the user_id for fine grained control
  5. Default IAM roles for authenticated and guest users

Identity pools are primarily used for authorization. This second Cognito feature, also known as federated identities, has two common use cases – to provide access to different AWS resources and to create temporary credentials for unauthenticated users. IT pros can use identity pools to assign identity and access management (IAM) roles to their users, who receive their own set of IAM permissions and authenticate through an IdP (Identify Provider).

20
Q

What is AWS Identify Center?

A
  1. Earlier it was called as Single Sign On.
  2. IAM Identity Center is built on top of AWS Identity and Access Management (IAM) to simplify access management to multiple AWS accounts, AWS applications, and other SAML-enabled cloud applications. In IAM Identity Center, you create, or connect, your workforce users for use across AWS.

E.g.:
* AWS accounts in AWS Organizations
* Business cloud applications (e.g., Salesforce, Box, Microsoft 365, …)
* SAML2.0-enabled applications
* EC2 Windows Instances

21
Q

What is AWS Directory Services?

A

AWS Directory Service for Microsoft Active Directory, also known as AWS Managed Microsoft AD, activates your directory-aware workloads and AWS resources to use managed AD on AWS.

22
Q

What is AD Connector?

A

AD Connector is a directory gateway with which you can redirect directory requests to your on-premises Microsoft Active Directory without caching any information in the cloud. AD Connector comes in two sizes, small and large. You can spread application loads across multiple AD Connectors to scale to your performance needs. There are no enforced user or connection limits.

23
Q

What is AWS Control Tower?

A

Provides ongoing governance for your Control Tower environment (AWS Accounts).
* Preventive Guardrail – using SCPs (e.g., Restrict Regions across all your accounts)
* Detective Guardrail – using AWS Config (e.g., identify untagged resources)

24
Q

What is AWS Shield?

A

AWS Shield is a managed service that provides protection against Distributed Denial of Service (DDoS) attacks for applications running on AWS.

AWS Shield Standard:
* Free service that is activated for every AWS customer
* Provides protection from attacks such as SYN/UDP Floods, Reflection attacks and other
layer 3/layer 4 attacks

AWS Shield Advanced:
* Optional DDoS mitigation service ($3,000 per month per organization - It can help in reducing the cost)
* Protect against more sophisticated attack on Amazon EC2, Elastic Load Balancing (ELB), Amazon CloudFront, AWS Global Accelerator, and Route 53
* 24/7 access to AWS DDoS response team (DRP)
* Protect against higher fees during usage spikes due to DDoS
* Shield Advanced automatic application layer DDoS mitigation automatically creates,
evaluates and deploys AWS WAF rules to mitigate layer 7 attacks

25
Q

What is AWS Macie?

A

Amazon Macie is a data security and data privacy service that uses machine learning (ML) and pattern matching to discover and protect your sensitive data.

26
Q

What is Amazon Inspector?

A

Amazon Inspector is an automated vulnerability management service that continually scans AWS workloads for software vulnerabilities and unintended network exposure.

For EC2 instances
* Leveraging the AWS System Manager (SSM) agent
* Analyze against unintended network accessibility
* Analyze the running OS against known vulnerabilities

For Container Images push to Amazon ECR
* Assessment of Container Images as they are pushed

For Lambda Functions
* Identifies software vulnerabilities in function code and package dependencies
* Assessment of functions as they are deployed

Reporting & integration with AWS Security Hub
Send findings to Amazon Event Bridge

27
Q

What is GuardDuty?

A

Amazon GuardDuty is a threat detection service that continuously monitors your AWS accounts and workloads for malicious activity and delivers detailed security findings for visibility and remediation.

28
Q

What is AWS certificate manager?

A

Use AWS Certificate Manager (ACM) to provision, manage, and deploy public and private SSL/TLS certificates for use with AWS services and your internal connected resources. ACM removes the time-consuming manual process of purchasing, uploading, and renewing SSL/TLS certificates.

29
Q

how certificates are renewed in ACM?

A
  1. ACM generated certificates are renewed 60 days before the expiry
  2. For external certificates:
    a. ACM sends daily expiration events 45 days before the expiry. The events are sent to event bridge (it can go to Lambda, SNS and SQS)
    b. You can use AWS Config rule named acm-certificate-expiration-check to theck for expirting certificates (you can configure the number of days before which you will get the event) and sends an event to the event bridge.
30
Q

What is AWS Web Application Firewall?

A

AWS WAF is a web application firewall that helps protect web applications from attacks by allowing you to configure rules that allow, block, or monitor (count) web requests based on conditions that you define. These conditions include IP addresses, HTTP headers, HTTP body, URI strings, SQL injection and cross-site scripting.

31
Q

Where AWS Web Application Firewall can be deployed?

A
  1. Application Load balancer
  2. API gateway
  3. cloud front
  4. AppSync GraphQL API
  5. Cognitive User pool
32
Q

What kind of AWS WAF rules can be defined?

A

Define Web ACL (Web Access Control List)
1. IP Set: up to 10,000 IP addresses – use multiple Rules for more IPs
2. HTTP headers, HTTP body, or URI strings Protects from common attack - SQL
injection and Cross-Site Scripting (XSS)
3. Size constraints - make sure request of certain size (e.g. 2mb)
4. geo-match (block countries)
5. Rate-based rules (to count occurrences of events) – for DDoS protection

Web ACL are regional exccept for CloudFront where they are deinfed globally.

33
Q

What is SCP?

A

Service control policies (SCPs) are one type of policy that can be used to manage your organization. SCPs offer central control over the maximum available permissions for all accounts in your organization, allowing you to ensure your accounts stay within your organization’s access control guidelines.

In SCPs, you can restrict which AWS services, resources, and individual API actions the users and roles in each member account can access. You can also define conditions for when to restrict access to AWS services, resources, and API actions. These restrictions even override the administrators of member accounts in the organization.

**If a user or role has an IAM permission policy that grants access to an action that is either not allowed or explicitly denied by the applicable SCPs, the user or role can’t perform that action.

SCPs affect all users and roles in the attached accounts, including the root user.

SCPs do not affect any service-linked role.**