[Information Security] Chapter 8 Intrusion Detection

이은지·2024년 8월 23일
0

Information Security

목록 보기
9/11

Intruders

  • Some statistics on intruders
    • 약 80%가 외부자에 의한 것이며, 20% 미만이 내부자에 의한 것
    • 조직 내 개인들과 그들이 사용하는 IT 시스템을 특정하여 공격하는 활동이 증가함
    • 이러한 추세는 대상을 특정한 공격이 방화벽이나 IDS와 같은 경계 방어를 우회 하도록 설계될 수 있으므로, the necessity of defense-in-depth strategies을 사용할 필요성 증가
  • Classification of intruders by Symantec and Verizon
    • Cyber criminals
      • Individuals of members of an organized crime group with a goal of financial reward 금전적 보상을 목표로 하는 개인이나 조직 범죄 집단에 속한 사람들
      • Activities
        • Identity theft/Theft of finantial credential 신원 도용/금융 자격증 도용
        • Corporate espionage 기업 스파이활동
        • Data theft/ransoming 데이터 도난/데이터 몸값 요구
    • Activists
      • Individuals who are motivated by social or political causes 사회나 정치적 원인에 의해 동기 부여된 개인들
      • Usually have low skills
      • The aim of their attacks is often to promote and publicize their cause typically through 공격목적: 자신들의 원인을 홍보하고 알리는 것
        • Website defacement 웹사이트 변조
        • Denial of service attacks
        • Theft and distribution of data results in negative publicity or compromise of their targets 부정적인 홍보를 유발하거나 목표물을 손상시키는 데이터의 도난 및 배포
    • State-Sponsored Organizations 국가 후원 조직
      • To conduct espionage or sabotage activities 정부에 의해 후원되는 해커 그룹으로 스파이 활동이나 방해 활동을 수행
      • Known as APTs(Advanced Persistent Threats) 장기간에 걸쳐 비밀리에 지속되는 공격 때문에 고급 지속적 위협(APT)으로 알려져 있음
      • Wide spread nature and scope of these activities by a wide range of countries 광범위한 국가에서 이러한 활동의 광범위한 성격과 범위가 나타남
    • Others
      • Classic hackers or crackers enjoying technical challenges for reputation
      • There is a pool of “hobby hackers” due to wide availability of attack toolkits
  • Another type of classification based on their skill levels
    • Beginner
      • With minimal technical skills, using primarily existing attack toolkits (known as script-kiddies) 기술적 능력 최소, 주로 기존의 공격 툴킷 사용
      • Comprise the largest number of attackers 가장 많은 공격자 포함
      • Easiest to defend against 이미 알려진 도구를 사용하므로, 이러한 공격자들은 방어하기 쉬움
    • Skilled
      • With sufficient technical skills to modify and extend attack toolkits to use newly discovered, or purchased, vulnerabilities 새롭게 발견하거나, 구매한 취약점을 수행하기 위해 공격 툴킷을 수정하고 확장하는 충분한 기술적 스킬을 가짐
      • Able to locate new vulnerabilities of similar type with already known to exploit 이미 알려진 것과 유사한 새로운 취약점을 찾아내는데 능숙
      • Found in all intruder classes 모든 침입자 유형에서 skilled 범주에 들어가는 공격자가 발견됨
    • Expert 고급 기술적 스킬을 가져, 전혀 새로운 종류의 취약점을 발견하거나 새롭고 강력한 공격 툴킷 작성 가능
      • With high-level technicall skills capable of discovering brand new categories of vulnerabilities
      • Write a new powerful attack toolkits
      • Some are employed by state-sponsored organizations
      • Most difficult to defend

Intruder behavior

  1. Target Acquisition and Information gathering 목표확보 및 정보수집

    • Both technical and non-technical
    • Use network exploration tools
  2. Initial Access
    원격 네트워크 취약점을 이용하거나, 약한 인증 자격 증명을 추측하거나 사회공학적 방법을 통해 목표시스템 최초 접근

    • By exploiting a remote network vulnerability
    • By guessing weak authentication credentials
    • Via social engineering
  3. Privilege Escalation
    로컬 접근 취약점을 이용해 권한을 상승 시킴

    • Use local access vulnerabilities
  4. Information Gathering or System Exploit
    공격자가 시스템 리소스에 접근하거나 수정하여 다른 목표 시스템으로 이동하는 행위

    • Access or modify resources
    • Navigate to another target system
  5. Maintaining Access and Convering Tracks 접근 유지 및 공격 감추기

    • Installing backdoor
    • Disabling audit log

Intrusion detection

Definitions

Intrusion Detection System(IDS)

IDS는 데이터 출처, 유형에 따라 다음과 같이 분류됨

  • Host-based IDS (HIDS)
    • Monitors the characteristics of a single host for suspicious activity
    • 단일 호스트의 특성과 해당 호스트 내에서 발생하는 이벤트를 모니터링하여 의심스러운 활동의 증거를 찾음
  • Network-based IDS (NIDS)
    • Monitors network traffic and anlayzes network, tansport, and application protocols to identify suspicious activity
    • 네트워크 트래픽을 모니터링 하고, 네트워크, 전송, 응용 프로그램 프로토콜을 분석하여 의심스러운 행동 식별
  • Distributed or Hybrid IDS
    • Combines information from a number of sensors 여러 센서로부터 정보를 결합
    • Often both host and network based 호스트 및 네트워크 기반 모두를 포함하는 경우가 많음
    • With a central analyzer able to better identify and respond to intrusion activity 중앙분석기가 침입 활동을 더 잘 식별하고 대응할 수 있음

또한, IDS는 3가지 논리적 구성요소로 구성됨

  • Sensors : collect data 데이터수집
  • Analyzers : determine if intrusion has occured 센서로부터 데이터를 입력 받아 침입이 발생 했는지를 결정
  • User interface : view output or control system behavior 사용자는 시스템 출력을 보거나 시스템 동작을 제어 가능

Basic principles

  • Motivation of IDS
    • Quick intrusion detection reduces the damage and make quick recovery possible 빠른 침입 탐지는 피해를 줄이고, 빠른 회복이 가능하게 함
    • Can help preventing intrusions by serving as deterrent 침입을 방지하는 수단으로 작용하여 억제 효과를 낼 수 있음
    • Strengthen intrusion prevention measures by collecting the intrusion techniques 침입 기법에 대한 정보를 수집하여 침입 방지 조치를 강화하는데 사용될 수 있음
  • Base assumption
    • The behavior of an intruder differs from that of a legitimate user → 침입자의 행동이 합법적인 사용자의 행동과 구별되는 방식으로 차이가 난다는 가정에 기초
    • Overlaps between them causes
      • false positives → 합법적인 유저가 침입자 행동으로 분류됨
      • false negatives → 침입자가 침입자로 식별되지 않음

IDS Requirements

  1. Run continually: Run continually with minimal human supervision
  2. Be fault tolerant: Be fault tolerant in the sense that it must be able to recover from system crashes and reinitializations
  3. Resist subversion(침해저항성): The IDS must be monitor itself and detect if it has been modified by an attacker
  4. Impose a minimal overhead on system: 실행되고 있는 시스템에 최소한의 오버헤드 부과
  5. Configured according to system security policies that is being monitored 모니터링 되고 있는 시스템의 보안 정책에 따라 구성할 수 있어야함
  6. Adapt to changes in systems and users 시스템과 사용자의 행동 변화에 대응하여 적응할 수 있어야 함
  7. Scale to monitor large numbers of systems 대규모 호스트를 모니터링할 수 있을 정도로 확장 가능해야함
  8. Provide graceful degradation of service: that if some components of IDS stop working for any reason, the rest of then should be affect as little as possible 우아한 서비스 저하 제공 → IDS 일부 구성요소가 어떤 이유로 작동을 멈추더라도 나머지 시스템에는 최대한 영향을 미치지 않아야 함
  9. Allow dynamic reconfiguration (동적 재구성 허용): should have the ability to reconfigure the IDS without having to restart it

Analysis approaches

센서데이터 분석을 통한 침입 탐지를 위해 사용

Anomaly detection

  • 개념
    • Involves the collection of data relating to the behavior of legitimate users over a period of time 합법적인 사용자의 행동과 관련된 데이터를 일정 기간 수집하는 과정을 포함
    • Current observed behavior is anlayzed to detmine whether this behavior is that of a legitimate user or that of an intruder 현재 관찰된 행동을 분석하여 그 행동이 합법적 사용자의 것인지, 침입자의 것 인지를 높은 수준의 확신을 갖고 결정
  • Classification approach
    • Statistical
      • Analysis of the observed behavior using univariate, multivariate, or time-series(시계열) models of observed metrics
    • Knowledge based
      • Approaches use an expert system that classifies observed behavior according to a set of rules that model legitimate behavior 합법적인 행동을 하는 일련의 규칙
    • Machine-learning
      • Approaches automatically determine a suitable classification model from the training data using data mining techniques

Signature or heuristic detection

  • 개념
    • Uses a set of known malicious data patterns or attack rules that are compared with current behaviors 알려진 악성 데이터 패턴이나 공격 규칙의 집합을 현재 행동과 비교
    • Also known as misuse detection
    • Can only identify known attacks for which it has patterns or rules 패턴이나 규칙을 가지고 있는 알려진 공격만 식별 가능
  • Signature approaches
    • Match a large collection of known patterns of malicious data against data stored on a system or in transit over a network 악성데이터의 알려진 패턴 대 집합을 시스템에 저장된 데이터나 네트워크를 통해 이동중인 데이터와 매칭시킴
    • The signatures need to be large enough to minimize the false alarm rate, while still detecting a sufficiently large fraction of malicious data 서명은 충분히 큰 부분의 악성 데이터를 감지하면서도, 오경보율을 최소화 하기 위해 충분한 크기 필요
    • Widely used in anti-virus products, network traffic scanning proxies, and in NIDS

💡 장점
- 시간, 자원 사용에 대한 비교적 낮은 비용, 널리 받아들여짐

💡 단점
- 새로운 멀웨어를 지속적으로 식별하고 검토하여, 이를 식별할 수 있는 signature를 생성하는데 많은 노력이 필요
- Signature가 존재하지 않는 제로데이 공격의 경우 감시 불가

  • Rule-based heuristic identification
    • Involves the use of rules for identifying known penetrations or penetrations that would exploit known weakness 알려진 취약점을 이용한 침투나 알려진 침투를 식별하기 위한 규칙의 사용을 포함
    • Rules can also be defined that identify suspicious behavior, even when the behavior is within the bounds of established patterns of usage 이용 패턴의 경계 내에서도 의심스러운 행동을 식별할 수 있는 규칙 또한 정의될 수 있음
    • SNORT is an example of a rule-based NIDS 다양한 네트워크 공격을 탐지하기 위해 대규모 규칙 집합이 존재

Host-based intrusion detection

  • Adds a specialized layer of security software to vulnerable or sensitive systems 데이터베이스 서버 및 관리 시스템과 같은 취약하거나, 민감한 시스템에 특별한 보안 소프트웨어 계층을 추가
  • Can use either anomaly or signature and heuristic approaches 모니터링 되는 호스트에서 무단 행위를 감지하기 위해 다음과 같은 접근방식 사용 가능
  • Monitors activity to detect suspicious behavior
    • 목적: primary purpose is to detect intrusions, log suspicious events, and send alerts
    • 장점: can detect both external and internal intrusions

Data sources and sensors

  • A fundamental component of intrusion detection is the sensor that collects data
  • Common data sources include
    • System call traces 시스템 호출 추적(유닉스, 리눅스에서 사용, 윈도우에서는 문제 발생)
    • Audit(log file) records 로그 파일 기록
    • File integrity checksums 파일 무결성 체크섬
    • Registry access 레지스트리 접근(윈도우 특정적)

Anomaly HIDS

  • Majority uses “System call” traces as the data for detection
    • System call
      • 프로그램이 핵심 커널 기능에 접근하는 수단으로, 저수준의 운영체제 기능과의 광범위한 상호작용을 제공 → 따라서 해당 정보는 프로세스 활동을 정상 또는 비정상으로 분류하는데 사용될 수 있는 상세한 정보를 제공
  • Anomaly HIDS is not used in Windows
    • 이유 : Analysis is hindered by wide usage of DLLs as an intermediary between process requests and actual system call interfaces Window는 일반적으로 DLLs가 프로세스 요청과 실제 시스템 호출 인터페이스 사이의 중개자로 사용되기 때문에 Anomaly HIDS 사용 x
  • System call based approach imposes a moderate load on the monitored system to gather and classify the data
    • System call 접근법은 HIDS에 풍부한 정보 소스를 제공하지만, 이러한 데이터는 수집하고 분류하기 위해 모니터링 시스템에 중등도의 부하를 주게됨
  • 하지만 다른 접근법은 탐지율이 더 낮음

Distributed HIDS

  • 예전엔 Host IDS는 단일 시스템의 독립적 운영에 중점을 두었지만, Now typical organization needs to defend a distributed collection of hosts supported by a LAN or internetwork 대부분의 조직은 LAN이나 인터넷워크에 의해 지원되는 분산 호스트 컬렉션을 방어할 필요가 있음
  • More effective defense can be achieved by coordination and coorperating among IDSs across the network 네트워크 전반에 걸친 IDS 간의 조정, 협력을 통해 더 효과적인 방어를 달성할 수 있음
  • Architecture
    • Host agent module
      • 모니터링 되는 시스템에서 백그라운드 프로세스로 운영되는 감사 수집 모듈, 호스트에서 보안 관련 이벤트에 대한 데이터를 수집하여, 중앙 관리자에 전송
    • LAN monitor agent module
      • host agent module과 같은 방식으로 운영, 다른 점은 LAN 트래픽을 분석하고 그 결과를 중앙 관리자에게 보고한다는 것
    • Central manager module
      • LAN, host agent 로부터 보고된 데이터를 처리하고, 상관관계를 분석하여 침입을 탐지

  • Agent Architecture
  • Major issues in the design of a distributed IDS
    • 다양한 센서 데이터 형식을 다뤄야 함
    • 네트워크 상의 시스템으로부터 데이터를 수집하고 분석하는 하나 이상의 노드 필요
    • 중앙집중식 or 분산식 아키텍처 사용 가능

Network-based intrusion detection

  • Monitors traffic at selected points on a network
  • Examines traffic packet by packet in real or close to real time 실시간이나 거의 실시간으로 트래픽을 패킷별로 검사하여 침입패턴을 탐지하려고 시도
  • May examine network, transport, and/or application-level protocol activity
  • Comprised of a number of sensors, one or more servers for NIDS management functions, and one or more management consoles for the human interfaces
    • 전형적인 NIDS 시스템에는 트래픽 패킷을 모니터링 하기 위한 여러 센서들, NIDS 관리 기능을 위한 하나 이상의 서버, 휴먼 인터페이스를 위한 하나 이상의 관리 콘솔이 포함됨
  • Analysis of traffic patterns may be done at the sensor, the management server or a combination of the two
    • 트래픽 패턴 분석은 센서, 관리 서버 또는 그 둘의 조합에서 수행될 수 있음

Types of network sensors

2가지 유형이 있음

  • Inline sensor
    • Make the traffic that it is monitoring must pass through the sensor 모니터링 트래픽이 센서를 통과해야함
    • To enable them to block an attack when one is detected 공격을 감지할 때 이를 차단할 수 잇어야함

💡 장점: 추가적인 하드웨어 장치 필요 없이, NIDS 센서 소프트웨어만 필요함

  • Passive sensor
    • Monitors a copy of network traffic 네트워크 트래픽 복사본을 모니터링
    • Actual traffic does not pass through the device 실제 트래픽은 장치를 통과하지 않음

💡 장점: 패시브 센서는 지연에 기여하는 추가 처리 단계를 추가하기 않기 때문에 인라인 센서보다 더 효율적

NIDS sensor deployment 아주 중요!!

Intrusion detection techniques

  • Signature detection에 적합한 공격 유형

    • Reconnaissance and attacks 정찰 및 공격
      • Application layer 응용 계층
        • DHCP, DNS, FTP, HTTP, IMAP, IRC, NFS, POOP, SIP, SNMP…
      • Transport layer 전송 계층
        • examines TCP/UDP related attacks
      • Network layer 네트워크 계층
        • ICMP, IGMP, IP Spoofing…
    • Unexpected application services 예상치 못한 응용 프로그램 서비스
      • 예: 승인되지 않은 응용 프로그램 서비스를 실행하는 호스트
    • Policy violations 정책 위반
      • 예: 부적절한 웹사이트 사용 및 금지된 응용 프로그램 프로토콜 사용
  • Anomaly detection에 적합한 공격 유형

    • Denial-of-service(DoS) attacks
      • 패킷 트래픽이나 연결 시도가 대폭 증가하여 대상 시스템을 압도하려는 것
    • Scanning
      • 공격자가 다양한 종류의 패킷을 보내어 타깃 네트워크나 시스템을 조사하는 것
      • 스캐닝은 응용계층, 전송계층, 네트워크 계층에서 비정상적인 흐름 패턴을 통해 감지될 수 있음
    • Worms
      • 일반적으로 서로 통신하지 않는 호스트들이 통신하게 하거나, 평소 사용하지 않는 포트를 사용하게 하는 등의 행위로 인해 감지될 수 있음

Logging of alerts

센서가 잠재적 위반을 탐지하면, 관련된 정보와 함께 경보를 보내고 로그를 남김. NIDS 센서에 의해 기록되는 정보는 다음과 같음

  • Timestamp
  • Connection or session ID
  • Event or alert type
  • rating(예: 우선순위, 심각도, 영향, 신뢰도)
  • Network, transport, and application layer protocols
  • Source and destination IP addresses
  • Source and destination TCP or UDP ports, or ICMP types and codes
  • Number of bytes transmitted over the connection
  • Decoded payload data, such as application requests and responses
  • State-related information

Honeypots

침입 탐지 기술의 또 다른 구성 요소.

  • 허니팟?
    • 잠재적 공격자를 중요 시스템으로 유인하기 위해 설계된 미끼 시스템(Decoy system)
    • Systems are filled with fabricated information(날조된 정보) that a legitimate user of the system wouldn’t access
    • Resources that have no production value
      • therefore incomming communication is most likely a probe(조사), scan, or attack
      • Initiated outbound communication suggests that the system has probably been compromised(허니팟이 외부 통신을 시작한다면, 침해 당한 것)
  • 목적
    • Lure(방해하다) a potential attacker away from critical systems(중요 시스템)
    • Collect information about the attacker’s activity
    • Encourage the attacker to stay on the system long enough for administrators to respond

Classification: Low interaction vs High interaction

  • Low interaction honeypot
    • Consists a software package that emulates particular IT services or systems well enough to provide a realistic initial interaction, but does not execute a full version of those services or systems
      • 특정 IT 서비스나 시스템을 에뮬레이션하는 소프트웨어 패키지로 구성되어 있음
      • 초기 상호작용을 현실적으로 제공하지만, 해당 서비스나 시스템의 전체 버전을 실행하지는 않음
    • Provides a less realistic target 낮은 현실적인 목표
    • Often sufficient for use as a component of a distributed IDS to warn of imminient attack 즉각적인 공격을 경고하는 분산 IDS 구성요소로 사용하기에 충분함
  • High interaction honeypot
    • A real system, with a full operating system, services, and applications, which are instrumented and deployed where they can be accessed by attackers 전체 운영체제, 서비스 및 응용 프로그램이 탑재된 실제 시스템으로, 공격자가 접근 할 수 있는 곳에 배치되고 도구화됨
    • Is a more realistic target that may occupy an attacker for an extended period 더 현실적인 목표를 제공하여, 공격자를 장기간 붙잡아둘 수 있음
    • However, it requires significantly more resources 하지만, 상당한 자원을 요구함
    • If compromised could be used to initiate attacks on other systems 만약 침해되면, 다른 시스템에 대한 공격을 시작하는데 사용될 수 있음

💡 높은 상호작용 허니팟은 더 현실적인 목표를 제공하며, 공격자를 장기간 붙잡아둘 수 있음. 그러나 상당한 자원을 요구하며, 만약 침해되면 다른 시스템에 대한 공격을 시작하는 데 사용될 수 있음. 낮은 상호작용 허니팟은 덜 현실적인 목표를 제공하지만, 공격 초기 단계에서 침입자를 식별하는데 충분함. 이는 즉각적인 공격을 경고하는 분산 IDS의 구성요소로 사용하기에 충분함

Honeypot Deployment Options

  • Outside of external firewall (1)
    • As honeypot attracts many attacks, it reduces the management burden of firewall and IDS sensor
      허니팟이 많은 잠재적 공격을 유인함으로써, 방화벽과 내부 IDS 센서가 발생시키는 경보를 줄여 관리 부담을 경감시킴
    • Little ability to trap internal attackers 단점: 내부 공격자를 포착하는 능력이 거의 없음
  • In DMZ (2) 비무장지대 (외부에 제공되는 서비스의 네트워크)
    • Confliction with external firewall
      - Either need to open the ports related to honeypot(risky) or limit the effectiveness of honeypot

      단점: 방화벽이 일반적으로 필요하지 않은 서비스에 접근하려는 DMZ로의 트래픽을 차단함. 따라서 방화벽은 허용 가능한 것 이상으로 트래픽을 열어야 하며, 이는 위험하거나 허니팟의 효과를 제한함

  • Fully internal honeypot (3)
    • can catch internal attacks and detect misconfigured firewall 장점: 내부 공격을 포착하고, 잘못 구성된 방화벽을 감지할 수 있음
    • Honeypot compromise will cause a serious problems 단점: 허니팟이 손상되면 여러 심각한 문제를 유발함

Example system: Snort

Open source based lightweight IDS

  • performs real-time packet capture, protocol analysis, and content searching and matching
  • Mainly designed to analyze TCP, UDP, and ICMP protocol
  • Can be extended with plugins for other protocols

Snort Architecture

  • Packet Decoder
    • 각각 캡처된 패킷을 처리하여 데이터 링크, 네트워크, 전송 및 어플리케이션 계층에서 프로토콜 헤더를 식별하고 분리
  • Detection Engine
    • 침입 탐지의 실제 작업을 수행
    • 보안 관리자가 정의한 rule set을 기반으로 패킷을 분석
  • Logger
    • 규칙과 일치하는 각 패킷에 대해 규칙은 로깅 및 알림 옵션이 취해질 것을 지정
    • 로거 옵션이 선택되면, 패킷이 로그파일에 저장되고, 나중에 분석을 위해 로그파일 사용 가능
  • Alert
    • 감지된 각 패킷에 대해 알림이 발송될 수 있음
    • 데이터베이스나 소켓으로 보내질 수 있음

Snort Rules

  • Uses a simple, flexible rule definition language

  • Format

    • Rule header

    • Options

    • Action

      • what to do when it finds a packet that matches the rule
      • drop, reject, sdrop → works only inline mode

profile
소통하는 개발자가 꿈입니다!

0개의 댓글