1. Trang chủ
  2. » Công Nghệ Thông Tin

Bài giảng môn an toàn mạng Firewalls

77 1K 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 77
Dung lượng 3,38 MB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

Các lo i Firewalls ạPacket Filtering Router Application Level Gateway Circuit Level Gateway... Packet Filtering Rulesconnection to our SMTP port * * 25 OUR-GW allow we don’t trust these

Trang 1

Network Security

Firewalls

Trang 2

T i sao c n có firewall ạ ầ

Các k t n i Internet cho phép các m ng ế ố ạriêng n i vào h th ng m ng toàn c u.ố ệ ố ạ ầFirewall được chèn vào gi a m ng riêng ữ ạ

Trang 3

M c tiêu thi t k ụ ế ế

T t c các truy c pấ ả ậ , k c t bên trong ể ả ừ

ra hay bên ngoài vào đ u ph i đi qua ề ảfirewall

Ch cho phép ỉ các truy c p h p lậ ợ ệ (được

đ nh ngh a trong ị ĩ chính sách an ninh)

Trang 4

Các k thu t đi u khi n truy ỹ ậ ề ể

c p ậ

Service Control – i u khi n theo hĐ ề ể ướng

d ch v (Internet) i vào ho c ra.ị ụ Đ ặ

Direction Control – i u khi n theo chi u Đ ề ể ề

Trang 5

Kh n ng c a Firewalls ả ă ủ

Single choke point – i m ki m tra duy Đ ể ể

nh t - b o v các d ch v nh y c m kh i ấ ả ệ ị ụ ạ ả ỏcác lo i t n công khác nhau (spoofing, ạ ấDOS …)

Singular monitoring point – i m giám Đ ểsát, ki m soát các hành vi.ể

Trang 6

Scope of Firewalls

Platform for non-security functions –

N n t ng cho các d ch v khác - dùng ề ả ị ụcho các d ch v chuy n đ i đ a ch ị ụ ể ổ ị ỉ

(NAT), qu n lý m ng …ả ạ

Platform for IPSec – N n t ng cho IPSec ề ả

- th c thi VPN qua ch đ đự ế ộ ường h m.ầ

Trang 7

H n ch c a Firewalls ạ ế ủ

Không th ch ng l i các t n công b ể ố ạ ấ ỏ

qua firewall (bypass)

Không ch ng l i đố ạ ược các m i đe d a t ố ọ ừbên trong

Không ch ng đố ược s lây nhi m các ự ễ

chương trình virus và mã đ c.ộ

Trang 8

Các lo i Firewalls ạ

Packet Filtering Router

Application Level Gateway

Circuit Level Gateway

Trang 9

Packet Filtering

OSI Layers Addressed

Trang 10

Packet Filtering Router

Áp d ng m t ụ ộ t p các lu tậ ậ cho m i gói tin ỗ

đi qua Router và quy t đ nh s chuy n ế ị ẽ ể

ti p hay h y gói tin đó ế ủ

L c gói tin theo ọ c hai h ả ướ ng

Trang 11

Packet Filtering Router

Các lu t d a trên ậ ự đ a ch ngu n, ị ỉ ồ đ a ch ị ỉ đíchs c ng ố ổ đ l c gói tinể ọ

Danh sách các lu t ậ được kh p v i các ớ ớtham s gói tin.ố

N u không có lu t nào kh p, hành đ ng ế ậ ớ ộ

m c đ nh đặ ị ược áp d ng.ụ

Trang 12

Packet Filtering Router

Trang 13

Packet Filtering Rules

connection to our SMTP port

*

* 25

OUR-GW allow

we don’t trust these guys

* SPIGOT

*

* block

comment port

theirhost port

ourhost action

• Cho phép gửi mail vào (port 25), nhưng chỉ được gửi cho gateway

• Không cho phép lưu lượng đến từ máy SPIGOT

Trang 14

Packet Filtering Rules

comment port

theirhost port

ourhost action

• Chính sách mặc định

• Luôn luôn là luật cuối cùng

• Luật này cấm tất cả các lưu lượng khác

Trang 15

Packet Filtering Rules

Connection to their SMTP port

25

*

*

* allow

comment port

theirhost port

ourhost action

• Các trạm trong mạng có thể gửi mail ra ngoài

• Một vài ứng dụng có thể kết nối tới cổng 25

• Hacker có thể truy cập qua cổng 25

Trang 16

Packet Filtering Rules

their replies ACK

*

* 25

* allow

flags

connection to their SMTP port

25

*

*

our hosts allow

comment port

dest port

src action

• Cải tiến trường hợp trước

• Các trạm bên trong có thể truy cập tới bất kỳ SMTP server nào

• Cho phép các xác nhận từ SMTP server bên ngoài

Trang 17

Packet Filtering Rules

replies to our calls ACK

*

*

*

* allow

comment port

dest port

src action

• Xử lý các kết nối FTP

• Hai kết nối được sử dụng: Một dùng để điều khiển và 1

để truyền dữ liệu; dùng 2 cổng khác nhau (20, 21)

• Các kết nối ra ngoài sử dụng các cổng chỉ số cao (> 1023)

Trang 19

Packet Filtering Attacks

IP address spoofing – các gói tin t bên ừngoài có s d ng đ a ch IP gi (tin c y) ử ụ ị ỉ ả ậtrong trường đ a ch ngu n.ị ỉ ồ

Source routing attacks – hacker n đ nh ấ ịtuy n ngu n đ gói tin tránh các đi m ế ồ ể ể

ki m soát.ể

Tiny fragment attack – hacker phân nh ỏgói tin đ qua m t các lu t l c gói tin ể ặ ậ ọ

d a trên tiêu đ TCP.ự ề

Trang 20

Real Life Example

Trang 22

Stateful Inspection

Layers Addressed By Stateful Inspection

Trang 23

Stateful Inspection

Firewalls

Tr ng thái c a 1 k t n i: Open or ạ ủ ế ố

Closed

State: Th t c a gói tin trong cu c trao đ i ứ ự ủ ộ ổ

Th ườ ng cho bi t gói tin có ph i thu c v m t ế ả ộ ề ộ

k t n i đang m hay không ế ố ở

Trang 24

trong m ng t i các máy ch ngoài m ng ạ ớ ủ ạ

Các gói tin trao đ i ti p theo gi a các máy này ổ ế ữ

t i các c ng này là đ ạ ổ ượ c phép mà không c n ầ

ph i xem xét k ả ỹ

B n ghi b xóa kh i b ng tr ng thái khi k t n i ả ị ỏ ả ạ ế ố TCP ng t ắ

Trang 25

Stateful Inspection Firewall

Operation I

External Webserver 123.80.5.34

2.

Establish

TCP SYN Segment From: 60.55.33.12:62600 To: 123.80.5.34:80

Stateful Firewall

Type

TCP

Internal IP 60.55.33.12

Internal Port 62600

External IP 123.80.5.34

External Port 80

Status OK Connection Table

Note: Outgoing Connections Allowed By Default

Trang 26

Stateful Inspection Firewall

Operation I

External Webserver 123.80.5.34

Stateful Firewall

Type

TCP

Internal IP 60.55.33.12

Internal Port 62600

External IP 123.80.5.34

External Port 80

Status OK Connection Table

Trang 27

Internal Port 62600 63206

External IP 123.80.5.34 1.8.33.4

External Port 80 69

Status OK OK Connection Table

Trang 28

N u có m t phân đo n TCP SYN/ACK đ ế ộ ạ ượ c

g i, không th bi t đ ử ể ế ượ c tr ướ c đó đã có

phân đo n SYN đ yêu c u m k t n i hay ạ ể ầ ở ế ố

ch a (các stateful firewall có th ki m tra ư ể ể

đ ượ c).

Trang 29

Stateful Firewall

Operation II

Attacker Spoofing External Webserver 10.5.3.4

Internal

Client PC

60.55.33.12

Stateful Firewall

2.

Check Connection Table:

No Connection Match: Drop

1.

Spoofed TCP SYN/ACK Segment From: 10.5.3.4.:80 To: 60.55.33.12:64640

Type

TCP

UDP

Internal IP 60.55.33.12 60.55.33.12

Internal Port 62600 63206

External IP 123.80.5.34 222.8.33.4

External Port 80 69

Status OK OK Connection Table

Trang 31

Port-Switching Applications

with Stateful Firewalls

External FTP Server 123.80.5.34

2.

To Establish

TCP SYN Segment From: 60.55.33.12:62600 To: 123.80.5.34:21

Stateful Firewall

Type TCP

Internal IP 60.55.33.12

Internal Port 62600

External IP 123.80.5.34

External Port 21

Status OK State Table

Step 2

Trang 32

Port-Switching Applications

with Stateful Firewalls

External FTP Server 123.80.5.34

Use Ports 20 and 55336 for Data Transfers

5.

To Allow, Establish Second Connection

4.

TCP SYN/ACK Segment From: 123.80.5.34:21 To: 60.55.33.12:62600

Use Ports 20 and 55336 for Data Transfers

Stateful Firewall

Type TCP TCP

Internal IP 60.55.33.12 60.55.33.12

Internal Port 62600 55336

External IP 123.80.5.34 123.80.5.34

External Port 21 20

Status OK OK

State Table

Step 2

Step 5

Trang 33

Application Level

Gateway

Trang 34

Application Gateway

Firewalls

Layers Addressed by Application-Proxy Gateway Firewalls

Trang 35

hi n TELNET t i máy ch xa, ngệ ớ ủ ở ười

dùng được ch ng th c, sau đó gateway ứ ự

k t n i t i máy ch xa và thông tin ế ố ớ ủ ở

được chuy n ti p gi a 2 bên.ể ế ữ

Trang 36

Application Level Gateway

Proxy có th t ch i chuy n ti p thông tin ể ừ ố ể ế

n u ch ng th c ngế ứ ự ười dùng th t b i ho c ấ ạ ặ

ng d ng

Có th ki m tra gói tin qua l i đ đ m b o ể ể ạ ể ả ả

an toàn - full packet awareness

D dàng ghi l i thông tin vì toàn b n i ễ ạ ộ ộ

dung gói tin có th hi u để ể ược

Nh ượ c đi m: ể C n ph i th c hi n thêm các ầ ả ự ệ

x lý – t ng đ ph c t p x lý.ử ă ộ ứ ạ ử

Trang 37

Circuit-Level Gateway

Trang 38

Circuit Level Gateway

Không cho phép các k t n i TCP end-to-endế ốThi t l p ế ậ hai k t n i TCP ế ố : M t gi a gateway ộ ữ

và tr m bên trong, m t gi a gateway và ạ ộ ữ

tr m bên ngoài.ạ

Chuy n ti p các phân đo n TCP ể ế ạ t m t k t ừ ộ ế

n i bên này t i k t n i bên kia ố ớ ế ố mà không

th c hi n ki m tra n i dungự ệ ể ộ

Trang 39

Circuit Level Gateway

Ch c n ng an ninh ứ ă (th c hi n theo chính ự ệsách) s xác đ nh k t n i nào đẽ ị ế ố ược phép

c dùng khi ng i dùng bên trong là

tin c y v i t t c các d ch v bên ngoài.ậ ớ ấ ả ị ụ

Thường được s d ng k t h p v i m t ử ụ ế ợ ớ ộ

proxy cho các d ch v bên trong.ị ụ

Ch y u dùng đ che gi u thông tin c a ủ ế ể ấ ủcác m ng riêng bên trong.ạ

Trang 40

Dedicated Proxy Servers

Trang 42

Only essential services

Trang 43

Bastion Host

Allows access only to specific hosts

Maintains detailed audit information by logging all traffic

terminating intruder attacks

Each proxy is a small, highly secure

subset of the general application

Trang 44

Proxies run as non-privileged users

Trang 45

Bastion Host,

Single-Homed

Trang 46

Bastion Host, Single-Homed

host

 For traffic from the Internet, only IP packets

 For traffic from the internal network, only relayed packets from the bastion host are allowed out

Trang 47

Bastion Host, Single-Homed

 Bastion host performs authentication

Implements both packet level and application level filtering

 Intruder penetrates two separate systems

before internal network is compromised

 May contain a public information server

What happens if

this is compromised?

Trang 48

Bastion Host, Dual-Homed

Trang 49

Bastion Host, Dual-homed

 Bastion host second defense layer

 Internal network is completely isolated

 Packet forwarding is turned off

 More secure

Trang 50

Screened Subnet

Trang 51

Screened Subnet

 Most secure

 Isolated subnet with bastion host between two packet filtering routers

 Traffic across screened subnet is blocked

 Three layers of defense

 Internal network is invisible to the Internet

Trang 52

Typical DMZ

Internet

Primary DNS Server

Secondary DNS Server

Clients

Packet Filtering Routers BGP-4 Frac/T3 Frac/T3

.10 11

Trang 53

DMZ Building Guidelines

Keep It Simple - KISS principle - the more

simple the firewall solution, the more secure and more manageable

Use Devices as They Were Intended to Be

Used – don’t make switches into firewalls

Create Defense in Depth – use layers,

routers and servers for defense

Pay Attention to Internal Threats – “crown

jewels” go behind internal firewall – adage:

“all rules are meant to be broken”

Trang 54

Taming the DNS

Don’t want to reveal internal names and addresses

Internal network has an isolated,

pseudo-root DNS

“Split DNS” or “Split Brain”

Trang 55

Taming the DNS

Trang 56

Gateways to disparate networks

Hides internal addresses

Port Address Translation (PAT) – a variation using ports

Trang 58

VPN’s Another Type of

Firewall

Connecting remote users

across the Internet

Connecting offices across Internet

Trang 59

Other Types Of Firewalls

Host Based Firewalls – comes with some operating systems (LINUX, WIN/XP) –

ipfilter is a popular one

http://coombs.anu.edu.au/~avalon/

and crunchy on the outside, soft and

chewy on the inside

Trang 60

Other Types Of Firewalls

Personal Firewalls

Appliances – personal

firewall appliances are

designed to protect small

networks such as

networks that might be

found in home offices

Provide: print server,

shared broadband use,

firewall, DHCP server and

NAT

(NB: This is not an endorsement of any product)

Trang 61

Network Security

Trusted Systems

Trang 62

Access Matrix

General model of access control:

• Subject – entity capable of accessing

objects (user = process= subject)

• Object – anything to which access is

controlled (files, programs, memory)

• Access right – way in which an object is accessed by a subject (read, write, exe)

Trang 63

Access Matrix

Trang 64

Access Control List

Trang 65

Different requirement is to protect data

or resources on the basis of security

levels (unclassified, confidential, secret and top secret)

Trang 66

No read up: Subject can only read an object

of less or equal security level

No write down: Subject can only write into

an object of greater or equal security level

Trang 67

Reference Monitor

Trang 68

Reference monitor is a controlling

element in hardware and OS

Enforces the security rules in the

security kernel database (no read up, no write down)

Trang 69

Trusted System

Properties

Complete mediation – security rules enforced on every access

Isolation – reference monitor and

database are protected from

unauthorized modification

Verifiability – reference monitor’s

correctness must be mathematically provable

Trang 70

Trojan Horse Defense

Alice installs trojan horse program and gives Bob write only permission

Trang 71

Trojan Horse Defense

Alice induces Bob to invoke the trojan horse Program detects it is being executed by Bob, reads the sensitive character string and writes it into Alice’s back-pocket file

Trang 72

Trojan Horse Defense

Two security levels are assigned, sensitive(higher) and public Bob’s stuff

is sensitive and Alice’s stuff is public.

Trang 73

Trojan Horse Defense

If Bob invokes the trojan horse program, that program acquires Bob’s security and is able to read the character string However, when the

program attempts to store the string, the no write down policy is invoked

Trang 74

A classic in the field published in 1994 Know for its 

“bombs” which

indicated a serious risk

Trang 75

Important URLs

Evolution of the Firewall Industry - Discusses different architectures and their differences, how packets are processed, and provides a

timeline of the evolution

http://csrc.nist.gov/publications/nistpubs/800-4 1/sp800-41.pdf

NIST Guidelines On Firewalls and Firewall Policy

Trusted Computing Group

Vendor group involved in developing and

promoting trusted computer standards

Trang 76

Read “An Evening With Berferd” – notice the techniques used (traces, protocols, etc.) – Do not attempt this at home

Trang 77

Remember Hans Brinker

Ngày đăng: 30/03/2015, 11:32

TỪ KHÓA LIÊN QUAN

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN

🧩 Sản phẩm bạn có thể quan tâm