Firewalls/Detection
CS 161: Computer Security
- Prof. Raluca Ada Popa
Firewalls/Detection CS 161: Computer Security Prof. Raluca Ada Popa - - PowerPoint PPT Presentation
Firewalls/Detection CS 161: Computer Security Prof. Raluca Ada Popa March 8, 2018 Controlling Networks On The Cheap Motivation: How do you harden a set of systems against external attack? Key Observation: The more network
– Key Observation:
– Due to larger attack surface
– But you have to know all the services that are running – And sometimes some trusted remote users still require access
– Key Observation:
– Due to larger attack surface
– But you have to know all the services that are running – And sometimes some trusted remote users still require access
– What happens when you have to secure 100s/1000s of systems? – Which may have different OSs, hardware & users … – Which may in fact not all even be identified …
– Who is allowed to talk to whom, accessing what service?
– Inbound: attempts by external users to connect to services on internal machines – Outbound: internal users to external services – Why? Because fits with a common threat model. There are thousands of internal users (and we’ve vetted them). There are billions of outsiders.
– Permit inside users to connect to any service – External users restricted:
– They have no logging facility that can be used to detect when a break-in has occurred
– Ports can be spoofed
– Initiated by host with Internet address 4.5.5.4 and – Connecting to port 80 of host with IP address 3.1.1.2
– Initiated by host with any internal host and – Connecting to port 80 of host with IP address 3.1.1.2 on external Internet
1
Packet #1
2
Packet #2
2
1
Firewall r r
seq=1, TTL=22
n
seq=1, TTL=16
X
i
seq=2, TTL=16
X
c
seq=3, TTL=16
X t t
seq=4, TTL=22
e
seq=4, TTL=16
X
r~~~
~~~~ r~~~? n~~~? ri~~? ni~~? ri~~? ro~~? ni~~? no~~? ric~? roc~? rio~? roo~? nic~? noc~? nio~? noo~? rice? roce? rict? roct? riot? root? rioe? rooe? nice? noce? nict? noct? niot? noot? nioe? nooe? Packet discarded in transit due to TTL hop count expiring
TTL field in IP header specifies maximum forwarding hop count Assume the Receiver is 20 hops away Assume firewall is 15 hops away
wreak havoc
– Remote access, telecommuting, branch offices, …
Internet Company intranet Alice at home Fileserver Alice at work
Internet Company Alice at home VPN server Fileserver Alice at work Company intranet
IP header to fileserver IP payload to file server VPN client encapsulates packet IP header to fileserver IP payload to file server IP header to VPN encrypted
NIDS
Monitor sees a copy
HTTP traffic
NIDS /etc/p RST
NIDS /%65%74%63/%70%61%73%73%77%64
Remote client FooCorp’s border router FooCorp Servers
Front-end web server
bin/amazeme -p xxx
Output of bin/amazeme
Remote client FooCorp’s border router FooCorp Servers
Front-end web server
bin/amazeme -p xxx
NIDS
Monitor sees a copy
HTTP traffic
Output of bin/amazeme
– Okay, need to do full HTTP parsing
– Okay, need to understand Unix filename semantics too!
Remote client FooCorp’s border router FooCorp Servers
Front-end web server
profile=xxx bin/amazeme -p xxx
HIDS instrumentation added inside here
Remote client FooCorp’s border router FooCorp Servers
Front-end web server
bin/amazeme -p xxx
Nightly job runs on this system, analyzing logs
– Again scan arguments sent to back-end programs
– Cheap: web servers generally already have such logging facilities built into them – No problems like %-escapes, encrypted HTTPS
– Again must consider filename tricks, other sensitive files – Can’t block attacks & prevent from happening – Detection delayed, so attack damage may compound – If the attack is a compromise, then malware might be able to alter the logs before they’re analyzed
Remote client FooCorp’s border router FooCorp Servers
Front-end web server
Real-time monitoring of system calls accessing files