홍익대학교 이윤규 교수님의 네트워크 보안 강의 (2022)를 정리했습니다.
인터넷 프로토콜과 서비스 거부 (Internet Protocols and Service Denial)
DoS/DDoS 공격 (Denial of Service)
- 공격자가 도메인에 트래픽을 감당할 수 없을 만큼 보내서 서비스 불능 상태로 만드는 공격.
- 공격 방법으로는 공격자가 직접 대규모로 머신을 구동해서 보내는 방법, 타인의 IP나 도메인을 훔쳐서 훔친 IP를 통해 우회를 해서 공격을 하는 방법(봇넷)이 있다.
- 공격자들은 소위 말하는 Compromised machine (이미 손상된 시스템)을 본넷으로 구축을 해서 엄청난 양의 트래픽을 타겟으로 보낼 수 있다.
BGP(Border Gateway Protocol) security (게이트웨이 보더에 대한 보안 이슈)
- 라우터(네트워크상에서 패킷을 교환해주는 디바이스)가 길을 찾을 때 사용하는 프로토콜이다. (동적 경로를 찾는 프로토콜) *ASN 넘버를 사용해서 각각의 라우터들이 나눠서 관리를 하고, 최종적으로 정보를 공유하면서 경로를 만든다.
- 라우팅 테이블을 유지하고 관리하는 규정을 경계 경로 프로토콜(BGP)라고 한다. 라우팅 테이블이 변경될 경우 자동으로 업데이트를 한다. 즉, 최단 경로를 지속적으로 체크해 업데이트를 한다.
- 나이지리아-구글 사건
IXP(Internet eXchange Point)라고 하는 인터넷 교환 지점을 관리하는 라우터 포인트가 있다. 나이지리아의 경우 인터넷 서비스가 제대로 개발되어 있지 않기 때문에, 구글에서 빠르게 접근할 수 있는 prefix 경로를 알려주었고, 나이지리아의 ISP 업체가 실수로 이 정보를 이웃 AS에 브로드 캐스트해버린다. 경로가 새로 발생했기 때문에 체크해서 업데이트 하게되고, 구글로 가는 경로가 업데이트 된다. 구글에 접속하려고 google.com을 입력했는데 바로가는게 아니라 다른 AS를 통과해서 돌아가게 된다. 러시아, 중국, 나이지리아와 같은 나라를 통과해서 구글에 접속하게 되는데, 이때 중국과 러시아가 인터넷 트래픽을 검열하기 때문에 막히게 되었고, 70분동안 구글 서비스를 사용할 수 없게 되었다. 이후 BGP 보안에 대한 이슈가 크게 알려지게 된다. BGP를 악의적으로 공격하면 대혼란이 발생할 수 있다.
(AS : 자율 시스템. ASN라는 넘버를 가지고 있다.) - 라우터에 악성코드를 심어 잘못된 경로를 브로드캐스트하게 되면 엄청난 문제가 발생할 수 있다. 신뢰를 바탕으로 하고 있기 때문에, 기본적으로 라우터들이 최적의 경로를 제공하고 있다고 가정하고 믿고 있기 때문이다.
- 2008년 파키스탄 정부의 라우터가 잘못된 경로를 발표해 유튜브 접속이 막혀버린다.
- 2010년 차이나 텔레콤이 잘못된 경로를 브로드캐스트해서 중국망을 통과하게 한다.(약 18분동안 전세계의 15% 인터넷 트래픽을 하이재킹)
- 2016년 캐나다에서 한국으로 들어오는 루트가 약 4개월 동안 중국을 경유하도록 하이재킹 되었다.
$\Rightarrow$ RPKI(Resource Public Key Infrastructure)
공개키 기반 암호화를 통해 전자 서명을 처리해서 라우팅 정보의 무결성을 인증함으로써 위와 같은 보안 이슈를 막을 수 있다. RPKI에서는 원래 bgp 테이블의 경로 정보가 들어있는 ROA(Route Origin Authorization, 경로 원점 인증서, 원래 가야 되는 경로 정보가 들어있는 인증서)가 있다. Access Point에 왔을 때 ROA를 열어서 비교하고, ROA에 존재하는 최단 경로가 아닐 경우 이동하지 않도록 한다. ROA는 PKI기반으로 전자서명을 처리 되어있어 무결성이 있기 때문에 신뢰할 수 있다.
DNS security (DNS 보안 이슈)
- 미라이 봇넷 사건 : 2016년에 DynDNS라고 하는 도메인 주소 조회 서비스 업체가 DoS 공격을 당했다. 사용자가 DNS를 요청했는데 그에 맞는 정보를 주지 못하게 되어서 마비가 되었다. 미라이 봇넷은 디바이스에 악성코드를 설치해 좀비로 만들어서 일제히 타겟 서버를 공격하는 방식이다.
- 최근에는 DNS에 직접적인 공격은 거의 없고, 하이재킹은 종종 발생한다.
- Pharming(파밍) : 원하는 사이트가 아니라 다른 사이트로 보내버리는 경우 (DNS 서버가 해킹된 경우)
주의 : 파밍의 경우 '제대로' 입력했는데 악성 사이트가 나오는 경우, 피싱의 경우 '유사한' 주소를 입력해 악성사이트에 들어가는 경우이다.
파밍 - naver.com 했는데 악성 사이트가 나옴. (DNS 서버가 해킹되어 악성 정보를 줌.)
피싱 - never.com 으로 악성사이트가 나옴 (잘못된 주소를 입력해서 악성 사이트에 들어감.)
- DNSSEC(DNS Security Extension) : DNS 서버를 구성하는 안전 프로토콜이다. 전 세계적으로 적용되어 있다. 기존의 DNS에 공개 키 암호화 방식을 넣어서 DNS 프로토콜에 추가를 한 것이다. 즉, DNS가 가지고 있는 보안 취약점을 극복하기 위한 확장 프로토콜이라고 볼 수 있다. dns 응답 정보에 전자 서명을 첨부해서 보내고 받는 쪽에서 그 서명을 보고 검증을 함으로써 정보의 무결성을 확보하는 형태이다. 하이재킹을 막는 역할을 한다. 그러나 DoS 공격에 악용될 수 있다.
앨리스 -> 찰리 : "이 질문에 대해서 답을 주세요 -밥- "
찰리 -> 밥 : "답"
$\rightarrow$ 쿼리의 리스폰스 값이 훨씬 크기 때문에 밥은 아무것도 하지 않았는데 공격을 받게 됨.
(당연히 프로토콜로 막을 수 있지만 원리적으로 가능하다는 것으로 이해하기.)
- DoH(DNS-over-https) : 클라이언트 컴퓨터와 dns서버가 커뮤니케이션 할 때 암호화를 해 웹 브라우징 자체를 안전하게 만든다. 대부분의 서비스에서 사용을 하고, 도청과 위변조가 막아진다. 요청을 평문으로 보내는 게 아니라 마찬가지로 https를 통해서 암호화해서 보냄으로써 dns도 그걸 이제 디크립션해서 정보를 다시 보내주는 방식으로 진행이 된다.
Packet Amplification (패킷 증폭 공격)
- SYN flooding : TCP 3-way handshake에서, 타겟에 많은 SYN을 보내고 응답을 하지 않는 공격. SYN 백로그 큐를 꽉 차게 만들어서 다른 커뮤니케이션 연결 요청을 받지 못하게 만든다. SYN cookie를 통해서 막을 수 있다. (암호화)
- SYN cookie : 암호화 된 버전을 보낸다. 유효하게 보내지 않았을 경우 response가 오지 않기 때문에 잊어버릴 수 있다. SYN의 복사본을 보내놓고 가지고 있는게 아니라, 받은 것과 관련 없는 새로운 값을 보내고 까먹는 것이다. 백로그 큐를 사용하지 않기 때문에 강제로 채워지는 것을 막을 수 있다.
- SYN reflection : A->B : "저는 C에요" / B->C : "답장". C를 사칭해 보내서 C가 원치않는 답장을 받게 하는 식으로 C를 귀찮게 하는 공격이다.
Other denial-of-service attack
- 표적에다가 대규모 패킷을 보내기 위해서 여러 머신들을 감염시키고 어레인지해놓은 것을 봇넷이라고 한다.
- 봇넷 : 공격자들이 제어하는 다수의 감염된 시스템. 봇넷을 구동해서 대규모의 패킷을 보내는 공격이 가능하다.
- cctv, 카메라, 가정용 iot 기기, 와이파이 디바이스, 라우터 등을 감염시켜서 사용한다. 구매 후 처음 암호, 디폴트 암호를 바꾸지 않고 사용하는 것을 이용해 감염시킨다. 미라이 봇넷 같은 경우에는 네트워크 스캔을 할 때 랜덤 ip를 생성한다. 특정 포트에다가 랜덤 ip 주소를 조합해서 아이디와 패스워드 값들을 다 넣어본 다음에 걸리면 감염을 시켜서 본넷 군단을 형성시킨다.
Malware
말웨어들은 상호 배타적이지 않다. 즉, 하나의 타입이라고 완벽하게 구분할 수 없다. ex) 웜이면서 바이러스일 수 있다.
- worm : 다른 시스템에 자신을 복제해서 전파시킨다.
- virus : 자신을 다른 프로그램에 코드에 직접 연결시킨다. (ex) 워드 문서에 매크로를 연결해서 사용하는 형태). 자신이나 일부 데이터를 사용자의 코드에다 연결시켜서 감염시키고 전파한다.
- Trojan : 정상적인 프로그램인 줄 알고 실행하지만 악의적인 작업이 수행된다. RAT(remote access Trojan)와 같이 원격으로 제어를 하는 형태도 존재한다. 정상적인 척 위장하지만 백그라운드에서 악의적인 동작을 수행한다.
- rootkit : 루트에 설치가 돼서 공격자들이 제어를 할 수 있게 끔 한다.(Stealthy, 사용자가 모르게 숨어 있음.)
- ransomware : 파일을 잠궈서 파일을 담보로 값을 요구한다.
- Botnet : 로봇 + 네트워크의 합성어.
- 동일한 말웨어에 감염시켜서 일괄적으로 악의적인 지시를 수행하게 함. 일제히 지시를 받는 감염된 시스템 네트워크. 감염된 봇들은 자신이 감염된 지 모른다. (Stealthy).
- 모든 디바이스가 감염 대상이 될 수 있다.
- 사용하는 언어가 있다.
- CNC 서버에 의해서 컨트롤이 된다. (원격으로 본넷을 조정하는 컨트롤 타워.)
- 전통적인 방식의 경우 하나의 cnc 서버가 본넷들한테 일제의 명령을 날리는 형태였는데, 이경우 CNC 하나만 차단하면 되기 때문에 이를 개선해서 P2P 방식을 사용하는 봇넷도 출연하고 있다. (각각의 노드들이 연결되어 있는 노드들에 대해 ip주소를 알고 있고, 이를 가지고 1대1로 Command and control을 수행한다.)
- IRC(Internet Relay Chat)이라는 채팅채널을 이용해서 공격한다. 이를 이용해 DDOS와 같은 공격을 한다.
- 암호화폐 채굴, 스팸 이메일 발송 , 패스워드 해시 트래킹 등에 쓰이기도 한다.
- 대규모의 컴퓨팅 파워를 이용해서 할 수 있는 악성 동작들은 다 본넷을 통해서 할 수 있다.
말웨어들은 어떻게 동작하는가, 말웨어의 동작 메커니즘.
기본적으로 두 개의 컴포넌트로 이루어져 있다. Dropper + Payload.
Dropper : 복제 매커니즘. 복제만 담당하는 파트.
Payload : 실제로 피해를 주는 파트.
복제 메커니즘 (Dropper) : worm 같은 경우, 원격 코드 실행 취약점을 분석하거나 암호를 추측해 시스템에 접근하고, 자신을 복제해서 자신의 복사본을 만든다.
Payload : 실제로 공격을 하는 파트이기 때문에 이 부분이 중요하다. 실제로 말웨어가 주는 피해 부분이 여기에 해당된다.데이터 훼손, 스팸 메일, 개인정보 유출, 기밀 데이터를 유출, 데이터를 암호화시키고 값을 요구, 트래픽을 감시, rootkit 설치, 비트코인을 채굴 등을 실행한다.
Countermeasures (말웨어를 막는 법.)
Scanner 스캐너.
ex) V3의 드라이브 스캔.
해킹으로 인해서 나타나는 침해 지표, IOC를 찾아낸다. 공격으로 남은 로그, 비정상적인 시스템 동작에 대한 로그가 IOC에 해당한다. 보통 특정 바이러스의 바이트 문자열, '시그니처'를 찾는다. (string of bytes = signature)
문자열이 존재하는지 여러분의 파일들을 스캔하며 바이트 레벨에서의 패턴 매칭을 실행한다. 알려진 악성코드에 대해서 가장 효과적인 방법이다. 시그니처 리스트를 가지고 비교를 한다. 알려지지 않은 타입에 대해서는 찾을 수 없는 방식이다.
- 공격자들은 암호화를 통해서 Scanner 탐지를 막는다. 키 값을 바꿔 암호화시킴으로써 공통적인 시그니처가 존재하지 않도록 한다.
- Scan for decryptor code : 위처럼 암호화를 했다면, 복호화를 해야한다. Payload안에 시그니처를 암호화해서 가지고 있는데, 이를 복호화하지 않으면 아무것도 할 수 없다. 코드안에 복호화 코드가 있기 때문에 이를 찾는다. 사실상 요즘의 스캐너 기반 디텍션의 표준이다.
말웨어를 변형하는 방식
다형성polymorphic_과 변성_metamorphic 두가지로 나뉜다. 디크립터 시그니처를 숨기는 것이 목표이다.
Polymorphic 방식
평문, 플레인 텍스트를 먼저 암호화 후, 해독기 코드를 morphed, 변형 시킴.
시그니처를 통해서 찾는 것은 의미가 없기 때문에, 디크립터 코드를 악성코드가 복제될 때마다 변형시켜서 숨긴다.
디크립터의 명령어 시퀀스들을 조금씩 변경을 시켜주고, 암호화된 본문 e(planin text)은 복제할 때마다 키 값을 바꾼다. 이런 식으로 조금씩 변형을 시켜주는 거를 우리가 다형성 악성 코드, 폴리모픽 방식이라고 한다.
$\Rightarrow$ 변형된 디크립터들의 시퀀스들을 끼어맞추면서 찾아야한다.
Metapmorphic 방식
변성, 아예 새로운 변이를 나타낸다.
원래대로 돌아갈 수 있는 역함수가 존재한다면 폴리모픽이고 역함수가 존재하지 않고 아예 새로운 걸로 합체가 된다면 메타모픽이다. 즉, 변형된 바이너리로부터 원본이 추출 가능하면 폴리모픽이고 변형된 거에서 원본을 알아낼 수가 없으면 메타모픽이다.
반복할 때마다 아예 분해됐다가 다시 재작성되는, 이전에 있던 버전하고 완전 다른 버전의 바이러스로 형성이 된다. 다형성 바이러스도 키 값이 바뀌니까 다르게 표시가 되지만, 변성 바이러스는 코드 자체가 재작성되는 거니까 아예 다른 것처럼 보인다.
먼저 악성 코드 자체가 분해가 되고, 코드에다가 임의의 변형을 넣는다. 코드 치환한다든지, 데드코드(무의미한 코드)를 집어넣는다. 분해하는게 중요한 포인트이다. 분해를 해서 조각낸 다음 쓸데없는 코드를 넣고 코드값을 바꾸는 등의 변형을 시킨 뒤 다시 결합시킨다. 일정한 순서 없이 결합을 시킨다. 원본하고 기능은 동일하지만 특징, 시그니처가 완전 달라진다.
Checksummer
일종의 변화를 감지하는 방식. checksummer는 시스템에 있는 주요 파일들이나 주요 프로그램 코드들의 원본 checksum을 쭉 가지고 있다. 변동이 생기면 그 값이 바뀌게 된다. 원래 코드가 조금이라도 변경이 된다면 해시 값이 바뀌니까, 값의 변경이 발생한 것들을 해시 값 매칭만 해서 찾아내면 된다.
- false negative(거짓 음성)가 없다. 실제로는 악성인데 아니라고 하는 거는 없습니다. 무조건 변경이 발생했기 때문에.
- 시그니처 방식과 관계가 없기 때문에 알려지지 않은 공격에도 대응을 할 수 있다
- flase alrams, false positives (오경보, 오탐지)가 발생한다. 실제로는 정상인데 악성이라고 하는 경우가 있다.
$\rightarrow$ 변경이 발생했다고 판단이 되면 스캐너를 돌려서 재확인하는 식으로 같이 사용을 해볼 수가 있다.
anomaly detection (비정상 탐지)
- normal을 정의 해야함. 뭐가 정상이고 비정상인지 정의해야하는 문제가 있다.
- 정상의 정의가 시간이 지남에 따라 바뀔 수 있다.
- 알려지지 않은 코드에 대해서 탐지할 수 있다. (checksummer와 유사한 콘셉트)
- 정상을 define하는것에 상당한 어려움이 있다.
$\rightarrow$ 단독으로 사용하지 않고 스캐너, 체크섬머와 혼용을해서 사용한다. - 최근 딥러닝으로 구현되고 있다.
Networking Tools For Monitoring
방화벽
인터넷에서 인터널(내부) 네트워크로 들어오는 것들과 또 인터널 네트워크에서 인터넷으로 내보내는 것들의 접근을 제어한다. 침입된 상태를 찾기 위해서 네트워크를 본다든지 혹은 시스템을 지속적으로 모니터링하는 역할을 한다.
한 가지 형태가 아니며, 어느 네트워크 레이어에 포커싱하느냐에 따라 여러 가지 형태로 구현이 될 수가 있다.
- Packet Filter : 네트워크 레이어, ip 계층에서 사용하는 방화벽.
- Circuit gateway : 전송 계층, TCP 계층에서 사용되는 방화벽.
- Application proxy : 응용 계층에서 사용되는 방화벽.
방화벽에 대한 표준 정의, 기준 프로토콜은 없으며 어떻게 구현되느냐에 따라의 차이이다. 세 개의 레이어에서 각각 방화벽의 동작을 한다. 방화벽이 모든 패킷을 보는 것은 아니고, 세 관점(packet filter, circuit gateway, application proxy)에서 나눠서 봐야한다.
Packet Filter
network layer, ip 계층에서 동작을 하는 방화벽. 인터넷과 내부 네트워크 경계에 있음으로써 패킷의 ip 주소 혹은 포트 번호들의 조건을 체크를 해서 통신을 허가하거나 거부하는 역할을 한다.
source ip 주소, source 포트번호, 대상 아이피 주소, 대상 포트 번호, flag bits (SYN, ACK), egress or ingress 등을 확인한다.
- ingress - 외부에서 서버 내부로 유입되는 트래픽
- egress - 서버 내부에서 외부로 나간 트래픽
이렇게 Inspection을 함으로써 로컬 패킷만 네트워크를 나갈 수 있게끔 한다든지, 외부 패킷만 네트워크에 진입하게 한다든지, 알려진 잘못된 주소로 오는, 잘못된 ip 주소에서 오는 트래픽을 차단한다든지 혹은 특정 포트에 도착하는 트래픽을 제외한 트래픽들은 다 차단한다든지 하는 동작들을 수행한다.
- IP 내부에 있는 것들을 스캔해서 체크한다. (IP datagram 헤더에 있는 정보를 체크)
- 속도가 빠르고 구현이 쉽다. (패킷 내용을 전부 확인하는게 아니라 헤더의 네트워크 정보만 확인하기 때문에.)
- IP 주소 자체가 스푸핑될 수 있기 때문에 이것만 보고 필터링하는 것은 상당히 위험할 수 있다.
요약 : headar 부분만 보기 때문에 간략하고 심플하고 빠르다는 장점이 있지만 다른 옵션들에 비해서 상대적으로 조금 보안성이 높지는 않다. ip adress spoofing, routing attack과 같은 라우팅 어택들 취약하다는 단점이 있다.
- 패킷 필터에 대한 공격 : TCP ACK SCAN. 포트 스캔의 경우 포트가 열려있는지 확인하는 것이지만, 이 공격의 경우 ACK를 보내서 방화벽이 활성화 되어 있는지 확인한다. 스캐너와 스캔 대상(타겟) 사이에 설치된 방화벽의 종류를 알아내기 위한 공격이다. 스캔 신호를 보냈는데 필터링 되지 않으면 리스폰스가 오게되고, 필터링 되는 경우에는 응답이 오지 않는 것을 이용해 확인한다.
- TCP ACK SCAN 공격을 막기 위해서 상태기반 방화벽을 사용한다. 동일하게 패킷 정보를 검토하지만, TCP 연결에 대한 정보를 기록하고 상태를 트래킹한다. TCP 순서 번호를 추적을 해 세션 하이재킹을 막는다. 예를 들어, SYN 패킷을 받으면 테이블에 로깅을 해, TCP의 동작이 유효한지 아닌지 판단한다. 접근이 금지된 패킷의 경우 로그에 저장하고 전송을 막는다.
circuit gateway
tcp 계층에서 동작하는 방화벽.
내부에서 외부로 오는 네트워크 접근을 제어하고, 외부에서 내부로 네트워크 접속할 때는 서킷 프록시 프로그램을 통해 연결을 형성시킨다.패킷 필터에다가 상태를 추가해서 동작을 한다고 보면 된다. tcp 세션에서 전달되고 주고받는 패킷들을 다 검사하고, 그 과정에서 tcp 연결이나 플래그 비트들을 전부 기억한다. 즉, 패킷 필터가 했던 일 + 연결 중인 추적. 상태 기반 패킷 필터와 같다. TCP ACK SCAN을 방지한다.
- 패킷 필터링 보다 느리다.
- 네트워크 패킷과 연결 TCP에 대한 정보만 확인하며 애플리케이션 데이터를 보지는 않는다.
Application Proxy
proxy : 네트워크에서는 두 점 사이의 통신을 할 때 이제 대리 통신을 하는, 중계기 역할을 한다.
망 내부에서 망 외부랑 연결할 때 캐싱을 해 정보를 저장해준다. 자주 가는 사이트에 대해서 원격 서버의 정보를 다 가져오는게 아니라, 프록시 서버가 가지고 있는 데이터를 가져와 전송 시간을 줄인다.
- 전송되는 정보들을 스캔해서 확인하는 보안적인 역할을 한다.
- 수신되는 애플리케이션 데이터 자체를 다 확인한다. 주고받은 데이터 안에 있는 정보들을 다 확인하며, 데이터를 허용하기 전에 데이터가 안전한지 체크한다.
ex) 중국의 만리방화벽 프록시는 천안문과 같은 키워드를 체크하고 검열한다.
인터넷 : 전체적인 네트워크 망의 집합체
인트라넷 : 소규모 망, 조직에서 쓰고 있는 내부 시스템망.
내부 망에 접근하려고 하는 경우 애플리케이션 프록시 방화벽이 체크를 하게 된다. 내부망은 엄청나게 타이트한 보안으로 운영된다.
애플리케이션 프락시를 나오게 되면은 dmz라는 존이 있다. 인터넷과 내부 네트워크(인트라넷) 사이에 위치하는 일종의 서브넷이다. 인트라넷의 바깥에 있으면서 외부와 커뮤니케이션 할 수 있다. dmz에 있는 서버나 호스트들은 외부 네트워크를 왔다 갔다 할 수 있다. 대신에 외부에서 안으로. 접근을 하려고 할 때 1차적으로 방어를 하고 더 이상 못 들어가게끔 한다. (일종의 막다른 골목) 인트라넷에서 사용하는 메일 서버, DNS 서버들은 dmz 존에 연결돼서 사용된다.
dmz 존을 기준으로 앞 뒤로 방화벽이 설치된다. 내부망 부분엔 애플리케이션 프록시, 외부망 쪽에는 패킷 필터가 설치된다.
외부에서 dmz로 왔다갔다 하는 것들을 패킷필터가 케어하고, dmz를 거쳐서 내부망으로 들어가려고 하는 거를 어플리케이션 프록시가 체크를 하게 된다. 외부에서 접근하려고 할 때 패킷필터까지는 빠르게 들어온다. 인트라넷에서 사용하고 있는 메일이나 dns나 그런 웹 서비스들을 dmz 존을 통해서 이제 동작을 구현할 수가 있기 때문에 dmz, packet filter까지는 외부망하고 맞닿아서 동작을 하게 된다. 그러나 인트라넷으로 접근하려고 하는 것은 수상한 동작이기 때문에 애플리케이션 프락시로 내부적인 것들을 상세하게 체크를 하게 된다. 악성 코드가 있는지, 어떤 콘텐츠들이 들어 있는지, 이런 것들을 어플리케이션 프록시로 체크를 한다.
여기서 포인트는 이제 패킷 필터랑 어플리케이션 프록시가 서로 다른 타입으로 방화벽을 구축했다. 같은 종류를 쓰는 경우, 하나가 뚫리면 전부 뚫리는데, 서로 다른 타입의 방화벽을 구축을 했기 때문에 하나가 뚫리더라도 연쇄적으로 뚫리지 않는 효과를 얻을 수 있다. 일반적인 네트워크들은 이렇게 구현이 되어있다.
여태까지는 '방지'를 했지만, 이미 침입했을 경우 침입을 탐지해야한다. 방화벽들은 '방지'하는 것이다.
intrusion detection
- IDS(Intrusion detection systems) : 침입 탐지 시스템. 공격의 사인(특정 머신이 IRC에 접근하려고 하는 경우(봇넷), 잘못된 IP 주소에 접근하려고 하는 경우, 패킷이 위장된 주소에서 온 경우, 외부에서 왔다고 했지만 내부에서 온 경우, 스팸메일) 을 체크한다. 서브넷 단위로 스캐닝하며 공격의 징후가 어디있는지, 어디까지 펴져있는지 체크한다.
IDS가 탐지하는 법
- 오용 감지(misuse detection)
- IRC를 액세스하는 경우와 같이 사용자가 평소와 다른 행동을 하는 경우를 탐지한다.
(ex) 갑자기 고급 디버깅 도구를 사용한다, 은행에서 금액을 최대로 인출한다.) - 시그니처를 찾는다 $\rightarrow$ 최근은 머신러닝 분류기를 훈련시켜서 판별한다. 스캐너 기반 악성 코드와 같은 원리이다.
- IRC를 액세스하는 경우와 같이 사용자가 평소와 다른 행동을 하는 경우를 탐지한다.
- 비정상 감지(anomaly detection) : 정상이 아닌 경우를 찾는다. 정상을 정의하는 것이 어렵고, 정의해도 바뀌기 때문에 완전한 방법은 아니다. 알려지지 않은 타입을 찾는데 유리하다. 머신러닝 테크닉이 많이 사용되고 있다. 다른 탐지 방법들과 함께 사용하는 것이 좋다.
'ETC > 네트워크 보안' 카테고리의 다른 글
네트워크 보안 Ch.번외 (0) | 2023.04.10 |
---|---|
네트워크 보안 Ch.11 Software Security (1) | 2023.04.10 |
네트워크 보안 Ch.10 Software Security (0) | 2023.04.10 |
네트워크 보안 Ch.9 Network Security (1) | 2023.04.10 |
네트워크 보안 Ch.7 Authorization (0) | 2023.04.10 |