06_IntrusionDetection

69
Slide #22-1 Chương 6: Phát hin xâm nhp  Nguyên tc •Mc tiêu ca phát hi n xâm nh p Các mô hình • Kiến trúc •Tchc 

Transcript of 06_IntrusionDetection

7/30/2019 06_IntrusionDetection

http://slidepdf.com/reader/full/06intrusiondetection 1/69

Slide #22-1

Chương 6: Phát hiện xâm nhập 

• Nguyên tắc 

• Mục tiêu của phát hiện xâm nhập 

• Các mô hình

• Kiến trúc 

• Tổ chức 

7/30/2019 06_IntrusionDetection

http://slidepdf.com/reader/full/06intrusiondetection 2/69

Slide #22-2

 Nguyên lý của phát hiện xâm nhập 

• Đặc điểm của hệ thống không bị xâm nhập 

 –  User, process actions conform to statistically

 predictable pattern –  User, process actions do not include sequences of 

actions that subvert the security policy

 –  Process actions correspond to a set of specifications

describing what the processes are allowed to do• Hệ thống bị xâm nhập sẽ không thỏa mãn 1 trong

các đặc điểm trên 

7/30/2019 06_IntrusionDetection

http://slidepdf.com/reader/full/06intrusiondetection 3/69

Slide #22-3

Ví dụ 

• Mục tiêu: Chèn một backdoor vào hệ thống 

 –  Intruder will modify system configuration file or  program

 –  Requires privilege; attacker enters system as anunprivileged user and must acquire privilege

•  Nonprivileged user may not normally acquire privilege(violates #1)

• Attacker may break in using sequence of commands thatviolate security policy (violates #2)

• Attacker may cause program to act in ways that violate program’s specification 

7/30/2019 06_IntrusionDetection

http://slidepdf.com/reader/full/06intrusiondetection 4/69

Slide #22-4

Denning’s Model 

• Hypothesis: exploiting vulnerabilities

requires abnormal use of normal commands

or instructions – Includes deviation from usual actions

 – Includes execution of actions leading to break-

ins – Includes actions inconsistent with specifications

of privileged programs

7/30/2019 06_IntrusionDetection

http://slidepdf.com/reader/full/06intrusiondetection 5/69

Slide #22-5

Goals of IDS

• Phát kiểu nhiều kiểu xâm nhập 

 –  Previously known and unknown attacks

 –  Suggests need to learn/adapt to new attacks or changesin behavior 

• Phát hiện các xâm nhập kịp thời  –  May need to be be real-time, especially when system

responds to intrusion

• Problem: analyzing commands may impact response time of system

 –  May suffice to report intrusion occurred a few minutesor hours ago

7/30/2019 06_IntrusionDetection

http://slidepdf.com/reader/full/06intrusiondetection 6/69

Slide #22-6

Goals of IDS

• Biểu thị các phân tích dưới định dạng đơn giản, dễhiểu 

 –  Ideally a binary indicator 

 –  Usually more complex, allowing analyst to examinesuspected attack 

 –  User interface critical, especially when monitoringmany systems

• Phát hiện chính xác  –  Minimize false positives, false negatives

 –  Minimize time spent verifying attacks, looking for them

7/30/2019 06_IntrusionDetection

http://slidepdf.com/reader/full/06intrusiondetection 7/69

Slide #22-7

Các mô hình phát hiện xâm nhập 

• Phát hiện bất thường 

 –  What is usual, is known

 –  What is unusual, is bad

• Phát hiện dựa trên chuỗi hành động khả nghi  –  What is bad, is known

 –  What is not bad, is good

• Phát hiện dựa trên đặc tả  –  What is good, is known

 –  What is not good, is bad

7/30/2019 06_IntrusionDetection

http://slidepdf.com/reader/full/06intrusiondetection 8/69

Slide #22-8

Phát hiện bất thường 

• Phân tích tập các đặc điểm của hệ thống vàso sánh với các đặc điểm thông thường;

cảnh báo nếu thống kê cho thấy dấu hiệukhông khớp so với đặc điểm thông thường.  – Threshold metrics

 – Statistical moments – Markov model

7/30/2019 06_IntrusionDetection

http://slidepdf.com/reader/full/06intrusiondetection 9/69

Slide #22-9

Dựa trên ngưỡng 

• Đếm số lần xuất hiện của sự kiện 

 – Between m and n events (inclusive) expected to

occur 

 – If number falls outside this range, anomalous

• Example

 – Windows: lock user out after k failed sequentiallogin attempts. Range is (0, k  – 1).

• k or more failed logins deemed anomalous

7/30/2019 06_IntrusionDetection

http://slidepdf.com/reader/full/06intrusiondetection 10/69

Slide #22-10

Vấn đề 

• Ngưỡng hợp lý phụ thuộc và nhiều yếu tốkhông rõ ràng

 – Typing skill of users

 – If keyboards are US keyboards, and most users

are French, typing errors very common

• Dvorak vs. non-Dvorak within the US

7/30/2019 06_IntrusionDetection

http://slidepdf.com/reader/full/06intrusiondetection 11/69

Slide #22-11

Dựa trên thống kê 

• Người phân tích tính toán độ lệch trung bình, độ lệch chuẩn, hoặc các phép đo

tương quan khác  – If measured values fall outside expected

interval for particular moments, anomalous

• Vấn đề 

 – Profile may evolve over time; solution is toweigh data appropriately or alter rules to takechanges into account

7/30/2019 06_IntrusionDetection

http://slidepdf.com/reader/full/06intrusiondetection 12/69

Slide #22-12

Example: IDES

• Phát triển tại SRI International theo mô hìnhDenning

 –  Represent users, login session, other entities as orderedsequence of statistics <q0, j, …, qn, j>

 –  qi, j (statistic i for day j) is count or time interval

 –  Weighting favors recent behavior over past behavior 

• Ak , j sum of counts making up metric of k th statistic on jth day• qk ,l +1 = Ak ,l +1 –   Ak ,l  + 2 – rt qk ,l where t is number of log

entries/total time since start, r factor determined through

experience

7/30/2019 06_IntrusionDetection

http://slidepdf.com/reader/full/06intrusiondetection 13/69

Slide #22-13

Vấn đề 

• Giả thiết hành vi của tiến trình và người dùngcó thể mô hình hóa theo cách thống kê được 

 – Ideal: matches a known distribution such asGaussian or normal

 – Otherwise, must use techniques like clustering to

determine moments, characteristics that showanomalies, etc.

• Phải tính toán thời gian thực 

7/30/2019 06_IntrusionDetection

http://slidepdf.com/reader/full/06intrusiondetection 14/69

Slide #22-14

Markov Model

• Các trạng thái quá khứ ảnh hưởng với việc chuyểntrạng thái hiện tại 

• Việc phát hiện bất thường dựa trên chuỗi sự kiện,không dựa vào một sự kiện đơn lẻ nào 

• Vấn đề: Cần huấn luyện HT để thiết lập các chuỗisự kiện hợp lệ 

 –  Use known, training data that is not anomalous

 –  The more training data, the better the model

 –  Training data should cover all possible normal uses of 

system

7/30/2019 06_IntrusionDetection

http://slidepdf.com/reader/full/06intrusiondetection 15/69

Slide #22-15

Example: TIM

• Time-based Inductive Learning

• Chuỗi sự kiện là abcdedeabcabc

• TIM suy ra các luật:  R1: abc (1.0)  R2: cd (0.5)  R3: ce (0.5)

 R4: d e (1.0)  R5: ea (0.5)  R6: ed (0.5)

• Xuất hiện chuỗi sự kiện: abd ; triggers alert

 –  c always follows ab in rule set

• Chuỗi: acf ; no alert as multiple events can follow c 

 –  May add rule R7: c f (0.33); adjust R2, R3

7/30/2019 06_IntrusionDetection

http://slidepdf.com/reader/full/06intrusiondetection 16/69

Slide #22-16

Mô hình Dùng sai

• Xác định một chuỗi các lệnh được thực thi được biết là sẽ vi phạm chính sách an ninh hay không 

 –  Descriptions of known or potential exploits groupedinto rule sets

 –  IDS matches data against rule sets; on success, potentialattack found

• Không có khả năng phát hiện các tấn công chưa

 biết tới bởi người phát triển các luật  –  No rules to cover them

7/30/2019 06_IntrusionDetection

http://slidepdf.com/reader/full/06intrusiondetection 17/69

Slide #22-17

Example: NFR 

• Được thiết kế để có thể thêm các luật dễ dàng 

• Kiến trúc: 

 – Packet sucker: read packets from network  – Decision engine: uses filters to extract

information

 – Backend: write data generated by filters to disk 

• Query backend allows administrators to extract raw, postprocessed data from this file

• Query backend is separate from NFR process

7/30/2019 06_IntrusionDetection

http://slidepdf.com/reader/full/06intrusiondetection 18/69

Slide #22-18

 N-Code Language

• Các bộ lọc (filter) được viết bằng ngôn ngữ này 

• Ví dụ: Bỏ qua các gói tin không đến 2 web servers: # list of my web servers

my_web_servers = [ 10.237.100.189 10.237.55.93 ] ;

# we assume all HTTP traffic is on port 80

filter watch tcp ( client, dport:80 )

{

if (ip.dest != my_web_servers)

return;

# now process the packet; we just write out packet info

record system.time, ip.src, ip.dest to www._list;

}

www_list = recorder(“log”) 

7/30/2019 06_IntrusionDetection

http://slidepdf.com/reader/full/06intrusiondetection 19/69

Slide #22-19

Mô hình dựa trên đặc tả 

• Xác định xem việc thực thi một chuỗi lệnhcó vi phạm đặc tả của một chương trình hay

một hệ thống hay không • Chỉ cần kiểm tra các chương trình có khả

năng thay đổi trạng thái của hệ thống 

7/30/2019 06_IntrusionDetection

http://slidepdf.com/reader/full/06intrusiondetection 20/69

Slide #22-20

Example: Apply to rdist  

• Ko, Levitt, Ruschitzka định nghĩa PE-grammar để môtả các hành vi có thể chấp nhận của 1 chương trình. 

• rdist: Chương trình trên UNIX thay đổi nội dung cácchương trình khác trên trạm ở xa. 

• rdist  tạo các file tạm, copy nội dung, thay đổi chế độ bảo vệ, chủ sở hữu, và sao chép vào vị trí 

 –  Attack: during copy, delete temp file and place symboliclink with same name as temp file

 –  rdist changes mode, ownership to that of program

7/30/2019 06_IntrusionDetection

http://slidepdf.com/reader/full/06intrusiondetection 21/69

Slide #22-21

Quy định đặc tả 

• Đặc tả của lệnh chmod , chown cho biết lệnh nàychỉ được thay thế thuộc tính các file mà rdist  tạo

ra• Chown, chmod  các link sẽ vi phạm luật vì

M.newownerid ≠ U (chủ sở hữu file link khácvới chủ sở hữu của file mà rdist  tạo ra) 

7/30/2019 06_IntrusionDetection

http://slidepdf.com/reader/full/06intrusiondetection 22/69

Slide #22-22

So sánh

• Mô hình dùng sai: Nếu tất cả các luật chính sáchđược xác định trước, có thể dễ dàng xây dựng tậpluật để phát hiện vi phạm 

 –  Usual case is that much of policy is unspecified, sorulesets describe attacks, and are not complete

• Phát hiện bất thường: Phát hiện các sự kiện bấtthường, nhưng chưa chắc đã là vi phạm 

• Dựa trên đặc tả: Giả thiết đặc tả được tuân thủ thìan ninh ko bị vi phạm, mô hình dùng sai giả sửchính sách trong tập luật

7/30/2019 06_IntrusionDetection

http://slidepdf.com/reader/full/06intrusiondetection 23/69

Slide #22-23

Kiến trúc hệ thống IDS 

• Các thành phần cơ bản:  –  Agent like logger; it gathers data for analysis

 –  Director like analyzer; it analyzes data obtained fromthe agents according to its internal rules

 –  Notifier obtains results from director, and takes some

action

• May simply notify security officer • May reconfigure agents, director to alter collection, analysis

methods

• May activate response mechanism

7/30/2019 06_IntrusionDetection

http://slidepdf.com/reader/full/06intrusiondetection 24/69

Slide #22-24

Agents

• Thu thập thông tin và gửi cho Director  

• Có thể chuyển đổi định dạng thông tin 

 – Preprocessing of records to extract relevant

 parts

• Có thể xóa các thông tin không cần thiết 

• Director có thể yêu cầu agent gửi các thôngtin khác theo yêu cầu 

7/30/2019 06_IntrusionDetection

http://slidepdf.com/reader/full/06intrusiondetection 25/69

Slide #22-25

Example

• IDS sử dụng việc phân tích các nỗ lực đăngnhập thất bại 

• Agent quét các log 5 phút/lần, gửi cho

Director thông tin về các đăng nhập thất bại  – Time of failed login

 – Account name and entered password

• Director yêu cầu tất cả các bản ghi đăng nhập(cả thành công và thất bại) của 1 người dùngnào đó 

 – Suspecting a brute-force cracking attempt

7/30/2019 06_IntrusionDetection

http://slidepdf.com/reader/full/06intrusiondetection 26/69

Slide #22-26

Host-Based Agent

• Thu thập thông tin từ các logs 

 –  May use many logs as sources

 –  May be security-related or not –  May be virtual logs if agent is part of the kernel

• Very non-portable

• Agent có thể tự tạo thông tin 

 –  Scans information needed by IDS, turns it intoequivalent of log record

 –  Typically, check policy; may be very complex

7/30/2019 06_IntrusionDetection

http://slidepdf.com/reader/full/06intrusiondetection 27/69

Slide #22-27

 Network-Based Agents

• Phát hiện các tấn công trên mạng 

 –  Denial of service attack introduced by flooding anetwork 

• Theo dõi lưu lượng cho số lượng lớn các trạm 

• Có thể kiểm tra nội dung của lưu lượng 

• Mã hóa end-to-end sẽ ảnh hưởng tới việc theo dõi

nội dung  –  Not traffic analysis, though

7/30/2019 06_IntrusionDetection

http://slidepdf.com/reader/full/06intrusiondetection 28/69

Slide #22-28

 Network Issues

• Kiến trúc mạng ảnh hưởng với việc định vị agent  –  Ethernet or broadcast medium: one agent per subnet

 –  Point-to-point medium: one agent per connection, or agent at distribution/routing point

• Tập trung vào thời điểm kẻ xâm nhập đi vào hệthống 

 –  If few entry points, place network agents behind them

 –  Does not help if inside attacks to be monitored

7/30/2019 06_IntrusionDetection

http://slidepdf.com/reader/full/06intrusiondetection 29/69

Slide #22-29

Tổng hợp thông tin 

• Agent tạo ra thông tin ở nhiều cấp độ 

 – Application-monitoring agents provide one

view (usually one line) of an event – System-monitoring agents provide a differentview (usually many lines) of an event

 –  Network-monitoring agents provide yet another 

view (involving many network packets) of anevent

7/30/2019 06_IntrusionDetection

http://slidepdf.com/reader/full/06intrusiondetection 30/69

Slide #22-30

Director 

• Lược bớt thông tin từ Agent  –  Eliminates unnecessary, redundant records

• Phân tích các thông tin còn lại để xác định khảnăng có tấn công 

 –  Analysis engine can use a number of techniques,

discussed before, to do this

• Thường chạy trên hệ thống riêng rẽ  –  Does not impact performance of monitored systems

 –  Rules, profiles not available to ordinary users

7/30/2019 06_IntrusionDetection

http://slidepdf.com/reader/full/06intrusiondetection 31/69

Slide #22-31

Example

• Jane đăng nhập để thực hiện hoạt động bảotrì hệ thống trong ngày 

• Tiếp tục đăng nhập buổi tối để viết báo cáo • Có 1 tối Jane chỉnh sửa lại hệ thống 

• Agent #1: Báo cáo việc log in/out 

• Agent #2: Báo các các lệnh được thực thi  –  Neither agent spots discrepancy

 – Director correlates log, spots it at once

7/30/2019 06_IntrusionDetection

http://slidepdf.com/reader/full/06intrusiondetection 32/69

Slide #22-32

Adaptive Directors

• Thay đổi tiểu sử hoặc tập luật để thích ứngviệc phân tích với các thay đổi của hệ thống 

 – Usually use machine learning or planning to

determine how to do this

• Example: Sử dụng mạng nơ ron để phân tíchlog:

 – Network adapted to users’ behavior over time  – Used learning techniques to improve classification

of events as anomalous

• Reduced number of false alarms

7/30/2019 06_IntrusionDetection

http://slidepdf.com/reader/full/06intrusiondetection 33/69

Slide #22-33

 Notifier 

• Tiếp nhận thông tin từ Director  

• Thực hiện các hành động phù hợp 

 –  Notify system security officer 

 – Respond to attack 

• Thường sử dụng giao diện đồ họa (GUIs) 

 – Well-designed ones use visualization to convey

information

7/30/2019 06_IntrusionDetection

http://slidepdf.com/reader/full/06intrusiondetection 34/69

Slide #22-34

GrIDS GUI

A E

D

C

B

• Graphical Instrution Detection System: Giao diện

GrIDS hiển thị quá trình phát triển của 1 sâu mấytính lan truyền qua mạng 

• Left is early in spread

• Right is later on

7/30/2019 06_IntrusionDetection

http://slidepdf.com/reader/full/06intrusiondetection 35/69

Slide #22-35

Other Examples

• Phần mềm Courtney phát hiện tấn côngSATAN

 – Added notification to system log – Could be configured to send email or paging

message to system administrator 

• Giao thức IDIP kết hợp các hệ thống IDSđể

chống lại tấn công  – If an IDS detects attack over a network, notifies

other IDSes on co-operative firewalls; they canthen reject messages from the source

7/30/2019 06_IntrusionDetection

http://slidepdf.com/reader/full/06intrusiondetection 36/69

Slide #22-36

Tổ chức của 1 hệ thống IDS 

• Giám sát lưu lượng mạng để phát hiệnxâm nhập 

 –   NSM system

• Kết hợp giám sát trạm và giám sát mạng 

 –  DIDS

• Phân tán các agents độc lập  –  AAFID system

7/30/2019 06_IntrusionDetection

http://slidepdf.com/reader/full/06intrusiondetection 37/69

Slide #22-37

 NSM – Network Secure Monitor 

• Xây dựng tiểu sử hoạt động của mạng và so sánhvới hoạt động hiện tại 

• Ma trận 3 chiều chứa dữ liệu 

 –  Axes are source, destination, service

 –  Each connection has unique connection ID 

 –  Contents are number of packets sent over thatconnection for a period of time, and sum of data

 –  NSM generates expected connection data

 –  Expected data masks data in matrix, and anything leftover is reported as an anomaly

7/30/2019 06_IntrusionDetection

http://slidepdf.com/reader/full/06intrusiondetection 38/69

Slide #22-38

Vấn đề 

• Quá nhiều dữ liệu!  –  Solution: arrange data

hierarchically into

groups

• Construct by folding

axes of matrix

 –  Analyst could expand

any group flagged asanomalous

(S 1, D1, SMTP)

(S 1, D1, FTP)

… 

(S 1, D1)

(S 1, D2, SMTP)

(S 1, D2, FTP)

… 

(S 1, D2)

S 1

7/30/2019 06_IntrusionDetection

http://slidepdf.com/reader/full/06intrusiondetection 39/69

Slide #22-39

Signatures

• Người phân tích có thể viết các luật để tìmkiếm các hành động lặp lại trong ma trận

 – Repeated telnet connections lasting only as longas set-up indicates failed login attempt

• Người phân tích có thể viết các luật để khớpvới lưu lượng mạng 

 – Used to look for excessive logins, attempt tocommunicate with non-existent host, singlehost communicating with 15 or more hosts

7/30/2019 06_IntrusionDetection

http://slidepdf.com/reader/full/06intrusiondetection 40/69

Slide #22-40

Các vấn đề khác 

• Giao diện người dùng đồ họa độc lập với bộ phântích ma trận NSM. 

• Bản thử nghiệm phát hiện ra nhiều tấn công 

 –  But false positives too

• Vẫn được sử dụng trong nhiều hệ thống 

 –  Signatures have changed, of course

• Minh họa cho khả năng phát hiện xâm nhập trênmạng là khả thi  –  Did no content analysis, so would work even with

encrypted connections

7/30/2019 06_IntrusionDetection

http://slidepdf.com/reader/full/06intrusiondetection 41/69

Slide #22-41

Hệ thống kết hợp: DIDS 

• Các hệ thống chỉ dựa trên mạng hoặc dựa trên cáctrạm đều không đủ để phát hiện 1 số tấn công 

 –  Attacker tries to telnet into system several times using

different account names: network-based IDS detectsthis, but not host-based monitor 

 –  Attacker tries to log into system using an accountwithout password: host-based IDS detects this, but notnetwork-based monitor 

• DIDS sử dụng các agents trên các trạm được theodõi và sử dụng một trạm theo dõi mạng.  –  DIDS director uses expert system to analyze data

7/30/2019 06_IntrusionDetection

http://slidepdf.com/reader/full/06intrusiondetection 42/69

Slide #22-42

Kẻ tấn công di chuyển trong mạng 

• Kẻ xâm nhập truy cập hệ thống A với tên Alice

• Chuyển từ hệ thống A sang hệ thống B, xâm nhập

B với tên Bob• Các kỹ thuật phát hiện xâm nhập dựa trên trạm

không phát hiện được xâm nhập này 

• DIDS có thể thấy Bob đăng nhập vào kết nối của Alice; hệ chuyên gia có thể phát hiện 2 kẻ là 1 

 –  Assigns network identification number NID to this user 

7/30/2019 06_IntrusionDetection

http://slidepdf.com/reader/full/06intrusiondetection 43/69

Slide #22-43

Điều khiển dữ liệu phân tán 

• Agent phân tích các log để rút trích các dữliệu đáng quan tâm 

 – Agent uses signatures to look for attacks• Summaries sent to director 

 – Other events forwarded directly to director 

• Mô hình DIDS có các báo cáo từ agents:  – Events (information in log entries)

 – Action, domain

7/30/2019 06_IntrusionDetection

http://slidepdf.com/reader/full/06intrusiondetection 44/69

Slide #22-44

Actions and Domains

• Các đối tượng thực thi các hành động (actions)  –  session_start, session_end, read, write, execute,

terminate, create, delete, move, change_rights,

change_user_id

• Các domains mô tả đặc điểm các đối tượng (obj)  –  tagged, authentication, audit, network, system,

sys_info, user_info, utility, owned, not_owned

 –  Objects put into highest domain to which it belongs• Tagged, authenticated file is in domain tagged

• Unowned network object is in domain network 

7/30/2019 06_IntrusionDetection

http://slidepdf.com/reader/full/06intrusiondetection 45/69

Slide #22-45

More on Agent Actions

• Một thực thế có thể là Sub hoặc Obj tùy theo bốicảnh 

 –  Process: subject when changes protection mode of object, object when process is terminated

• Bảng theo dõi sẽ cho biết sự kiện nào được gửi tớiDIDS director 

 –  Based on actions, domains associated with event –  All NIDS events sent over so director can track view of 

system

• Action is session_start or execute; domain is network  

7/30/2019 06_IntrusionDetection

http://slidepdf.com/reader/full/06intrusiondetection 46/69

Slide #22-46

Layers of Expert System Model

1. Các bản ghi Log 

2. Các sự kiện (thông tin đáng quan tâm từ các bản ghilog)

3. Định nghĩa đối tượng liên quan tới tất cả các sự kiệngắn với 1 người dùng. Gán NID cho đối tượng 

4. Các thông tin về bối cảnh như thời gian, không gian,

tương quan với các sự kiện khác –  Sequence of commands to show who is using the system

 –  Series of failed logins follow

7/30/2019 06_IntrusionDetection

http://slidepdf.com/reader/full/06intrusiondetection 47/69

Slide #22-47

Top Layers

5. Xác định các mối đe dọa (kết hợp các sự kiệntrong bối cảnh)  –  Abuse (change to protection state)

 –  Misuse (violates policy, does not change state) –  Suspicious act (does not violate policy, but of interest)

6. Đánh giá điểm (biểu thị trạng thái an toàn của hệthống) 

 –  Derived from previous layer and from scoresassociated with rules

• Analyst can adjust these scores as needed

 –  A convenience for user 

7/30/2019 06_IntrusionDetection

http://slidepdf.com/reader/full/06intrusiondetection 48/69

Slide #22-48

Autonomous Agents: AAFID

• Phân tán Director tới các Agents 

• Autonomous agent  là một tiến trình có thể hoạt

động độc lập trong một hệ thống có chứa agent • Mỗi agent độc lập sẽ thực hiện một chức năng

giám sát cụ thể 

 –  Has its own internal model

 –  Communicates with other agents

 –  Agents jointly decide if these constitute a reportable

intrusion

7/30/2019 06_IntrusionDetection

http://slidepdf.com/reader/full/06intrusiondetection 49/69

Slide #22-49

Advantages

• Giải quyết vấn đề “single point of failure” 

 –  All agents can act as director 

 –  In effect, director distributed over all agents

• Một agent bị xâm phạm sẽ không ảnh hưởng cácagent khác

• Mỗi agent sẽ giám sát một tài nguyên 

 –  Small and simple• Agents có thể được chuyển nếu cần thiết • Ổn định hơn trong hệ thống mạng lớn 

7/30/2019 06_IntrusionDetection

http://slidepdf.com/reader/full/06intrusiondetection 50/69

Slide #22-50

Disadvantages

• Lưu lượng trao đổi nhiều hơn so với hệthống tập trung 

 – Securing these can be very hard and expensive• Mỗi agent theo dõi một tài nguyên, nên có

thể cần nhiều agents 

• Cần tới kỹ thuật tính toán phân tán khi pháthiện xâm nhập  – This computation also must be secured

7/30/2019 06_IntrusionDetection

http://slidepdf.com/reader/full/06intrusiondetection 51/69

Slide #22-51

Example: AAFID

• Mỗi trạm có 1 tập agents và một transceiver   –  Transceiver controls agent execution, collates

information, forwards it to monitor (on local or remote

system)

• Các bộ lọc sẽ cung cấp các truy cập tới tài nguyênđược theo dõi  –  Use this approach to avoid duplication of work and

system dependence

 –  Agents subscribe to filters by specifying records needed

 –  Multiple agents may subscribe to single filter 

7/30/2019 06_IntrusionDetection

http://slidepdf.com/reader/full/06intrusiondetection 52/69

Slide #22-52

Transceivers and Monitors

• Các transceivers thu thập dữ liệu từ agents  –  Forward it to other agents or monitors

 –  Can terminate, start agents on local system

• Example: System begins to accept TCP connections, sotransceiver turns on agent to monitor SMTP

• Monitors tiếp nhận dữ liệu từ transceivers 

 –  Can communicate with transceivers, other monitors

• Send commands to transceiver 

 –  Perform high level correlation for multiple hosts

 –  If multiple monitors interact with transceiver, AAFIDmust ensure transceiver receives consistent commands

7/30/2019 06_IntrusionDetection

http://slidepdf.com/reader/full/06intrusiondetection 53/69

Slide #22-53

Other 

• Giao diện giữa người dùng với monitors 

 – Could be graphical or textual

• Bản thử nghiệm được phát triển bằng ngônngữ PERL for Linux and Solaris 

 – Proof of concept

 – Performance loss acceptable

7/30/2019 06_IntrusionDetection

http://slidepdf.com/reader/full/06intrusiondetection 54/69

Slide #22-54

 Ngăn chặn phá hoại 

• Chỉ ra được tấn công trước khi nó hoàn thành

• Ngăn chặn trước khi nó hoàn tất thành công 

• Thủ thuật: Cách ly kẻ tấn công  –  Attacker placed in a confined environment that looks

like a full, unrestricted environment

 –  Attacker may download files, but gets bogus ones

 –  Can imitate a slow system, or an unreliable one

 –  Useful to figure out what attacker wants

 –  MLS systems provide natural jails

7/30/2019 06_IntrusionDetection

http://slidepdf.com/reader/full/06intrusiondetection 55/69

Slide #22-55

Điều khiển xâm nhập 

• Khôi phục hệ thống để tuân thủ các chính sách 

• Six phases

 –  Preparation for attack (before attack detected)

 –  Identification of attack 

Containment of attack (confinement)

Eradication of attack (stop attack)

 –  Recovery from attack (restore system to secure state)

Follow-up to attack (analysis and other actions)

Discussed in what follows

7/30/2019 06_IntrusionDetection

http://slidepdf.com/reader/full/06intrusiondetection 56/69

Slide #22-56

Containment Phase

• Mục tiêu: Hạn chế truy cập của kẻ tấn côngtới các tài nguyên hệ thống 

• Hai phương pháp  – Passive monitoring

 – Constraining access

7/30/2019 06_IntrusionDetection

http://slidepdf.com/reader/full/06intrusiondetection 57/69

Slide #22-57

Theo dõi thụ động 

• Ghi lại các hành động của kẻ tấn công, không canthiệp vào tấn công 

 –  Idea is to find out what the attacker is after and/or 

methods the attacker is using

• Vấn đề : Hệ thống có thể bị tổn hại  –  Attacker can also attack other systems

• Example: type of operating system can be derivedfrom settings of TCP and IP packets of incomingconnections

 –  Analyst draws conclusions about source of attack 

7/30/2019 06_IntrusionDetection

http://slidepdf.com/reader/full/06intrusiondetection 58/69

Slide #22-58

Chế ngự hành động 

• Làm giảm vùng bảo vệ của kẻ tấn công

• Vấn đề: nếu người bảo vệ không biết mục tiêu

của kẻ tấn công, có thể vùng bảo vệ đã đượcgiảm lại chứa các tài nguyên được tìm kiếm 

 – Stoll created document that attacker downloaded

 – Download took several hours, during which the phone call was traced to Germany

7/30/2019 06_IntrusionDetection

http://slidepdf.com/reader/full/06intrusiondetection 59/69

Slide #22-59

Lừa gạt 

• Công cụ lừa gạt kẻ tấn công 

 –  Creates false network interface

 – Can present any network configuration to attackers

 –  When probed, can return wide range of vulnerabilities

 –  Attacker wastes time attacking non-existent systems

while analyst collects and analyzes attacks to determine

goals and abilities of attacker  –  Experiments show deception is effective response to

keep attackers from targeting real systems

7/30/2019 06_IntrusionDetection

http://slidepdf.com/reader/full/06intrusiondetection 60/69

Slide #22-60

Loại bỏ tấn công 

• Phương pháp thông thường: ngăn chặn các truy cậphệ thống hoặc chấm dứt các tiến trình có liên quan 

• Sử dụng “wrappers” để thực thi điều khiển truy cập 

 –  Example: wrap system calls

• On invocation, wrapper takes control of process

• Wrapper can log call, deny access, do intrusion detection

• Experiments focusing on intrusion detection used multiple

wrappers to terminate suspicious processes –  Example: network connections• Wrapper around servers log, do access control on, incoming

connections and control access to Web-based databases

7/30/2019 06_IntrusionDetection

http://slidepdf.com/reader/full/06intrusiondetection 61/69

Slide #22-61

Firewalls

• Kiểm soát các truy cập vào hệ thống mạng 

 –  Also mediate access out to the Internet

• Example: Java applets filtered at firewall

 –  Use proxy server to rewrite them

• Change “<applet>” to something else 

 –  Discard incoming web files with hex sequence CA FEBA BE

• All Java class files begin with this

 – Block all files with name ending in “.class” or “.zip” 

• Lots of false positives

7/30/2019 06_IntrusionDetection

http://slidepdf.com/reader/full/06intrusiondetection 62/69

Slide #22-62

Intrusion Detection and Isolation

Protocol• Phối hợp các phản ứng tới các tấn công 

• Boundary controller  : Hệ thống có thể khóa

các kết nối từ vòng ngoài  – Typically firewalls or routers

• Neighbor  : Hệ thống kết nối gần kề 

• IDIP domain : Tập các hệ thống có thể gửicác bản tin cho nhau mà không cần qua bộđiều khiển biên 

7/30/2019 06_IntrusionDetection

http://slidepdf.com/reader/full/06intrusiondetection 63/69

Slide #22-63

Protocol

• IDIP protocol engine theo dõi các kết nối trên cáchệ thống thuộc IDIP domains 

 –  If intrusion observed, engine reports it to neighbors

 –  Neighbors propagate information about attack 

 –  Trace connection, datagrams to boundary controllers

 –  Boundary controllers coordinate responses

• Usually, block attack, notify other controllers to block relevantcommunications

7/30/2019 06_IntrusionDetection

http://slidepdf.com/reader/full/06intrusiondetection 64/69

Slide #22-64

Example

• C , D, W , X , Y , Z boundary controllers

• f launches flooding attack on A 

•  Note after X suppresses traffic intended for  A, W beginsaccepting it and A, b, a, and W can freely communicateagain 

C    D 

 X  

W  

 A 

e Y  

 Z  

 f  

7/30/2019 06_IntrusionDetection

http://slidepdf.com/reader/full/06intrusiondetection 65/69

Slide #22-65

Giai đoạn theo dõi 

• Thực hiện các hành động bên ngoài hệthống để chống lại kẻ tấn công 

 – Thumbprinting: traceback at the connectionlevel

 – IP header marking: traceback at the packet level

 – Counterattacking

7/30/2019 06_IntrusionDetection

http://slidepdf.com/reader/full/06intrusiondetection 66/69

Slide #22-66

Tấn công kẻ tấn công 

• Dùng pháp luật  – Collect chain of evidence so legal authorities

can establish attack was real

 – Check with lawyers for this

• Rules of evidence very specific and detailed

• If you don’t follow them, expect case to be dropped 

• Dùng kỹ thuật  – Goal is to damage attacker seriously enough to

stop current attack and deter future attacks

7/30/2019 06_IntrusionDetection

http://slidepdf.com/reader/full/06intrusiondetection 67/69

Slide #22-67

Một số hậu quả 

1. Có thể làm tổn hại các bên vô tội • Attacker may have broken into source of attack or may

 be impersonating innocent party

2. Có thể có các tác động phụ • If counterattack is flooding, may block legitimate use

of network 

3. Có thể vi phạm pháp luật 

7/30/2019 06_IntrusionDetection

http://slidepdf.com/reader/full/06intrusiondetection 68/69

Slide #22-68

Example: Counterworm

• Thực hiện các hành động quét sâu khi được cungcấp nhận diện sâu 

 –  Counterworm spreads rapidly, deleting all occurrencesof original worm

• Một số vấn đề 

 –  How can counterworm be set up to delete only targetedworm?

 –  What if infected system is gathering worms for research?

 –  How do originators of counterworm know it will notcause problems for any system?

• And are they legally liable if it does?

7/30/2019 06_IntrusionDetection

http://slidepdf.com/reader/full/06intrusiondetection 69/69

Key Points

• Intrusion detection is a form of auditing

• Anomaly detection looks for unexpected events

• Misuse detection looks for what is known to be bad

• Specification-based detection looks for what is

known not to be good

• Intrusion response requires careful thought and

 planning