34
Security in Layers and Attack mitigation 1

Security in Layers and Attack mitigation · Sysadmins 6. Layers of Protection •Firewalls ... • Users make mistakes • They click on things they shouldn’t ... common and most

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Security in Layers and Attack mitigation · Sysadmins 6. Layers of Protection •Firewalls ... • Users make mistakes • They click on things they shouldn’t ... common and most

SecurityinLayersandAttackmitigation

1

Page 2: Security in Layers and Attack mitigation · Sysadmins 6. Layers of Protection •Firewalls ... • Users make mistakes • They click on things they shouldn’t ... common and most

Vulnerabilities

• Aflaworweaknessinasystem'sdesign,implementation,oroperationandmanagementthatcouldbeexploitedtoviolatethesystem'ssecuritypolicy.

2

Page 3: Security in Layers and Attack mitigation · Sysadmins 6. Layers of Protection •Firewalls ... • Users make mistakes • They click on things they shouldn’t ... common and most

Botnet

Command&Control

botnet

3

Page 4: Security in Layers and Attack mitigation · Sysadmins 6. Layers of Protection •Firewalls ... • Users make mistakes • They click on things they shouldn’t ... common and most

UnevenPlayingField

• Thedefenderhastothinkabouttheentireperimeter,alltheweakness

• Theattackerhastofindonlyoneweakness

• Thisisnotgoodnewsfordefenders

4

Page 5: Security in Layers and Attack mitigation · Sysadmins 6. Layers of Protection •Firewalls ... • Users make mistakes • They click on things they shouldn’t ... common and most

AttackSurface

• EntirePerimeteryouhavetoDefend

Web ServerDNS

SMTP

Power Fiber

Application

Firewall

5

Page 6: Security in Layers and Attack mitigation · Sysadmins 6. Layers of Protection •Firewalls ... • Users make mistakes • They click on things they shouldn’t ... common and most

SoftGooeyInside

• Butitisnotjusttheperimeter!

Web ServerDNS

SMTP

Power Fiber

Application

Firewall

USB SticksFishing

SpearfishingPasswords

Ex-EmployeesSysadmins

6

Page 7: Security in Layers and Attack mitigation · Sysadmins 6. Layers of Protection •Firewalls ... • Users make mistakes • They click on things they shouldn’t ... common and most

LayersofProtection

• Firewalls(thoughtherearelaptopsontheinside)• IntrusionDetectionSystems• LoggingSystemsandAnalysis• ProtectingtheFirewalls,IDSs,andLoggingSystems

• Andwhatdoyouhave?

7

Page 8: Security in Layers and Attack mitigation · Sysadmins 6. Layers of Protection •Firewalls ... • Users make mistakes • They click on things they shouldn’t ... common and most

AMuchBiggerAttackSurface

• USDoDdatashowsonaverage1/3ofvulnerabilitiesingovernmentsystemsareinthesecuritysoftware

8

Page 9: Security in Layers and Attack mitigation · Sysadmins 6. Layers of Protection •Firewalls ... • Users make mistakes • They click on things they shouldn’t ... common and most

It’stheSoftware!

• “Insteadoffocusingontheimpactofthehacks,weshoulddigforthereasonsthesesystemsweresovulnerableinthefirstplace.Almostwithoutfail,therootcauseisbadsoftware.”-- GaryMcGraw

• ButWeHavetoDefendtheEntireAttackSurface

9

Page 10: Security in Layers and Attack mitigation · Sysadmins 6. Layers of Protection •Firewalls ... • Users make mistakes • They click on things they shouldn’t ... common and most

NetworkInfrastructure

• Routers(androutingprotocols)

• Switchesandothernetworkelements

• InfrastructureServices:DNS,DHCP,LDAP,Microsoftstuff

10

Page 11: Security in Layers and Attack mitigation · Sysadmins 6. Layers of Protection •Firewalls ... • Users make mistakes • They click on things they shouldn’t ... common and most

Links

• Primaryriskiswiretapping• Easilydefeatedbyencryption—butarepeople

usingit?• Mostencryptiondoesn’tprotectagainsttraffic

analysis—butthatisn’tineveryone’sthreatmodel

• Link-layerencryptionprotectsagainstmosttrafficanalysis,butithastobedoneoneveryvulnerablelink

11

Page 12: Security in Layers and Attack mitigation · Sysadmins 6. Layers of Protection •Firewalls ... • Users make mistakes • They click on things they shouldn’t ... common and most

CryptoisnottheWeakness

• Commonly,theencryptiontechnologyisfineandisnotbroken

• Aslongasyouhavenotinventedyourown• TheweaknessisOpSec,OperationalSecurity

Practices• KeyManagement• WeakKeysandAntiqueCryptoAlgorithms• SendingCleartext

12

Page 13: Security in Layers and Attack mitigation · Sysadmins 6. Layers of Protection •Firewalls ... • Users make mistakes • They click on things they shouldn’t ... common and most

TrafficAnalysis

• Looksatexternalcharacteristicsoftraffic:whotalkstowhom,sizeofmessages,etc.

• Veryvaluabletointelligenceagencies,police,etc.• Whoworkswithwhom?Whogivesordersto

whom?• Notgenerallyusefulforordinarythieves,though

sophisticatedattackerscoulduseittofindtargets

13

Page 14: Security in Layers and Attack mitigation · Sysadmins 6. Layers of Protection •Firewalls ... • Users make mistakes • They click on things they shouldn’t ... common and most

Solutions

• UseVPNsorapplication-levelencryption• Uselinkencryptionforhigh-risklinks(e.g.,WiFi)• Alsouselinkencryptionforaccesscontrol

(especiallyWiFi)• Don’tworryabouttrafficanalysis—unlessyour

enemyisanintelligenceagency.Ofcourseitis!

14

Page 15: Security in Layers and Attack mitigation · Sysadmins 6. Layers of Protection •Firewalls ... • Users make mistakes • They click on things they shouldn’t ... common and most

(IsWiFi Safe?)

• Insideanorganization,WiFi+WPA2Enterpriseisgenerallysafeenoughwithoutfurthercrypto• However,it’shardertotraceaninfectedhostthat’s

doingaddress-spoofing

• ForexternalWiFi,alwaysusecryptoabovethelink,preferablyVPNs• Makesureyoudomutualauthentication

• ThereissomeresidualriskifyourVPNdoesn’tdropunencryptedinboundtraffic

15

Page 16: Security in Layers and Attack mitigation · Sysadmins 6. Layers of Protection •Firewalls ... • Users make mistakes • They click on things they shouldn’t ... common and most

SwitchesandtheLike

• Compromisedswitchescanbeusedforeavesdropping

• Specialriskinsomesituations:reconfiguredVLANs• VLANsprovidegoodtrafficseparationbetweenuser

groups• EspeciallyusefulagainstARP- andMAC-spoofing

attackers

• Otherdangerpoint:themonitoringport

16

Page 17: Security in Layers and Attack mitigation · Sysadmins 6. Layers of Protection •Firewalls ... • Users make mistakes • They click on things they shouldn’t ... common and most

ARPandMACSpoofing

• ARPmapstheIPaddressdesiredtoaMACaddress

• SwitcheslearnwhatMACaddressesareonwhatports,androutetrafficaccordingly

• IfamalicioushostsendsouttrafficwiththewrongMACaddress,theswitchwillsendtraffictoit

• IfamalicioushostrepliestoanARPqueryforsomeothermachine,themalicioushostwillreceivethetraffic,butthismightbenoticed

17

Page 18: Security in Layers and Attack mitigation · Sysadmins 6. Layers of Protection •Firewalls ... • Users make mistakes • They click on things they shouldn’t ... common and most

Address-SpoofingHappens

• Afewyearsago,someonespoofedtheIPandMACaddressesofauniversity’sFTPserver

• TheattackingmachinewasinanotherbuildingbutonthesameVLAN

• NoonehadnoticedtheintermittentfailuresoftheFTPservice

• Themachinehadbeenpenetrated6monthsearlier....

• SwitchesshouldlogMACandIPaddresseschanges,andkeepthoselogsforalongtime

18

Page 19: Security in Layers and Attack mitigation · Sysadmins 6. Layers of Protection •Firewalls ... • Users make mistakes • They click on things they shouldn’t ... common and most

Defenses

• Hardenswitchaccess• ACLs• ssh-onlyaccess,andonlyusingpublic/privatekeypairs;

nopasswords

• Separatesegments

19

Page 20: Security in Layers and Attack mitigation · Sysadmins 6. Layers of Protection •Firewalls ... • Users make mistakes • They click on things they shouldn’t ... common and most

Routers

• Routerscanbeusedforthesamesortsofattacksasswitches

• Becauseroutersinherentlyseparatedifferentnetworks,theyalwaysdefendagainstcertainkindsofaddressspoofing• Thismakesthemtargets

• Worseyet,routerscanlaunchroutingprotocolattacks

20

Page 21: Security in Layers and Attack mitigation · Sysadmins 6. Layers of Protection •Firewalls ... • Users make mistakes • They click on things they shouldn’t ... common and most

RoutingProtocolAttacks:Effects

• Trafficisdiverted• Attackercanseethetrafficanddotrafficanalysis• Attackercanmodifypackets• Attackercandroppackets• Attackercanhijackprefixes

• End-to-endcryptocanprotectthepackets’contents,butcan’tstoptrafficanalysisordenialofservice

21

Page 22: Security in Layers and Attack mitigation · Sysadmins 6. Layers of Protection •Firewalls ... • Users make mistakes • They click on things they shouldn’t ... common and most

WhyisRoutingSecurityDifferent?

• Mostsecurityfailuresareduetobuggycode,buggyprotocols,orbuggysysadmins

• Routingsecurityproblemshappenwheneverythingisworkingright,butsomepartydecidestolie.Theproblemisadishonestparticipant

• Mostrouterscanlieviaanyroutingprotocolsthey’reusing

22

Page 23: Security in Layers and Attack mitigation · Sysadmins 6. Layers of Protection •Firewalls ... • Users make mistakes • They click on things they shouldn’t ... common and most

DefendingAgainstRoutingAttacks

• Mustknowauthoritativeownerofprefixes• Generallydonewithacertificatesignedbythe

addressspaceowner• BeingrolledouttodayasRPKI• Allroutingannouncementsmustbedigitally

signed• Eachrouterneedsaroute-signingcertificate• Allsignaturesmustbeoverthefullpath;

signaturesarethusnested• IntheIETFprocessasBGPSEC

23

Page 24: Security in Layers and Attack mitigation · Sysadmins 6. Layers of Protection •Firewalls ... • Users make mistakes • They click on things they shouldn’t ... common and most

NetworkServices

• Certaincoreservicesareubiquitous—andfrequentlyattacked• DNS• DHCP• SMTP• Assortedlocalservices:fileservers,printers,LDAP,and

more

• Thesearethemeans,notthegoalsoftheattackers

24

Page 25: Security in Layers and Attack mitigation · Sysadmins 6. Layers of Protection •Firewalls ... • Users make mistakes • They click on things they shouldn’t ... common and most

DNS

• DNSresponsesareeasilyspoofedbyattackers• Cachecontamination• QueryIDguessing• DeliberatetinkeringbyISPs,nation-states,hotels,etc.

• Becauseresponsesarecached,client/serverauthenticationcan’tsolveit.

• Musthavedigitallysignedrecords(DNSSEC)

25

Page 26: Security in Layers and Attack mitigation · Sysadmins 6. Layers of Protection •Firewalls ... • Users make mistakes • They click on things they shouldn’t ... common and most

SMTP

• Historically,amajorattacktarget;principleimplementationswereverybuggy

• Today,thebigproblemisspam;mustkeepattackersfromspamming/fishingyourusers,andfromusingyoutospreadspam

• Spearfishingisthemajorpenetration• Secondaryissue:separateinsideandoutside

emailsystems—insideemailoftenhassensitiveinformation

26

Page 27: Security in Layers and Attack mitigation · Sysadmins 6. Layers of Protection •Firewalls ... • Users make mistakes • They click on things they shouldn’t ... common and most

EncryptedEmail

• Emailmessagesthemselvescanbeencrypted:usefulforend-to-endsecurity• ButS/MIMEandPGParehardtouse,andtheir

absencewillnotbenoticed

• SMTPcanbeencrypted,too• Notthatcrucialforsite-to-siterelaying(but

eavesdroppersdoexist);veryimportantforauthenticatedemailsubmission

• Yourusersmustauthenticatesomehow—viaIPaddressifinside;viacredentialsifroaming—beforesendingmailthroughyouroutboundSMTPserver

27

Page 28: Security in Layers and Attack mitigation · Sysadmins 6. Layers of Protection •Firewalls ... • Users make mistakes • They click on things they shouldn’t ... common and most

LocalServices

• RarelydirectlyaccessiblefromtheInternet;(ab)usedafterinitialpenetration• Virusspreading• Filecontents,intargetedattacks• Privilegeescalation

• Quiteoftenbuggy,butthere’slittlechoiceaboutrunningthem;they’renecessaryforscalabilityandproductivity

28

Page 29: Security in Layers and Attack mitigation · Sysadmins 6. Layers of Protection •Firewalls ... • Users make mistakes • They click on things they shouldn’t ... common and most

ApplicationServices

• Datacenter-resident:deliverservicestotheoutsideworld

• Obviousexample:HTTP

• But—HTTPisgenerallyafrontendforavitaldatabase

• Aprimetarget

29

Page 30: Security in Layers and Attack mitigation · Sysadmins 6. Layers of Protection •Firewalls ... • Users make mistakes • They click on things they shouldn’t ... common and most

TargetingApplicationServices

• Generallyexposedtotheoutside—andyoucan’tfirewallthem,becausetheymustbeexposedtotheoutside

• Theservercanbeusedforthebadguys’content:phishingservers,“warez” sites,more

• Thedatabaseoftenholdsveryvaluableinformation,likecreditcards

• Thereareusuallyconnectionsfromtheseserversbackintothecorporation

30

Page 31: Security in Layers and Attack mitigation · Sysadmins 6. Layers of Protection •Firewalls ... • Users make mistakes • They click on things they shouldn’t ... common and most

UserMachines

• Ordinarydesktopsaretargets,too• Plantkeystrokeloggerstostealpasswords,especiallyforfinancialsites• Turnintobots—bandwidthiswhatmatters• Turnintospam/spearfishingengines;usemachine’sprivileges(generallybasedonnetworklocation)tosendoutspamthroughtheauthorizedSMTPserver

31

Page 32: Security in Layers and Attack mitigation · Sysadmins 6. Layers of Protection •Firewalls ... • Users make mistakes • They click on things they shouldn’t ... common and most

Users

• Usersmakemistakes• Theyclickonthingstheyshouldn’t• Theyvisitdangeroussites• Theymistakephishingemailsfortherealthing• Theydon’tkeeptheirsystemsuptodate• “PEBCAK”:ProblemExistsBetweenChairandKeyboard

• (It’snoteventheirfault;oursystemsarehorriblydesigned)

32

Page 33: Security in Layers and Attack mitigation · Sysadmins 6. Layers of Protection •Firewalls ... • Users make mistakes • They click on things they shouldn’t ... common and most

SocialEngineering

• Phishingandother‘clickbait’arethemostcommonandmostdangerousformsofSocialEngineering

• ClickononebadURLandyourcomputerisinfected

• ‘Spearphishing’iswhenphishingemailseemstocomefromsomeoneyouknow

• WhenmywifesendsaURLorattachesafile,IaskinSignalorSkypeifitisreal

33

Page 34: Security in Layers and Attack mitigation · Sysadmins 6. Layers of Protection •Firewalls ... • Users make mistakes • They click on things they shouldn’t ... common and most

SocialEngineering

• Trytotrickpeopleintodoingthingstheyshouldn’t

• Peoplewanttohelp• Walkinthedoordressedasadeliveryorrepairperson• Callandsoundlikeaninsider:“Chris,couldyoureset

mypasswordonserver#3inrack7?ItsconnectiontotheRADIUSserverishung.”

• Averydifferentskillthanpurelytechnicalstuff—butveryusefultoo

34