Upload
naiya
View
27
Download
1
Embed Size (px)
DESCRIPTION
Internet & Web Security. Overview. Encryption and authentication ... Communication and data-sharing applications ... Web security and firewalls. Encryption and authentication. Foundations of Internet security Data confidentiality and integrity Authentication Example systems. - PowerPoint PPT Presentation
Citation preview
Institute for Visualization and Perception ResearchI VPR 1
© Copyright 1998 Haim Levkowitz
Internet & Web Security
Institute for Visualization and Perception ResearchI VPR 2
© Copyright 1998 Haim Levkowitz
Overview
• Encryption and authentication ...
• Communication and data-sharing applications ...
• Web security and firewalls ...
Institute for Visualization and Perception ResearchI VPR 3
© Copyright 1998 Haim Levkowitz
Encryption and authentication ...
• Foundations of Internet security
• Data confidentiality and integrity
• Authentication
• Example systems
Institute for Visualization and Perception ResearchI VPR 4
© Copyright 1998 Haim Levkowitz
Communication and data-sharing applications ...
• Mail and news
• Virtual terminal services
• File sharing
• Example systems
Institute for Visualization and Perception ResearchI VPR 5
© Copyright 1998 Haim Levkowitz
Web security and firewalls ...
• WWW security
• Network security issues
• SATAN
• Useful tools
Institute for Visualization and Perception ResearchI VPR 6
© Copyright 1998 Haim Levkowitz
Foundations of Internet security ...
• Internet security ...
• Layered protocol models ...
• Security and Layered Internet Protocols ...
Institute for Visualization and Perception ResearchI VPR 7
© Copyright 1998 Haim Levkowitz
Internet security ...
• Authentication ...
• Access control ...
• Integrity ...
• Confidentiality ...
Institute for Visualization and Perception ResearchI VPR 8
© Copyright 1998 Haim Levkowitz
Authentication ...
• Something you are (SYA)
• Something you know (SYK)
• Something you have (SYH)
Institute for Visualization and Perception ResearchI VPR 9
© Copyright 1998 Haim Levkowitz
Access control ...
• Who gets access to what
• Authentication, rights, privileges
Institute for Visualization and Perception ResearchI VPR 10
© Copyright 1998 Haim Levkowitz
Integrity ...
• Current vs. original (pure) condition of data
Institute for Visualization and Perception ResearchI VPR 11
© Copyright 1998 Haim Levkowitz
Confidentiality ...
• E-mail "like postcards"
• FTP, WWW
Institute for Visualization and Perception ResearchI VPR 12
© Copyright 1998 Haim Levkowitz
Layered protocol models ...• Protocol message contents ...
• Identities
• Sender, receiver
• Message length
• Message data
• Layered protocols ...
• Protocol enveloping ...
• OSI reference model ...
• Internet TCP/IP model ...
• Protocol enveloping in TCP/IP ...
Institute for Visualization and Perception ResearchI VPR 13
© Copyright 1998 Haim Levkowitz
Layered protocols ...• N layers
Layer N
Layer N – 1
Layer 1
Layer N
Layer N – 1
Layer 1
Computer 1 Computer 2
Institute for Visualization and Perception ResearchI VPR 14
© Copyright 1998 Haim Levkowitz
Protocol enveloping ...
Layer N
Layer N – 1
Layer 1
Layer N
Layer N – 1
Layer 1
Computer 1 Computer 2
Institute for Visualization and Perception ResearchI VPR 15
© Copyright 1998 Haim Levkowitz
OSI reference model ...
• Open Systems Interconnection abstract model
• Does not define: PL bindings, OS bindings, API issues, UI issues
• Defines: 7 protocol layers ...
Institute for Visualization and Perception ResearchI VPR 16
© Copyright 1998 Haim Levkowitz
Defines: 7 protocol layers ...
• Physical ...
• Data link ...
• Network ...
• Transport ...
• Session ...
• Presentation ...
• Application ...
Application-related services
Network-related services
Application
Presentation
Session
Transport
Network
Data Link
Physical
Institute for Visualization and Perception ResearchI VPR 17
© Copyright 1998 Haim Levkowitz
Physical ...
• Network transmission medium
• E.g., coaxial, twisted-pair, fiber-optic
• Raw bit-stream service
• Responsible only for writing / reading bits to / from physical medium
Institute for Visualization and Perception ResearchI VPR 18
© Copyright 1998 Haim Levkowitz
Data link ...• Group bits into frames
• Goal: reliable delivery mechanism• Error detection
• Noise, interference• Collisions
• Flow control• Avoid unnecessary frame loss
• Saturated buffers
Institute for Visualization and Perception ResearchI VPR 19
© Copyright 1998 Haim Levkowitz
Network ...
• Extend data link layer • From local to neighboring / distant networks• E.g., Ethernet, Token Ring
• Incompatible physical and link layers• ==> Internetworks (networks of networks)• Topology: routers• Two network layer services ...
Institute for Visualization and Perception ResearchI VPR 20
© Copyright 1998 Haim Levkowitz
Two network layer services ...• connection-oriented (CO)
• "reliable" / "virtual-circuit"
• well ordered data stream
• guarantee lost, order, duplicate
• connectionless (CL)
• "unreliable" / "datagram"
• no guarantees
Institute for Visualization and Perception ResearchI VPR 21
© Copyright 1998 Haim Levkowitz
Transport ...
• higher-level tasks (not end-to-end delivery)• multiplexing• OSI: 5 incompatible transport protocols
• CL, w/ CL network• CL, w/ CO network• CO, w/ CO network• CO, w/ CL network
• highest network aware
Institute for Visualization and Perception ResearchI VPR 22
© Copyright 1998 Haim Levkowitz
Session ...
• how data exchanged in dialog• two-way simultaneous (full-duplex)• two-way alternate (half-duplex)• one-way (simplex)
• checkpointing• synch points in data stream• resume aborted transfer at last encountered
synch point
Institute for Visualization and Perception ResearchI VPR 23
© Copyright 1998 Haim Levkowitz
Presentation ...
• hide diff in data rep'n
• e.g., ASCII vs. EBCDIC
• generic rep’n w/ ISO ASN.) spec ...
Institute for Visualization and Perception ResearchI VPR 24
© Copyright 1998 Haim Levkowitz
generic rep'n w/ ISO ASN. spec ...
• (Abstract Syntax Notation One)• Boolean• Integer (arb. length)• Real (arb. length & prec.)• Enumerated (days of week, months of year, etc.)• Bit string (arb. length)• Octet (byte) string (arb. length)• Null (any undef'd value)
Institute for Visualization and Perception ResearchI VPR 25
© Copyright 1998 Haim Levkowitz
Application ...
• service consumer
• via APIs
Institute for Visualization and Perception ResearchI VPR 26
© Copyright 1998 Haim Levkowitz
Internet TCP/IP model ...
• 5 layers• physical, data link, network, transport,
application• session, presentation
• by application, w/ assistance of API• Network layer: IP ...• Transport layer: TCP & UDP ...• Application layer ...
Institute for Visualization and Perception ResearchI VPR 27
© Copyright 1998 Haim Levkowitz
Network layer: IP ...
• move data between endpoints
• if not on same host ==> routing
• IP protocol
• IP datagram (packet)
Institute for Visualization and Perception ResearchI VPR 28
© Copyright 1998 Haim Levkowitz
Transport layer: TCP & UDP ...
• Transmission Control Protocol (TCP)
• connection-oriented
• User Datagram Protocol (UDP)
• connectionless
Institute for Visualization and Perception ResearchI VPR 29
© Copyright 1998 Haim Levkowitz
Application layer ...
• FTP
• SMTP: Simple Mail Transfer Protocol
• NNTP: Network News
• HTTP
Institute for Visualization and Perception ResearchI VPR 30
© Copyright 1998 Haim Levkowitz
Protocol enveloping in TCP/IP ...
• Application data --> TCP segment --> IP datagram --> Ethernet frame
Application FTP, SMTP, HTTP,
TCP UDP ICMP
IP
Data Link Ethernet, Token Ring, FDDI
Physical
Protocol Suite
Institute for Visualization and Perception ResearchI VPR 31
© Copyright 1998 Haim Levkowitz
Security and Layered Internet Protocols ...
• Physical and link layer ...
• Security at the IP layer ...
• TCP/UDP layer ...
• Application layer ...
Institute for Visualization and Perception ResearchI VPR 32
© Copyright 1998 Haim Levkowitz
Physical and link layer ...
• physical transmission medium
• access control
• confidentiality
Institute for Visualization and Perception ResearchI VPR 33
© Copyright 1998 Haim Levkowitz
Security at the IP layer ...
• network snooping (sniffing) ...
• Message replay ...
• Message alteration ...
• Message delay and denial ...
• Authentication issues ...
• Unauthorized access ...
• Routing attacks ...
Institute for Visualization and Perception ResearchI VPR 34
© Copyright 1998 Haim Levkowitz
network snooping (sniffing) ...
• abuse of tools for debugging / network problems ...
• network interface into promiscuous mode ...
• solution: encrypt
Institute for Visualization and Perception ResearchI VPR 35
© Copyright 1998 Haim Levkowitz
abuse of tools for debugging / network problems ...• e.g., Network General's Expert Sniffer
• etherfind (SunOS)
• tcpdump (free on Internet)
• Sniffer FAQ
• comp.security, news.answers
• ftp://ftp.iss.net/pub/faq/sniff
• http://www.iss.net/iss/sniff.html
Institute for Visualization and Perception ResearchI VPR 36
© Copyright 1998 Haim Levkowitz
network interface into promiscuous mode ...
• report all packets to sniffer
• display / record
• analyze
• super user on unix / VMS
• remote also possible
Institute for Visualization and Perception ResearchI VPR 37
© Copyright 1998 Haim Levkowitz
Message replay ...
• snoop & record conversation between systems A & B
• play back messages from A to B
• replay, as if A
• e.g., restore earlier password file (and account)
Institute for Visualization and Perception ResearchI VPR 38
© Copyright 1998 Haim Levkowitz
Message alteration ...
• modify contents
• modify checksomes to cover alterations
• solution: encrypt for data integrity
Institute for Visualization and Perception ResearchI VPR 39
© Copyright 1998 Haim Levkowitz
Message delay and denial ...• delay: datagrams held indefinitely
• unauthorized control of router• authenticate to prevent
• denial: datagrams discarded before delivery• overwhelm router / other comm. end
system• datagram overflow ==> lost
Institute for Visualization and Perception ResearchI VPR 40
© Copyright 1998 Haim Levkowitz
Authentication issues ...
• address masquerading ...
• address spoofing ...
Institute for Visualization and Perception ResearchI VPR 41
© Copyright 1998 Haim Levkowitz
Address masquerading ...
• configure network interface w/ other system's IP address
• NFS: access solely based on IP address
• one system down, another can masquerade
Institute for Visualization and Perception ResearchI VPR 42
© Copyright 1998 Haim Levkowitz
Address spoofing ...
• aka TCP sequence number attack
• exploits weakness of TCP
• net effect at IP layer
• How ...
• Defense ...
Institute for Visualization and Perception ResearchI VPR 43
© Copyright 1998 Haim Levkowitz
How ...
• Legitimate 3-way handshake A <--> B ...
• C impersonates A ...
Institute for Visualization and Perception ResearchI VPR 44
© Copyright 1998 Haim Levkowitz
Legitimate 3-way handshake A <--> B ...
• A --> B: SYN + ISN(A) (initial sequence number)
• A <-- B: SYN + ISN(B) + ACK(ISN(A))
• A --> B: ACK(ISN(B))
• A <--> B: application data
Institute for Visualization and Perception ResearchI VPR 45
© Copyright 1998 Haim Levkowitz
C impersonates A ...• C --> B: counterfeit IP datagram SYN +
ISN(C)• A <-- B: SYN + ISN(B) + ACK(ISN(C))
• A down; doesn't know• C --> B: ACK(ISN(B))
• C predicts ISN(B)• TCP ISN generator: 32-bit clock (w/ time)
• C --> B: rsh command
Institute for Visualization and Perception ResearchI VPR 46
© Copyright 1998 Haim Levkowitz
Defense ...
• 1. no address-based auhentication
• 2. screening router• filter packets based on
configurable rules• inbound attacks from
outside• outbound attacks from
inside
S: 108.3.54.9 D: 117.25.9.1
S: 117.25.16.41 D: 117.25.2.7
blocked
blocked
accepted
accepted
Internal 117.25.xxx.yyy
external
Institute for Visualization and Perception ResearchI VPR 47
© Copyright 1998 Haim Levkowitz
Unauthorized access ...
• Packet filtering
• Screeing router
• Firewall
Application
Transport (TCP, UDP)
Network (IP)
Data Link
Physical
Institute for Visualization and Perception ResearchI VPR 48
© Copyright 1998 Haim Levkowitz
Routing attacks ...
• normally: dynamic routing• instead: source routing (legit for tests)• use to bypass filter• or, pass through attacking location
• alteration, delay, denial• ICMP (Internet Control Message
Protocol) redirects
Institute for Visualization and Perception ResearchI VPR 49
© Copyright 1998 Haim Levkowitz
TCP/UDP layer ...
• Some of same problems as at IP layer• No guarantee of confidentiality• packet filtering• hijacking
• modify controls through "hijacked" privileges
• e.g., steal telnet session
Institute for Visualization and Perception ResearchI VPR 50
© Copyright 1998 Haim Levkowitz
Application layer ...
• Application gateways ...
• APIs ...
Institute for Visualization and Perception ResearchI VPR 51
© Copyright 1998 Haim Levkowitz
Application gateways ...
• firewalls at app layer
• mail (SMTP) gateway ...
• proxy ...
• server filter ...
Institute for Visualization and Perception ResearchI VPR 52
© Copyright 1998 Haim Levkowitz
mail (SMTP) gateway ...
• change headers of outgoing messages to hide internal topology
• e.g., [email protected] --> [email protected]
• deliver inbound messages correctly
Institute for Visualization and Perception ResearchI VPR 53
© Copyright 1998 Haim Levkowitz
proxy ...• w/ firewall• both server (to inside client) and client
(to outside server)• block inside from direct connection to
outside• single outbound access point ==>
• sophisticated logging & access control
Institute for Visualization and Perception ResearchI VPR 54
© Copyright 1998 Haim Levkowitz
server filter ...
• host sw
• filter access to own servers
• mini firewall: guard passage into local host
Institute for Visualization and Perception ResearchI VPR 55
© Copyright 1998 Haim Levkowitz
APIs ...
• portability
• transparency
• modularity
• compatibility
• supportability
• Longevity
Institute for Visualization and Perception ResearchI VPR 56
© Copyright 1998 Haim Levkowitz
Encryption and authentication ...
• Foundations of Internet security ...
• Data confidentiality and integrity ...
• Authentication
• Example systems
Institute for Visualization and Perception ResearchI VPR 57
© Copyright 1998 Haim Levkowitz
Data confidentiality and integrity ...
• Encryption, decryption, digital signatures ...
• Simple cryptosystem ...• Keys cryptosystems ...• One-way hash functions• Encryption and decryption
algorithms ...
Institute for Visualization and Perception ResearchI VPR 58
© Copyright 1998 Haim Levkowitz
Encryption, decryption, digital signatures ...
• Encryption
• Plaintext --> ciphertext
• Decryption
• Plaintext <-- ciphertext
• Digital signature
• authentication
Institute for Visualization and Perception ResearchI VPR 59
© Copyright 1998 Haim Levkowitz
Simple cryptosystem ...
• Caesar Cipher
• Simple substitution cipher
• ROT-13
• half alphabet ==> 2 x ==> plaintext
ABCDEFGHIJKLMNOPQRSTUVWXYZ
DEFGHIJKLMNOPQRSTUVWXYZABC
Institute for Visualization and Perception ResearchI VPR 60
© Copyright 1998 Haim Levkowitz
Keys cryptosystems …
• keys and keyspace ...
• secret-key and public-key ...
• key management ...
• strength of key systems ...
Institute for Visualization and Perception ResearchI VPR 61
© Copyright 1998 Haim Levkowitz
keys and keyspace …
• ROT: key is N
• Brute force: 25 values of N
• IDEA in PGP: 2 128 numeric keys
• 1 billion keys / sec ==> >10,781,000,000,000,000,000,000 years
Institute for Visualization and Perception ResearchI VPR 62
© Copyright 1998 Haim Levkowitz
secret-key and public-key ...
Institute for Visualization and Perception ResearchI VPR 63
© Copyright 1998 Haim Levkowitz
key management ...
• secret• agree on same / have diff
• public• really belong to alleged owner?
• centralized trust• CAs: certification authorities
• decentralized trust• trusted entity signs public key of
unknown
Institute for Visualization and Perception ResearchI VPR 64
© Copyright 1998 Haim Levkowitz
strength of key systems ...
• key secrecy
• no back door (trap door)
• resistance to attack
• brute force
• analytical …
Institute for Visualization and Perception ResearchI VPR 65
© Copyright 1998 Haim Levkowitz
Analytical ...
• cryptanalysts' attacks
• ciphertext-only
• known-plaintext
• chosen-plaintext
• adaptive-chosen-plaintext
• chosen-ciphertext
Institute for Visualization and Perception ResearchI VPR 66
© Copyright 1998 Haim Levkowitz
Encryption and decryption algorithms ...
• DES
• IDEA
• RC2 and RC4
• Diffie-Hellman
• RSA
• Skipjack and Clipper
Institute for Visualization and Perception ResearchI VPR 67
© Copyright 1998 Haim Levkowitz
Us cryptographic export restrictions
• 56-bit key max
Institute for Visualization and Perception ResearchI VPR 68
© Copyright 1998 Haim Levkowitz
Authentication ...
• Authentication techniques
• User-to-host authentication ...
• Host-to-host authentication ...
• User-to-user authentication
Institute for Visualization and Perception ResearchI VPR 69
© Copyright 1998 Haim Levkowitz
User-to-host authentication ...
• static passwords in cleartext
• static passwords with one-way hash
• One-time passwords
• Trusted third parties
Institute for Visualization and Perception ResearchI VPR 70
© Copyright 1998 Haim Levkowitz
Host-to-host authentication ...
• No authentication
• Disclosing passwords
• Digital signature and encryption
Institute for Visualization and Perception ResearchI VPR 71
© Copyright 1998 Haim Levkowitz
Example systems ...
Institute for Visualization and Perception ResearchI VPR 72
© Copyright 1998 Haim Levkowitz
Overview
• Encryption and authentication ...
• Communication and data-sharing applications ...
• Web security and firewalls ...
Institute for Visualization and Perception ResearchI VPR 73
© Copyright 1998 Haim Levkowitz
Communication and data-sharing applications ...
• Mail and news ...
• Virtual terminal services ...
• File sharing ...
• Example systems ...
Institute for Visualization and Perception ResearchI VPR 74
© Copyright 1998 Haim Levkowitz
Mail and news ...• Core application protocols ...
• sendmail ...
• Privacy Enhanced Mail (PEM) ...
• RIPEM ...
• Pretty Good Privacy (PGP) ...
• Anonymous remailers
• MIME
Institute for Visualization and Perception ResearchI VPR 75
© Copyright 1998 Haim Levkowitz
Core application protocols ...
• SMTP
• POP3
• IMAP4
• NNTP
Institute for Visualization and Perception ResearchI VPR 76
© Copyright 1998 Haim Levkowitz
sendmail ...
• DEBUG mode
• .forward files
• aliases database
• CERT advisories
Institute for Visualization and Perception ResearchI VPR 77
© Copyright 1998 Haim Levkowitz
Privacy Enhanced Mail (PEM) ...
• PEM message types
• Digital signatures
• Encryption
• Certificates and key management
Institute for Visualization and Perception ResearchI VPR 78
© Copyright 1998 Haim Levkowitz
RIPEM ...
• Generating a key pair
• Encrypting a message
• Decrypting a message
• Singing a cleartet message
• Verifying a signature
Institute for Visualization and Perception ResearchI VPR 79
© Copyright 1998 Haim Levkowitz
Pretty Good Privacy (PGP) ...
Institute for Visualization and Perception ResearchI VPR 80
© Copyright 1998 Haim Levkowitz
Virtual terminal services ...
• Virtual terminal operation
• Secure terminals
• Telnet
• BSD trusted host mechanism
• Server filters
• logdaemon
Institute for Visualization and Perception ResearchI VPR 81
© Copyright 1998 Haim Levkowitz
File sharing ...
• Trivial FTP (TFTP)
• FTP
• NFS
Institute for Visualization and Perception ResearchI VPR 82
© Copyright 1998 Haim Levkowitz
Example systems ...
• X Windows
Institute for Visualization and Perception ResearchI VPR 83
© Copyright 1998 Haim Levkowitz
Overview
• Encryption and authentication ...
• Communication and data-sharing applications ...
• Web security and firewalls ...
Institute for Visualization and Perception ResearchI VPR 84
© Copyright 1998 Haim Levkowitz
Web security and firewalls ...
• WWW security ...
• Network security issues ...
• SATAN
• Useful tools
Institute for Visualization and Perception ResearchI VPR 85
© Copyright 1998 Haim Levkowitz
WWW security ...
• Web model
• Browsers and servers
• NCSA httpd ...
• New directions in Web security ...
Institute for Visualization and Perception ResearchI VPR 86
© Copyright 1998 Haim Levkowitz
NCSA httpd ...
• Building the server
• Server configuration files
• Basic authentication
• Managing access control files
• httpd log files
• CGI programming
• CERT advisories
Institute for Visualization and Perception ResearchI VPR 87
© Copyright 1998 Haim Levkowitz
New directions in Web security ...
• Digest authentication
• S-HTTP
• SSL
Institute for Visualization and Perception ResearchI VPR 88
© Copyright 1998 Haim Levkowitz
Network security issues ...
• IP security option (IPSO)
• swIPe
• IPv4 and IPv6 security protocols
• SNMPv1 and SNMPv2
• Firwalls: Filters and Gateways
Institute for Visualization and Perception ResearchI VPR 89
© Copyright 1998 Haim Levkowitz
SATAN
Institute for Visualization and Perception ResearchI VPR 90
© Copyright 1998 Haim Levkowitz
Useful tools