adversary recon and practical - first — forum of incident … · 2016-06-12 · one weird trick....

37

Upload: others

Post on 27-May-2020

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Adversary Recon and Practical - FIRST — Forum of Incident … · 2016-06-12 · one weird trick. Initial phish domain. 17 The magic of cross-indexed Whois databases…. Inferring
Page 2: Adversary Recon and Practical - FIRST — Forum of Incident … · 2016-06-12 · one weird trick. Initial phish domain. 17 The magic of cross-indexed Whois databases…. Inferring

Adversary Recon and Practical Defenses Using Domain and DNS OSINT

Tim HelmingDirector, Product ManagementDomainTools

Page 3: Adversary Recon and Practical - FIRST — Forum of Incident … · 2016-06-12 · one weird trick. Initial phish domain. 17 The magic of cross-indexed Whois databases…. Inferring

Instruction Slide

• Please do not delete the title slide.• You are not required to use this template.• You are welcome to include your organization’s

logo/brand on the presentation title page. • You are also welcome to adjust the location of your

logo as long as it does not overlap/touch the FIRST logo.

• Your slides must be reviewed prior to your presentation by the FIRST Program Chair and Committee.

Page 4: Adversary Recon and Practical - FIRST — Forum of Incident … · 2016-06-12 · one weird trick. Initial phish domain. 17 The magic of cross-indexed Whois databases…. Inferring

Contents

• OSINTforadversaryanalysis—andwhyadversaryanalysisisuseful

• WhichOSINTsourcesarewetalkingabout?• ForensicDomainMapping:NexusDiscoveryand

Expansion• Attribution/Profiling/Analyzing.Withoutlurkingon

teh darkwebs (unlessthat’syourthing)• Oh,snap,we’rebreached.Nowwhat?• ContinuousSecurity&ThreatHunting

Page 5: Adversary Recon and Practical - FIRST — Forum of Incident … · 2016-06-12 · one weird trick. Initial phish domain. 17 The magic of cross-indexed Whois databases…. Inferring

So, me.

Beeninthesecuritygamealongtime.WhenIbegan…

-Startedasasupportguyatafirewallcompany-Eventuallyranproductatthefirewallcompany-NowrunningproductatDomainTools-Musician,radioham(WT1IM),motorcycleguy

(asacomiccharacterfromMIRcon)

Page 6: Adversary Recon and Practical - FIRST — Forum of Incident … · 2016-06-12 · one weird trick. Initial phish domain. 17 The magic of cross-indexed Whois databases…. Inferring

Combating Cybercrime…

At the destination (defending your assets)

6

At the source (shutting down criminal networks)

Page 7: Adversary Recon and Practical - FIRST — Forum of Incident … · 2016-06-12 · one weird trick. Initial phish domain. 17 The magic of cross-indexed Whois databases…. Inferring

Why do adversary analysis?

– Kevin Mandia

“Attribution is a proxy for risk.”

Page 8: Adversary Recon and Practical - FIRST — Forum of Incident … · 2016-06-12 · one weird trick. Initial phish domain. 17 The magic of cross-indexed Whois databases…. Inferring

Why do adversary analysis?

– Josh RayVP, Verisign iDefense

“The pursuit of attribution, manifesting itself in adversary analysis, can be employed to improve an organization's resource allocation and security posture.”

Page 9: Adversary Recon and Practical - FIRST — Forum of Incident … · 2016-06-12 · one weird trick. Initial phish domain. 17 The magic of cross-indexed Whois databases…. Inferring

Why do adversary analysis?Adversaryanalysis≠positiveattribution.Asolidprofilecanspeakvolumes.

• Calculatedvsopportunistic/scattershotattack• Lonewolfvsconnectednetwork• Scaleofoperations• Natureofoperations• TT&Ps

…manyofwhichcanbediscernedquickly,tohelpyoutriageindicators

Page 10: Adversary Recon and Practical - FIRST — Forum of Incident … · 2016-06-12 · one weird trick. Initial phish domain. 17 The magic of cross-indexed Whois databases…. Inferring

Why do adversary analysis?

Asolidprofile(orpositiveattribution)enablesmultipleactions:

• Lookforlateralmovement• Discoverdwelltime(morelater)• Monitorattackers• Learnmoreviasearch(i.e.younowhaveabunchmoresearchterms)

Page 11: Adversary Recon and Practical - FIRST — Forum of Incident … · 2016-06-12 · one weird trick. Initial phish domain. 17 The magic of cross-indexed Whois databases…. Inferring

Threat Actor OpSec and Patterns

11

It’s easier for everyone—including the bad guys—to follow patterns than to act randomly. Poor OpSec heightens their risk of exposure.

There are patterns evident in DNS/Whois OSINT that can be discerned…

…and anticipated

(…and others that can be red herrings)

Page 12: Adversary Recon and Practical - FIRST — Forum of Incident … · 2016-06-12 · one weird trick. Initial phish domain. 17 The magic of cross-indexed Whois databases…. Inferring

Sources of OSINT• DNS lookups(manysourcesofpassive/massiveDNS.Live

lookupsarefinebutdon’tscale)• Dig (commandline)• Whoislookups (manywebsources,orport43from

commandline)• MXrecords(severalwebsources,commandlinealso

supportsthis)• Archive.org’sWayback Machine• Searchengines(thereareafewofthesetooJ)• Malwareanalysis(wewon’tbecoveringthattoday)

Page 13: Adversary Recon and Practical - FIRST — Forum of Incident … · 2016-06-12 · one weird trick. Initial phish domain. 17 The magic of cross-indexed Whois databases…. Inferring

OSINT = Free?

Shortanswer• Piecemeal:Yes• Atscale:No(typically)

Longeranswer• Withsomework,therearethingsyoucandotoautomate

collection/queryingofOSINTinlarge(ish)volumes,but…• Considerthedomains-by-IPproblem• Thereareproductsthatsolvethescale/cross-indexing

problemforyou

Page 14: Adversary Recon and Practical - FIRST — Forum of Incident … · 2016-06-12 · one weird trick. Initial phish domain. 17 The magic of cross-indexed Whois databases…. Inferring

Examples – introduction

Usingaphishingattack,anAPT,andanad-hocinvestigationofaDDoS service,wewillsee:

• Forensicdomainmapping• Techniques:“nexusdiscovery”

and“expansion”• Adversaryanalysistechniques

Page 15: Adversary Recon and Practical - FIRST — Forum of Incident … · 2016-06-12 · one weird trick. Initial phish domain. 17 The magic of cross-indexed Whois databases…. Inferring

15

Begin with the domain

GoeoglleDoc.com

ScenarioGoogle document

phishing attack

Goalsprofile threat and

assess risk

Profile your adversary with this one weird trick

Page 16: Adversary Recon and Practical - FIRST — Forum of Incident … · 2016-06-12 · one weird trick. Initial phish domain. 17 The magic of cross-indexed Whois databases…. Inferring

Initial phish domain

Page 17: Adversary Recon and Practical - FIRST — Forum of Incident … · 2016-06-12 · one weird trick. Initial phish domain. 17 The magic of cross-indexed Whois databases…. Inferring

17

The magic of cross-indexed Whois databases….

Page 18: Adversary Recon and Practical - FIRST — Forum of Incident … · 2016-06-12 · one weird trick. Initial phish domain. 17 The magic of cross-indexed Whois databases…. Inferring

Inferring Adversary IntentReginaldC.Rodman:BusyGuy

OSINTsources:

• commercialWhoisdataproviders

This phone number connects to other domains, all registered to Reginald Rodman. Known as “Reverse Whois”

Strong inferences:

• Targeting banks• These domains

registered within 3 days of each other

Page 19: Adversary Recon and Practical - FIRST — Forum of Incident … · 2016-06-12 · one weird trick. Initial phish domain. 17 The magic of cross-indexed Whois databases…. Inferring

19

Goals: profile threat and assess riskNext Steps:

• Searchfordomainsinnetworklogs

• Proactivelyblockaccess• Studyattacker’sinfrastructure• Monitorfutureregistrations

Use It!

Page 20: Adversary Recon and Practical - FIRST — Forum of Incident … · 2016-06-12 · one weird trick. Initial phish domain. 17 The magic of cross-indexed Whois databases…. Inferring

What Makes a Good Nexus?

• Uniquenessofthedatapoint• [email protected] isNOTagoodnexus• [email protected] ISagoodnexus

• Smalleris(generally)better• AhostingIPwith100Ksitesisnotgoingtotell

youmuchaboutyourtargetdomain• Asingleorlow-countIPismorelikelytoindicate

connectionandaffinity• Adatapoint withsemanticmeaningisgood

• “[email protected]”tellsussomething…

Page 21: Adversary Recon and Practical - FIRST — Forum of Incident … · 2016-06-12 · one weird trick. Initial phish domain. 17 The magic of cross-indexed Whois databases…. Inferring

Example 2: APT 28 (FireEye report)

“WehaveseenAPT28registeratleasttwodomainsmimickingthedomainsoflegitimateorganizationsintheCaucasus…OneAPT28domainimitatedakeyChechen-focusednewswebsite,whiletheotherappearedtotargetmembersoftheArmenianmilitarybyhostingafakeloginpage.”– Page11,APT28Report

Page 22: Adversary Recon and Practical - FIRST — Forum of Incident … · 2016-06-12 · one weird trick. Initial phish domain. 17 The magic of cross-indexed Whois databases…. Inferring

IP Nexus

OSINTsources:

• port43• passiveDNS• commercial

providers

Page 23: Adversary Recon and Practical - FIRST — Forum of Incident … · 2016-06-12 · one weird trick. Initial phish domain. 17 The magic of cross-indexed Whois databases…. Inferring

IP Expansion

Noticeanything?

• googleproductupdate• sry-yahoo• update-windows• …etc

Apatternisclear…

OSINTsources:

• passiveDNS• commercial

providers

Page 24: Adversary Recon and Practical - FIRST — Forum of Incident … · 2016-06-12 · one weird trick. Initial phish domain. 17 The magic of cross-indexed Whois databases…. Inferring

Example 3: DDoS for sale

DDoS brokersabound.

Example:top10booters[.]com

Weknowthissiteisbad.Butcanwelearnmoreaboutitsextendednetwork? Itsoperator(s)?

Page 25: Adversary Recon and Practical - FIRST — Forum of Incident … · 2016-06-12 · one weird trick. Initial phish domain. 17 The magic of cross-indexed Whois databases…. Inferring

Seek Nexus…

• RegistrantName/Address:notinteresting• RegistrantEmail

– 2addresseslookinteresting(abuse@enom isnot interesting)

• DNS– IPaddress:couldbeinteresting(staytuned)– MX:onlyinterestinginthattheyhave MX– NS:notinteresting

Page 26: Adversary Recon and Practical - FIRST — Forum of Incident … · 2016-06-12 · one weird trick. Initial phish domain. 17 The magic of cross-indexed Whois databases…. Inferring

Expansions: IP and email

Nexus:185.30.165.39• top10booters[.]com• darkbooter[.]com• darkbooter[.]net• fatal-mt2[.]net• hazebooter[.]com• hazebooter[.]net• icestresser[.]com• iddos[.]co• iddos[.]net• ionbooter[.]com• ipstressers[.]com• minecraftkings[.]net• pcgameguides[.]net

Nexus:[email protected]• ddosninja[.]com• dimension[.]li• expuse[.]in• iddos[.]co• ionbooter[.]com• ituneshacks[.]com• newmicrosoftoffice[.]com• pcgameskeys[.]net• pickmypromdress[.]com• top10booters[.]com• xboxburn[.]com• xboxonecompetitions[.]com

Page 27: Adversary Recon and Practical - FIRST — Forum of Incident … · 2016-06-12 · one weird trick. Initial phish domain. 17 The magic of cross-indexed Whois databases…. Inferring

Attribution path

Top10booters[.]com

185.30.165.39 [email protected]

22 likely-connected domains

6 unique, non-anonymous email addresses

1 strong candidate for our attacker

22…

2 names with tight connections to top10booters

10 not-obviously-fake human names

Page 28: Adversary Recon and Practical - FIRST — Forum of Incident … · 2016-06-12 · one weird trick. Initial phish domain. 17 The magic of cross-indexed Whois databases…. Inferring

Capitalize on “slOPSec”Sometimes,registrantsinitiallyregisteropenly,addprivacylater.Oops!(exampledotnetexplorer[.]info fromVolatileCedar)

Today: Earlier:

Page 29: Adversary Recon and Practical - FIRST — Forum of Incident … · 2016-06-12 · one weird trick. Initial phish domain. 17 The magic of cross-indexed Whois databases…. Inferring

Capitalize on “slOPSec”CorroborateviaWayback Machineorscreenshothistorytools

Today: Earlier:

Page 30: Adversary Recon and Practical - FIRST — Forum of Incident … · 2016-06-12 · one weird trick. Initial phish domain. 17 The magic of cross-indexed Whois databases…. Inferring

30

Apply It…

Page 31: Adversary Recon and Practical - FIRST — Forum of Incident … · 2016-06-12 · one weird trick. Initial phish domain. 17 The magic of cross-indexed Whois databases…. Inferring

Mitigation:• Lockdownagainst

observed threats• Findandlockdown

againstexpandedthreatnetwork

Today

OSINT in Continuous Security

Forensics:• Werethesedomains

orIPsseenpreviously?

• Innocuous-lookingtrafficmighthavebeenevil

LookingBack

Prevention:• Monitornew

registrationsbythisactor

• Defendbeforeattacksarelaunched

LookingAhead

It’snotjustforIRanymore…

Page 32: Adversary Recon and Practical - FIRST — Forum of Incident … · 2016-06-12 · one weird trick. Initial phish domain. 17 The magic of cross-indexed Whois databases…. Inferring

Oh, Snap—I’m Breached! Now What?

OHSNAP!

exfiltrationdomain.com

datahemorrhage

pwnyoudomain.comlulzdomain.com

datatrickles

Undertheradar

UseOSINTtoexpand

exfiltrationdomain.com(nexusdiscovery)->(expansion)->pwnyoudomain.comlulzdomain.comwewinulosedomain.com…etc

OK-stoppedthe leak.But…

Howlonghavetheybeeninside?Wherehavetheybeensendingmydata?Wheremighttheytrytosenditnext?time

Page 33: Adversary Recon and Practical - FIRST — Forum of Incident … · 2016-06-12 · one weird trick. Initial phish domain. 17 The magic of cross-indexed Whois databases…. Inferring

OSINT in Continuous Security and for Hunt Teams

1)Detect initialindicators,expand toconnectedassets2) Review archivesforearlieroccurrencesofexpandedthreatnetwork

3)Monitor cybersquatters,repeat-offenderdomainregistrants

4) Proactivelyblocknewthreatinfrastructure

12

3 4

Page 34: Adversary Recon and Practical - FIRST — Forum of Incident … · 2016-06-12 · one weird trick. Initial phish domain. 17 The magic of cross-indexed Whois databases…. Inferring

Summing Up• Adversaryanalysisisworthwhile,

especiallyforattention-gettingthreatindicators

• SourcesofOSINTabound• Piecemeallookupsarefree;at-scale

typicallyis$• Technique:nexusdiscoveryandexpansion

• “Nexus:”adatapointthatconnectsinfrastructure

• “Expansion:”thebroadersetofconnectedentities,expandedfromtheoriginalone

• Thesetechniqueshaveapplicationacrosstensesoftime

Page 35: Adversary Recon and Practical - FIRST — Forum of Incident … · 2016-06-12 · one weird trick. Initial phish domain. 17 The magic of cross-indexed Whois databases…. Inferring

Wrapping Up

Q&A

Page 36: Adversary Recon and Practical - FIRST — Forum of Incident … · 2016-06-12 · one weird trick. Initial phish domain. 17 The magic of cross-indexed Whois databases…. Inferring

Thank [email protected]

@timhelming

Page 37: Adversary Recon and Practical - FIRST — Forum of Incident … · 2016-06-12 · one weird trick. Initial phish domain. 17 The magic of cross-indexed Whois databases…. Inferring