SACON - Threat hunting (Chandra Prakash)

37
SACON SACON International 2017 Chandra Prakash Suryawanshi Aujas Network Pvt Ltd SVP chander80 India | Bangalore | November 10 – 11 | Hotel Lalit Ashok Threat Hunting

Transcript of SACON - Threat hunting (Chandra Prakash)

Page 1: SACON - Threat hunting (Chandra Prakash)

SACON

SACONInternational2017

ChandraPrakashSuryawanshiAujasNetworkPvt Ltd

SVPchander80

India|Bangalore|November10– 11|HotelLalit Ashok

ThreatHunting

Page 2: SACON - Threat hunting (Chandra Prakash)

SACON 2017

Adversariesleavetrailseverywhere

Emaillogs

Endpointprocessaccounting

HTTPproxylogs

Authenticationrecords

Filesystemmetadata

Networksessiondata

Databasequerylogs

Page 3: SACON - Threat hunting (Chandra Prakash)

SACON 2017

Alertingonlygetsyousofar

Automatedsystemsaregreat,butsomehaveflaws

GoodFor

Easytocreatenewrules.

Automationdecreasesdwell

time.

BadAt

Can’tfindthingsyoudon’talreadyknowhowto

find!

Page 4: SACON - Threat hunting (Chandra Prakash)

SACON 2017

Whatis“hunting”?

Thecollectivenameforanymanualormachine-assistedtechniquesusedtodetect

securityincidentsthatyourautomatedsolutionsmissed.

Page 5: SACON - Threat hunting (Chandra Prakash)

SACON 2017

ThreatHuntingPlatformDrivers

Aunifiedenvironmentfor:Collectingandmanagingbigsecuritydata

Detectingandanalyzingadvancedthreats

VisuallyinvestigatingattackTTPsandpatterns

Automatinghunttechniques

Collaboratingamongstsecurityanalystteams

Page 6: SACON - Threat hunting (Chandra Prakash)

SACON 2017

HuntingStyles

Complexity

Value

Indicators

ArtifactAnalysis

Tactic&TechniqueAnalysis

AnomalyDetection

Page 7: SACON - Threat hunting (Chandra Prakash)

SACON 2017

TheHuntingMaturityModel(HMM)

Page 8: SACON - Threat hunting (Chandra Prakash)

SACON 2017

HUNTINGSTRATEGY

Page 9: SACON - Threat hunting (Chandra Prakash)

SACON 2017

Strategyenablesresults

WheredoIstart?

WhatshouldIlookfor?

What’smypath

toimprove?

Yourstrategydeterminesthequalityofyourresults.

Chooseastrategythatsupportsyourdetectiongoals.

Don’tunderestimatetheimportanceofgoodplanning!

Page 10: SACON - Threat hunting (Chandra Prakash)

SACON 2017

Strategy#1

Makethemostofwhatyoualreadycollect

Advantages

Youprobablyalreadycollectatleastsomedata.

Someoneisalreadyfamiliarwithitscontents.

Youmayalreadyhavesomeideaofthekeyquestionsyouwantanswered.

Disadvantages

Yourabilitytoaskquestionsislimitedbytheavailabledata.

Externalforceshavemoreinfluenceoveryourresults.

Mayconfuse“easy”with“effective”.

Page 11: SACON - Threat hunting (Chandra Prakash)

SACON 2017

Thethreedatadomains

Keepasmuchasyoucancomfortablystore

Network

• Authentication• Sessiondata• ProxyLogs• Filetransfers• DNSresolution

Host

• Authentication• Auditlogs• Processcreation

Application

• Authentication• DBqueries• Audit&transactionlogs• Securityalerts• Threatintel

Page 12: SACON - Threat hunting (Chandra Prakash)

SACON 2017

Aimfordatadiversity

Leveragedifferenttypesofdatato…

RevealRelationships

ClarifytheSituation

HighlightInconsistencies

TellaCompleteStory

Page 13: SACON - Threat hunting (Chandra Prakash)

SACON 2017

Alsolookfortoolsetdiversity

Differenttechniques,differentperspectives

Page 14: SACON - Threat hunting (Chandra Prakash)

SACON 2017

Strategy#2

FollowtheKillChain

Source:Intelligence-DrivenComputerNetworkDefenseInformedbyAnalysisofAdversaryCampaignsandIntrusionKillChains”,Hutchins,Cloppert,Amin,http://www.lockheedmartin.com/content/dam/lockheed/data/corporate/documents/LM-White-Paper-Intel-Driven-Defense.pdf(LastcheckedApril29th,2015)

Reconnaissance Weaponization Delivery Exploitation Installation Command&Control(C2)

ActionsonObjectives

Page 15: SACON - Threat hunting (Chandra Prakash)

SACON 2017

Strategy#2

FollowtheKillChain

Source:Intelligence-DrivenComputerNetworkDefenseInformedbyAnalysisofAdversaryCampaignsandIntrusionKillChains”,Hutchins,Cloppert,Amin,http://www.lockheedmartin.com/content/dam/lockheed/data/corporate/documents/LM-White-Paper-Intel-Driven-Defense.pdf(LastcheckedApril29th,2015)

Reconnaissance Weaponization Delivery Exploitation Installation Command&Control(C2)

ActionsonObjectives

Findincidentsalreadyoccurring

Page 16: SACON - Threat hunting (Chandra Prakash)

SACON 2017

Strategy#2

FollowtheKillChain

Source:Intelligence-DrivenComputerNetworkDefenseInformedbyAnalysisofAdversaryCampaignsandIntrusionKillChains”,Hutchins,Cloppert,Amin,http://www.lockheedmartin.com/content/dam/lockheed/data/corporate/documents/LM-White-Paper-Intel-Driven-Defense.pdf(LastcheckedApril29th,2015)

Reconnaissance Weaponization Delivery Exploitation Installation Command&Control(C2)

ActionsonObjectives

Findincidentsalreadyoccurring

Expandthestoriesyouareabletotell

Page 17: SACON - Threat hunting (Chandra Prakash)

SACON 2017

Strategy#2

FollowtheKillChain

Source:Intelligence-DrivenComputerNetworkDefenseInformedbyAnalysisofAdversaryCampaignsandIntrusionKillChains”,Hutchins,Cloppert,Amin,http://www.lockheedmartin.com/content/dam/lockheed/data/corporate/documents/LM-White-Paper-Intel-Driven-Defense.pdf(LastcheckedApril29th,2015)

Reconnaissance Weaponization Delivery Exploitation Installation Command&Control(C2)

ActionsonObjectives

Findincidentsalreadyoccurring

ExpandthestoriesyouareabletotellPredictincidents

beforetheyhappen

Page 18: SACON - Threat hunting (Chandra Prakash)

SACON 2017

THEHUNTINGPROCESS

Page 19: SACON - Threat hunting (Chandra Prakash)

SACON 2017

TheHuntingProcess

Successfulhuntingrequiresmanyiterationsthroughthiscycle.

Thefasteryouranalystsgetthroughthisloop,thebetter.

Page 20: SACON - Threat hunting (Chandra Prakash)

SACON 2017

Mosthuntsstartwithquestions

WhatdatadoIhaveandwhatdoesit

“looklike”?

Isthereanylateralmovementgoingon?

Isthereanydataexfiltrationgoingoninmynetwork?

Arethereanyunauthorizedusers

onmyVPN?Isanyonemisusingtheirdatabasecredentials?

Havemyusersbeenspearphished?

Page 21: SACON - Threat hunting (Chandra Prakash)

SACON 2017

Questionsbecomehypotheses

“Ifthisactivityisgoingon,itmightlooklike…”

That’syourhypothesis!

Ifatfirstyoudon’tsucceed,recraft it.

Page 22: SACON - Threat hunting (Chandra Prakash)

SACON 2017

HypothesesCanBeDrivenBy…

ThreatIntelligence

• BothIOCsearchesandTTPanalysis

• "d8e8fc[…]ba249isaknown-badfilehash.Let's see if it's onany ofour critical systems."

SituationalAwareness

• Basedonfriendlyintel,knowledgeofbusinessprocesses,CrownJewelsAnalysisorotherknowledgeofyourownenvironment

• "EngineeringusersshouldneveraccesstheFinancefileserver.Let'sseeifthey'redoingthat."

DomainExpertise

• Acombinationofintel- andawareness-based

• "Iknow(China|Russia|Iran)threatactorsTTPs.Aretheyinournetwork?"

Page 23: SACON - Threat hunting (Chandra Prakash)

SACON 2017

DataTypeandLocation

Datatypesforyourhuntareusuallydictatedbyyourhypothesis.• Command&Control:Networksessionrecords,HTTPproxylogs• LateralMovement:Windowsauthenticationlogs(orwhateveryourOSis)

Location fromwhichthedataiscollectedcanalsobeamajorfactor:• Command&Control:Internetconnectionpoints• LateralMovement:Internet-facingservices,criticalassets,endpoints,servers

Documentacollectionplanforeachhunt,includingtype&location,aswellasotherrelevantfilters(turnBigDataintoSmallerDataifyoucan).

Page 24: SACON - Threat hunting (Chandra Prakash)

SACON 2017

AnalyticTechnique

Imagecredit:fatmonk8,https://www.reddit.com/r/pics/comments/2gi309/coworker_said_i_had_the_most_organized_toolbox_in/

Page 25: SACON - Threat hunting (Chandra Prakash)

SACON 2017

Awiseowloncesaid…

Page 26: SACON - Threat hunting (Chandra Prakash)

SACON 2017

HUNTINGINSQRRL

Page 27: SACON - Threat hunting (Chandra Prakash)

SACON 2017

Createhypotheses

StartwithguidedhuntsusingtheSqrrlDetections

Page 28: SACON - Threat hunting (Chandra Prakash)

SACON 2017

Createhypotheses

Getmoreadvancedusingthehuntreports

Page 29: SACON - Threat hunting (Chandra Prakash)

SACON 2017

InvestigateviaToolsandTechniques

ThisisverysimilartoIncidentInvestigation– again,youwillwanttoaskthesamesixquestions:

1. Wastheactivityactuallyanincident?2. Wastheadversarysuccessful?3. Whatotherresourceswereinvolved?4. Whatactivitiesdidtheadversaryconduct?5. Whatresourceswerecompromised?6. Whatshouldthenextstepsbe?

Page 30: SACON - Threat hunting (Chandra Prakash)

SACON 2017

Additionalhypotheses

Thinkaboutwhatyourdatawillshow

Page 31: SACON - Threat hunting (Chandra Prakash)

SACON 2017

Wasthebeaconanincident?

Howlongdiditoccurfor?(Isitstilloccurring?)Lookattheendpoints(clickontheminthedetectionprofiletobringuptheirprofiles),startingwiththedestination

Whatdoyouknowaboutit?Isitaknownservice?Whatdomainisitassociatedwith?

MayneedtoexploreandexpandtoDNSDomainsWhatURIsisitassociatedwith?

MayneedtoexploreandexpandtoURIsCouldalsousetheactivitylogwithwebproxylogstofindthis

Aretheendpointsassociatedwithothermaliciousactivity?MayneedtoexploreandexpandtoAlertMayneedtodrilldownintotheactivity

Page 32: SACON - Threat hunting (Chandra Prakash)

SACON 2017

WastheLatMov anincident?

Lookatthepatterns:Isthisconsistentwithanadversaryexploringanetwork?Arethefailurepatternsconsistent?

LookattheHostnameentities:Areanyofthemknownjumpservers?

LookattheAccounts:Areanyofthemadminswhoareexpectedtousethistypeofactivity?AreanyoftheaccountslinkedtothesameUser,especiallyaregularandanadminaccountforthesameperson?

LookattheRelationships:Isthetimingconsistentwiththistypeofactivity?Isthereotheractivityoccurringbeforeoraftertoindicateitisnormal?

Page 33: SACON - Threat hunting (Chandra Prakash)

SACON 2017

Wasthestaginganincident?

Lookatthevolume:Isthisreallydatabeingstagedorjustastatisticaloutlier?

LookattheHostnames:WeretheyinvolvedinLateralMovementsorotherriskybehaviors?

LookattheAccounts:ExplorefromtheIPAddresses andexpandtoAccountsIsthisactivitybeingconductedbythesameperson?

LookattheRelationships:Isthetimingconsistentwiththistypeofactivity?Isthereotheractivityoccurringbeforeoraftertoindicateitisnormal?

Page 34: SACON - Threat hunting (Chandra Prakash)

SACON 2017

Wastheexfil anincident?

Lookatthevolume:Isthisreallydatabeingexfilled orjustastatisticaloutlier?

LookattheIPAddresses:Weretheinternalonesinvolvedinstagingorotherriskybehaviors?WeretheexternalonesassociatedwithsuspiciousdomainsorURIs?Mayneedtoexploreandexpandtofindthis

LookattheAccounts:ExplorefromtheinternalIPAddress andexpandtoAccountsWhoappearstobeconductingtheactivityandshouldtheybe?

LookattheRelationships:Isthetimingconsistentwiththistypeofactivity?Isthereotheractivityoccurringbeforeoraftertoindicateitisnormal?

Page 35: SACON - Threat hunting (Chandra Prakash)

SACON 2017

Atthispoint,youareinvestigatinganincident

ThestepsyoufollowforthefollowingarethesameasforIncidentInvestigation:

3. Whatotherresourceswereinvolved?4. Whatactivitiesdidtheadversaryconduct?5. Whatresourceswerecompromised?6. Whatshouldthenextstepsbe?

KeeptherestoftheHuntingProcessCycleinmindasyouanswerthesequestions,theywillbeusedforthefollowingsteps

Page 36: SACON - Threat hunting (Chandra Prakash)

SACON 2017

Piecetogethertheincident

Answeringthequestionsrequiresacompletepicture

Page 37: SACON - Threat hunting (Chandra Prakash)

SACON 2017

THANKYOU