An toàn và bảo mật hệ thống thông tin - C4: malicious code
-
Upload
phan-khanh-toan -
Category
Education
-
view
359 -
download
6
Transcript of An toàn và bảo mật hệ thống thông tin - C4: malicious code
9/14/2015
1
Giảng viên: Lê Phúc
Email: [email protected]
Website: http://is.ptithcm.edu.vn/~lephuc
Malicious codes
INT1303 Information security, PTITHCM, 2015
Phân loại
INT1303 Information security, PTITHCM, 2015
2
Adware
Attack kit
Auto-rooter
Backdoor
Exploits
Flooders
Keyloggers
Logic bomb
Macro virus
Mobile code
Rootkit
Spammer
Spyware
Trojan horse
Virus
Worm
Zombie, bot
9/14/2015
2
Virus
INT1303 Information security, PTITHCM, 2015
3
Phần mềm ký sinh trên file thực thi, boot
sector, file tài liệu.
Phát tán thông qua thao tác sao chép file hoặc
thực thi/mở file từ xa.
Là hình thức phổ biến nhất trong giai đoạn
đầu (80s-90s). Xu hướng chuyển dần sang
macro virus trên các file tài liệu.
Virus
INT1303 Information security, PTITHCM, 2015
4
3 thành phần của virus điển hình:
Infection mechanism: cơ chế lây nhiễm
Trigger: sự kiện kích hoạt virus
Payload: hành vi của virus
9/14/2015
3
Virus
INT1303 Information security, PTITHCM, 2015
5
Vòng đời điển hình của virus:
Dormant phase: giai đoạn virus chưa hoạt động,
chờ sự kiện kích hoạt
Propagation phase: tự nhân bản
Triggering phase: virus được kích hoạt để thực thi
Execution phase: thực hiện các hành vi của virus
theo lập trình.
Virus6
program V := { goto main; 1234567;
subroutine infect-executable := {
loop: file := get-random-executable-file;
if (first-line = 1234567) goto loop
else prepend V to file; }
subroutine do-damage := {whatever to be done}
subroutine trigger-pulled := {return trigger}
main: main-program := {infect-executable;
if trigger-pulled then do-damage;
goto next;}
next: }
9/14/2015
4
Virus
INT1303 Information security, PTITHCM, 2015
7
Phân loại virus theo mục tiêu lây nhiễm:
Boot sector infector: Lây nhiễm boot sector
File infector: Lây nhiễm các file thực thi
Macro virus: Lây nhiễm các file tài liệu có hỗ trợ
macro/script
Multipartite virus: Có thể lây nhiễm trên nhiều loại
file khác nhau
Virus
INT1303 Information security, PTITHCM, 2015
8
Phân loại theo hình thức tự che giấu:
Encrypted virus: tự mã hóa với key ngẫu nhiên
Stealth virus: tự ẩn bằng cách nén hoặc thay đổi
mã nhằm tránh phát hiện
Polymorphic virus: tự thay đổi sau mỗi lần nhân
bản (đa hình)
Metamorphic virus: thay đổi hoàn toàn sau mỗi
lần nhân bản (siêu hình)
9/14/2015
5
Virus
INT1303 Information security, PTITHCM, 2015
9
Macro / script virus:
Không phụ thuộc HĐH, đích lây nhiễm là các file
tài liệu có hỗ trợ macro/script
Dễ dàng phát tán qua email
Người dùng không chú ý
Worm
INT1303 Information security, PTITHCM, 2015
10
Đặc điểm:
Là phần mềm hoàn chỉnh
Tự lây lan hoặc thông qua sao chép
Khai thác lỗ hổng của phần mềm
9/14/2015
6
Worm
INT1303 Information security, PTITHCM, 2015
11
Các phương thức phát tán:
Electronic mail or instant messenger facility
File sharing
Remote execution capability
Remote file access or transfer capability
Remote login capability
Worm
INT1303 Information security, PTITHCM, 2015
12
Tìm mục tiêu: Worm tự tìm mục tiêu để phát
tán thông qua các kỹ thuật scan, fingerprint.
Random: quét trên danh sách các địa chỉ IP ngẫu
nhiên
Hit-List: dựa trên danh sách địa chỉ các máy có
nguy cơ.
Topological: dựa trên thông tin có trên máy bị
nhiễm để tìm thêm máy khác.
Local subnet: tấn công các máy nội bộ
9/14/2015
7
Worm
INT1303 Information security, PTITHCM, 2015
13
Worm propagation model
Worm
INT1303 Information security, PTITHCM, 2015
14
Một số worm điển hình:
Morris worm: 1988 (3 years probation, 400 hours of community service,
fine of $10,000)
Code Red: 2001 (IIS buffer overflow)
SQL Slammer: 2004 (SQL server buffer overlow)
9/14/2015
8
Worm
INT1303 Information security, PTITHCM, 2015
15
Phát triển:
Multiplatform
Multi-exploit
Ultrafast spreading
Polymorphic
Metamorphic
Transport vehicles
Zero-day exploit
Worm
INT1303 Information security, PTITHCM, 2015
16
Một số loại worm đặc biệt:
Mobile Code
Mobile Phone Worms (Cabir/2004, Lasco,
CommWarrior/2005)
Client-Side Vulnerabilities and Drive-by-
Downloads
9/14/2015
9
Các loại phần mềm độc khác
INT1303 Information security, PTITHCM, 2015
17
Spam, Trojan
Zombie, bots
Keyloggers, phishing, spyware
Backdoors, rootkits
Phát hiện malware
INT1303 Information security, PTITHCM, 2015
18
Signature detection
Change detection
Anomaly detection
9/14/2015
10
Signature detection
INT1303 Information security, PTITHCM, 2015
19
Mỗi virus thường có một chuỗi nhận dạng. Tìm
chuỗi này trong file để phát hiện ra virus.
Đơn giản, chỉ phát hiện được các virus thông
thường.
Không phát hiện được virus “mới”, virus siêu
hình, đa hình
Danh sách signature có thể rất lớn, làm cho
việc quét trở nên mất thời gian
Change detection
INT1303 Information security, PTITHCM, 2015
20
Nguyên tắc: virus làm thay đổi nội dung file
thực thi
Giải pháp: sử dụng hàm băm, định kỳ kiểm tra
mã băm của các file thực thi trên máy.
Có thể phát hiện virus “mới”
Không có false negative, nhưng nhiều false
positive do các file có thể được thay đổi.
Việc kiểm tra mất nhiều năng lượng xử lý
9/14/2015
11
Anomaly detection
INT1303 Information security, PTITHCM, 2015
21
Giám sát thường xuyên để phát hiện các trạng
thái bất thường của hệ thống, ví dụ:
Thay đổi nội dung file
Cách phản ứng của hệ thống
Lưu lượng mạng thay đổi
Truy xuất file bất thường
Có thể phát hiện virus “mới”. Độ chính xác
thấp. Thường kết hợp với IDS
Xu hướng phát triển của malware
INT1303 Information security, PTITHCM, 2015
22
Encrypted, polymorphic, metamorphic
malware
Fast replication/Warhol worms
Flash worms
Botnets
Good news for the bad guys…
…bad news for the good guys