클라우드 시큐리티 과정 4기 - 4회차 AWS 보안 모니터링 및 취약점 점검
안녕하세요. Twodragon입니다.
클라우드 시큐리티 과정 4기 강의를 시작하게 되었고, 게더 타운(Gather Town)에서 진행되는 일정을 소개드리려고 합니다.
먼저 게더 타운 진행 스케줄은 총 2시간(20분 진행, 5분 휴식)으로 다음과 같습니다.
온라인 강의 특성 상 눈의 피로 또는 학생분들의 높은 집중력을 위해 20분씩 진행하고 5분 휴식을 취하고 있습니다.
10:00 - 10:20 = 근황 토크 & 멘티끼리 토론 (과제 토론 1회, 주제 토론 1회) & 과제 피드백
10:25 - 10:45 = AWS 보안 모니터링 (EC2, S3, IAM, Kubernetes)
10:50 - 11:10 = AWS 보안 취약점 점검
11:15 - 11:35 = AWS 보안 자동화
11:40 - 12:00 = 5회차 과정 이해를 위한 필수적인 실습
1. 근황 토크 & 과제 피드백
- 근황 토크 & 과제 관련하여 토론 진행 & 과제 피드백
Q1) 과제 내용 요약 발표하고, 과제하고 느낀 점
- 현재 클라우드 보안에서 이슈가 되고 있는 사항 (KRCERT 또는 기사를 통해 얻은 참고자료)
- Apple 제품 보안 업데이트 권고 : 아이폰, 아이패드 커널에서 발견된 권한 상승 취약점 발견으로 최신 버전으로 업데이트 권고
- 구글 Chrome 업데이트 권고 : 데스크톱 용 크롬 브라우저에서 발생하는 Use-after-free 취약점 발견으로 최신 버전으로 업데이트 권고
- Cisco 보안 업데이트 권고 : Cisco 시 권한 상승 공격 및 서비스 거부 취약점 발견으로 최신 버전으로 업데이트 권고
2. AWS 보안 모니터링 (EC2, S3, IAM, Kubernetes)
Q2) CloudTrail, Config, VPC Flow Logs, Kubernetes Audit 로그들은 어떤 상황에서 쓰일지 자유롭게 의견을 말해주세요
- AWS CloudTrail 로그 예시 : CloudTrail 로그 파일의 예 - AWS CloudTrail (amazon.com)
- AWS SSM, Cloudwatch 모니터링 활용 사례 : SSM, Cloudwatch
- GuardDuty 유형 : 결과 유형 - Amazon GuardDuty
- AWS Security Group 모니터링 예시 : https://techblog.woowahan.com/2665/
- AWS 안전한 S3 사용 가이드 : https://techblog.woowahan.com/6217/
Amazon CloudWatch를 이용한 효율적인 윈도 서버 모니터링 – 지락문화예술공작단
Amazon CloudWatch를 이용한 효율적인 윈도 서버 모니터링 모니터링 없이 시스템을 운영하게 된다면 마치 계기판을 보지 않고 자동차를 운전하는 것과 같다는 이야기가 있습니다. 시스템 장애는 곧
jirak.net
AWS 멀티 계정 환경에서 취약한 Security Group 설정 모니터링 | 우아한형제들 기술블로그
{{item.name}} 들어가며 클라우드 서비스의 장점은 리소스의 탄력적 사용, 비용 절감, 운영에 대한 부담 감소에 있다. 하지만 보안 관점에서는 이러한 클라우드 서비스의 장점이 취약점으로 작용한
techblog.woowahan.com
사례별로 알아본 안전한 S3 사용 가이드 | 우아한형제들 기술블로그
우아한형제들 인프라보안팀에서 근무하고 있는 이주호입니다. ‘S3를 왜 안전하게 사용해야 하는지 이해’하고 몇 가지 사례를 예시로 들어 ‘더욱 안전하게 사용하기 위해 설정해야 하는 기능
techblog.woowahan.com
3. AWS 보안 취약점 점검
- Public IP 찾는 AWS cli 명령어 쿼리문 알려달라고 질의
https://kloudle.com/academy/how-to-get-all-public-ip-addresses-in-your-aws-account/
- 2023 AWS 클라우드 보안 가이드 : https://www.skshieldus.com/download/files/download.do?o_fname=2023%20클라우드%20보안%20가이드_%20AWS.pdf&r_fname=20221220170637944.pdf
- 2023 Azure 클라우드 보안 가이드 : https://www.skshieldus.com/download/files/download.do?o_fname=2023%20클라우드%20보안%20가이드_%20Azure.pdf&r_fname=20221220170359688.pdf
- 2023 GCP 클라우드 보안 가이드 : https://www.skshieldus.com/download/files/download.do?o_fname=2023%20클라우드%20보안%20가이드_%20GCP.pdf&r_fname=20221220170155323.pdf
4. AWS 보안 자동화 (ChatGPT를 활용한 AWS 코드 작성)
- eventbridge로 aws 콘솔 로그인을 모니터링하기 위한 slack에 대한 람다 코드를 알려주십시오.
(Please let me know the lambda code to slack for monitoring aws console login with eventbridge)
eventbridge로 aws 콘솔 로그인을 모니터링
import json
import os
import boto3
from botocore.exceptions import ClientError
# Set the Slack webhook URL
SLACK_WEBHOOK_URL = os.environ['SLACK_WEBHOOK_URL']
def lambda_handler(event, context):
# Get the login event from the EventBridge event
login_event = event['detail']
# Get the username and IP address of the user who logged in
username = login_event['userIdentity']['userName']
source_ip = login_event['sourceIPAddress']
# Set the message text for the Slack notification
message_text = f'AWS Management Console login by {username} from IP {source_ip}'
# Send the notification to Slack
send_to_slack(message_text)
def send_to_slack(message_text):
# Set the Slack message data
slack_message = {
'text': message_text
}
# Send the message to the Slack webhook
response = requests.post(SLACK_WEBHOOK_URL, data=json.dumps(slack_message))
if response.status_code != 200:
raise ValueError(
f'Request to slack returned an error {response.status_code}, the response is:\n{response.text}')
Q3) ChatGPT는 어떤 상황에서 쓰면 유용할지 자유롭게 의견을 말해주세요
- AWS 네트워크 공격 자동차단 예시 : https://techblog.woowahan.com/2558/
- AWS에서 보안 감사 및 이상징후 탐지 예시 : https://techblog.woowahan.com/2603/
- Lambda 를 활용한 AWS 보안 모니터링 : https://github.com/Twodragon0/Lambda
AWS에서 네트워크 공격 자동차단 하기 | 우아한형제들 기술블로그
{{item.name}} Introduction Summary 최근 Public cloud 시장이 활성화 되면서 많은 기업들이 Cloud 도입을 시작하고 있으며, 한국의 경우 대표적으로 Amazon Web Service(AWS)를 사용하고 있다. 그리고 한국의 Seoul regi
techblog.woowahan.com
AWS에서 보안 감사 및 이상징후 탐지 | 우아한형제들 기술블로그
{{item.name}} Introduction Summary AWS에서는 유용하게 사용 할 수 있는 log들이 있다. 그 중에서도 cloudtrail log를 수집/분석하여 정보보안 및 운영의 효율성을 높이는데에 도움이 되는 기술을 공유하고자
techblog.woowahan.com
GitHub - Twodragon0/Lambda: Lambda Alert
Lambda Alert. Contribute to Twodragon0/Lambda development by creating an account on GitHub.
github.com
5. 5회차 과정 이해를 위한 필수적인 실습
- ChatGPT 활용하여 Lambda 코드 작업 진행
- 2023 AWS 클라우드 보안 가이드 : https://www.skshieldus.com/download/files/download.do?o_fname=2023%20클라우드%20보안%20가이드_%20AWS.pdf&r_fname=20221220170637944.pdf
참고자료
- 클라우드 시큐리티 과정 3기 - 6주차 ISMS 대응 및 점검 : https://twodragon.tistory.com/597
- 클라우드 시큐리티 과정 3기 - 5주차 AWS WAF 보안 : https://twodragon.tistory.com/596
- 클라우드 시큐리티 과정 3기 - 4주차 : https://twodragon.tistory.com/595
- 투드래곤 (클라우드 시큐리티 과정 2기 - 5주차 Splunk와 ELK 데이터 분석) (tistory.com)
- 투드래곤 (클라우드 시큐리티 과정 2기 - 4주차 Azure 보안) (tistory.com)