breaking f&b solutions · 2018. 2. 11. · headless browsers • browser without a gui, often...

34
Breaking Fraud & Bot Detection Solutions Mayank Dhiman Stealth Security

Upload: others

Post on 25-Feb-2021

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Breaking F&B Solutions · 2018. 2. 11. · Headless Browsers • Browser without a GUI, often used for automation and testing. • Either render full JS or run JS in a virtual DOM

BreakingFraud&BotDetectionSolutions

MayankDhimanStealthSecurity

Page 2: Breaking F&B Solutions · 2018. 2. 11. · Headless Browsers • Browser without a GUI, often used for automation and testing. • Either render full JS or run JS in a virtual DOM

Agenda

• ArchitecturalOverview• ThreatModel• Issues&Attacks• Takeaways

Page 3: Breaking F&B Solutions · 2018. 2. 11. · Headless Browsers • Browser without a GUI, often used for automation and testing. • Either render full JS or run JS in a virtual DOM

FraudDetection

• Defendagainstfraudulentlogins,paymentsetc.

• Lookforanomaliesinactivityofauser,givenpastactivity.

Page 4: Breaking F&B Solutions · 2018. 2. 11. · Headless Browsers • Browser without a GUI, often used for automation and testing. • Either render full JS or run JS in a virtual DOM

BotDetection

• Defendagainstbotstryingtotestcredentialdumps,scrapingetc.

• Botdetectionsolutionslookforanomaliesacrossentirepopulationsandtimeperiods.

Account TakeOver FakeAccounts PII/PHITheft

Page 5: Breaking F&B Solutions · 2018. 2. 11. · Headless Browsers • Browser without a GUI, often used for automation and testing. • Either render full JS or run JS in a virtual DOM

CloudDeployment

Mitigator

ServiceProvider

ClientBrowser WebServer

WebRequest1

Fingerprint.js2

3

4.FormSubmission4

5.RiskScore5

6.Block6

6.Allow6

Page 6: Breaking F&B Solutions · 2018. 2. 11. · Headless Browsers • Browser without a GUI, often used for automation and testing. • Either render full JS or run JS in a virtual DOM

InlineDeployments

InlineDevice

ClientBrowser WebServer

Allow

Block

2

WebRequest1

3 4

4

Fingerprint.js2

Page 7: Breaking F&B Solutions · 2018. 2. 11. · Headless Browsers • Browser without a GUI, often used for automation and testing. • Either render full JS or run JS in a virtual DOM

ThreatModel

• Attackerhasfullcontroloverthebrowser.• Attackercancraftrequestsandmodifyresponsesaccordingtotheresponsesfromthewebserver.

Page 8: Breaking F&B Solutions · 2018. 2. 11. · Headless Browsers • Browser without a GUI, often used for automation and testing. • Either render full JS or run JS in a virtual DOM

FundamentalIssueI

• Attackercanreverseengineertheentiresensor

Page 9: Breaking F&B Solutions · 2018. 2. 11. · Headless Browsers • Browser without a GUI, often used for automation and testing. • Either render full JS or run JS in a virtual DOM

BrowserFingerprinting

https://panopticlick.eff.org/

Page 10: Breaking F&B Solutions · 2018. 2. 11. · Headless Browsers • Browser without a GUI, often used for automation and testing. • Either render full JS or run JS in a virtual DOM

BrowserFingerprinting• Hardware

– CPU Architecture&DeviceMemory– GPUCanvasFingerprinting– AudioStackFingerprinting

• Software– UserAgent– OSVersion

• Storage– LocalStorage– SessionStorage

• Display– ColorDepth– ScreenSize

• BrowserCustomizations– Fonts– Plugins– Codecs– MimeTypes– Timezone– UserLanguage

• Misc.– Floatingpointcalculations– Addbehavior/callbacks/objectstoDOMtocheckarealJSexecutionengine

Page 11: Breaking F&B Solutions · 2018. 2. 11. · Headless Browsers • Browser without a GUI, often used for automation and testing. • Either render full JS or run JS in a virtual DOM

BrowserFingerprinting(Fingerprintjs2)

https://github.com/Valve/fingerprintjs2

Page 12: Breaking F&B Solutions · 2018. 2. 11. · Headless Browsers • Browser without a GUI, often used for automation and testing. • Either render full JS or run JS in a virtual DOM

UserBehavior• Mouse

– Coordinatesofwherethemovemoved– Coordinatesofclicks

• Keyboard– Streamofkeypresses

• Touchpad– Coordinatesofwherethescreenwas

touched

Page 13: Breaking F&B Solutions · 2018. 2. 11. · Headless Browsers • Browser without a GUI, often used for automation and testing. • Either render full JS or run JS in a virtual DOM

UserBehavior

• DeviceOrientation– 3Dangleofdevicewhenevertheorientationchanges

• DevicePosition– Recordspeedofchangeofdevice’sposition.

Timing informationalongwitheventtypecanbeused tocreateaveryaccuratepictureofwhatinteractionstookplaceonthewebpage.

Page 14: Breaking F&B Solutions · 2018. 2. 11. · Headless Browsers • Browser without a GUI, often used for automation and testing. • Either render full JS or run JS in a virtual DOM

Anti-Tampering&Anti-Reversing

• JavaScriptObfuscation• XORbasedpackedcode• Randomizename/locationoftheJavaScriptfiletoload

• DynamicFields

Page 15: Breaking F&B Solutions · 2018. 2. 11. · Headless Browsers • Browser without a GUI, often used for automation and testing. • Either render full JS or run JS in a virtual DOM

Payload

• PayloadEncoding(Base64)• SymmetricEncryption(DES)• CustomEncryptionSchemes

Page 16: Breaking F&B Solutions · 2018. 2. 11. · Headless Browsers • Browser without a GUI, often used for automation and testing. • Either render full JS or run JS in a virtual DOM

FundamentalIssueII

• TherearenoguaranteesofthecorrectexecutionofJavaScript

Page 17: Breaking F&B Solutions · 2018. 2. 11. · Headless Browsers • Browser without a GUI, often used for automation and testing. • Either render full JS or run JS in a virtual DOM

HeadlessBrowsers

• BrowserwithoutaGUI,oftenusedforautomationandtesting.

• EitherrenderfullJSorrunJSinavirtualDOM.

Page 18: Breaking F&B Solutions · 2018. 2. 11. · Headless Browsers • Browser without a GUI, often used for automation and testing. • Either render full JS or run JS in a virtual DOM

StrippingAttack

Mitigator

ServiceProvider

ClientBrowser WebServer

WebRequest1

Fingerprint.js2

3

4.FormSubmission4

5.RiskScore5

6.Block6

6.Allow6

Page 19: Breaking F&B Solutions · 2018. 2. 11. · Headless Browsers • Browser without a GUI, often used for automation and testing. • Either render full JS or run JS in a virtual DOM

StrippingAttack

Mitigator

ServiceProvider

ClientBrowser WebServer

WebRequest1

Fingerprint.js2

3

4.FormSubmission4

5.RiskScore5

6.Block6

6.Allow6

Page 20: Breaking F&B Solutions · 2018. 2. 11. · Headless Browsers • Browser without a GUI, often used for automation and testing. • Either render full JS or run JS in a virtual DOM

StrippingAttack

InlineDevice

ClientBrowser WebServer

Allow

Block

2

WebRequest1

3 4

4

Fingerprint.js2

Page 21: Breaking F&B Solutions · 2018. 2. 11. · Headless Browsers • Browser without a GUI, often used for automation and testing. • Either render full JS or run JS in a virtual DOM

StrippingAttack

InlineDevice

ClientBrowser WebServer

Allow

Block

WebRequest1

4

4

Fingerprint.js2

FormPOST3

MITMProxy

Page 22: Breaking F&B Solutions · 2018. 2. 11. · Headless Browsers • Browser without a GUI, often used for automation and testing. • Either render full JS or run JS in a virtual DOM

ReplayAttacks

• Nocheckonfreshnessofpayload.

Page 23: Breaking F&B Solutions · 2018. 2. 11. · Headless Browsers • Browser without a GUI, often used for automation and testing. • Either render full JS or run JS in a virtual DOM

DynamicTokens

• Adynamictokenisgenerated,whichisderivedfromthetimestamp.

• Samelogiccanbereplicatedinascript.

Page 24: Breaking F&B Solutions · 2018. 2. 11. · Headless Browsers • Browser without a GUI, often used for automation and testing. • Either render full JS or run JS in a virtual DOM

FundamentalIssueIII

• TherearenoguaranteesofthelegitimacyofthedatacollectedbytheJavaScriptsensors.

Page 25: Breaking F&B Solutions · 2018. 2. 11. · Headless Browsers • Browser without a GUI, often used for automation and testing. • Either render full JS or run JS in a virtual DOM

ForgingBrowserFingerprints

• FPRANDOM– Modifiedbrowserwhichintroducesnoiseduringbrowserfingerprint.

• OpenWPM –WebPrivacyMeasurementsoftware.

• DatabaseofNormalFingerprints

https://github.com/plaperdr/fprandomhttps://github.com/citp/OpenWPM

Page 26: Breaking F&B Solutions · 2018. 2. 11. · Headless Browsers • Browser without a GUI, often used for automation and testing. • Either render full JS or run JS in a virtual DOM
Page 27: Breaking F&B Solutions · 2018. 2. 11. · Headless Browsers • Browser without a GUI, often used for automation and testing. • Either render full JS or run JS in a virtual DOM

ForgingBrowserFingerprints

Page 28: Breaking F&B Solutions · 2018. 2. 11. · Headless Browsers • Browser without a GUI, often used for automation and testing. • Either render full JS or run JS in a virtual DOM

BadGuysAreAlreadyDoingthis

• Anti-Detect*$399intheunderground

https://krebsonsecurity.com/2015/03/antidetect-helps-thieves-hide-digital-fingerprints/

Page 29: Breaking F&B Solutions · 2018. 2. 11. · Headless Browsers • Browser without a GUI, often used for automation and testing. • Either render full JS or run JS in a virtual DOM

UserBehavior

• Replaywithchangedtimestamps• Addripplesanddisturbances• UseMITMProxy

Page 30: Breaking F&B Solutions · 2018. 2. 11. · Headless Browsers • Browser without a GUI, often used for automation and testing. • Either render full JS or run JS in a virtual DOM

FundamentalIssueIV

• JavaScriptcan’tprotectallflows.

Page 31: Breaking F&B Solutions · 2018. 2. 11. · Headless Browsers • Browser without a GUI, often used for automation and testing. • Either render full JS or run JS in a virtual DOM

FundamentalIssueV

• Themitigative actionactsasanoraclefortheattacker.

Page 32: Breaking F&B Solutions · 2018. 2. 11. · Headless Browsers • Browser without a GUI, often used for automation and testing. • Either render full JS or run JS in a virtual DOM

OtherIssues

• Fraud/BotDetectionSolutionsarethemselvesFingerprintable.

• SimilarissuesexistformobileappSDKbasedsolutions.

Page 33: Breaking F&B Solutions · 2018. 2. 11. · Headless Browsers • Browser without a GUI, often used for automation and testing. • Either render full JS or run JS in a virtual DOM

Takeaways

• ImplementationandArchitecturalIssuesinmultipledeployments.

• JavaScriptrunsinanattackercontrolledenvironment.

• Understandthelimitationsofsuchsolutions.• Protectallflows.

Page 34: Breaking F&B Solutions · 2018. 2. 11. · Headless Browsers • Browser without a GUI, often used for automation and testing. • Either render full JS or run JS in a virtual DOM

Questions?