670 likes | 966 Views
Network Infrastructure Insecurity. The authentication, management and routing protocols that run your network . Topics. Overview Basic protocol flaws Network allocation flaws Routing protocol flaws Authentication flaws Network Management and other fun flaws Application of attacks. DMZ.
E N D
Network Infrastructure Insecurity The authentication, management and routing protocols that run your network
Topics • Overview • Basic protocol flaws • Network allocation flaws • Routing protocol flaws • Authentication flaws • Network Management and other fun flaws • Application of attacks
DMZ Firewall Switch Router Internet Hub Printer Radius Server Host Host Host Host Host The Network
DMZ Switch Router Hub Printer Radius Server Host Host Host Host Host The Network
Switch Router Hub Printer Radius Server Host Host Host Host Host The Network
Switch Router Hub Printer Radius Server The Network
Overview • Network Infrastructure • The building blocks of a network • basic network protocols • network management • authentication • routing • other random things • switches, hubs • printers • routers
Overview • Does this stuff matter? • Absolutely - the network depends on these • Basic protocols - obvious • network management & allocation • simplify network design and machine deployment • Authentication • access control • Routing • Getting from A to B • Other stuff • The network RUNS on these
Overview • Impacts • Attacking protocols can allow for hijacking, spoofing and impersonation • control network devices • elevate access • change network flow • hide connections • sniffing • …and more
Basic Protocols • Security at the IP layer discussed over and over • Security at the link layer ignored
ARP • Address Resolution Protocol • Used for mapping network IP addresses to physical (in the case of ethernet, MAC) interface addresses. • Broadcast at the link layer.
ARP Security Flaws • Lack of Authentication • Limited Table Entries • ARP caches can be overpopulated and flushed
ARP Authentication Flaws • Lack of Authentication • Arp replies are typically accepted and cached without concern for origin when received. • No method to distinguish between legitimate and illegitimate messages
ARP Lack of Authentication • Invalid ARP replies • When an ARP who-is is broadcast on the wire, anyone can reply and be mapped to the associated network address. • Gratuitous ARP replies • ARP replies without requests can be sent out and cached, diverting traffic from the compromised network address to the attacker.
ARP Attacks • Replace entries in arp caches for existing addresses • Denial of Service • Reply to requests with compromised host adress as router or nameserver. • Non-blind traffic hijacking • Exploitation of host-based trusts.
ARP Attacks • ARP Cache Overpopulation • Sending too many gratuitous ARP replies flushing the target ARP cache in some implementations. • Reach cache maximum, can cause devices like switches to re-enter “learning mode”
DHCP • Dynamic Host Configuration Protocol • Popular amongst pc users for ease of installation and configuration • UDP transport • To broadcast, from 0.0.0.0
DHCP Security Problems • Unauthenticated • Anyone can request an address • Undirected • Anyone can respond • Limited ACL capabilities • Limit addresses per mac
DHCP Attacks • Get all addresses • Denial Of Service • Reply to requests with compromised host set as router or nameserver • Deregister hosts • hijack ip’s, connections
DHCP Fixes • Authentication • ISC is adding authentication in their 3.1 implementation • Others have implemented proprietary authentication mechanisms • Don’t allow dynamic assignment of DNS servers or routers • Statically define these
Gateway Protocols • IGP • RIPv1 • RIPv2 • OSPF
RIP • Routing Information Protocol • Widely used distance-vector IGP (Interior Gateway Protocol) within autonomous systems. • Exists in two forms, Version 1 and the backwards compatible Version 2. • RIPv1 is extremely vulnerable to serious attack.
RIP Security Flaws • Transport Method • Authentication
RIP Transport Method Flaws • Based on UDP, utilizing port 520 for sending and receiving messages. • UDP is unreliable, no sequencing of packets. Easy to send arbitrary data to target . • Since sequencing is not a concern, forging source address can be very effective. • May be able to receive data from anywhere on the internet.
RIP Authentication Flaws • Lack of any authentication in RIPv1 • Cleartext Authentication recommended in RFC 2453 RIPv2 Specifications • MD5 Key/KeyID Digest Based Authentication described in RFC 2082.
RIP Attacks • Forging RIP messages • Spoofing source address and sending invalid routes, altering traffic flow. • Traffic Hijacking • Traffic Monitoring • Redirecting traffic from trusted to untrusted. • Obtaining Cleartext RIPv2 "password" when sent across network. • Using retrieved password to send authenticated updates to RIPv2 routers, altering traffic flow with consequences listed above.
RIP Solutions • Disabling RIPv1 and using RIPv2 with MD5 authentication. • Enabling MD5 based authentication for RIPv2 • Disabling RIP completely and using OSPF with MD5 authentication as interior gateway protocol. OSPF is the suggested IGP.
OSPF • OSPF - Open Shortest Path First • Link-State Interior Gateway Protocol. In wide use within autonomous systems. • OSPF is the recommended IGP, intended as a replacement for RIP.
OSPF Security Flaws • Authentication
OSPF Authentication Flaws • Default Lack of Authentication • By default in some implementations, OSPF authentication may be off. • Cleartext "simple password" Authentication • Commonly a default setting, clear-text password included in OSPF message used to authenticate peers. • Type of authentication determined by "CODE" field in the OSPF message header.
OSPF Attacks • Forging OSPF messages • Can be somewhat difficult but theoretically possible if no authentication required or cleartext password obtained.
OSPF Solution • Enable MD5 Authentication in OSPF implementation.
Authentication Flaw Overview • Authentication is a means for verification and granting of access • Problems range from denial of service to active and passive attacks leading to total compromise • gain access • elevate access
Authentication Mechanisms • Radius • TACACS, XTACACS, TACACS+ • NIS/NIS+ • LDAP
RADIUS • Remote Authentication Dial In User Service • RFC 2138 & 2139 • Used to authenticate users • Off-machine/device authentication • Central authentication server called a NAS • Popular implementations from Livingston and Merit
Radius Security Model • UDP Based transport • Each packet contains an authenticator • Access-Requests • md5(secret + authenticator) ^ user password • Access-Reject & Access-Accept • md5(Code + ID + Length + Request-Auth + Attributes + Secret)
Radius Flaws • Gaining the shared secret • Send Access-Request with all known values • Authenticator = 0 • User Name/Password = known • Code = Access-Request (1) • ID = 0, length = known • Reply will come back with the following • md5(1 + 0 + length + 0 + user name attr + user pass attr + Secret) • Dictionary attack for Secret • radbrute.tar.gz
Radius Flaws... • Passive attack • Knowledge of a user password will allow attack if sniffing is possible • Request-Access uses user password + authenticator + shared secret • md5(authenticator + shared secret) ^ user pass • obtain md5 by ^ userpass • brute force dictionary attack with known authenticator
Radius Flaws... • Replay • Radius servers must not reuse authenticator • if authenticator isn’t cryptographically random, repeat authentications until an authenticator is reused, and replay server Request-Accept • Failure limits and logging limit the effectivity • Predictable authenticator • If authenticator can be predicted, replay attacks become easier and more effective
TACACS, XTACACS and TACACS+ • Terminal Access Controller Access Control System?? • Old protocol developed by BBN for Milnet • Similar in concept to RADIUS • Central authentication server moves authentication off device or host • RFC 1492, Internet Draft “The TACACS+ Protocol”
TACACS, etc Flaws • TACACS & XTACACS • UDP Transport • spoof RESPONSE messages from server trivially • Cleartext authentication normal • User names and password sent exposed • MD5 in newer implementations • Good way to crack passwords online • Easy, fast way to grind for accounts with bad passwords
TACACS+ • TCP Transport • Doesn’t suffer from easy spoofing; may be hijackable • Authentication and Encryption • May be possible to conduct attacks similar to RADIUS • Defaults and failure modes may pose problems • tacacs-server last-resort succeed
TACACS+ ... • Authentication • No integrity checking • Vulnerable to replay • Encryption • Heavy dependence on session id’s • may be easy to force collision • too small • Lack of padding in critical places
NIS and NIS+ • Network Information Service • Originally from Sun • Popular scheme for distributing password, name service, etc • RPC based transport
NIS and NIS+ Flaws • NIS transports in plaintext • NIS is only protected by a domainname • easily guessed • Many vulnerabilities in implementations • quick search for NIS and NIS+ vulnerabilities resulted in over a dozen individual problems • NIS+ is sufficiently complex to install that no one uses it
NIS and NIS+ Solutions • Run NIS+ if at all possible • Investigate alternatives like LDAP
LDAP • Lightweight Directory Access Protocol • Operates on distinguished name (DN) and attribute pairs or collections
LDAP Flaws • New and relatively untested • Unfamiliar • Default ACL’s are typically poor • Authentication mechanisms still not fully implemented • CA based authentication still only part there • DoS attacks • Flood with requests
Network Management and Other Fun Flaws • SNMP • printers
SNMP • Simple Network Management Protocol • The most popular network management protocol • Hosts, firewalls, routers, switches…UPS, power strips, ATM cards -- ubiquitous • “One of the single biggest security nightmares on networks today”