More Related Content Similar to AWS Builders - Industry Edition : Welcome to Security Modernization (20) More from Amazon Web Services Korea (20) AWS Builders - Industry Edition : Welcome to Security Modernization1. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
3. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Time Table & Agenda
Time
Duration
(min)
Agenda
14:00 ~ 14:15 15
DevSecOps Overview
+ Program introduction
14:15 ~ 15:00 (45 mins)
5 Interview with the customer
20 IAM for DevSecOps Overview
20 Application Security Overview
15:00 ~ 15:10 10 Break Time
15:10 ~ 15:55 (45mins)
5 Interview with the customer
20 CI/CD Pipeline Security Overview
20 Continuous Security Overview
15:55 ~ 16:30 (35 mins)
5 Interview with the customer
15 Infra security
15 Detective Control Overview
4. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
DevSecOps Overview
5. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
비즈니스의 요구사항
Business
Development
Build it faster
Operations
Keep it stable
DevOps
6. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
DevOps
신속한 출시 주기, 통합 및 파이프라인의 글로벌 자동화, 팀 간의 긴밀한 협업을 통해
소프트웨어 제품을 지속적으로 개선하는 프로세스
Agile한 프로젝트
운영을 원해!
DevOps
지속적 통합
(CI)
지속적 전달
(CD)
마이크로 서비스
(MSA)
코드형 인프라
(IaaS, IaC)
소통 및
협업
(Culture)
7. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
지속적
통합
지속적
전달
모니터링 및
로깅
마이크로 서비스
코드형
인프라
소통 및
협업
그렇다면 여러분의 DevOps 체계는
어느정도 수준으로 안전하게 보호되고 있습니까?
DevOps의 이점
8. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
DevOps 와 보안
Security
Keep it secure
DevOps의 중심 :
고객
Security의 중심 :
컴플라이언스
9. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
“A ship in harbor is safe, but that is not what ships are built for." by John A. Shedd (1850 ~ 1926)
“배는 항구에서 안전하지만,
그것이 배가 만들어진 목적은 아니다.”
다시 생각해 보는 보안..
10. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
DevOps 파이프라인의 속도를 늦추지 않아야 함
사고 예방 우선순위
자동화된 도구와 프로세스
보안의 여러 구성 요소를 Code로 표현 하는 것으로 부터 출발
CI/CD 과정에서 코드/아티팩트 검증 및 감사 Control 구현
DEV
OPS
SEC
DevOps 환경에서의 보안
• DevOps = 수명 주기를 가속화하는 효율성
• DevSecOps = 수명 주기 속도에 영향을 주지 않고 빌딩 블록을 검증
DevSecOps의 핵심 : 지속적인 보안
11. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
설계 개발 테스트
스테이징
& 운영
문제를 발견하고 해결 하기까지 비용과 시간이 증가
$
$
$
$
$
$
Shift Security Left
Shift (All the Way) Left
12. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• 개발 환경 전체에서 견고한 DevOps 기반을 구축
• 개발 팀과 보안 팀 간의 협업을 촉진하여 처음부터 설계에 보안을 포함
• 지속적 보안 테스트를 자동화하고 지속적 통합/지속적 개발 파이프라인에 빌드
• 의도에서 벗어나는 편차를 실시간으로 모니터링하여 보안 및 규정 준수를 포함하도록 모니터링 확장
• 미준수로 표시된 리소스의 알림, 자동화된 재조정 또는 격리를 활성화해야 합니다.
DevOps 조직에 DevSecOps를 도입
Test Driven Security
Automated Security Test
Static Application Security Test (SAST)
Dynamic Application Security Test (DAST)
Compliance as Code
Software Composition Analysis (SCA)
Web Application Firewall (WAF)
Threat Intelligence
Interactive Application Security Test (IAST)
13. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
- Mike Tyson -
So,
do YOU have a plan ?
14. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Program Introduction
15. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
DevOps의 사이클
CI/CD
AWS Cloud
PROD
Development Operation
16. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
DevSecOps 아젠다
Identity and Access Management (IAM)
Application Security Enforcement
CI/CD Pipeline Security
Continuous Security Automation
Infra Security
Detective Control
• DevSecOps의 종착지
• 네트워크 및 호스트 보안
• 테스트 주도 보안
• compliance as code
• CICD 파이프라인 내 보안
• CICD 파이프라인 자체의 보안
• 어플리케이션 개발 단계에서의 보안 고려
• AWS 환경의 기본 접근제어 도구
• 운영환경 전반에 대한 지속적인 탐지 및 대응
17. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
DevSecOps 프로그램 구성
회차 주제 세부 토픽 일정
1 DevSecOps Overview
DevSecOps 개념 소개 및 필요성 강조
전체 프로그램에 대한 개괄
06/24(목)
02:00~04:30 pm
2
DevSecOps 시작은 IAM부터
IAM 개념, IAM Management, ABAC / RBAC
IAM for Dev / IAM for Ops
07/01(화)
02:00~05:30 pm
Application Security Enforcement Credential Management, Encryption, CodeGuru etc.
3
CI/CD Pipeline security
AppSec - SAST, SCA, SCA, DAST, IAST, Secret Scanning,
DevOpsGuru, Code/Artifact Validation etc.
07/15(수)
02:00~05:30 pm
Continuous Security Automation
Test Driven Security, Compliance as Code, AWS Config,
RDK etc.
4
Infra Security
VPC, WAF, DDoS, Network Firewall, Route53 Resolver
DNS Firewall, Shield, Firewall Manager etc.
07/29(화)
02:00~05:30 pm
Detective Control
API 추적, 보안 대응 자동화, 계정 전반의 위협 탐지, 리소
스 구성관리, EC2 보안평가, 민감 데이터 보호, 통합 모니
터링, 보안 이슈 분석 etc.
08/05(목)
02:00~05:30 pm
5 Let’s get hands on ! (workshop day)
1 ~ 4회차에서 다루었던 내용들을 바탕으로
AWS 솔루션즈 아키텍트와 함께 핸즈온 실습진행
08/05(목)
02:00~05:30 pm
18. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
DevSecOps : Security Modernization
Solutions Architect
Solutions Architect Solutions Architect
19. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
IAM for DevSecOps Overview
20. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• AWS와 상호 작용
IAM과 API 호출
AWS
서비스 API
엔드포인트
AWS SDK
AWS CLI
또 다른
AWS 서비스
AWS
Management
Console
API 인터페이스
21. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• API 요청 흐름
IAM과 API 호출
HTTP/HTTPS
클라이언트
API 인터페이스
IAM
AWS
CloudTrail
AWS 서비스
API 엔드포인트
API 요청
22. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• API 요청 흐름
IAM과 API 호출
HTTP/HTTPS
클라이언트
API 인터페이스
IAM
AWS
CloudTrail
AWS 서비스
API 엔드포인트
API 요청
자격증명 필요!
(Credentials)
23. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• 서명을 통한 API 보안
IAM과 API 호출
AWS SDK, CLI 및 AWS Management Console을 사용하면 API 호출이 자동으로 서명됩니다.
자격 증명
확인
변조
방지
재전송 공격
방지
24. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• AWS API를 사용하기 위한 인증방법
• AWS 서비스와의 모든 상호 작용은 AWS API를 통해 이루어집니다
• 모든 상호 작용은 SigV4방식을 사용하여 AccessKeyId 및 SecretAccessKey로 서명됩
니다.
• AccessKeyId 및 SecretAccessKey는 AWS Identity and Access Management (IAM)의
사용자 또는 역할에 매핑됩니다.
• AWS IAM 역할 및 정책을 연결하여 작업을 허용 또는 거부
Sigv4
25. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• 요청에는 보내는 인증 정보에 대한 서명(signature)이 필요함
• 서명을 만들기 위해서 서명 키(Signing Key)를 사용함
Sigv4
Image from : https://docs.aws.amazon.com/ko_kr/AmazonS3/latest/API/sig-v4-authenticating-requests.html
26. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• AWS Security Token Service
• 신뢰할 수 있는(연동) 사용자에게 임시 보안 크리덴셜 제공
• 수명이 짧은 액세스 키 ID, 보안 액세스 키 및 세션 토큰
• 구성 가능한 크리덴셜 수명
• 최소/최대/기본
• 한 번 만료되면 재사용할 수 없음
• IAM 정책을 사용하여 권한 제어
• 발행되는 임시 크리덴셜의 수에는 제한이 없음
STS
27. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• STS 는 만료 시간이 있는 임시 자격증명을 제공합니다.
STS
AWS 서비스
역할 위임(Assume role)
세션
액세스 키 ID
보안 액세스 키
세션 토큰
만료
임시 보안
크리덴셜
15분
~36시간
임시 크리덴셜
액세스
서비스
기업
데이터 센터
AWS 클라우드
AWS STS
DynamoDB Amazon S3 Amazon EC2
28. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Account A(111122223333) Account B(444455556666)
Caller IAM role
Target Amazon DynamoDB table
“MyTable”
AWS 다른 계정으로 작업
29. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Account A(111122223333) Account B(444455556666)
Caller IAM role Target Amazon
DynamoDB table
“MyTable”
Cross-account
access IAM role
AWS 다른 계정으로 작업
30. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Account A(111122223333) Account B(444455556666)
Caller IAM role Target Amazon
DynamoDB table
“MyTable”
Cross-account
access IAM role
AWS 다른 계정으로 작업
31. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Account A(111122223333) Account B(444455556666)
Caller IAM role Target Amazon
DynamoDB table
“MyTable”
Cross-account
access IAM role
AWS 다른 계정으로 작업(AssumeRole)
32. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Who? When? What?
Where to
?
Where from?
Bill 3:27pm Launch Instance us-west-2 72.21.198.64
Alice 8:19am Added Bob to admin grou
p
us-east-1 127.0.0.1
Steve 2:22pm Deleted security group eu-west-1 205.251.233.176
AWS CloudTrail 로그
33. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS CloudTrail을 통한 STS API 감사
AWS Cloud AWS Cloud
{
"eventVersion": "1.05",
"userIdentity": {
"type": "AssumedRole",
"principalId": "AROA6O4DS6EKUUTZB565I:i-03c304b61867e7052",
"arn": "arn:aws:sts::994024026389:assumed-role/test-role-ec2-cross/i-03c304b61867e7052",
"accountId": "994024026389",
"accessKeyId": "ASIA6O4DS6EKVDRF6IE2",
"sessionContext": {
"sessionIssuer": {
"type": "Role",
"principalId": "AROA6O4DS6EKUUTZB565I",
"arn": "arn:aws:iam::994024026389:role/test-role-ec2-cross",
"accountId": "994024026389",
"userName": "test-role-ec2-cross"
},
...
}
},
"eventTime": "2020-08-07T02:30:51Z",
"eventSource": "sts.amazonaws.com",
"eventName": "AssumeRole",
"awsRegion": "us-east-1",
"sourceIPAddress": "15.164.93.199",
"userAgent": ”…": {
"roleArn": "arn:aws:iam::166642409121:role/test-role-cross-s3",
"roleSessionName": ”myname"
},
}
역순으로 확인
{
"eventVersion": "1.07",
"userIdentity": {
"type": "AssumedRole",
"principalId": "AROASNTFJL2QSHCHTDVN3:hoseok-nim",
"arn": "arn:aws:sts::166642409121:assumed-role/test-role-cross-s3/myname",
"accountId": "166642409121",
"accessKeyId": "ASIASNTFJL2QTERQGOUF",
"sessionContext": {
"sessionIssuer": {
"type": "Role",
"principalId": "AROASNTFJL2QSHCHTDVN3",
"arn": "arn:aws:iam::166642409121:role/test-role-cross-s3",
"accountId": "166642409121",
"userName": "test-role-cross-s3"
},
"attributes": {
"creationDate": "2020-08-07T02:30:51Z",
"mfaAuthenticated": "false"
}
}
},
"eventTime": "2020-08-07T02:42:40Z",
"eventSource": "s3.amazonaws.com",
"eventName": "ListObjects",
"awsRegion": "ap-northeast-2",
"sourceIPAddress": "15.164.93.199",
…
},
{
"eventVersion": "1.05",
"userIdentity": {
"type": "AWSAccount",
"principalId": "AROA6O4DS6EKUUTZB565I:i-03c304b61867e7052",
"accountId": "994024026389"
},
"eventTime": "2020-08-07T02:30:51Z",
"eventSource": "sts.amazonaws.com",
"eventName": "AssumeRole",
"awsRegion": "us-east-1",
"sourceIPAddress": "15.164.93.199",
"userAgent": ”…",
"requestParameters": {
"roleArn": "arn:aws:iam::166642409121:role/test-role-cross-s3",
"roleSessionName": ”myname"
},
},
"sharedEventID": "ec312aa3-1bec-4137-b5aa-b36aa855360b"
34. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Application Security Overview
35. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Permissions management
36. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS에서 인증이 작동하는 방식
Caller IAM role
AWS service, e.g.,
Amazon Simple Storage
Service (Amazon S3)
AWS Management
Console
AWS Command Line
Interface
AWS Tools and SDKs
via
37. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• IDE에서 실행중인 경우 AWS Toolkit 설정에 자격증명을 추가합니다.
• AWS 콘솔을 사용하는 경우 이미 IAM 사용자로 로그인했을 것입니다
• Amazon Cognito는 모바일 및 웹 앱과 같은 신뢰할 수 없는 환경에 제한된 임시 자격증명을
제공합니다
• 개발 컴퓨터 또는 AWS에서 코드가 실행중이고 SDK를 사용한다면 여러 단계에 걸쳐서
조회 프로세스가 이어집니다
어떻게 사용자/애플리케이션이 인증되나요?
38. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• 자격증명 우선순위
• (1) 코드에 지정되어 있음 (Hard coded)
• (2) 환경 변수
• AWS_ACCESS_KEY_ID
• AWS_SECRET_ACCESS_KEY
• AWS_SESSION_TOKEN (Temporary Credential 일 경우)
• (3) 자격 증명 파일의 기본 자격 증명 프로필
• Linux, macOS 또는 Unix: ~/.aws/credentials
• Windows: %UserProfile%/.aws/credentials
• (4) EC2 인스턴스 프로파일에 연결된 역할(Role)
개발 환경에서 Credential 관리
39. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS 엔터프라이즈 환경의 IAM
AWS Cloud
Account Account Account
Account
40. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• aws configure 파일 설정
• 명시적 선언
다중 계정 작업을 위한 설정
[default]
aws_access_key_id={YOUR_ACCESS_KEY_ID}
aws_secret_access_key={YOUR_SECRET_ACCESS_KEY}
[dev]
aws_access_key_id={YOUR_ACCESS_KEY_ID}
aws_secret_access_key={YOUR_SECRET_ACCESS_KEY}
BasicAWSCredentials awsCreds = new BasicAWSCredentials("access_key_id", "secret_key_id");
AmazonS3 s3Client = AmazonS3ClientBuilder.standard()
.withCredentials(new AWSStaticCredentialsProvider(awsCreds))
.build();
41. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• IAM 사용자 / 서비스 계정
• 액세스 키 ID/보안 액세스 키
• Security Token Service를 통한 역할
• 임시 액세스 키 ID/보안 액세스 키
• Ex) EC2 InstanceProfile using Metadata service
안전하게 자격증명 사용
이렇게 하지 마십시오.
42. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• AWS Security Token 서비스(STS) 사용
임시 자격증명을 사용하는 경우(Java)
AWSSecurityTokenService securityTokenService = AWSSecurityTokenServiceClientBuilder.standard()
.withRegion(stsRegion)
.build();
AWSCredentials awsCredentials = new STSAssumeRoleSessionCredentialsProvider.Builder(assumeRole,
roleSessionName)
.withStsClient(securityTokenService)
.build();
AmazonS3 s3Client = AmazonS3ClientBuilder.standard()
.withCredentials(AWSSTSCredentialsProvider.getSTSAssumeRoleSessionCredentialsPro
vider(clientRegion, roleARN, roleSessionName))
.withRegion(clientRegion)
.build();
43. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• RoleArn, RoleSession 및 임시 자격증명을 이용하여 새로운 세션 연결
임시 자격증명을 사용하는 경우(Python)
session = boto3.Session(profile_name=’dev’)
assumed_role = sts_client.assume.role(
RoleArn=“arn:aws:iam::…….:role/……”,
RoleSessionName=“……”
}
credentials=assumed_role[‘Credentials’]
sts_new_session=boto3.Session(
aws_access_key_id=credentials[‘AccessKeyId’],
aws_secret_access_key=credentials[‘SercretAccessKey’],
aws_session_token=credentials[‘SessionToken’]
)
sts_s3_client = sts_new_session.client('s3')
44. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
모바일 애플리케이션에서의 자격 증명 사용
Standard Tokens
Web and Mobile
Apps
Amazon
Cognito
Managed User Directory
Hosted UI
Federation
AWS Credentials
45. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Data encryption
46. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• 데이터 암호화에 사용하는 암호화 키를 쉽게 생성/보관/관리해주는 관리형 서비스
• 서버측 / 클라이언트 측 암호화를 지원
• 중앙 집중 암호화 키 관리 :
KMS(Key Management Service)이란?
EBS S3 Redshift
AWS
SDK
AWS CloudTrail
Customer
master key
S3
bucket
EBS
volume
RDS
instance
CMK
Data key Data key Data key
Key Management Service
47. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• 2계층 키 구조와 봉투 암호화
• 데이터를 암호화하는데 사용되는 데이터 키
• 고객 마스터 키(CMK)를 통해 데이터 키를
암호화
• CMK 정책으로 데이터에 대한 접근 제어
• 장점
• 데이터 키의 변조 위험 감소
• 대용량 데이터 암호화에 대한 성능 향상
• 수백만 데이터 키들보다 훨씬 적은 수의 마
스터 키를 집중 관리하는게 효율적
• 키 관련 행위에 대한 중앙 집중식 접근관리
와 감사
KMS의 봉투 암호화
48. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
서버 측 암호화(Server-Side Encryption)
• AWS가 전송된 데이터에 대해 고객 대신 서버 측에서 암호화 작업 수행
• 총 34 개 서비스 연동 : Amazon S3, Amazon EBS, Amazon RDS,
Amazon Redshift, Amazon WorkSpaces, Amazon Kinesis Streams,
AWS CloudTrail…
• 고객 관리 통제 하에 AWS KMS에 암호화 키 보관
클라이언트 측 암호화(Client-Side Encryption)
• 데이터를 전송하기 전에 암호화 수행
• 고객이 직접 암호화 키를 마련하고 직접 관리하거나, AWS
KMS/CloudHSM내에 보관 관리
• 도구들: AWS Encryption SDK, S3 Encryption Client, EMRFS Client,
DynamoDB Encryption Client
AWS 상에서 암호화를 적용하는 2가지 타입
49. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• 암호화를 위한 데이터 형식과 APIs
• AWS KMS 봉투 암호화에 대한 간단한 인터페이스
• 오픈소스, Apache 2.0 라이선스에 따라 무료 제공
• 지원하는 언어:
• AWS Encryption SDK for Java
• AWS Encryption SDK for Python
• AWS Encryption SDK for C
• AWS Encryption SDK for JavaScript
• 브라우저에서 JavaScript 용 AWS 암호화 SDK 및 Node.js 용 AWS 암호화 SDK
• 암호화 모범 사례에 따른 기본 구현
• 마스터 키를 사용하여 데이터 키를 보호하기 위한 프레임워크
• 암호화된 데이터와 함께 암호화된 데이터 키를 저장하는 형식 메시지
AWS 암호화 SDK
50. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
public static void main(String[] args) {
byte[] myData = "Hello World!".getBytes(StandardCharsets.UTF_8);
KmsMasterKeyProvider masterKeyProvider = KmsMasterKeyProvider.builder()
.withKeysForEncryption(keyArn).build();
Map<String, String> encryptionContext = Collections.singletonMap("ExampleContextKey", "ExampleCont
extValue");
byte[] ciphertext = new AwsCrypto()
.encryptData(mkp, myData, encryptionContext).getResult();
byte[] plaintext = new AwsCrypto()
.decryptData(mkp, ciphertext).getResult();
System.out.println(new String(myData, StandardCharsets.UTF_8));
}
The AWS Encryption SDK (Java)
51. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
코드에서 데이터를 분리
52. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• 데이터베이스 자격 증명 및 API 키와 같은 암호에 대한 수명주기 관리
AWS Secret Manager
보안 정보를
안전하게 교체
사용한 만큼 지불
세분화된 정책을
통해 액세스 관리
중앙 집중식
보안 정보 보호
및 감사
53. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• 평문 보안 정보 삭제 이점
• 오용 위험 감소
• "비밀 확산"감소
• 개발자의 오버 헤드 감소
• 시작하기
• 계정 전략 선택 – 중앙 계정 또는 여러 계정에서 보안 정보 관리
• 보안 정보가 사용되는 위치 찾기
• AWS CloudFormation 또는 사용자 지정 도구를 사용하여 마이그레이션 자동화
AWS Secret Manager
Pro tip:
• 각 AWS 계정에서 Secrets Manager 운영
• 보안 암호 이름 지정, 검색, 암호화 및 순환에 대한 관행을 정의합니다.
• 보안 암호의 수를 확인하십시오.
54. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• 관리할 서버가 없는 안전하고 확장 가능한 호스팅 보안 암호 관리 서비스를 사용
• 코드에서 데이터를 분리하여 보안 상태를 개선
• 구성 데이터 및 보안 문자열을 계층으로 저장하고 버전을 추적
• 세분화된 수준에서 액세스 제어 및 감사
AWS 시스템 관리자 Parameter Store
AWS Systems Manager
Systems Manager는
대규모 리소스를 안전하게
관리하고 운영하는데
도움이 됩니다.
55. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• Java
Parameter Store + Secret Manager
AWSSimpleSystemsManagement ssm = AWSSimpleSystemsManagementClientBuilder.defaultClient();
...
AmazonDynamoDB getDynamoDbClient() {
//Getting AWS credentials from Secrets Manager using GetParameter
BasicAWSCredentials differentAWSCreds = new BasicAWSCredentials(
getParameter("/aws/reference/secretsmanager/access-key"),
getParameter("/aws/reference/secretsmanager/secret-key"));
//Initialize the DDB Client with different credentials
final AmazonDynamoDB client = AmazonDynamoDBClient.builder()
.withCredentials(new AWSStaticCredentialsProvider(differentAWSCreds))
.withRegion(getParameter("region")) //Getting config from Parameter Store
.build();
return client;
}
public GetParameterResult getParameter(String parameterName) {
GetParameterRequest request = new GetParameterRequest();
request.setName(parameterName);
request.setWithDecryption(true);
return ssm.newGetParameterCall().call(request).getParameter().getValue();
}
56. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon CodeGuru
57. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• 코드 품질 개선 및 어플리케이션에서 가장 실행비용이 비싼 코드 라인을 식별을 위한
지능적인 추천을 제공하는 기계학습 기반의 개발자 도구
Amazon CodeGuru
58. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• 어플리케이션 개발주기의 서로 다른 단계를 보강하는 두 가지 기능
Amazon CodeGuru 의 두 가지 기능
Amazon CodeGuru
Profiler
Amazon CodeGuru
Reviewer
가장 실행비용이 비싼 코드 라인을 식별하여
어플리케이션 성능을 최적화하고 고객의
컴퓨팅 및 인프라 비용을 절감합니다.
기계 학습을 사용하여 심각한 문제와
찾기 어려운 버그들을 식별하고 코드
품질을 개선하기 위한 수정 방법을
추천합니다.
59. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
CodeGuru Reviewer Workflow
Code
Repository
CodeGuru
Reviewer
3. Recommendation
4. Developer
Feedback
5. Improvement
for better
recommendations
1. Repository
Association
Repo Admin
2. Pull
Request
Developer
60. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• 코드 리뷰 추천
애플리케이션의 보안 취약성 해결
61. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Wrap-up
62. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
안전한 애플리케이션 개발을 위해서
HTTP/HTTPS
클라이언트
API 인터페이스
IAM
API 요청
Cognito
AWS 서비스
AWS STS
Amazon S3
Amazon EC2
Systems Manager CodeGuru
Reviewer
Secret Manager
KMS
Encryption
SDK
63. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
CI/CD Pipeline Security Overview
64. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
CI/CD 파이프라인
코드 빌드 테스트 프로비저닝 배포 모니터링
지속적 통합
지속적 전달
지속적 배포
65. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
DevSecOps가 중요한 이유는 무엇입니까?
DevOps = 애플리케이션 수명 주기를 가속화하는 효율성
DevSecOps = 수명 주기 속도에 영향을 주지 않고 빌딩 블록을 검증
개발자 고객
릴리스
테스트
빌드
계획 모니터링
전달 파이프라인
피드백 루프
보안
66. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Remind: DevSecOps 원칙
• 모든 이해 관계자와 협업
• 모든 것을 체계화
• 모든 것을 테스트
• 모든 것을 자동화
• 모든 것을 측정 및 모니터링
• 지속적인 피드백으로 비즈니스 가치 제공
67. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
DevSecOps CI/CD 파이프라인
1. CI/CD 파이프라인의 보안
• 액세스 권한관리
• 빌드 서버/노드 강화
2. CI/CD 파이프라인에서의 보안
• 아티팩트 검증
• 정적 코드 분석
68. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
다음 사항을 중점으로 파이프라인의 보안을 생각해봅시다.
• 사용자 관리
• 최소 권한
• 탐지 제어
• 인프라 제어
무엇에 집중해야 합니까?
69. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AppSec Test Integration
70. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
어떤 테스트를 하고 계십니까?
71. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Security Testing
• Application Security Testing 도구 피라미드
https://insights.sei.cmu.edu/blog/10-types-of-application-security-testing-tools-when-and-how-to-use-them/
72. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Security Testing
• AppSec TEST
• SAST: Static Application Security Testing
• SCA: Software Composition Analysis
• DAST: Dynamic Application Security Testing
• IASA: Interactive Application Security Testing
73. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Example of CI/CD pipeline
74. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Example of CI/CD pipeline
75. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Security Testing
76. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Security Testing
77. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Security Testing
78. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Security Testing
79. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Security Testing
80. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Security Testing
• Scan for secret
• AWS git-secret
• Bandit/SonaType
• Dependency Compliance Test
• Tag Artifact for Security
• CVE test for docker image (ECR)
• Trivy / Clair
• DCT(Docker Container Trust)
• IAM policy compliance test
• ZAP (OWASP)
• IAM policy compliance test
• AWS Config
• AWS GuardDuty
• AWS SecurityHub
• ….
Integrated with CI/CD pipeline
81. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Infra as Code
82. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Security Testing – Infra as Code
• Infra as Code 도구들
• CloudFormation
• CDK
• Terraform
83. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• Infra as Code
• IaC를 위한 별도의 파이프라인 생성하여 운영
• IaC의 코드에 대한 검증 필요
• 파이프라인에 코드 검증 테스트 통합
Security Testing – Infra as Code
84. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
IaC
DevOps Amazon S3 AWS CodePipeline
정적 코드 분석
Lambda
스택 생성
CloudFormation
스택 검증
Lambda
테스트 스
택 승인
스택 삭제
CloudFormation
ChangeSet 생성
CloudFormation
ChangeSet 실행
CloudFormation
커밋 단계 테스트 단계 프로덕션 단계
Put/Get
1. 2.
3.
4. 5. 6.
Security Testing – Infra as Code
85. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Security Testing – Infra as Code
86. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Security Testing – Infra as Code
CloudWatch의 알람 경보 설정도 IaC로 관리
• 특정 S3 버킷에 PUT, DELETE 같은 이벤트가 발생하는 경우
• 보안 그룹이 생성/삭제 되거나 기존 규칙의 인그레스(Ingress)
이그레스(Egress)설정이 변경 취소 되는 경우
• NACL이 생성 삭제되거나 기존 규칙이 설정 변경되는 경우
• IGW가 삭제 및 생성되는 경우
• VPC의 구성이 변경되는 경우
• EC2의 인스턴스 생성 및 삭제 변경이 발생하는 경우
• IAM 정책의 생성 수정 삭제가 발생하는경우
87. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Security in the pipeline
88. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Signer
• 코드 서명을 통한 신뢰할 수 있는 코드만 배포
• 관리형 서비스인 AWS Signer 를 사용
• AWS Lambda 콘솔의 CSC(Code signing configurations) 설정 제공
•Warn : 배포 허용 후 CloudWatch에 Warn 메시지 기록
•Enforce : 미승인 프로필 서명 및 만료된 서명 배포 차단
• AWS Lambda 콘솔의 고급 설정을 통해 구성
•코드의 위치는 지정된 S3 및 로컬
89. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Signer
90. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Docker Content Trust: DCT
• 작성자가 image를 Push 하기 전에 비밀키를 사용하여 서명
• 작성자의 공개키로 복호화여 이미지를 검증하고 사용
91. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS CodeSeries
92. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
DevSecOps CI/CD 파이프라인
AWS
CodeCommit
모니터링
프로비저닝
배포
테스트
빌드
코드
AWS CodePipeline
AWS CodeDeploy
AWS
CloudFormation
Amazon
CloudWatch
AWS CodeBuild
AWS
Config
93. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
DevSecOps CI/CD 파이프라인
AWS
CodeCommit
모니터링
프로비저닝
배포
테스트
빌드
코드
AWS CodePipeline
AWS CodeDeploy
AWS
CloudFormation
Amazon
CloudWatch
AWS CodeBuild
AWS
Config
보안 암호 검사 보안 아티팩트
태그 지정
테스트 보안이
표준을 충족함
보안 구성 요소 배포
/등록
보안 표준 모
니터링
94. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Continuous Security Automation
95. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
여러분의 시스템은
어느정도 수준으로 안전하게 보호되고 있습니까?
96. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Continuous Security - Overview
Continuous Security는 DevOps 환경의 베스트 프랙티스들이 보안 영역과 통합
되어 DevOps의 가치를 해치지 않으면서 시스템의 안전을 확보해 나가는 활동
https://securitytestingnews.wordpress.com/2016/03/08/implementing-continuous-security-through-devops/
97. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Test Driven Security (TDS)
98. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Test Driven Security (TDS)
• 테스트 주도 보안 (TDS)
• Continuous Security를 위한 첫번째 단계
• 보안 컨트롤을 정의하고 구현 및 테스트
• 보안을 제품의 기능으로 바라보는 관점
• 모든 보안 테스트를 자동화
https://www.qcmore.com/blog/ways-make-test-automation-successful-agile-environment/
99. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Test Driven Security (TDS)
• TDD와 TDS는 어떻게 다른가?!
• 보안을 제품의 기능으로 다루는 점에서 유사함
• 테스트의 대상은 Security Control
Test Security Control Like TDD
100. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Test Driven Security (TDS)
어떻게 TDS를 구현 할 것인가?!
1. 베이스라인 정의하기
2. 테스트 작성하기
3. 베이스라인 테스트하기
4. 지속적인 테스트 실행
5. 배포시 테스트를 반드시 통과해야 함
By Julien Vehent Firefox Operations Security Lead, Mozi
lla
https://www.usenix.org/conference/enigma2017/conference-program/presentation/vehent
101. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
TDS를 위한 Security Baseline 을 생각해 봅시다.
102. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Test Driven Security (TDS)
• TDS 의 베이스라인 예시
• SSH 루트 로그인은 모든 시스템에서 비활성화해야 한다.
• 시스템과 애플리케이션은 출시 후 30일 이내에 최신 버전으로 패치
• 웹 애플리케이션은 HTTP가 아닌 HTTPS를 사용해야 한다.
• 자격증명은 애플리케이션 코드와 함께 저장될 수 없다.
• 관리자 화면은 VPN을 통해서만 접근할 수 있다.
This Photo by Unknown Author is licensed und
er CC BY-SA
103. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Compliance As Code
104. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Compliance as Code
• 컴플라이언스 관리체계를 코드 기반의 파이프라인으로 이동하는 아이디어
• 코드는 클라우드에서 실행되며 컴플라이언스 검증에 필요한 리소스를 지속적으로 평가
• 규정준수 가시성 확보
https://amazicworld.com/what-compliance-as-code-means-for-your-business/
105. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Compliance as Code
• Infra as code
from 11,2017 ~ to 12,2020
106. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Compliance as Code
• Infra as code vs Compliance as code
from 11,2017 ~ to 11,2020
- Infra as code
- Compliance as code
107. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Config
108. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Config
• 거버넌스와 규정준수 관리
• 내 리소스가 올바르게 구성되어 있습니까?
• 내 리소스가 규정 요구사항을 준수 합니까?
• 지속적인 규정 준수를 어떻게 보장합니까?
• 리소스가 규정을 벗어난 경우 거의 실시간으로 알림을
받으려면 어떻게 해야 합니까? AWS Config
109. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Config
• 코드를 통한 규정준수 – Compliance as Code
• 수동적으로 수행되던 감사(audit) 활동에 대한 새로운 대안
• 이벤트로부터 기록된 구성의 제어(control) 평가 및 자동화
• 기본적으로 현재의 상태와 변경된 상태에 대한 테스트 활동
• 지속적 규정준수 및 가시성 확보
110. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Config
관리형 규칙
•AWS에서 정의하고 관리 (2021-06. 현재 182개)
•구성이 거의 또는 전혀 필요 없음
관리자
사용자 지정 규칙
•AWS Lambda 함수 사용
•고객이 유지 관리
• AWS Config – Rule (규칙)
111. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Config
리소스 구성 변경
AWS Config 규칙
AWS Config
변경 내용 트리거
Amazon SNS Topic
AWS API Endpoint
CloudWatch Events
AWS Systems Manager
Automation
Configuration Item
전달
112. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
RDK
113. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
114
RDK
• 직관적이고 생산적인 "Compliance-as-Code" 워크플로 지원
• Custom Rule 배포와 관련된 작업 간소화
• 간소화된 개발-배포-모니터링의 이터레이션 프로세스 제공
114. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
115
https://github.com/awslabs/aws-config-rdk
RDK
115. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• Workflow for Config Rules
RDK
116. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Compliance as Code Pipeline
117. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
118
CICD Pipeline for Compliance as Code
• Compliance as Code 를 위한 별도의
CI/CD 파이프라인을 관리
• Unit Test
• Artifact에 대한 관리
• 승인절차등을 구현 할 수 있음
118. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Infra Security
119. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
DevOps의 종착지
CI/CD
AWS Cloud
PROD
development
120. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
안전한 워크로드를 위한 조건
안전한
운영환경
안전한
CI/CD 파이프라인
안전하게
개발된
어플리케이션
Applicatio
n
CI/CD Pipelin
e
Infrastructure
121. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Hardware hacking, physical access attacks, sn
iffing
Mac spoofing, sniffing
IP attacks,
Port scanning, DDoS, Flag manipulation
Session hijacking, SYN attacks
Protocol attack
Sql injection, exploit code, malware
어떤 공격이 있을까?
122. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
확장성이 뛰어나고 안전하며 편하게 모니터링할 수 있는
DDoS 보호 애플리케이션을 구축하겠다.
Objective:
네트워크 격리
네트워크 접근 제어
네트워크 방화벽
어플리케이션 위협 보호
DDoS 방어
AWS Marketplac
e
네트워크 보호를 위한 5개 레이어
123. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
1. 네트워크 격리 : VPC Quick skim
VPC
Private subnet Public subnet
Customer gateway Elastic Network
Adapter
Elastic network
interface
Endpoints
Flow logs
Internet
gateway
NAT gateway Network access
control list
Peering connection
Router
VPN connection
VPN gateway
Traffic Mirroring
• AWS Cloud 내에 격리된 사설 네트워크를 생성
AWS Virtual Private Cloud
• 논리적으로 분리된 일종의 가상 사설망
을 제공
• VPC상에서 사설 IP대역을 선택
• 적절하게 서브넷팅하고 EC2 인스턴스
를 배치
AWS network security
• AWS 는 IP Spoofing과 같은 레이어 2
공격을 차단.
• 소유하지 않은 EC2인스턴스에 대한
스니핑 불가
• 외부와의 모든 라우팅과 연결을 통제
Security
Group
124. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
VPC
Subnet 1
Security Group SG
Subnet 2
Network ACL Network ACL
SG
Routing Table
Routing Table
Virtual Private Gateway
Internet Gateway
Instance level lockdown
Isolate network functions
Network level lockdown
Route restrictively
네트워크 접근 제어 : 보안 계층 on VPC
125. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
어플리케이션 위협 보호 : OWASP
https://lab.wallarm.com/owasp-top-10-2021-proposal-based-on-a-statistical-data/
126. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
WEB/WAS
www.example.com
CloudFront
사용자
Safe
Traffic
Edge Location
Edge Location
WAF
WAF
해커 악성 봇
적법 접근
SQLi, XSS, ..
WAF
ELB
ALB
사용자
적법 접근
VPC
WEB/WAS
어플리케이션 위협 보호 : AWS WAF
127. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
어플리케이션 위협 보호 : WAF 보안 규칙
AWS Marketplace
Custom Rule
Amazon managed Rule
128. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS WAF Amazon Kin
esis Data Fir
ehose
Amazon
ElasticSearch
Amazon S3
For long-term s
torage
AWS Cloud
Kibana
For log analysis
and visualization
https://aws.amazon.com/blogs/security/how-to-analyze-aws-waf-logs-usin
g-amazon-elasticsearch-service/
어플리케이션 위협 보호 : WAF 로깅 아키텍처
129. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Private subnet
Public subnet
Amazon
Route 53
EC2
ALB
Amazon
CloudFront
AWS WAF
Amazon
API Gateway
DDoS
Attack
Users
AWS Cloud
VPC
Web Application
Security Group
ALB Security Group
Auto Scaling gro
up
DDoS 방어 : DDoS Resilient 참조 아키텍처
130. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Shield Standard Shield Advanced
별도 비용 없이 모든 AWS 고객들이
이미 사용 중!
대규모 혹은 복잡한 공격으로부터
서비스를 보호하는 유료 서비스
CloudFront EIP
Route53 ELB Global
Accelerator
Shield Response Team
(SRT) 의 24x7 지원
AWS WAF 및 Firewall
Manager 기본 포함
DDoS Visibility 제공
공격 수용에 따른 비용 보호
131. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• VPC 를 위한 managed 형 네트워크 방화벽 및 침입 방지/탐지 서비스
네트워크 방화벽 : AWS Network Firewall
132. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon Route53 Resolver DNS Firewall
• Route 53 Resolver 를 위한 방화벽
• 모든 VPC에 대해 쉽게 DNS 트래픽을 차단/허용
• 높은 가용성의 관리형 서비스
AWS Cloud
VPC
Availability Zone
Availability Zone
Instances
Instances
Resolver
Resolver
VPC+2
VPC+2
133. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Network Firewall DNS Firewall
compliance alerts AWS
Security Hub
AWS Firewall Manager 로 정책 관리
AWS
Firewall Manager
AWS WAF AWS Shield Security Group
134. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
6. Detective Control
135. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon GuardDuty
Amazon Inspector
Amazon
CloudWatch event
AWS CloudTrail
Amazon S3 Glacier
Amazon S3 Amazon Athena
AWS Security Hub Amazon Macie
AWS Config
Amazon CloudWatch
AWS Config Amazon CloudWatch
탐지제어 on AWS
Amazon Detective
136. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
규정 위반 리소스 고객 서비스 접근 차단 미허가 리소스 생성
미승인 접근 권한 불법 상승
리소스에 대한 상시 접근
통로 구성 시도
과다 권한 부여 중요 정보 유출
AWS 자격증명 유출로
인한 불법 접근
AWS 상의 주요 침해 내용
137. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Threat Intelligence
AWS Config Rules 위반건
파트너 Tool
로그 및 모니터링 메트릭
AWS Abuse report
빌링 상의 변화
침해지표
138. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
서비스 도메인
• 서비스 구성이나 리소스 권한 변경
과 관련된 incident
• ex)
• AWS 계정
• AWS IAM
• 리소스 메타데이터
• 청구
인프라 도메인
• 데이터 또는 네트워크 관련 활동이
포함
• ex)
• VPC EC2 트래픽
• VPC EC2 프로세스 및 데이터
• 운영체제와의 상호작용
어플리케이션 도메인
• 응용 프로그램 코드
• 서비스나 인프라에 배포 된
소프트웨어에서 발생
139. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
API 추적 : AWS CloudTrail
• AWS API 요청의 처리내역을 로깅하는 서비스.
CloudTrail
콘솔 AWS SDK CLI
S3
AWS 파트너
네트워크
ElasticSearch EMR/Redshift
140. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
보안 대응 자동화 : AWS CloudWatch
Detect malicious API and automate response.
If trail.delete { trail.enable & email.security_team}
• 중요 이벤트에 대한 대응 규칙 설정
141. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
계정 전반의 위협 탐지 : Amazon GuardDuty
VPC flow logs
DNS Logs
CloudTrail
Events
위험도
데이터 소스
Threat intelligence
Anomaly Detection
(ML)
AWS Security Hub
• 경감조치
• 파트너 제품 연계
• SIEM으로 전달
CloudWatch Event
탐지 케이스
Examples:
• 비트코인 마이닝
• C&C 관련 행동
• 악성 IP / Tor 접근
• Brute Force
• …
비정상적인 사용자 행동
Example:
• 인스턴스 시작
• 네트웍 권한/구성 변경
Amazon GuardDuty
위협탐지 유형
HIGH
MEDIUM
LOW
비정상적인 트래픽 패턴
Example:
• 비정상적인 트래픽 볼륨
• 사용한 적이 없는 포트
142. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
리소스 구성 관리 : AWS Config / Rules
• Config : AWS리소스의 변경사항을 추적하고 감사하는 서비스
• Config Rules : 해당 변경 사항이 기준 정책에 위반될 때, 대응 규칙 실행
(경보, 차단 등 AWS Lambda활용).
변경된 리소스들 Config Rules
이력, 스냅샷
SNS Topic
API 접근
정규화
AWS Config는 다음 질문에 대한 해답을 드리는 일종의 렌즈역할을 합니다
나의 리소스들이 시간이 흐르면서 어떤식으로 설정되어 지고 있는가?
AWS Config
143. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon Macie Amazon GuardDuty
CloudTrail CloudWatch
Events
On-Instance
Logs
Amazon VPC Flow
Logs
CloudWatch
Logs
CloudWatch
Alarms
S3 Access Logs S3 Bucket
AWS 람다를 통한 자동 대응
AWS Lambda
144. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
탐지제어 실전 시나리오
GuardDuty
S3
AWS Config
Flow logs
DNS logs
CloudTrail log
Macie
Detective Admin
Needed Action
Inspector EC2
SNS
Security Hub
145. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Wrap-up
146. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
DevOps의 종착지
CI/CD
AWS Cloud
PROD
development