If a server screams in a forest DMZ! How machine hardening ... Kennefick - Machine Hardening -...

23
If a server screams in a forest DMZ! How machine hardening can made the difference.

Transcript of If a server screams in a forest DMZ! How machine hardening ... Kennefick - Machine Hardening -...

Page 1: If a server screams in a forest DMZ! How machine hardening ... Kennefick - Machine Hardening - Tactical Edge.pdf•File and Directory Protec4on – Through the use of Access Control

IfaserverscreamsinaforestDMZ!

Howmachinehardeningcanmadethedifference.

Page 2: If a server screams in a forest DMZ! How machine hardening ... Kennefick - Machine Hardening - Tactical Edge.pdf•File and Directory Protec4on – Through the use of Access Control

Contents

•  WhoamI?•  WhatdoIdo?

•  Whatismachinehardening?Canithelp?

•  VulnerabiliBesonthehostlayer•  CanIbackthisupwithstats?•  Tools,resources

Page 3: If a server screams in a forest DMZ! How machine hardening ... Kennefick - Machine Hardening - Tactical Edge.pdf•File and Directory Protec4on – Through the use of Access Control

WhoamI–DavidKennefickPresentConsultantwithedgescan™www.edgescan.com

PastCurrent–full-stackpentesBng,GRC&integraBonforclientsBank–workedinabankdoingAMLstuffStudent–DesignedtoolsfordyslexicstudentsSomethingsomethingagile….

OWASPMember

Fullstacksecurity&ApplicaBondeveloper:4.5Years

Page 4: If a server screams in a forest DMZ! How machine hardening ... Kennefick - Machine Hardening - Tactical Edge.pdf•File and Directory Protec4on – Through the use of Access Control

Reasonsforhardening

•  Increasingsecurity•  Increaseperformance•  Decreasethelikelihoodofmachinebeingexploited.

•  Passsecurityaudits

•  Byhardeningwearesimplyreducingthescopefora\ackbydecreasingthepotenBala\ackpoints.

Page 5: If a server screams in a forest DMZ! How machine hardening ... Kennefick - Machine Hardening - Tactical Edge.pdf•File and Directory Protec4on – Through the use of Access Control

Vulnerabili4esonthehostlayer

•  Likelihoodofavulnerabilityonthehostlayeranditscause.

*Statsfromtheedgescan2015Vulnerabilitystatsreport–November2015

Page 6: If a server screams in a forest DMZ! How machine hardening ... Kennefick - Machine Hardening - Tactical Edge.pdf•File and Directory Protec4on – Through the use of Access Control

Whatarewehardening?Isitimportant

•  OS•  Network•  ApplicaBons•  Whatelse?– Wordpress– drupal

Page 7: If a server screams in a forest DMZ! How machine hardening ... Kennefick - Machine Hardening - Tactical Edge.pdf•File and Directory Protec4on – Through the use of Access Control

OSHardening

•  Aim– Systemisconfiguredtolimitthepossibilityofeitherinternalorexternala\ack.

•  How– WhilethemethodsforhardeningvaryfromoneoperaBngsystemtoanothertheconceptsinvolvedarelargelysimilarregardlessofwhetherWindows,UNIX,Linux,MacOSXoranyothersystemisbeingbaselined.

Page 8: If a server screams in a forest DMZ! How machine hardening ... Kennefick - Machine Hardening - Tactical Edge.pdf•File and Directory Protec4on – Through the use of Access Control

•  DisableNon-essen4alservices–  ShouldprodhaveSSHenabled?–  Shouldamailserverhavethedefault80+443open?

•  UpdatevendorsuppliedPatchesandFixes(SecurityUpdates)

•  PasswordManagement–  Expiringpasswordsonnon-machineaccounts.

–  Enforcingtheregularchangingofpasswords–  Disablingofuseraccountsaherrepeatedfailedlogina\empts,audit

policiesenabled

•  Removeunnecessaryaccounts–  Guest,unusedandunnecessaryuseraccounts–  WhenemployeesleaveanorganizaBon

Page 9: If a server screams in a forest DMZ! How machine hardening ... Kennefick - Machine Hardening - Tactical Edge.pdf•File and Directory Protec4on – Through the use of Access Control

•  FileandDirectoryProtec4on–ThroughtheuseofAccessControlLists(ACLs)andfilepermissions.

•  Usergroupsandassocia4ons– Ausershouldn’thavepermissionstheydon’tneed.–  Backupusers,performancelogusers,admin,authenBcatedusers

•  FileandFileSystemEncryp4on–– AlldiskparBBonsareforma\edwithafilesystemtypewithencrypBonfeatures(NTFSinthecaseofWindows)

•  EnableLogging-OperaBngsystemisconfiguredtologallacBvity,errorsandwarnings.

•  FileSharing-Disableanyunnecessaryfilesharing,limitSMBsharing.Disableplaintextandanonymouslogin.

Page 10: If a server screams in a forest DMZ! How machine hardening ... Kennefick - Machine Hardening - Tactical Edge.pdf•File and Directory Protec4on – Through the use of Access Control

NetworkHardening

•  Upda4ngSoNwareandHardware–  Thisneverstops.–  Allnetworkingsohwaretogetherwiththefirmwareinroutersareupdated

withthelatestvendorsuppliedpatchesandfixes.Thisshouldbedonefromthefirstuse.

•  PasswordProtec4on–  Routersandwirelessshouldbeprotectedwithstrongpasswordsusingat

leastWPA2-PSK(AES).Mostwirelessshouldbedisabledorremovedifpossible.

•  DisableandremoveunnecessaryProtocolsandServices––  Forexample,onmostserversusingSSLv2issBllpossible.Allversionsof

SSL/TLSshouldbedisabledexceptforTLSv1.2–  ThiswillbeaPCIrequirementfromJune2016.

Page 11: If a server screams in a forest DMZ! How machine hardening ... Kennefick - Machine Hardening - Tactical Edge.pdf•File and Directory Protec4on – Through the use of Access Control

•  Ports–  Unnecessaryportsblockedbyafirewallandassociatedservices

disabledonanyhostswithinthenetwork,Someportsworthopening,3389and5405,5421.

–  Forexample,anetworkinwhichnoneofthehostsactsasawebserverdoesnotneedtoallowtrafficforport80or443topassthroughthefirewall

•  RestrictedNetworkAccess–  Thereshouldbeafirewallbetweenthenetworkandtheinternet.In

thecaseoflargeorganisationstheremaybeLAN,DMZandinnerDMZ,sotheremaybemanylayersoffirewalls.

–  OtheropBonsincludetheuseofNetworkAddressTranslaBon(NAT)andaccesscontrollists(ACLs).

–  AuthorizedremoteaccessshouldbeenabledthroughtheuseofsecuretunnelsandvirtualprivatenetworkswithaformofMFAinuse.

Page 12: If a server screams in a forest DMZ! How machine hardening ... Kennefick - Machine Hardening - Tactical Edge.pdf•File and Directory Protec4on – Through the use of Access Control

Applica4onHardening

•  AllapplicaBonsandservicesinstalledonnetworkbasedhostsystemsmustbeincludedinthesecurityhardeningprocesstoensurethattheydonotprovideaweaklinkinthesecuritydefenses.– Wealwayshearofbackdoors,ifyoudon’ttrustit,removeit.

•  AnumberofcommonoperaBngsystembasedservicesareinstalledbydefaultandneedtobereviewed.–  SMBsharing–  FTP–  Junipernetworks/ForBnet

Page 13: If a server screams in a forest DMZ! How machine hardening ... Kennefick - Machine Hardening - Tactical Edge.pdf•File and Directory Protec4on – Through the use of Access Control

WebServers

•  Fornon-publicsitesauthenBcaBonmethodsshouldbeputinplaceandforsitesthatareonlytobeaccessiblebyinternalusers.

•  Intranet/LAN/DNZapproachshouldbeusedsothatexternalaccessispreventedbyafirewall

•  EncrypBonshouldbeuBlised•  WebserverlogsshouldbereviewedrouBnelyforsuspiciousacBvity.Anya\emptstoaccessunusualURLsonthewebservertypicallyindicateana\empttoexploitproblemsinoutdatedorUnpatchedwebservers.

•  Latestvendorsuppliedpatches;WordPress,PHPetc.

Page 14: If a server screams in a forest DMZ! How machine hardening ... Kennefick - Machine Hardening - Tactical Edge.pdf•File and Directory Protec4on – Through the use of Access Control

MailServers

•  UnneededconfiguraBonopBonsofthemailserversohwarearedisabled

•  Allthelatestvendorsuppliedupdatesareapplied

•  RelayprevenBonopBonsshouldbeacBvated•  AuthenBcaBonmustbeusedtoensurethatonlyauthorisedusersareabletosendandreceiveemailmessages

•  Openrelaysaredangerous.

Page 15: If a server screams in a forest DMZ! How machine hardening ... Kennefick - Machine Hardening - Tactical Edge.pdf•File and Directory Protec4on – Through the use of Access Control

FTPServers

•  ThepurposeoftheFileTransferProtocol(FTP)istoallowfilestobedownloadedfromanduploadedtoremoteservers.

•  AnonymousFTP–  WewouldrecommendallanonymousacBvityberemovedor

restricted.

•  AuthenBcatedFTP–  InthecaseofauthenBcatedFTPitisessenBalthatSFTP(Secure)be

usedsothatloginandpasswordcredenBalsareencrypted,ratherthantransmi\edinplaintext.

Page 16: If a server screams in a forest DMZ! How machine hardening ... Kennefick - Machine Hardening - Tactical Edge.pdf•File and Directory Protec4on – Through the use of Access Control

Vulnerable

•  HaveyouperformedthepropersecurityhardeningacrosstheenBreapplicaBonstack?

–  Doyouhaveaprocessforkeepingallyoursohwareuptodate?ThisincludestheOS,Web/AppServer,DBMS,applicaBons,andallcodelibraries.

–  Iseverythingunnecessarydisabled,removed,ornotinstalled(e.g.ports,services,pages,accounts,privileges)?

–  Aredefaultaccountpasswordschangedordisabled?–  Isyourerrorhandlingsetuptopreventstacktracesandotheroverly

informaBveerrormessagesfromleaking?–  Arethesecuritysetngsinyourdevelopmentframeworks(e.g.,Struts,

Spring,ASP.NET)andlibrariesunderstoodandconfiguredproperly?

Page 17: If a server screams in a forest DMZ! How machine hardening ... Kennefick - Machine Hardening - Tactical Edge.pdf•File and Directory Protec4on – Through the use of Access Control

Hardeningtools/guides

•  MBSA2.3–  h\ps://www.microsoh.com/en-IE/download/details.aspx?id=7558

•  Spacewalk–  h\p://spacewalk.redhat.com/

•  CIS(mapping)–  h\ps://www.cisecurity.org/

•  NIST–  h\p://www.nist.gov/

•  SecurityMonkey–  h\ps://github.com/Newlix/security_monkey

Page 18: If a server screams in a forest DMZ! How machine hardening ... Kennefick - Machine Hardening - Tactical Edge.pdf•File and Directory Protec4on – Through the use of Access Control

MBSA2.3

•  Microsohbaselinesecurityanalyser.– Securitypatches– SecuritymisconfiguraBons– Supportsanythingnewerthan2000

•  ExportsniceXMLdocumentwhichallowsforintegraBonintoGRCtools

•  Freetechnologythatcanberunoffline

Page 19: If a server screams in a forest DMZ! How machine hardening ... Kennefick - Machine Hardening - Tactical Edge.pdf•File and Directory Protec4on – Through the use of Access Control

Spacewalk

•  Managedupdatestokeepmachinesintopshape.

•  AllowingyoutocacheupdatesfordistribuBontodifferentlocaBonsbasedonwhateverparametersorganisaBonshave.

•  TechnologyRedHatssatelliteisbuilton.•  Communitydrivenandtested,whichmayormaynotbeimportanttoyou.

Page 20: If a server screams in a forest DMZ! How machine hardening ... Kennefick - Machine Hardening - Tactical Edge.pdf•File and Directory Protec4on – Through the use of Access Control

CIS&NIST

•  CenterforInternetSecurity.– PrioriBsedsetofcyberpracBces.– ConfiguraBondetailsforeachdevice.

•  NaBonalInsBtuteforStandardsandTechnology.– Cybersecurityframework.– Notaregulatoryagency,moreofaguidelineagency

– Massiveamountoffreeresources.

Page 21: If a server screams in a forest DMZ! How machine hardening ... Kennefick - Machine Hardening - Tactical Edge.pdf•File and Directory Protec4on – Through the use of Access Control

Securitymonkey

•  NewlixtechnologytomonitorpolicychangesonAWSinfrastructure.

•  AlertsuserswhenanAWSaccounthasanunexplainedprivilegeoroneitmaynotneedviaajusBficaBonsystem.

•  Changetrackingforallinfrastructure.•  Veryeasytosetup,possibletoauditwholeAWSinfrastructureofanSMEinoneahernoon.

Page 22: If a server screams in a forest DMZ! How machine hardening ... Kennefick - Machine Hardening - Tactical Edge.pdf•File and Directory Protec4on – Through the use of Access Control

Conclusion

•  Full-StackPatching!– Updatesandpatching

•  Hardening,getapro•  Findflawsbeforetheyareexploited•  Treatnetworkslikeyouhavetheenemyinsidealready.

•  Treatappsliketherearepeopleouttoexploitthem.MakesuretesBngishappeningindev,pre-prodandprod.

Page 23: If a server screams in a forest DMZ! How machine hardening ... Kennefick - Machine Hardening - Tactical Edge.pdf•File and Directory Protec4on – Through the use of Access Control

www.edgescan.com

© BCC Risk Advisory Ltd 2016.

Thanks

[email protected]@davidkennefick

edgescan™2015VulnerabilityStatsReport:

h\ps://www.edgescan.com/assets/docs/reports/2015-edgescan-Stats-Report-(2015)-v5.pdf