56
1 Aquarius – 01 Pisces (A~M) – 02 Pisces (N~Z) – 03 Aries – 04 Taurus (A~M) – 05 Taurus (N~Z) – 06 Gemini (A~M) – 07 Gemini (N~Z) – 08 Cancer (A~M) – 09 Cancer (N~Z) – 10 Leo – 11 Virgo (A~M) – 12 Virgo (N~Z) – 13 Libra (A~M) – 14 Libra (N~Z) – 15 Scorpio (A~M) – 16 Scorpio (N~Z) – 17 Sagittarius – 18 Capricorn (A~M) – 19 Capricorn (N~Z) – 20 https://od-splunklivesantaclara-XX.splunkoxygen.com Username: splunklive Password: security Security Hands-On: What’s Your Sign?

Splunk Enterprise for InfoSec Hands-On

  • Upload
    splunk

  • View
    146

  • Download
    6

Embed Size (px)

Citation preview

Page 1: Splunk Enterprise for InfoSec Hands-On

1

Aquarius – 01Pisces (A~M)– 02Pisces (N~Z)– 03Aries – 04Taurus (A~M)– 05Taurus (N~Z)– 06Gemini (A~M)– 07

Gemini (N~Z)– 08Cancer (A~M)– 09Cancer (N~Z)– 10Leo– 11Virgo (A~M)– 12Virgo (N~Z)– 13Libra(A~M)– 14

Libra(N~Z)– 15Scorpio (A~M)– 16Scorpio (N~Z)– 17Sagittarius – 18Capricorn (A~M)– 19Capricorn (N~Z)– 20

https://od-splunklivesantaclara-XX.splunkoxygen.comUsername:splunklive Password:security

SecurityHands-On:What’sYourSign?

Page 2: Splunk Enterprise for InfoSec Hands-On

Copyright©2016SplunkInc.

SplunkEnterpriseforInformationSecurity

Hands-OnSantaClara|November10,2016

Presenters:ChrisShobert &LilyLee

Page 3: Splunk Enterprise for InfoSec Hands-On

3

SafeHarborStatementDuringthecourseofthispresentation,wemaymakeforward-lookingstatementsregardingfutureeventsortheexpectedperformanceofthecompany.Wecautionyouthatsuchstatementsreflectourcurrentexpectations and estimates basedonfactorscurrentlyknowntousandthatactualeventsorresultscoulddiffermaterially.Forimportantfactorsthatmaycauseactualresultstodifferfromthosecontainedinourforward-lookingstatements,pleasereviewourfilings withtheSEC. Theforward-lookingstatementsmadeinthispresentationarebeingmadeasofthetimeanddateofitslivepresentation. If reviewedafter itslivepresentation, thispresentationmaynotcontaincurrentoraccurateinformation. Wedonotassumeanyobligationtoupdateanyforward-lookingstatementswe may make. Inaddition,anyinformationaboutour roadmapoutlinesourgeneralproductdirectionandissubjecttochangeatanytimewithoutnotice. It isforinformationalpurposesonlyandshallnot beincorporatedintoanycontractorothercommitment. Splunkundertakesnoobligationeithertodevelopthefeaturesorfunctionalitydescribed ortoincludeanysuchfeatureorfunctionalityinafuturerelease.

Page 4: Splunk Enterprise for InfoSec Hands-On

4

Agenda

Intro

WebAttacks

LateralMovement

DNSExfiltration

Wrap-up/Q&A

Page 5: Splunk Enterprise for InfoSec Hands-On

Copyright©2016SplunkInc.

Intro

Page 6: Splunk Enterprise for InfoSec Hands-On

Machinedatacontainsadefinitiverecordofallinteractions

Splunkisaveryeffectiveplatformtocollect,store,andanalyzeallofthatdata

Human Machine

Machine Machine

Page 7: Splunk Enterprise for InfoSec Hands-On

MainframeData

PlatformforMachineData

SplunkSolutions>EasytoAdopt

RelationalDatabases MobileForwarders Syslog/

TCP/OtherSensors&ControlSystems

AcrossDataSources,UseCases&ConsumptionModels

WireData

SplunkPremiumSolutions&Apps RichEcosystemofApps

VMware Exchange PCISecurity

ITSI

ITSvcInt

UBA

UBA Cisco PAN SNOW AWS

Page 8: Splunk Enterprise for InfoSec Hands-On

SplunkPositionedasa LeaderinGartner2016MagicQuadrantforSecurityInformationandEventManagement*

*Gartner,Inc.,2016MagicQuadrantforSecurityInformationandEventManagement,andCriticalCapabilitiesforSecurityInformationandEventManagement,OliverRochford,KellyM.Kavanagh,TobyBussa.10August2016ThisgraphicwaspublishedbyGartner,Inc.aspartofalargerresearchdocumentandshouldbeevaluatedinthecontextoftheentiredocument.TheGartnerdocumentisavailableuponrequestfromSplunk.Gartnerdoesnotendorseanyvendor,productorservicedepictedinitsresearchpublications,anddoesnotadvisetechnologyuserstoselectonlythosevendorswith thehighestratingsorotherdesignation.GartnerresearchpublicationsconsistoftheopinionsofGartner'sresearchorganizationandshouldnotbeconstruedasstatementsoffact.Gartnerdisclaimsallwarranties,expressedorimplied, withrespecttothisresearch,includinganywarrantiesofmerchantabilityorfitnessforaparticularpurpose.

Ø Fouryearsinarowasaleader

Ø FurthestoverallinCompletenessofVision

Ø Splunkalsoscoreshighestin2016CriticalCapabilitiesforSIEMreportinallthreeusecases

Page 9: Splunk Enterprise for InfoSec Hands-On

9

GartnerCriticalCapabilitiesforSIEM

9

*Gartner,Inc.,2016MagicQuadrantforSecurityInformationandEventManagement,andCriticalCapabilitiesforSecurityInformationandEventManagement,OliverRochford,KellyM.Kavanagh,TobyBussa.10August2016ThisgraphicwaspublishedbyGartner,Inc.aspartofalargerresearchdocumentandshouldbeevaluatedinthecontextoftheentiredocument.TheGartnerdocumentisavailableuponrequestfromSplunk.Gartnerdoesnotendorseanyvendor,productorservicedepictedinitsresearchpublications,anddoesnotadvisetechnologyuserstoselectonlythosevendorswith thehighestratingsorotherdesignation.GartnerresearchpublicationsconsistoftheopinionsofGartner'sresearchorganizationandshouldnotbeconstruedasstatementsoffact.Gartnerdisclaimsallwarranties,expressedorimplied, withrespecttothisresearch,includinganywarrantiesofmerchantabilityorfitnessforaparticularpurpose.

1.BasicSecurityMonitoring 2.AdvancedThreatDetection 3.Forensics&IncidentResponse

Page 10: Splunk Enterprise for InfoSec Hands-On

Copyright©2016SplunkInc.

WebAttacks

Page 11: Splunk Enterprise for InfoSec Hands-On

11

OWASP2013Top10[10]Unvalidated redirectsandforwards[9]Usingcomponentswithknownvulnerabilities[8]Cross-siterequestforgery[7]Missingfunctionlevelaccesscontrol[6]Sensitivedataexposure[5]Securitymisconfiguration[4]Insecuredirectobjectreference[3]Cross-sitescripting(XSS)[2]Brokenauthenticationandsessionmanagement

Page 12: Splunk Enterprise for InfoSec Hands-On

12

[1]InjectionSQLinjectionCodeinjectionOScommandingLDAPinjectionXMLinjectionXPath injectionSSIinjectionIMAP/SMTPinjectionBufferoverflow

WhydidIgetbreached?

SQLi hasbeenaroundavery,verylongtime…

Page 13: Splunk Enterprise for InfoSec Hands-On

13

Source:Imperva WebAttacksReport,2015

Page 14: Splunk Enterprise for InfoSec Hands-On

14

TalkTalk:PII/financialdatafor4McustomersVTech:PIIfor5Madults+kids

Page 15: Splunk Enterprise for InfoSec Hands-On

15

…andsofarthisyear…45

Page 16: Splunk Enterprise for InfoSec Hands-On

16

LittleBobbyTables

Page 17: Splunk Enterprise for InfoSec Hands-On

17

WhyDidBobby’sSchoolLoseTheirRecords?

$sql = "INSERT INTO Students (Name) VALUES ('" . $studentName . "');";

execute_sql($sql);

$studentName

1

2

Page 18: Splunk Enterprise for InfoSec Hands-On

18

INSERT INTO Students (Name) VALUES ('John');

WhyDidBobby’sSchoolLoseTheirRecords?

John

$studentName

Page 19: Splunk Enterprise for InfoSec Hands-On

19

WhyDidBobby’sSchoolLoseTheirRecords?

Robert'); DROP TABLE Students;--

INSERT INTO Students (Name) VALUES ('Robert'); DROP TABLE Students;--');

Page 20: Splunk Enterprise for InfoSec Hands-On

Let’sgethands-on!

Page 21: Splunk Enterprise for InfoSec Hands-On

21

Aquarius – 01Pisces (A~M)– 02Pisces (N~Z)– 03Aries – 04Taurus (A~M)– 05Taurus (N~Z)– 06Gemini (A~M)– 07

Gemini (N~Z)– 08Cancer (A~M)– 09Cancer (N~Z)– 10Leo– 11Virgo (A~M)– 12Virgo (N~Z)– 13Libra(A~M)– 14

Libra(N~Z)– 15Scorpio (A~M)– 16Scorpio (N~Z)– 17Sagittarius – 18Capricorn (A~M)– 19Capricorn (N~Z)– 20

https://od-splunklivesantaclara-XX.splunkoxygen.comUsername:splunklive Password:security

SecurityHands-On:What’sYourSign?

Page 22: Splunk Enterprise for InfoSec Hands-On

22

ALittleAboutOurEnvironmentOurlearningenvironmentconsistsof ~5.5Mevents,fromrealenvironments,butsanitized:

• WindowsSecurityevents• Apachewebaccesslogs• BroDNS&HTTP• PaloAltotrafficlogs• Someothervariousbits

Page 23: Splunk Enterprise for InfoSec Hands-On

23

OR

AreYouaNewbieorNinja?

Page 24: Splunk Enterprise for InfoSec Hands-On

Let’sgethands-on!

WebAttacks

Page 25: Splunk Enterprise for InfoSec Hands-On

25

https://splunkbase.splunk.com/app/1528/

SearchforpossibleSQLinjectioninyourevents:ü looksforpatternsinURIqueryfieldtoseeif

anyonehasinjectedthemwithSQLstatements

ü usestandarddeviationsthatare2.5timesgreaterthantheaveragelengthofyourURIqueryfield

Macrosused• sqlinjection_pattern(sourcetype,uri queryfield)• sqlinjection_stats(sourcetype,uri queryfield)

Page 26: Splunk Enterprise for InfoSec Hands-On

26

`sqlinjection_rex`isasearchmacro.Itcontains:

(?<injection>(?i)select.*?from|union.*?select|\'$|delete.*?from|update.*?set|alter.*?table|([\%27|\'](%20)*=(%20)*[\%27|\'])|\w*[%27|\']or)

Whichmeans:Inthestringwearegiven,lookforANY ofthefollowingmatchesandputthatintothe“injection”field.AnythingcontainingSELECTfollowedbyFROMAnythingcontainingUNIONfollowedbySELECTAnythingwitha‘attheendAnythingcontainingDELETEfollowedbyFROMAnythingcontainingUPDATEfollowedbySETAnythingcontainingALTERfollowedbyTABLEA%27ORa‘andthena%20andanyamountofcharactersthena%20andthena%27ORa‘

Note:%27isencoded“’”and%20isencoded<space>Anyamountofwordcharactersfollowedbya%27ORa‘andthen“or”

RegularExpressionsFTW

Page 27: Splunk Enterprise for InfoSec Hands-On

27

Bonus:TryouttheSQLInjectionSearch app!

Page 28: Splunk Enterprise for InfoSec Hands-On

28

Summary:WebAttacks/SQLInjectionSQLinjectionprovideattackerswitheasyaccesstodataDetectingadvancedSQLinjectionishard– useanapp!UnderstandwhereSQLi ishappeningonyournetworkandputastoptoitAugmentyourWAFwithenterprise-wideSplunksearches

Page 29: Splunk Enterprise for InfoSec Hands-On

Copyright©2016SplunkInc.

LateralMovement

Page 30: Splunk Enterprise for InfoSec Hands-On

30

PokingAround

Anattackerhacksanon-privilegedusersystem.

Sowhat?

Page 31: Splunk Enterprise for InfoSec Hands-On

31

LateralMovement

LateralMovementistheexpansionofsystemscontrolled,anddataaccessed.

Page 32: Splunk Enterprise for InfoSec Hands-On

32

MostFamousLateralMovementAttack?(excludingpasswordre-use)

PasstheHash!

Page 33: Splunk Enterprise for InfoSec Hands-On

33

ThisandothertechniquesusedindestructiveSands breach…

…andatSony,too.

Page 34: Splunk Enterprise for InfoSec Hands-On

34

DetectingLegacyPtHLookforWindowsEvents:EventID:4624or4625Logontype:3Auth package:NTLMUseraccountisnotadomainlogon,orAnonymousLogon

…thisistriviallyeasyinSplunk

Page 35: Splunk Enterprise for InfoSec Hands-On

Let’sgethands-on!

LateralMovement:Legacy

Page 36: Splunk Enterprise for InfoSec Hands-On

36

ThenItGotHarderPasstheHashtoolshaveimprovedTrackingofjitter,othermetricsSolet’sdetectlateralmovementdifferently

Page 37: Splunk Enterprise for InfoSec Hands-On

37

NetworkTrafficProvidesSourceofTruthIusuallytalkto10hostsThenonedayItalkto10,000hostsALARM!

Page 38: Splunk Enterprise for InfoSec Hands-On

Let’sgethands-on!

LateralMovement:NetworkTraffic

Page 39: Splunk Enterprise for InfoSec Hands-On

39

iz sohard…uhazmagic?

Page 40: Splunk Enterprise for InfoSec Hands-On

40

izsohard…uhazmagic?Comesee…

atthedemobooths

UBA

Page 41: Splunk Enterprise for InfoSec Hands-On

41

Summary:LateralMovementAttackersuccessdefinesscopeofabreachHighdifficulty,highimportanceWorthdoinginSplunkEasywithUBA

Page 42: Splunk Enterprise for InfoSec Hands-On

Copyright©2016SplunkInc.

DNSExfiltration

Page 43: Splunk Enterprise for InfoSec Hands-On

43

domain=corp;user=dave;password=12345

encrypt

DNSQuery:ZG9tYWluPWNvcnA7dXNlcj1kYXZlO3Bhc3N3b3JkPTEyMzQ1DQoNCg==.attack.com

ZG9tYWluPWNvcnA7dXNlcj1kYXZlO3Bhc3N3b3JkPTEyMzQ1DQoNCg==

Page 44: Splunk Enterprise for InfoSec Hands-On

44

DNSexfil tendstobeoverlookedwithinanoceanofDNSdata.

Let’sfixthat!

DNSExfiltration

Page 45: Splunk Enterprise for InfoSec Hands-On

45

FrameworkPOS:acard-stealingprogramthatexfiltrates datafromthetarget’snetworkbytransmittingitasdomainnamesystem(DNS)traffic

Butthebigdifferenceisthewayhowstolendataisexfiltrated:themalwareusedDNSrequests!https://blog.gdatasoftware.com/2014/10/23942-new-frameworkpos-

variant-exfiltrates-data-via-dns-requests

“”

…feworganizationsactuallykeepdetailedlogsorrecordsof theDNStraffictraversingtheirnetworks— makingitanidealwaytosiphondatafromahackednetwork.

http://krebsonsecurity.com/2015/05/deconstructing-the-2014-sally-beauty-breach/#more-30872

“”

DNSExfiltration

Page 46: Splunk Enterprise for InfoSec Hands-On

46

https://splunkbase.splunk.com/app/2734/

DNSexfil detection– tricksofthetradeü parseURLs&complicatedTLDs(TopLevelDomain)ü calculateShannonEntropy

Listofprovidedlookups• ut_parse_simple(url)• ut_parse(url,list)orut_parse_extended(url,list)• ut_shannon(word)• ut_countset(word,set)• ut_suites(word,sets)• ut_meaning(word)• ut_bayesian(word)• ut_levenshtein(word1,word2)

Page 47: Splunk Enterprise for InfoSec Hands-On

47

Examples• Thedomainaaaaa.com hasaShannonEntropyscoreof1.8 (verylow)• Thedomaingoogle.com hasaShannonEntropyscoreof2.6 (ratherlow)• A00wlkj—(-a.aslkn-C.a.2.sk.esasdfasf1111)-890209uC.4.com hasaShannon

Entropyscoreof3 (ratherhigh)

Layman’sdefinition:ascorereflectingtherandomness ormeasureofuncertainty ofastring

ShannonEntropy

Page 48: Splunk Enterprise for InfoSec Hands-On

48

DetectingDataExfiltration

index=brosourcetype=bro_dns|`ut_parse(query)`|`ut_shannon(ut_subdomain)`|eval sublen =length(ut_subdomain)|tableut_domain ut_subdomainut_shannon sublen

TIPSq LeverageourBroDNSdataq CalculateShannonEntropyscoresq Calculatesubdomainlengthq DisplayDetails

Page 49: Splunk Enterprise for InfoSec Hands-On

Let’sgethands-on!

LateralMovement:DNSExfiltration

Page 50: Splunk Enterprise for InfoSec Hands-On

50

DetectingDataExfiltration

…|statscountavg(ut_shannon)asavg_shaavg(sublen)asavg_sublenstdev(sublen)asstdev_sublenbyut_domain|searchavg_sha>3avg_sublen>20stdev_sublen<2

TIPSq LeverageourBroDNSdataq CalculateShannonEntropyscoresq Calculatesubdomainlengthq Displaycount,scores,lengths,

deviations

Page 51: Splunk Enterprise for InfoSec Hands-On

51

DetectingDataExfiltrationRESULTS• Exfiltrating datarequiresmanyDNSrequests– lookforhighcounts• DNSexfiltrationtomooo.com and chickenkiller.com

Page 52: Splunk Enterprise for InfoSec Hands-On

52

Summary:DNSExfiltrationExfiltrationbyDNSandICMPisaverycommontechniqueManyorganizationsdonotanalyzeDNSactivity– donotbelikethem!NoDNSlogs?NoSplunk Stream?LookatFWbytecounts

Page 53: Splunk Enterprise for InfoSec Hands-On

Copyright©2016SplunkInc.

Wrap-up/Q&A

Page 54: Splunk Enterprise for InfoSec Hands-On

54

SummaryMultiplephasestomodernattacksDeploydetectionacrossallphasesAlsoconsideradaptiveresponse!Stayabreastofmodernadvancements

Today’scontent(PDF):

https://splunk.box.com/v/SplunkLive-Security-Handout

Page 55: Splunk Enterprise for InfoSec Hands-On

• 5,000+ITandBusinessProfessionals• 175+Sessions• 80+CustomerSpeakers

PLUSSplunk University• Threedays:Sept23-25,2017• GetSplunk CertifiedforFREE!• GetCPEcreditsforCISSP,CAP,SSCP

SEPT25-28,2017WalterE.WashingtonConventionCenterWashington,D.C.CONF.SPLUNK.COM

The8th AnnualSplunkWorldwideUsers’Conference

Page 56: Splunk Enterprise for InfoSec Hands-On

ThankYou