Section - Security Flashcards

1
Q

What is a Layer 4 DDos Attack?

A
  • A layer 4 DDos attack is often referred to as a SYN flood. it works at the transport layer(TCP).
  • To establish a TCP connection a 3-way handshake takes place.
    • The client sends a SYN packet to a server
    • The server replies with a SYN-ACK
    • and the client then responds to that with an ACK
  • What should happen?
    • After the “3-way handshake” is complete, the TCP connection is established.
    • After this applications begin sending data using Layer 7 (application layer protocol) such as HTTP etc.
  • SYN Floods
    • A SYN flood uses the built in patience of the TCP stack to overwhelm a server by sending a large number of SYN packets and then ignoring the SYN-ACKs returned by the server.
    • This causes the server to use up resources waiting for a set amount of time for the anticipated ACK that should come from a legitimate client.
  • What Can Happen?
    • There are only so many concurrent TCP connections that a web application server can have open. so if an attacker sends enough SYN packets to a server, it can easily eat through the allowed number of TCP connections.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is an Amplification Attack?

A
  • Amplification/Reflection attacks can include things such as NTP,SSDP, DNS,CharGen,SNMP attacks etc.
  • This is where an attacker may send a thrid-party server (such as an NTP server) a request using a spoofed IP.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Amplification Attacks?

A
  • That server will then respond to that request with a greater payload than the initial request (usually within the region of 28-54 times larger than the request) to the spoofed IP address.
  • This means that if the attacker sends a packet with a spoofed IP address of 64 bytes, the NTP server would respond with up to 3,456 bytes of Traffic.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is a Layer 7 Attack?

A
  • A layer 7 attack occurs where a web server receives a flood of GET or POST requests, usually from a botnet or a large number of compromised computers.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Exam Tips: DDoS ?

A
  • A distributed Denial of Service (DDoS) attack attempts to make your website or application unavailable to your end users.
  • Common DDoS attacks include Layer 4 attacks such as SYN floods or NTP amplification attacks.
  • Common Layer 7 attacks include floods of GET/POST requests.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is CloudTrail?

A
  • AWS Cloud trail increase visibility into your user and resource activity by recording AWS Management Console actions and API Calls.
  • You can identify which users and accounts called AWS, the source IP address from which the calls were made, and when the calls occurred.
  • CloudTrail stores the logs in S3
  • What is logged?
    • Metadata around API calls
    • The identify of the API caller
    • The time of the API call
    • The source IP address of the API caller
    • The request parameters
    • The response elements returned by the service
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is AWS Shield?

A
  • Free DDoS Protection
  • Protects all AWS customers on Elastic Load Balancing (ELB), Amazon CloudFront, and Route 53
  • Protects against SYN/UDP floods reflection attacks, and other Layer 3 and Layer 4 attacks
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is AWS Shied Advanced?

A
  • Provides enhanced protections for your applications running on Elastic Load Balancer (ELB),Amazon CloudFront, and Route 53 against larger and mose sophisticated attacks.
  • Offers always-on-flow-based monitoring of network traffic and active application monitoring to provide near real-time notifications of DDoS attacks.
  • Give you 24/7 access to the DDoS Response Team (DRT) to help manage and mitigate application-layer DDoS attacks.
  • Protects your AWS Bill against higher fees due to Elastic Load Balancing (ELB), Amazon Cloud Front, and Aamazon Route 53 usage spikes during a DDoS attack.
  • Shield Advanced Costs $3,000 USD per month.
  • Shield Protects against Layer 3 and Layer 4 only
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is AWS WAF?

A
  • AWS WAF is a web application firewall that lets you monitor the HTTP and HTTPS requests that are forwarded to Amazon CloudFront or an Application Load balancer.
  • AWS WAF also lets you control access to your content.
  • You can configure conditions such as what IP addresses are allowed to make this request or what query string parameters need to be passed for the request to be allowed.
  • The Application Load balancer or CloudFront will either allow this content to be received or give an HTTP 403 status code.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is AWS GuardDuty?

A
  • Guard Duty is a threat detection service that uses machine learning to continously monitor for malicious behaviour.
  • Unsual API calls, calls from malicios IP
  • Attempts to disable CloudTrail logging
  • Unauthorized Deployments
  • Compromised Instances
  • Reconnaissance by the would-be attackers.
  • Alerts appear in the guard duty console and CloudWatch events
  • Receives feeds from third parties like Proofpoint and CrowdStrike, as well as AWS security, about known malicious domains and IP addresses
  • Monitors CloudTrail logs, VPC Flow logs and DNS logs.
  • Threat Dectection with AI
    • 7-14 days to set a baseline - what is normal behaviour on your account?
    • Once active, you will see findings on the Guard Duty console and in CloudWatch Events only if Guard Duty detects behavior it considers a threat.
  • Pricing
    • 30 days Free, charges based on:
      • Quality of CloudTrail events
      • Volume of DNS and VPC Flow logs
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is Amazon Macie?

A
  • Monitors sensitive data on S3 bucket - Personally Identifiable Information (PII)
  • Personal data useed to establish individual identity
  • This data could be exploited by criminals, used in identity theft and financial fraud
  • Home address, Email address, Social security number
  • Passport number, dirver’s license number
  • Date of birth, phone number, bank account, credit card number
  • Automated Analysis of Data
    • Macie uses machine learning and pattern matching to discover sensitive data stored on S3.
    • Uses AI to recognize if your S3 objects contain snesitive data, such as PII, PHI (Personal health Information) and financial data
    • Alerts you to uncrypted buckets
    • Alerts you about public buckets
    • Can also alert you about buckets shared with AWS accounts outside of those defined in your AWS organisations
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

AWS Macie Alerts?

A
  • You can filter and search Macie alerts in the AWS console
  • Alerts sent to Amazon EventBridge can be integrated with your security incident and event management (SIEM) system
  • Can be integrated with AWS security hub for broader analysis of your organisation’s security posture.
  • Can also be integrated with other AWS services, such Step Functions to Automatically take remediation actions.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is Amazon Inspector?

A
  • Amazon inspector is an automated security assessment service that helps improve security and compliance of applications deployed on AWS.
  • Amazon inspector automatically assesses applications for vulnerabilities or deviations from best practices.
  • Assessment Findings
    • After performing an assessment, Amazon Inspector produces a detailed list of security findings prioritized by the level of severity.
    • These findings can be reviewed directly or as part of detailed assessment reports that are available via the Amazon Inspector console or API
  • 2 Types of Assessment
    • Network Assessments
      • Network configuration analysis to checks for ports reachable from outside the VPC
      • Inspector agent is not required
    • Host Assessments
      • Vulnerable software (CVE), host hardening (CIS Benchmarks) and security best practices
      • Inspector agent required
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Amazon Inspector: How does it work?

A
  • Create assessment target
  • Install agents on EC2 instances
    • AWS will automatically install agent for instances that allow Systems manager Run Command
  • Create assessment template
  • Perform assessment run
  • Review findings against rules
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is AWS KMS?

A

AWS Key Management Service

  • Managed
    • Managed service that makes it easy for you to create and control the encryption keys used to encrypt your data.
  • Integrated
    • Seamlessly integrated with many AWS services to make encrypting data into those services as easy as checking a box.
  • Key Types
    • Symmetric
      • A single encryption key that is used for both encryption and decrytpion operations
    • Asymmetric
      • A public and privae key pair that can be used for encryption and decryption to sign or verify operations
      • Use when doing encryption outside of AWS.
  • Regional service
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

AWS KMS Use cases?

A

Whyen to use KMS:

Whenever you are dealing with sensitive information

  • Sensitive data that you want to keep secret
  • Customer data
  • Financial data
  • Database passwords
  • Credentials
  • Secrets
17
Q

What is a CMK?

A
  • Customer Master Key
    • Encrypt / Decrytp data up to 4KB
  • What is it used for?
    • Generate / Encrypt / Decrypt the Data key.
  • Data key
    • Used to encrypt / Decrypt your data.
    • The process of encrypting the data key to encrypt your data is called Envelope Encryption.
  • Properties
    • Alias
      • Your application can refer to the alias when using the CMK.
    • Creation Date
      • The date and time when the CMK was created
    • Description
      • You can add your own descritpion to the describe the CMK
    • Key State
      • Enabled, Disabled, pending deletion, unavailable
    • Key Material
      • Customer-provided or AWS-provided
    • Stays Inside KMS
      • Can never be exported
20
Q

What is the difference Between AWS-Managed CMK and Customer-Managed CMK?

A
  • AWS-Managed CMK
    • AWS-provided and AWS-managed CMK. Used on your behalf with the AWS services integrated with KMS.
  • Customer-Managed CMK
    • You create,own and managed yourself.
21
Q

What is Amazon CloudHSM?

A

Amazon CloudHSM is a hardware security module (HSM) used to generate encryption keys.

  • Dedicated hardware for security
  • Generate and manage your own encryption keys
  • AWS does not have access to your keys
22
Q

What is Amazon CloudHSM in the Real World?

A

Amazon CloudHSM allows you to meet corporate, contractual, and regulatory compliance requirements for data security by using dedicated hardware in the cloud.

23
Q

3 ways to generate a CMK?

A
  • AWS creates the CMK for you, The key material for a CMK is generated within Hard Security Modules managed by AWS KMS
  • Import key material from your own key management infrastructure and associate it with a CMK.
  • Have the key material generated and used in an AWS CloudHSM cluster as part of the custom key store feature in AWS KMS.
24
Q

3 Ways to Control Permissions?

A
  • Use the key policy
    • Controlling access this way means the full scope of access to the CMK is defined in a single document (the key policy)
  • Use IAM policies in combination with the key policy.
    • Controlling access this way enables you to manage all the permissions for your IAM identities in IAM
  • Use grants in combination with the key policy
    • Controlling access this way enables you to allow access to the CMK in the key policy, as well as allow users to delegate their access to others.
25
Q

KMS Vs. CloudHSM

A
  • KMS
    • Shared tenancy of underlying hardware
    • Automatic Key Rotation
    • Automatic Key generation
  • CloudHSM
    • Dedicated HSM to you
    • Full control of underlying hardware
    • Full control of users, groups, keys etc.
    • No automatic key rotation
26
Q

What is AWS Secrets Manager?

A
  • Secrets manager is a service that securely stores, encrypts, and rotates your database credentials and other secrets.
  • Encryption in transit and at rest using KMS
  • Automatically rotates credentials
  • Apply fine-grained access control using IAM policies
  • Costs money but is highly scalable
  • What can be stored?
    • RDS credentials
    • Credentials for non-RDS databases
    • Any type of secret, provided you can store it as a key-value pair(SSH keys, API Keys)
  • Exam Tip: If you enable rotation, Secrets manager immediately rotates the secret once to test the configuration - your applications must get the secrets directly from the secret manager and not be hard coded.
    • If you appplications are using embedded credentials, do not enable rotation because the embedded credentials will no longer work.
27
Q

What is Parameter Store?

A
  • Parameter store is a capability of AWS Systems manager that provides secure, hierachical storage for configuration data management and secrets management.
  • You can store data such as passwords, database strings, Aamazon machine Image (AMI) IDs, and license codes as parameter values.
  • You can store values in plain text or encrypted data.
  • Parameter Store is Free
  • Limitations:
    • Limit to the number of parameters you can store (currently 10,000)
    • No key rotation
28
Q

Exam Tips: Parameter Store or Secrets Manager

A
  • If you are minimizing cost - use parameter store
  • if you need more than 10 000 parameters, key rotation , or the ability to generate passwords using CloudFormation, use Secrets Manager
29
Q

Signing S3 Objects(Presigned URL)?

A
  • All objects in S3 are private by default
  • Only the owner has permissions to access these objects, however the object owner can optionally share objects with others by creating a presigned URL, using their own security credentials, to grant time-limited persmissions to download the projects.
  • Presigned URLs
    • When you create a presigned URL for your object, you must provide your security credentials, specify a bucket name and an object key, and indicate the HTTP method (or GET to download the object) as well as expiration date and time.
    • Anyone who receives the presigned URL can the access the object.
  • Presigned Cookies
    • This can be useful whe you want to provide access to multiple restricted files. The cookie will be saved on the user’s computer, and they will be able to browse the entire contents of the restricted content.
30
Q

What is Amazon Resource Names (ARNs)?

A
  • ARN all begin with:
    • arn:partitition:service:region:account_id:
31
Q

IAM Policies?

A
  • JSON document that defines permissions
  • Identity policy
  • Resource policy
  • No effect until attached
  • List of statements
32
Q

What is Permission Boundaries?

A
  • Used to delegate administration to other users
  • Prevent privilege escalation or unnecessarily broad permissions
  • Control maximum permissions an IAM policy can grant
33
Q

Exam Tips: IAM policies

A
  • Learn to read and interprete policies
  • Not explicitly allowed = = implicitly denied
  • Explicit deny > everything else
  • Only attached policies have an effect
  • AWS joins all applicable policies
  • AWS managed vs Customer managed
34
Q

AWS Certificate Manager?

A
  • AWS Certificate manager allows you to create, manage and deploy public and Private SSL certificates for use with other AWS services.
  • It integrates with other services such as Elastic Load Balancing, CloudFront distributions, and API gateway - allowing you to easily manage and deploy SSL certificates in your AWS environment.
  • Benefits of AWS Certificate Manager
    • Cost
      • No more paying for SSL certificates
      • AWS Certificate manager provisions both public and private certificates for free
      • You will still pay for the resources that utilize your certificate (such as your Elastic Load Balancer)
    • Automatic Renewals and Deployment
      • Certificate Manager can automate the renewal of your SSL certificate and automatically update the new certificate with ACM-intgerated services, such as Elastic Load Balancing, CloudFront and API Gateway.
    • Easier to Set Up
      • Removes a lot of manual process, such as generating a key pair or creating a certificate siging request (CSR).
      • You can create your own SSL certificate with just a few licks in the AWS management Console.