Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

79
Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code Forget Malicious Links and Fear the QR Code http://bit.ly/ consec2012 Steve Werby Security Researcher and Consultant ConSec 2012

description

Malicious URLs have been plaguing users for years. Leveraging of shortened URLs, redirect exploits, and other techniques have made detection of malicious links a much tougher problem for users who have to make a decision and for technical controls. This has gotten worse with the proliferation of QR codes and NFC tags. In this talk, I'll discuss research I conducted concerning the effectiveness of attacks using malicious QR codes, issues with mobile device QR code readers, an education campaign that resulted, and recommendations for users, publishers, app developers, and information security practitioners.

Transcript of Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Page 1: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Forget Malicious Links and Fear the QR Code

http://bit.ly/consec2012

Steve WerbySecurity Researcher and ConsultantConSec 2012

Page 2: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

The rules Have a question? Ask away! Have a comment? Share! I will ask you some questions too. I will give away Attrition shirts to a subset

of those who participate

Page 3: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Disclaimer

The opinions shared represent my views, the views of my clients, the views of my past employers, and most importantly, the views of my future employers.

Page 4: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Disclaimer

The opinions shared represent my views, the views of my clients, the views of my past employers, and most importantly, the views of my future employers.

Page 5: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Disclaimer

Ahoy, matey! Th' opinions shared represent me views.

Page 6: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Who am I?

Page 7: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Who am I? ISACA Certified Information Security Manager (CISM), 2010 (not quite) (ISC)2 Certified Information Systems Security Professional (CISSP), 2010 GIAC Security Leadership Certification (GSLC), 2008 GIAC Certified Forensics Analyst (GCFA), 2007 GIAC Web Application Security Certificate (GWAS), 2007 GIAC Security Essentials Certification (GSEC), 2007 GIAC Certified Incident Handler (GCIH), 2006 MBA, Virginia Commonwealth University BS, Industrial and Systems Engineering, Virginia Tech

Page 8: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Who am I?

Page 9: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Who am I?

Page 10: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Who am I?

Page 11: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Agenda

1. Overview of QR codes2. Planning the research study3. Deploying the research study4. Analysis of the results5. Education campaign6. Recommendations to reduce risk7. Q&A

Page 12: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Takeaways

1. QR codes pose risk similar to shortened URLs

2. Not all QR code readers created equal3. People easily socially engineered4. Resource for educating users

Page 13: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Overview: Shortened URL risk No visual cue what the destination web

page is May point to a malicious web page May point to a legitimate web page, with

an intermediary malicious web page

bit.ly/a301xD => ?

Page 14: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Overview: QR codes

1. 2-d barcode2. Varies by:

1. Mode2. Version3. Level of error correction

Page 15: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Overview: QR codes

Page 16: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Overview: Target actions

1. URL2. Text3. Calendar entry4. SMS5. Email6. vCard7. Phone call

Page 17: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Overview: Threat

1. Deliver [malicious|undesired] payload2. Funnel to [malicious|undesired] destination3. MiTM

Page 18: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Overview: Threat

1. Deliver [malicious|undesired] payload1. Exploit app vulnerability2. Exploit OS vulnerability

2. Funnel to [malicious|undesired] destination1. Phishing page2. Premium SMS

3. MiTM1. Clickjacking, framesniffing, etc.2. CSRF, XSS

Page 19: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Overview: Examples

Page 20: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Overview: Examples

Page 21: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Overview: Examples

Page 22: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Overview: Examples

Page 23: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Overview: Examples

Page 24: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Overview: Examples

Page 25: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Overview: Examples

Page 26: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Overview: Examples

Page 27: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Overview: Examples

Page 28: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Overview: Examples

Page 29: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Overview: Examples

Page 30: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Overview: Examples

Page 31: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Overview: Examples

Page 32: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Overview: Examples

Page 33: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Overview: Examples

Page 34: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Overview: Examples

Page 35: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Planning: Goals Evaluate QR code readers’ controls and

default behavior Assess user vulnerability to attacks Educate users

Page 36: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Planning Mediums What to measure Granularity

Page 37: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Planning: Mediums Electronic – web, email, Facebook 1:1 print – mailers, newspaper inserts, flyers 1:n print

Page 38: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Planning: Campaigns Classes

Original Added Overlaid

Original No written URL Written shortened URL Written

Page 39: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Planning: Granularity

Granular Campaign Campaign variants Physical location by GPS coordinates Target action performed Education

Page 40: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Planning: What to measure Count people scanning QR code Count people who perform target action

By choice Automatically

Effectiveness of campaign types Effectiveness of context

Page 41: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Planning: Flow qrcoderisk.com spoofed spoofed => qrcoderisk.com innocuous innocuous => qrcoderisk.com Shortened URL => qrcoderisk.com Shortened URL => qrcoderisk.com => real Shortened URL => innocuous => real Shortened URL => spoofed => real

Page 42: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Planning: Attributes to capture

Campaigns Campaign ID Campaign variant ID Campaign description Flow type (direct, shortened URL) URL display type (none, shortened URL,

real)

Page 43: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Planning: Attributes to capture

Deployments QR code ID Campaign variant ID Physical location GPS coordinates Number deployed Type (original, added, overlaid) Date deployed Picture

Page 44: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Planning: Attributes to capture

Tracked Visit ID QR code ID Campaign variant ID IP address (stripped/purged after 72 hours) User agent Date/time

Page 45: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Planning: Attributes to capture

Surveyed Visit ID QR code reader Knowledge of QR code risk

Data backed up QR code reader behavior

Page 46: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Planning: Hosts and services

Hosts qrcoderisk.com the<word>portal.com qrcode<obfuscated>.com (innocuous) bit.ly/qrcodeNNN

Services Amazon EC2 – LAMP platform bitly QRStuff QR Code Generator GPS Status (Android app) Several Android QR code readers

Page 47: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Deploying: Setup Generate shortened URLs using bitly Create unique QR codes pointing to

unique URLs Print documents and stickers

Page 48: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Deploying: Locations Easy to access High foot traffic Low security Unlikely to be removed quickly

Page 49: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Deploying: Campaigns Original

Suspicious Plausible

Added / overlaid Anything went

Page 50: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Deploying: Campaigns

Page 51: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Deploying: Campaigns

Page 52: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Deploying: Campaigns

Page 53: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Deploying: Campaigns

Page 54: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Deploying: Campaigns

Page 55: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Deploying: Campaigns

Page 56: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Deploying: Locations Stores (grocery, department, etc.) Schools Events (sporting, conferences) Vehicles (authorized!)

Page 57: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Deploying: Campaigns

Page 58: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Deploying: Campaigns

Page 59: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Deploying: Campaigns

Page 60: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Deploying: Campaigns

Page 61: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Deploying: Campaigns

Page 62: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Deploying: Campaigns

Page 63: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Deploying: Campaigns

Page 64: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Deploying: Campaigns

Page 65: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Deploying: Campaigns

Page 66: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Deploying: Campaigns

Page 67: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Analysis: Capturing bitly tracking (when used) Apache access.log MySQL DB populated from access.log,

user actions, user input

66.87.xxx.yyy - - [14/Sep/2012:12:33:52 +0000] "GET /nnn HTTP/1.1" 200 558 "-" "Mozilla/5.0 (iPhone; CPU iPhone OS 5_1_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9B206 Safari/7534.48.3"

Page 68: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Analysis (preliminary): Campaigns

Ranking

Free iPad (20)Work at home (17)Scan me for recipes (13)Catchall of Added (11)Mystery shopper (9)Scan this I dare you (8)Catchall of Overlaid (7)Don’t scan me (6)Only a QR code (5)Scan me (4)

Page 69: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Analysis: Tools for Android

ToolExpand Shortened URL

Warn if Malicious

Default Post-Scan Actions

Edit Post-Scan Actions

Save Scanned QR Codes

QR Droid No No Ask By Type YesMicrosoft tag No No Open No Yes

Quick Barcode Scanner No No Open No No

Scanlife Barcode & QR Reader

No No Open Yes, Global Yes

QuickMark Barcode Scanner

No No Ask No Yes

Page 70: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Education campaign: Components Risks that QR codes can pose What to look for Tool features Tool recommendations

Page 71: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Education campaign: Measurement Knowledge of the risk QR reader used What gained

New knowledge Intent to change behavior

Page 72: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Reducing risk: Publishers Describe in detail what the QR code does Do not use shortened URLs for QR codes

Page 73: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Reducing risk: App developers Give user control over QR code actions Set default settings to lowest risk

Page 74: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Reducing risk: Users Be cautious Use QR code readers with adequate

controls and enable them

Page 75: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Reducing risk: Infosec practitioners Make constituents aware of risk Deploy/configure/recommend adequate

tools

Page 76: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Takeaways

1. QR codes pose risk similar to shortened URLs

2. Not all QR code readers created equal3. People easily socially engineered4. Resource for educating users

Page 77: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Thanks @itandmore for helping come up with the

research idea @tbwerby for assisting with copywriting,

graphics, and deployment Volunteers for deployment assistance wtfqrcodes.com for many of the

interesting QR code examples ConSec for selecting my presentation

Page 78: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Next steps Continue research (volunteers?) Implement qrcoderisk.com as an ongoing

security awareness site (possibly)

Page 79: Forget Malicious Links and Fear the QR Code Presented by Steve Werby at ConSec 2012

Steve Werby (@stevewerby) ConSec 2012: Forget Malicious Links and Fear the QR Code

Q&A

Ask now, ||Track me down later ||<EMAIL ADDRESS STRIPPED> ||@stevewerby ||DerbyCon ||SecTor ||Hack3rcon