7Overview Network Infrastructure The building blocks of a network basic network protocolsnetwork managementauthenticationroutingother random thingsswitches, hubsprintersrouters
8Overview Does this stuff matter? Absolutely - the network depends on theseBasic protocols - obviousnetwork management & allocationsimplify network design and machine deploymentAuthenticationaccess controlRoutingGetting from A to BOther stuffThe network RUNS on these
9OverviewImpactsAttacking protocols can allow for hijacking, spoofing and impersonationcontrol network deviceselevate accesschange network flowhide connectionssniffing…and more
10Basic Protocols Security at the IP layer discussed over and over Security at the link layer ignored
11ARP Address Resolution Protocol Used for mapping network IP addresses to physical (in the case of ethernet, MAC) interface addresses.Broadcast at the link layer.
12ARP Security Flaws Lack of Authentication Limited Table Entries ARP caches can be overpopulated and flushed
13ARP Authentication Flaws Lack of AuthenticationArp replies are typically accepted and cached without concern for origin when received.No method to distinguish between legitimate and illegitimate messages
14ARP Lack of Authentication Invalid ARP repliesWhen an ARP who-is is broadcast on the wire, anyone can reply and be mapped to the associated network address.Gratuitous ARP repliesARP replies without requests can be sent out and cached, diverting traffic from the compromised network address to the attacker.
15ARP Attacks Replace entries in arp caches for existing addresses Denial of ServiceReply to requests with compromised host adress as router or nameserver.Non-blind traffic hijackingExploitation of host-based trusts.
16ARP 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”
17DHCP Dynamic Host Configuration Protocol Popular amongst pc users for ease of installation and configurationUDP transportTo broadcast, from
18DHCP Security Problems UnauthenticatedAnyone can request an addressUndirectedAnyone can respondLimited ACL capabilitiesLimit addresses per mac
19DHCP Attacks Get all addresses Deregister hosts Denial Of Service Reply to requests with compromised host set as router or nameserverDeregister hostshijack ip’s, connections
20DHCP Fixes Authentication ISC is adding authentication in their 3.1 implementationOthers have implemented proprietary authentication mechanismsDon’t allow dynamic assignment of DNS servers or routersStatically define these
22RIP 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.
24RIP 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.
25RIP Authentication Flaws Lack of any authentication in RIPv1Cleartext Authentication recommended in RFC 2453 RIPv2 SpecificationsMD5 Key/KeyID Digest Based Authentication described in RFC 2082.
26RIP Attacks Forging RIP messages Spoofing source address and sending invalid routes, altering traffic flow.Traffic HijackingTraffic MonitoringRedirecting 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.
27RIP Solutions Disabling RIPv1 and using RIPv2 with MD5 authentication. Enabling MD5 based authentication for RIPv2Disabling RIP completely and using OSPF with MD5 authentication as interior gateway protocol. OSPF is the suggested IGP.
28OSPF 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.
30OSPF Authentication Flaws Default Lack of AuthenticationBy default in some implementations, OSPF authentication may be off.Cleartext "simple password" AuthenticationCommonly 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.
31OSPF Attacks Forging OSPF messages Can be somewhat difficult but theoretically possible if no authentication required or cleartext password obtained.
32OSPF SolutionEnable MD5 Authentication in OSPF implementation.
33Authentication Flaw Overview Authentication is a means for verification and granting of accessProblems range from denial of service to active and passive attacks leading to total compromisegain accesselevate access
35RADIUS Remote Authentication Dial In User Service RFC 2138 & 2139 Used to authenticate usersOff-machine/device authenticationCentral authentication server called a NASPopular implementations from Livingston and Merit
36Radius Security Model UDP Based transport Each packet contains an authenticatorAccess-Requestsmd5(secret + authenticator) ^ user passwordAccess-Reject & Access-Acceptmd5(Code + ID + Length + Request-Auth + Attributes + Secret)
37Radius Flaws Gaining the shared secret Send Access-Request with all known valuesAuthenticator = 0User Name/Password = knownCode = Access-Request (1)ID = 0, length = knownReply will come back with the followingmd5( length user name attr + user pass attr + Secret)Dictionary attack for Secretradbrute.tar.gz
38Radius Flaws... Passive attack Knowledge of a user password will allow attack if sniffing is possibleRequest-Access uses user password + authenticator + shared secretmd5(authenticator + shared secret) ^ user passobtain md5 by ^ userpassbrute force dictionary attack with known authenticator
39Radius 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-AcceptFailure limits and logging limit the effectivityPredictable authenticatorIf authenticator can be predicted, replay attacks become easier and more effective
40TACACS, XTACACS and TACACS+ Terminal Access Controller Access Control System??Old protocol developed by BBN for MilnetSimilar in concept to RADIUSCentral authentication server moves authentication off device or hostRFC 1492, Internet Draft “The TACACS+ Protocol”
41TACACS, etc Flaws TACACS & XTACACS UDP Transport spoof RESPONSE messages from server triviallyCleartext authentication normalUser names and password sent exposedMD5 in newer implementationsGood way to crack passwords onlineEasy, fast way to grind for accounts with bad passwords
42TACACS+ TCP Transport Authentication and Encryption Doesn’t suffer from easy spoofing; may be hijackableAuthentication and EncryptionMay be possible to conduct attacks similar to RADIUSDefaults and failure modes may pose problemstacacs-server last-resort succeed
43TACACS+ ... Authentication Encryption No integrity checking Vulnerable to replayEncryptionHeavy dependence on session id’smay be easy to force collisiontoo smallLack of padding in critical places
44NIS and NIS+ Network Information Service Originally from Sun Popular scheme for distributing password, name service, etcRPC based transport
45NIS and NIS+ Flaws NIS transports in plaintext NIS is only protected by a domainnameeasily guessedMany vulnerabilities in implementationsquick search for NIS and NIS+ vulnerabilities resulted in over a dozen individual problemsNIS+ is sufficiently complex to install that no one uses it
46NIS and NIS+ Solutions Run NIS+ if at all possible Investigate alternatives like LDAP
47LDAP Lightweight Directory Access Protocol Operates on distinguished name (DN) and attribute pairs or collections
48LDAP Flaws New and relatively untested Unfamiliar Default ACL’s are typically poorAuthentication mechanisms still not fully implementedCA based authentication still only part thereDoS attacksFlood with requests
49Network Management and Other Fun Flaws SNMPprinters
50SNMP Simple Network Management Protocol The most popular network management protocolHosts, firewalls, routers, switches…UPS, power strips, ATM cards -- ubiquitous“One of the single biggest security nightmares on networks today”
51SNMPv1 Security Flaws Transport Mechanism Authentication Data manipulationDenial of ServiceReplayAuthenticationHost BasedCommunity BasedInformation Disclosure
52SNMP Transport Mechanism Flaws UDP BasedUnreliable - packets may or may not be receivedEasily forged - trivial to forge source of packets
53SNMP Authentication Flaws Host BasedFails due to UDP transportDNS cache poisoningCommunity BasedCleartext communityCommunity name prediction/brute forcingDefault communities
54SNMP Popular Defaults Popular defaults public private write “all private”monitormanagersecurityadminlandefaultpasswordtivoliopenviewcommunitysnmpsnmpdsystemand on and on...
55SNMPv1 Information Disclosure Routing tablesNetwork topologyNetwork traffic patternsFilter rules
56RMON and RMON2 Security SNMPv1’s flaws additional hazards by introducing “action invocation” objectscollects extensive info on subnetpacket captures
58Printers Flaws Actually a very large potential problem Laundering of hacking spoilsbounce attacksDenial of service
59Printer flaws... Many printers have FTP servers Allow anonymous access store as much data as memory or disk space in the printer - great place to store hacking tools, sniffer logs, and other stolen thingsMost are poor implementationseasily used in more complex attacksftp bounceBerkeley lpd flaws
60Printer flaws... Denial of Service Used as a tool to conduct DoS most love to respond to broadcast pingssmurfService deniedpoor tcp/ip implementationscrash easilypoor service implementationSNMPftp
62Example applications Defeat sniffing Race hosts on ARP replies reply to ARP’s with broadcast addressoverpopulate cachessome switches will flush their cachesalter routing on the host you want to sniff
63Examples Defeating things like SSH Gaining router access Alter routing Create SSH proxyClient will note key mismatch, but who ever pays attention?Gaining router accessObtain auth protocol key via brute forceExtract passwords on the wireJust plain old sniff
64What to do? Maintain good perimeter defenses At least you only have to trust your employees…Use cryptographically secure transportsCrypto is goodBut crypto fails without good policyDisable unneeded servicesNot using SNMP?
65What to do... Disable things like routed on hosts 99% of the time, static routes work fine on end machinesUse the strongest authentication methods possibleLong keys, strong crypto