SlideShare a Scribd company logo
STL 을 이용한 DOS 공격 검출
With Iterator
참조 블로그 주소
https://www.joinc.co.kr/w/Site/C++/STL
/STL_Iterator
DOS 공격 검출
• 어떻게?
– 하나의 IP 에서
– 특정 포트로
– 짧은 시간에 요청이 들어온다
• 이 요청을 잡아 낸다
패킷을 저장
• 들어오는 패킷을 저장해야 한다
• 어디에?
• Map?
• Vector?
Map
• 균형 이진트리 구조
• Key + Value
• Key = IP + Port 정보
• 수만개의 IP 가 들어온다면..
Map 으로 표현하기에는 너무 커진다
• 검색 시간 너무 커짐
Hash_map
• IP, PORT 를 Key
• TIME, COUNT 를 VALUE 로 가지는 MAP
• 을 원소로 가지는 vector 구조
Hash_map
• 새로 들어오는 패킷에 대해
• Key 값을 보고
• 이미 있다면 count 값을 증가
• 없다면 추가
• 시간 값을 보고 count 값을 초기화
시간 값을 초기화?
• 어떻게?
• 모든 저장된 원소의 TIME 값을 확인
• 모든 원소… 를 어떻게 확인?
• Hash vector를 일일이 돌면서 time 값을 확인?
– 너무 비효율적
• Iterator !
Iterator
• 패킷을 저장하는 자료구조의 Iterator
– 패킷 정보에 접근 가능
• 이 Iterator 를 저장하는 또 하나의
자료구조(map)를 생성
• 새로운 패킷이 들어와서 추가되는 경우에
Iterator 를 Iterator map 에 추가해준다
• 매 순간 Iterator map 을 순회하면서
time 값을 확인 해 준다
내가 내린 결론
• 작성자분 께서도 아직은 미완이라서
미안하다고 하시는데….
• 핵심 아이디어는 자료구조의 Iterator의
필요한 부분을 다시 저장한 자료구조를 사
용하면.. 매번 뽑아 낼 필요 없이 사용 할
수 있을까… …

More Related Content

Featured

Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
Christy Abraham Joy
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
Vit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
MindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
GetSmarter
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
Alireza Esmikhani
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
Project for Public Spaces & National Center for Biking and Walking
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
DevGAMM Conference
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
Erica Santiago
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Saba Software
 

Featured (20)

Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
 

Stl 을 이용한 dos 공격 검출

  • 1. STL 을 이용한 DOS 공격 검출 With Iterator 참조 블로그 주소 https://www.joinc.co.kr/w/Site/C++/STL /STL_Iterator
  • 2. DOS 공격 검출 • 어떻게? – 하나의 IP 에서 – 특정 포트로 – 짧은 시간에 요청이 들어온다 • 이 요청을 잡아 낸다
  • 3. 패킷을 저장 • 들어오는 패킷을 저장해야 한다 • 어디에? • Map? • Vector?
  • 4. Map • 균형 이진트리 구조 • Key + Value • Key = IP + Port 정보 • 수만개의 IP 가 들어온다면.. Map 으로 표현하기에는 너무 커진다 • 검색 시간 너무 커짐
  • 5. Hash_map • IP, PORT 를 Key • TIME, COUNT 를 VALUE 로 가지는 MAP • 을 원소로 가지는 vector 구조
  • 6. Hash_map • 새로 들어오는 패킷에 대해 • Key 값을 보고 • 이미 있다면 count 값을 증가 • 없다면 추가 • 시간 값을 보고 count 값을 초기화
  • 7. 시간 값을 초기화? • 어떻게? • 모든 저장된 원소의 TIME 값을 확인 • 모든 원소… 를 어떻게 확인? • Hash vector를 일일이 돌면서 time 값을 확인? – 너무 비효율적 • Iterator !
  • 8. Iterator • 패킷을 저장하는 자료구조의 Iterator – 패킷 정보에 접근 가능 • 이 Iterator 를 저장하는 또 하나의 자료구조(map)를 생성 • 새로운 패킷이 들어와서 추가되는 경우에 Iterator 를 Iterator map 에 추가해준다 • 매 순간 Iterator map 을 순회하면서 time 값을 확인 해 준다
  • 9. 내가 내린 결론 • 작성자분 께서도 아직은 미완이라서 미안하다고 하시는데…. • 핵심 아이디어는 자료구조의 Iterator의 필요한 부분을 다시 저장한 자료구조를 사 용하면.. 매번 뽑아 낼 필요 없이 사용 할 수 있을까… …