

# SEC 5  네트워크 리소스는 어떻게 보호합니까?
<a name="w2aac19b7c11b5"></a>

인터넷이든 프라이빗 네트워크이든 상관없이 어떤 형태든 네트워크 연결이 있는 워크로드에는 외부 및 내부 네트워크 기반 위협으로부터 보호하기 위한 다중 방어 계층이 필요합니다.

**Topics**
+ [SEC05-BP01 네트워크 계층 생성](sec_network_protection_create_layers.md)
+ [SEC05-BP02 모든 계층에서 트래픽 제어](sec_network_protection_layered.md)
+ [SEC05-BP03 네트워크 보호 자동화](sec_network_protection_auto_protect.md)
+ [SEC05-BP04 검사 및 보호 구현](sec_network_protection_inspection.md)

# SEC05-BP01 네트워크 계층 생성
<a name="sec_network_protection_create_layers"></a>

 동일한 연결 요구 사항을 공유하는 구성 요소를 계층으로 그룹화합니다. 예를 들어 인터넷에 액세스할 필요가 없는 Virtual Private Cloud(VPC)의 데이터베이스 클러스터는 인터넷에 연결되는 경로가 없는 서브넷에 배치해야 합니다. VPC 없이 운영되는 서버리스 워크로드의 경우, 마이크로서비스를 사용한 유사한 계층화 및 세분화를 통해 동일한 목표를 실현할 수 있습니다. 

연결성 요구 사항을 공유하는 Amazon Elastic Compute Cloud(Amazon EC2) 인스턴스, Amazon Relational Database Service(Amazon RDS) 데이터베이스 클러스터, AWS Lambda 함수와 같은 구성 요소를 서브넷으로 구성된 계층으로 분할할 수 있습니다. 예를 들어 인터넷에 액세스할 필요가 없는 VPC의 Amazon RDS 데이터베이스 클러스터는 인터넷에 연결되는 경로가 없는 서브넷에 배치해야 합니다. 이러한 계층적 제어 방식은 의도하지 않은 액세스를 허용할 수 있는 단일 계층 구성 오류로 인한 영향을 완화합니다. Lambda의 경우, VPC에서 함수를 실행하여 VPC 기반 제어를 활용할 수 있습니다.

수천 개의 VPC, AWS 계정, 온프레미스 네트워크를 포함할 수 있는 네트워크 연결의 경우 다음을 사용해야 합니다. [AWS Transit Gateway](http://aws.amazon.com/transit-gateway). AWS Transit Gateway는 스포크처럼 작동하는 모든 연결된 네트워크 간에 트래픽이 라우팅되는 방식을 제어하는 허브 역할을 합니다. Amazon Virtual Private Cloud와 AWS Transit Gateway 간의 트래픽은 AWS 프라이빗 네트워크에 유지되므로 DDoS(Distributed Denial of Service) 공격과 같은 외부 위협 벡터 그리고 SQL 명령어 삽입, 교차 사이트 스크립팅, 교차 사이트 요청 위조, 손상된 인증 코드 남용과 같은 일반적인 악용을 줄입니다. AWS Transit Gateway 리전 간 피어링은 하나의 장애 지점 또는 대역폭 병목 없이 리전 간 트래픽을 암호화합니다.

 **이 모범 사례가 수립되지 않을 경우 노출되는 위험의 수준:** 높음 

## 구현 가이드
<a name="implementation-guidance"></a>
+  VPC에 서브넷 생성: 각 계층(여러 가용 영역을 포함하는 그룹)별로 서브넷을 생성하고 라우팅 테이블을 연결하여 라우팅을 제어합니다. 
  +  [VPC 및 서브넷 ](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Subnets.html)
  +  [라우팅 테이블 ](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html)

## 리소스
<a name="resources"></a>

 **관련 문서:** 
+  [AWS Firewall Manager](https://docs.aws.amazon.com/waf/latest/developerguide/fms-chapter.html) 
+ [ Amazon Inspector ](https://aws.amazon.com/inspector)
+  [Amazon VPC 보안](https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Security.html) 
+  [AWS WAF 시작하기](https://docs.aws.amazon.com/waf/latest/developerguide/getting-started.html) 

 **관련 동영상:** 
+  [AWS Transit Gateway reference architectures for many VPCs(여러 VPC를 위한 AWS Transit Gateway 참조 아키텍처) ](https://youtu.be/9Nikqn_02Oc)
+  [Application Acceleration and Protection with Amazon CloudFront, AWS WAF, and AWS Shield(Amazon CloudFront, AWS WAF 및 AWS Shield를 사용한 애플리케이션 가속화 및 보호)](https://youtu.be/0xlwLEccRe0) 

 **관련 예시:** 
+  [실습: VPC 자동 배포](https://www.wellarchitectedlabs.com/Security/200_Automated_Deployment_of_VPC/README.html) 

# SEC05-BP02 모든 계층에서 트래픽 제어
<a name="sec_network_protection_layered"></a>

  네트워크 토폴로지를 설계할 때 각 구성 요소의 연결 요구 사항을 조사해야 합니다. 예를 들어 구성 요소에 인터넷 액세스(인바운드 및 아웃바운드), VPC 연결, 엣지 서비스, 외부 데이터 센터가 필요한지 조사해야 합니다. 

 VPC를 사용하면 설정한 프라이빗 IPv4 주소 범위 또는 AWS에서 선택한 IPv6 주소 범위를 사용하여 AWS 리전 전반의 네트워크 토폴로지를 정의할 수 있습니다. 보안 그룹(상태 저장 검사 방화벽), 네트워크 ACL, 서브넷, 라우팅 테이블을 사용하는 등 인바운드 및 아웃바운드 트래픽 모두에 대해 심층적인 방어 접근 방식을 갖춘 여러 제어를 적용해야 합니다. VPC 내의 가용 영역에서 서브넷을 생성할 수 있습니다. 각 서브넷에는 서브넷 내의 트래픽이 전송되는 경로 관리를 위한 라우팅 규칙을 정의하는 연결된 경로 테이블이 있을 수 있습니다. VPC에 연결된 인터넷 또는 NAT 게이트웨이로 이동하거나 다른 VPC를 통해 이동하는 경로를 설정하면 인터넷 라우팅 가능한 서브넷을 정의할 수 있습니다. 

 VPC 내에서 시작되는 인스턴스, Amazon Relational Database Service(Amazon RDS) 데이터베이스 또는 기타 서비스에는 네트워크 인터페이스별로 자체 보안 그룹이 있습니다. 이 방화벽은 운영 체제 계층 외부에 있으며, 허용되는 인바운드 및 아웃바운드 트래픽용 규칙을 정의하는 데 사용할 수 있습니다. 보안 그룹 간의 관계를 정의할 수도 있습니다. 예를 들어 데이터베이스 계층 보안 그룹 내의 인스턴스는 관련 인스턴스에 적용된 보안 그룹을 참조하여 애플리케이션 계층 내의 인스턴스에서 전송하는 트래픽만 수락합니다. 비TCP 프로토콜을 사용하지 않는 한, 로드 밸런서 또는 다음 서비스 없이 인터넷에서 직접 Amazon Elastic Compute Cloud(Amazon EC2) 인스턴스에 액세스할 필요가 없습니다(보안 그룹에 의해 제한된 포트를 사용하는 경우에도). [CloudFront](https://aws.amazon.com/cloudfront). 이것은 운영 체제 또는 애플리케이션 문제를 통해 이루어지는 무단 침입으로부터 보호하는 데 도움이 됩니다. 서브넷은 상태 비저장 방화벽 역할을 하는 네트워크 ACL을 연결할 수도 있습니다. 계층 간에 허용되는 트래픽 범위를 좁히도록 네트워크 ACL을 구성해야 합니다. 이때 인바운드 규칙과 아웃바운드 규칙을 모두 정의해야 합니다. 

 일부 AWS 서비스에서는 API 호출을 위해 [AWS API 엔드포인트가](https://docs.aws.amazon.com/general/latest/gr/rande.html) 위치한 인터넷에 구성 요소가 액세스해야 합니다. 다른 AWS 서비스에서는 [VPC 엔드포인트](https://docs.aws.amazon.com/vpc/latest/privatelink/vpc-endpoints.html) 를 Amazon VPC 내에서 사용합니다. Amazon S3 및 Amazon DynamoDB를 비롯한 여러 AWS 서비스가 VPC 엔드포인트를 지원하며, 이 기술은 다음에서 일반화되었습니다. [AWS PrivateLink](https://aws.amazon.com/privatelink/). 이 접근법을 사용하여 AWS 서비스, 서드 파티 서비스, 다른 VPC에 호스팅되는 사용자의 자체 서비스에 안전하게 액세스하는 것을 권장합니다. AWS PrivateLink의 모든 트래픽은 글로벌 AWS 백본에 유지되며 인터넷을 통해 이동하지 않습니다. 연결은 서비스의 제공업체가 아닌 서비스의 소비자만 시작할 수 있습니다. 외부 서비스 액세스에 AWS PrivateLink를 사용하면 인터넷 액세스 없이 에어 갭 VPC를 생성할 수 있으며 VPC를 외부 위협 벡터로부터 보호하는 데 도움이 됩니다. 서드 파티 서비스는 AWS PrivateLink를 사용하여 고객이 VPC에서 프라이빗 IP 주소를 통해 서비스에 연결하도록 할 수 있습니다. 인터넷에 아웃바운드 연결해야 하는 VPC 자산의 경우 AWS 관리형 NAT 게이트웨이, 아웃바운드 전용 인터넷 게이트웨이 또는 사용자가 생성하고 관리하는 웹 프록시를 통해 아웃바운드 전용(단방향)으로 연결할 수 있습니다. 

 **이 모범 사례를 정립하지 않을 경우 노출되는 위험의 수준:** 높음 

## 구현 가이드
<a name="implementation-guidance"></a>
+  VPC에서 네트워크 트래픽 제어: VPC 모범 사례를 구현하여 트래픽을 제어합니다. 
  +  [Amazon VPC 보안](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Security.html) 
  +  [VPC 엔드포인트](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-endpoints.html) 
  +  [Amazon VPC 보안 그룹](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_SecurityGroups.html) 
  +  [네트워크 ACL](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-network-acls.html) 
+  엣지에서 트래픽 제어: Amazon CloudFront와 같은 엣지 서비스를 구현하여 추가 보호 계층과 기타 기능을 제공합니다. 
  +  [Amazon CloudFront 사용 사례](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/IntroductionUseCases.html) 
  +  [AWS Global Accelerator](https://docs.aws.amazon.com/global-accelerator/latest/dg/what-is-global-accelerator.html) 
  +  [AWS Web Application Firewall(AWS WAF)](https://docs.aws.amazon.com/waf/latest/developerguide/waf-section.html) 
  +  [Amazon Route 53](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/Welcome.html) 
  +  [Amazon VPC 인그레스 라우팅](https://aws.amazon.com/about-aws/whats-new/2019/12/amazon-vpc-ingress-routing-insert-virtual-appliances-forwarding-path-vpc-traffic/) 
+  프라이빗 네트워크 트래픽 제어: 워크로드에 대한 프라이빗 트래픽을 보호하는 서비스를 구현합니다. 
  +  [Amazon VPC 피어링](https://docs.aws.amazon.com/vpc/latest/peering/what-is-vpc-peering.html) 
  +  [Amazon VPC 엔드포인트 서비스(AWS PrivateLink)](https://docs.aws.amazon.com/vpc/latest/userguide/endpoint-service.html) 
  +  [Amazon VPC Transit Gateway](https://docs.aws.amazon.com/vpc/latest/tgw/what-is-transit-gateway.html) 
  +  [AWS Direct Connect](https://docs.aws.amazon.com/directconnect/latest/UserGuide/Welcome.html) 
  +  [AWS Site-to-Site VPN](https://docs.aws.amazon.com/vpn/latest/s2svpn/VPC_VPN.html) 
  +  [AWS 클라이언트 VPN](https://docs.aws.amazon.com/vpn/latest/clientvpn-user/user-getting-started.html) 
  +  [Amazon S3 액세스 포인트](https://docs.aws.amazon.com/AmazonS3/latest/dev/access-points.html) 

## 리소스
<a name="resources"></a>

 **관련 문서:** 
+  [AWS Firewall Manager](https://docs.aws.amazon.com/waf/latest/developerguide/fms-section.html) 
+  [Amazon Inspector](https://aws.amazon.com/inspector) 
+  [AWS WAF 시작하기](https://docs.aws.amazon.com/waf/latest/developerguide/getting-started.html) 

 **관련 동영상:** 
+  [AWS Transit Gateway reference architectures for many VPCs(여러 VPC를 위한 AWS Transit Gateway 참조 아키텍처)](https://youtu.be/9Nikqn_02Oc) 
+  [Amazon CloudFront, AWS WAF, AWS Shield를 사용한 애플리케이션 가속화 및 보호 ](https://youtu.be/0xlwLEccRe0)

 **관련 예시:** 
+  [실습: VPC 자동 배포](https://www.wellarchitectedlabs.com/Security/200_Automated_Deployment_of_VPC/README.html) 

# SEC05-BP03 네트워크 보호 자동화
<a name="sec_network_protection_auto_protect"></a>

 위협 정보 및 이상 상태 감지 결과에 따라 자체 방어 네트워크를 제공하는 보호 메커니즘을 자동화합니다. 예를 들어 최신 위협에 적응하고 위협의 영향을 줄일 수 있는 침입 탐지 및 방지 도구가 있습니다. 웹 애플리케이션 방화벽은 네트워크 보호를 자동화할 수 있는 곳의 일례입니다. 예를 들어 AWS WAF Security Automations 솔루션([https://github.com/awslabs/aws-waf-security-automations](https://github.com/awslabs/aws-waf-security-automations))을 사용하여 알려진 위협 요소와 연결된 IP 주소에서 시작되는 요청을 자동으로 차단할 수 있습니다. 

 **이 모범 사례를 정립하지 않을 경우 노출되는 위험의 수준:** 보통 

## 구현 가이드
<a name="implementation-guidance"></a>
+  웹 기반 트래픽에 대한 보호 자동화: AWS는 일반적인 웹 기반 공격을 필터링하도록 설계된 AWS WAF 규칙 세트를 AWS CloudFormation을 사용하여 자동으로 배포하는 솔루션을 제공합니다. 사용자는 AWS WAF 웹 액세스 제어 목록(웹 ACL)에 포함된 규칙을 정의하도록 사전 구성된 다양한 보호 기능 중에서 선택할 수 있습니다. 
  +  [AWS WAF 보안 자동화](https://aws.amazon.com/solutions/aws-waf-security-automations/) 
+  AWS Partner 솔루션 고려: AWS 파트너는 고객 온프레미스 환경의 기존 제어 솔루션과 동등한 수준이거나, 동일하거나 통합된 업계 최고 수준의 수백 가지 제품을 제공합니다. 이러한 제품은 기존 AWS 서비스를 보완하여 클라우드 및 온프레미스 환경에 포괄적인 보안 아키텍처와 보다 원활한 환경을 배포할 수 있도록 해줍니다. 
  +  [인프라 보안](https://aws.amazon.com/security/partner-solutions/#infrastructure_security) 

## 리소스
<a name="resources"></a>

 **관련 문서:** 
+  [AWS Firewall Manager](https://docs.aws.amazon.com/waf/latest/developerguide/fms-section.html) 
+  [Amazon Inspector](https://aws.amazon.com/inspector) 
+ [Amazon VPC 보안](https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Security.html)
+  [AWS WAF 시작하기](https://docs.aws.amazon.com/waf/latest/developerguide/getting-started.html) 

 **관련 동영상:** 
+  [AWS Transit Gateway reference architectures for many VPCs(여러 VPC를 위한 AWS Transit Gateway 참조 아키텍처)](https://youtu.be/9Nikqn_02Oc) 
+  [Amazon CloudFront, AWS WAF, AWS Shield를 사용한 애플리케이션 가속화 및 보호 ](https://youtu.be/0xlwLEccRe0)

 **관련 예시:** 
+  [실습: VPC 자동 배포](https://www.wellarchitectedlabs.com/Security/200_Automated_Deployment_of_VPC/README.html) 

# SEC05-BP04 검사 및 보호 구현
<a name="sec_network_protection_inspection"></a>

 각 계층에서 트래픽을 검사하고 필터링합니다. 사용자는 [VPC Network Access Analyzer를 사용하여 잠재적인 의도치 않은 액세스에 대해 VPC 구성을 검사할 수 있습니다](https://docs.aws.amazon.com/vpc/latest/network-access-analyzer/what-is-vaa.html). 네트워크 액세스 요구 사항을 지정하고 이 요구 사항을 충족하지 않는 잠재적인 네트워크 경로를 찾을 수 있습니다. HTTP 기반 프로토콜을 통해 트랜잭션되는 구성 요소의 경우, 웹 애플리케이션 방화벽이 일반 공격으로부터 보호하는 데 도움을 줄 수 있습니다. [AWS WAF](https://aws.amazon.com/waf) 는 Amazon API Gateway API, Amazon CloudFront 또는 Application Load Balancer로 전달되는 구성 가능한 규칙과 일치하는 HTTP(s) 요청을 모니터링하고 차단할 수 있는 웹 애플리케이션 방화벽입니다. AWS WAF를 시작하려면 [AWS Managed Rules](https://docs.aws.amazon.com/waf/latest/developerguide/getting-started.html#getting-started-wizard-add-rule-group) 를 자체 규칙과 함께 사용하거나 기존 [파트너 통합을 사용할 수 있습니다.](https://aws.amazon.com/waf/partners/). 

 AWS Organizations 전반에서 AWS WAF, AWS Shield Advanced 보호, Amazon VPC 보안 그룹을 관리하기 위해 AWS Firewall Manager를 사용할 수 있습니다. 그러면 여러 계정과 애플리케이션의 방화벽 규칙을 중앙에서 구성하고 관리할 수 있으므로 일반 규칙 적용을 좀 더 쉽게 확장할 수 있습니다. 공격에 신속하게 대응하기 위해 [AWS Shield Advanced](https://docs.aws.amazon.com/waf/latest/developerguide/ddos-responding.html)나 웹 애플리케이션에 대한 원치 않는 요청을 자동으로 차단할 수 있는 [솔루션](https://aws.amazon.com/solutions/aws-waf-security-automations/) 을 사용할 수도 있습니다. Firewall Manager는 [AWS Network Firewall과도 연동됩니다](https://aws.amazon.com/network-firewall/). AWS Network Firewall은 규칙 엔진을 사용하여 스테이트풀 및 스테이트리스 네트워크를 모두 세세하게 제어할 수 있는 관리형 서비스입니다. 이 서비스는 워크로드 보호에 도움이 되도록 규칙에 [Suricata 호환](https://docs.aws.amazon.com/network-firewall/latest/developerguide/stateful-rule-groups-ips.html) 오픈 소스 침입 예방 시스템(IPS) 사양을 지원합니다. 

 **이 모범 사례가 수립되지 않을 경우 노출되는 위험의 수준:** 낮음 

## 구현 가이드
<a name="implementation-guidance"></a>
+  Amazon GuardDuty 구성: GuardDuty는 악성 활동 및 무단 행위를 지속적으로 모니터링하여 AWS 계정 및 워크로드를 보호하는 위협 탐지 서비스입니다. GuardDuty를 활성화하고 자동 알림을 구성합니다. 
  +  [Amazon GuardDuty](https://docs.aws.amazon.com/guardduty/latest/ug/what-is-guardduty.html) 
  +  [실습: 탐지 제어 자동 배포](https://wellarchitectedlabs.com/Security/200_Automated_Deployment_of_Detective_Controls/README.html) 
+  Virtual Private Cloud(VPC) 흐름 로그 구성: VPC 흐름 로그는 VPC의 네트워크 인터페이스에서 전송되고 수신되는 IP 트래픽에 대한 정보를 캡처하는 데 사용할 수 있는 기능입니다. 흐름 로그 데이터를 Amazon CloudWatch Logs 및 Amazon Simple Storage Service(Amazon S3)에 게시할 수 있습니다. 흐름 로그를 생성한 후에는 선택한 대상에서 해당 데이터를 검색하여 확인할 수 있습니다. 
+  VPC 트래픽 미러링 고려: 트래픽 미러링은 콘텐츠 검사, 위협 모니터링 및 문제 해결을 위해 Amazon Elastic Compute Cloud(Amazon EC2) 인스턴스의 탄력적 네트워크 인터페이스에서 네트워크 트래픽을 복사한 다음 대역 외 보안 및 모니터링 어플라이언스로 전송하는 데 사용할 수 있는 Amazon VPC 기능입니다. 
  +  [VPC 트래픽 미러링](https://docs.aws.amazon.com/vpc/latest/mirroring/what-is-traffic-mirroring.html) 

## 리소스
<a name="resources"></a>

 **관련 문서:** 
+  [AWS Firewall Manager](https://docs.aws.amazon.com/waf/latest/developerguide/fms-section.html) 
+  [Amazon Inspector](https://aws.amazon.com/inspector) 
+  [Amazon VPC 보안](https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Security.html) 
+  [AWS WAF 시작하기](https://docs.aws.amazon.com/waf/latest/developerguide/getting-started.html) 

 **관련 동영상:** 
+  [여러 VPC를 위한 AWS Transit Gateway 참조 아키텍처](https://youtu.be/9Nikqn_02Oc) 
+  [Amazon CloudFront, AWS WAF, AWS Shield를 사용한 애플리케이션 가속화 및 보호](https://youtu.be/0xlwLEccRe0) 

 **관련 예시:** 
+  [실습: VPC 자동 배포](https://www.wellarchitectedlabs.com/Security/200_Automated_Deployment_of_VPC/README.html) 