Top Banner
Company Confidential Powered by Building a Threat Intelligence Field of Dreams 05.12.2016
70

Threat Intelligence Field of Dreams

Jan 18, 2017

Download

Technology

Greg Foss
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Threat Intelligence Field of Dreams

CompanyConfidential

Poweredby

BuildingaThreatIntelligenceFieldofDreams

05.12.2016

Page 2: Threat Intelligence Field of Dreams

CompanyConfidential

James CarderCISO | VP LogRhythm Labs

Greg FossGlobal Security Operations

Team Lead

Page 3: Threat Intelligence Field of Dreams

OperationalizingThreatIntelligenceMakingThreatIntelligenceUseful

Page 4: Threat Intelligence Field of Dreams

CompanyConfidential

DefiningThreatIntelligence

“Evidence-basedknowledge,includingcontext,mechanisms,indicators,implicationsandACTIONABLEadviceaboutanexistingoremergingmenaceorhazardtoassetsthatcanbeusedtoinformdecisionsregardingthe

subject’sresponsetothatmenaceorhazard”- Gartner

Page 5: Threat Intelligence Field of Dreams

CompanyConfidential

• Documents(e.g.,FBIflashreports)• Blogs,emails• RSSfeeds

• CSVandtextfiles• STIX• OpenIOC

• Malwaresamples• Packetcapture• Forensicartifacts(files,email)

Actionabledatatypes

IntelReports

IndicatorsofCompromise

RawDataTypes

• UserBehaviors• EndpointBehaviors• NetworkBehaviors

YourOwnData

Page 6: Threat Intelligence Field of Dreams

CompanyConfidential

OperationalizingThreatIntelligence

IndicatorsofCompromise(IOC)areautomaticallysearched

Changestoexternalthreatenvironmentimmediatedetected

Providesanalystcontextaroundincident,event,threat,campaign• Historicalknowledgeaswelltochainrelatedattacks

Reconnaissance&Planning

InitialCompromise

Command&Control

LateralMovement

TargetAttainment

ExfiltrationCorruptionDisruption

Page 7: Threat Intelligence Field of Dreams

OSINTOpenSourceIntelligenceGathering

Page 8: Threat Intelligence Field of Dreams

CompanyConfidential

OpenSourceIntelligenceGathering

OpenSourceIntelligence(OSINT)inthesimplestoftermsislocating,andanalyzingpublically(open)availablesourcesofinformation.Thekeycomponenthereisthatthisintelligencegatheringprocesshasagoalofproducingcurrentandrelevantinformationthatisvaluabletoeitheranattackerorcompetitor.Forthemostpart,OSINTismorethansimplyperformingwebsearchesusingvarioussources.

- http://www.pentest-standard.org/index.php/PTES_Technical_Guidelines#OSINT

Page 9: Threat Intelligence Field of Dreams

CompanyConfidential

OSINT

• OffensiveandDefensive• Manual– InDepthAnalysisofthetargetentityorindividual(s)• Automated– Highlevelanalysisofmetadata• Operationalize,Integrate,andAutomateOSINTanalysis FTW• Definegoals– whattoanalyze,why,how,outputs,etc.

• IndicatorsofCompromise• Datatofeedbackloopsintodefensivetools• Research

• Attribution• Actors,victims,servers,locations,samples,etc.

Page 10: Threat Intelligence Field of Dreams

CompanyConfidential

OSINTOPSEC(Manual)

• OPSEC:OperationalSecurity• Thetargetcannotknowyourorganizationisactivelyinvestigatingthem…

• UseaUSB-bootableLinuximagesuchasTails– non-persistent• RunbothTORandaVPN(commercialorusecloudsystems)• VirtualPrivateServers(VPS)locatedinothercountries• Payforservicesusingbitcoinand/orpre-paidgiftcards• Regardlessofsolution– understandtheservice’sloggingpolicy,

checkforwarrantcanaries,andknowyourrights…

Page 11: Threat Intelligence Field of Dreams

CompanyConfidential

WhyTORandVPN?

TOR!=VPN

TOR=Randomizer

VPN=Tunnel

Honestly…Notabigdealunlessyou’replanningtodoillegalthings– Whichyoushouldnotbedoinganyways...

Page 12: Threat Intelligence Field of Dreams

CompanyConfidential

OSINTOPSEC(Automated– Corporate)

• RegisteraLinuxAmazonEC2box(freetier)withnoelasticIP• PurchaseaDyn DNSaccount– fordynamicDNSregistration• EstablishaPPTPVPNtunneltotheEC2system(s)• Performinvestigativeanalysisfromthesecloud-hostedsystems

and/orlocalboxeswithproperprecautionsinplace• ProxytrafficthroughanduseSSHportforwardingtoaccessservices

• Followingthecompletionoftheanalysis,rebootthesystem.• Bydefault,AWSwillassignanewIPunlessyouuseanelasticIP• ReconfigurethetunnelsandDNSasnecessary(automatethis)

Page 13: Threat Intelligence Field of Dreams

CompanyConfidential

AutomatingOSINTandResponse

DomainTools

PassiveTotal

VirusTotal

CiscoAMPThreatGRID

Netflow /IDS

Firewalls

Proxy

Endpoint

SIEM

API SecOps Infrastructure

Page 14: Threat Intelligence Field of Dreams

CompanyConfidential

ManualOSINTAnalysis

• Goal-Oriented• Definespecifictargetandunderstandthedatayouwishtoobtain

• Technical – Accounts,Servers,Services,Software,Integrations• Social – SocialMedia,Photography,WishLists,Email• Physical – Address,HomeIPAddress,Business,Footprint• Logical – Network,OperationalIntelligence,Where,When

Page 15: Threat Intelligence Field of Dreams

CompanyConfidential

AFewOSINTTools

• Maltego• Transforms!

• PassiveTotal• ThreatIntelandMaltego API!

• DomainToolsIRIS• Whois History,Pivotoffofdatapoints(email,address,phone,etc.)

• Shodan• Thenetworksearchengine– everythingfromopenVNCservicestoC2’s

• Facebook/Linkedin /Spokeo /Pipl /etc.• CreatefakeaccountsanduseAPIintegrationstoautomatesearches

Page 16: Threat Intelligence Field of Dreams

CompanyConfidential

OSINTTipsandTricks:ShortenedURL’s

Allyouneedis+

Page 17: Threat Intelligence Field of Dreams

CompanyConfidential

OSINTTipsandTricks:ShortenedURL’s

Page 18: Threat Intelligence Field of Dreams

CompanyConfidential

OSINTTipsandTricks:ResolveSkypeUsernametoIP

Page 19: Threat Intelligence Field of Dreams

CompanyConfidential

OSINTTipsandTricks:ResolveSkypeUsernametoIP

Page 20: Threat Intelligence Field of Dreams

CompanyConfidential

OSINTTipsandTricks:SourceCodeSearch

Nerdydata.com

Page 21: Threat Intelligence Field of Dreams

CompanyConfidential

OSINTTipsandTricks:SourceCodeSearch

;-)

Page 22: Threat Intelligence Field of Dreams

CompanyConfidential

Justscratchingthesurface…

Page 23: Threat Intelligence Field of Dreams

CaseStudiesOperationalizationofThreatIntel

Page 24: Threat Intelligence Field of Dreams

CompanyConfidential

CaseStudy:OperationalizingPOSIntelfromaThreatReport

ThreatReport

SIEM/AnalyticsEngine

Hits,Alarm,SmartResponse

NoHits,NoAlarm,SmartResponse

AutomatedSearchusingHostandNetworkIOCsand/or

BrutPOSbehavior inSIEMandonendpoint

POSNetwork

• Containment• Acquisition• Analysis• Confirmation• Remediation• Metrics/Reporting

Page 25: Threat Intelligence Field of Dreams

CompanyConfidential

SIEM/AnalyticsEngine

Domainwasopenedinthelast7daysor

registeredbyknownbad…SmartResponse

Domainisreputableorcategorizedasgood

DNSnameisn’trecognizedorpartofknownmaliciousdomainlists…Smart

Response…checkDomainTools

• Containment• Acquisition• Analysis• Confirmation• Remediation• Metrics/Reporting

InternetBrowsing

Internet

CaseStudy:OperationalizingIntelusingThirdPartyIntegrations

Page 26: Threat Intelligence Field of Dreams

CompanyConfidential

CaseStudy:OperationalizingIntelfromInternalBehaviors/Baselines

Assumecredentialsare

stolen

SIEM/AnalyticsEngine

Detect:Networktraffictovl.ff.avast.com &su.ff.avast.com

Detect: 128BitGUIDcba871fa-80c9-48bc-9836-

8df3a7f67145

Identify:Avast AV

SingleFactor

• Containment• Acquisition• Analysis• Confirmation• Remediation• Metrics/Reporting

SmartResponse:Does ITinventoryhaveanythingother thanMcAfeeorESET?Ifnot,SmartResponseintoIR

Page 27: Threat Intelligence Field of Dreams

CompanyConfidential

MalwareSandboxe.g.Cuckoo

Historical CaseData

Analyste.g.Malware,Forensics

External Servicese.g.DomainTools,

VirusTotal

ThreatIntelligencee.g.ISACs,

ThreatFeeds,FlashReports

OfferServicestoyourfriendsCollect Intel&Collaborate Vulnerability Intelligence

Ifyoubuildit…theywillcome…

Page 28: Threat Intelligence Field of Dreams
Page 29: Threat Intelligence Field of Dreams

CompanyConfidential

Isattributionimportant?

• “Ifyouknowtheenemyandknowyourselfyouneednotfeartheresultsofahundredbattles”– SunTzu

• “Allwarfareisbasedondeception.Hence,whenweareabletoattackwemustseemunable,whenusingourforcewemustappearinactive,whenwearenearwemustmaketheenemybelievewearefaraway,whenwearefarawaywemustmakehimbelievewearenear”– SunTzu

Page 30: Threat Intelligence Field of Dreams

CompanyConfidential

• Whodidit?• Whydidtheydoit?• Whatweretheyafter?• Couldwehavepreventedit?

• APT,China• China5yrplan,don’tknow• Researchdata,intellectual

property, Idon’tknow• No,notwithoutmore

budget

“Chinastoleit,specificallyanAPTgroupoutofAprovince.ThedatawasthentransferredtopersonB,locatedinprovinceC.ThenpersonBsentittopersonDinRussia.OnceinRussia,thestolendataendeduponpersonE’stable.”

Whatifattributionwasreal’ized?

Page 31: Threat Intelligence Field of Dreams

DocumentBuggingandWebTracingTrackingpeopleofinterestandmappingouttheirdigitalfootprints

Page 32: Threat Intelligence Field of Dreams

CompanyConfidential

HoneyTokensandDocumentBugging

Tracking file access, modification, exfiltration, etc…

• Use File Integrity Monitoring to track file interactions

• Any predefined item, instrumented to generate a unique log

• Strings, Drives, Directories, Hashes, ‘employees’

Page 33: Threat Intelligence Field of Dreams

CompanyConfidential

File Integrity Monitoring – Built in to Windows Logging

Page 34: Threat Intelligence Field of Dreams

CompanyConfidential

DocumentBugging– HowTo

• WebBug Background Information:

http://ha.ckers.org/webbug.html

• WebBug Server:

https://bitbucket.org/ethanr/webbugserver

• Bugged Files – Is Your Document Telling on You?

Daniel Crowley and Damon Smith (Chaos Communication Camp 2015)

https://www.youtube.com/watch?v=j5cjFul4ZIc

Page 35: Threat Intelligence Field of Dreams

CompanyConfidential

DocumentTracking

Same tricks used by Marketing / Sales for years. Normally for tracking emails, clicks, downloads, etc.

Why loading external images within email is risky…

Page 36: Threat Intelligence Field of Dreams

CompanyConfidentialhttps://github.com/gfoss/misc/tree/master/Bash/webbug

Documentscanbetrackedinthesamewayasemail/web

Page 37: Threat Intelligence Field of Dreams

CompanyConfidential

IssueswithDocumentTracking

When a document is opened up offline, it is possible that information will be divulged about the tracking service itself. Be cognizant of this when bugging documents.

Page 38: Threat Intelligence Field of Dreams

CompanyConfidential

IssueswithDocumentTracking

Visiting the site directly

Dead giveaway that something phishy is up…

Page 39: Threat Intelligence Field of Dreams

CompanyConfidential

IssueswithDocumentTracking

You may even get your domain flagged

This can hinder your tracking ability

Ensure that you check regularly…

Page 40: Threat Intelligence Field of Dreams

CompanyConfidential

Takingitastepfurther…• Honeybadger, Flash, Java, Client Side Code

If you are able to execute code on the endpoint, you can uncover the true location, regardless of proxy

Page 41: Threat Intelligence Field of Dreams

CompanyConfidential

Nohelpincourt…

• Evidenceobtainedviawebbugs,tracing,orsimilarformsoftrackingmaynotbeadmissibleincourt,asthiscouldbeconsideredentrapment.• FBICase– OperationTorpedo• https://www.wired.com/2014/08/operation_torpedo/

Page 42: Threat Intelligence Field of Dreams

CompanyConfidential

LegalitiesofDocumentBugging

• Isitspying?• Canyoureallygetintroublefortrackingyourownthings?• Allboilsdowntointent…verygreyarea.

Page 43: Threat Intelligence Field of Dreams

CompanyConfidential

BuggedDocumentsInPractice

ReversePhishing

Page 44: Threat Intelligence Field of Dreams

CompanyConfidential

Hewasevenkindenoughtocompletetheformandsenditback!

Page 45: Threat Intelligence Field of Dreams

CompanyConfidential

BuggedDocuments– InPractice

CaptureTheFlag– LogRhythmChallenge.com

Page 46: Threat Intelligence Field of Dreams

CompanyConfidential

InPractice

BuggingtheCTFinstructions…

Page 47: Threat Intelligence Field of Dreams

CompanyConfidential

BuggedDocuments– InPractice

“Weneedyourslides9-monthsaheadoftimeforthisindustry-leadingcybersecurityevent”– RandomConference

Page 48: Threat Intelligence Field of Dreams

CompanyConfidential

USBDrop– SecurityAwarenessCaseStudy

Page 49: Threat Intelligence Field of Dreams

CompanyConfidential

BuildingaBelievableCampaign

USBHumanInterfaceDevice(HID)attacksaretooobvious.Adeadgiveawaythatthetargetjustcompromisedtheirsystem.+Expensive.

http://hakshop.myshopify.com/products/usb-rubber-ducky-deluxe?variant=353378649

Page 50: Threat Intelligence Field of Dreams

CompanyConfidential

BuildingaBelievableCampaign

Userealisticfileswithsomewhatrealisticdata

Stagedapproachtotrackfileaccessandexploitation

Page 51: Threat Intelligence Field of Dreams

CompanyConfidential

README.doc

Page 52: Threat Intelligence Field of Dreams

CompanyConfidential

TrackingFileAccess

Buggeddocumentopenedwithinthecorporatenetwork?

Correlateaccesslogswithnetworkflowanalysistofindthevictim

Page 53: Threat Intelligence Field of Dreams

CompanyConfidential

WhoOpenedTheFile?

Page 54: Threat Intelligence Field of Dreams

CompanyConfidential

Competitive-Business-Analysis.xlsm

Page 55: Threat Intelligence Field of Dreams

CompanyConfidential

PowerShellMacro

Page 56: Threat Intelligence Field of Dreams

CompanyConfidential

PowerShellPrompt

PowerShellEmpire– Invoke-Prompt

Page 57: Threat Intelligence Field of Dreams

CompanyConfidential

Step1– CompressPowerShellScript

Page 58: Threat Intelligence Field of Dreams

CompanyConfidential

Step2– BuildtheMacroandInjectPowerShellScript

Page 59: Threat Intelligence Field of Dreams

CompanyConfidential

Step3-CustomizetheMacro

Page 60: Threat Intelligence Field of Dreams

CompanyConfidential

Step4- Profit

SendanemailwhentheMacroisrun…

Useabogusemail(unlikeIdidhere)– Iknow,Iknow.BadOpSec.

Page 61: Threat Intelligence Field of Dreams

CompanyConfidential

Page 62: Threat Intelligence Field of Dreams

CompanyConfidential

Tools\calculator.exe

Page 63: Threat Intelligence Field of Dreams

CompanyConfidential

Yep…Theyranit

“Nobody’sgoingtorunanexecutablefromsomerandomUSB”-- Greg

Page 64: Threat Intelligence Field of Dreams

CompanyConfidential

Nowwehaveourfoothold…

Fortunatelytheydidn’trunthisasanadmin

Page 65: Threat Intelligence Field of Dreams

CompanyConfidential

Page 66: Threat Intelligence Field of Dreams

CompanyConfidential

Page 67: Threat Intelligence Field of Dreams

CompanyConfidential

MacroAttackDetection

Page 68: Threat Intelligence Field of Dreams

CompanyConfidential

MalwareBeaconing

Page 69: Threat Intelligence Field of Dreams

CompanyConfidential

Conclusion

• DevelopingandleveragingactionableOSINTdatacanhelpoperationalizeThreatIntelligence

• DevelopacyclicalThreatIntelligenceecosystemandimplementautomatedresponses toknownthreats

• Takeproactivemeasuresbylayingtrapsandvariousflagsthatwillnotify theSOCtoanomalousactivity

• Useactivedefensetechniques tolearnmoreabouttheadversaryandattempttogainattribution

• Understandtheshortcomings ofattributionanddocumentbugging toavoidcommonpitfalls

• Communicateacrossvariousdepartmentsandcoordinatedefensiveefforts

Page 70: Threat Intelligence Field of Dreams

CompanyConfidential

James [email protected]

CISO | VP LogRhythm Labs

Greg [email protected]

Global Security Operations Team Lead

Thank You!