The Listening
The Listening
Esteban Guillardoy
[email protected]
1
Introduction
2
Demo
Malicious Brainstorming...
4
Adapting the idea
5
The challenge
Targets go on and off
Covertness without losing reliability
Routing the data
Stealthiness
7
Email Client Extensions
Trusted code
Program execution
Easy development
8
Backdoor controlled by
simply sending emails
9
Features
Predefined Actions
10
11
Mozilla Addons/Extensions
Basic structure:
/components/*
/content or /chrome/content
/defaults/preferences/*.js
/chrome.manifest
/install.rdf
12
Development
Must have tools
Firebug + ChromeBug Extension Developer
Chrome List Extension Manager Extended
Console2 Inspector Widget
DOM Inspector MozRepl
Event Spy XPCOMViewer
13
How it works
14
Email Check
attachment.contentType.match(/image\/png/) != null
15
Encryption
Implementation in Javascript
16
Hiding Information
Original Modified
17
Hiding Information
Least Significant Bit (LSB) algorithm
0 1 1
0 1 1 0 0 0 0 1 = a
18
Hiding Information
Python Implementation
Using Python Imaging Library (PIL)
Some bitwise operations and we are ready
Javascript Implementation
Hidden iframe to create a HTML5 canvas element
Retrieve pixel info with:
var context = canvas.getContext('2d');
var data = context.getImageData(0,0,canvas.width,canvas.height);
19
Execution
20
Getting Output
1) XMLHttpRequest
2) Sending an email
New email:
Components.classes["@mozilla.org/messengercompose;1"]
Components.classes["@mozilla.org/messenger/account-manager;1"]
Send it:
Components.classes["@mozilla.org/messengercompose/compose;1"]
Delete it from Sent folder
21
Deployment
Discover profiles by reading profiles.ini:
Windows, usually in %AppData% \Thunderbird\
Linux, usually in ~/.thunderbird/ or
~/.mozilla-thunderbird/
Mac OS X, usually in ~/Library/Thunderbird/
22
Deployment - Injecting
Existing Addon
1) Installed addons in %profile-dir%/extensions.ini
2) Copy backdoor into %selected-addon%/content/
3) Edit chrome.manifest
overlay chrome://messenger/content/messenger.xul
chrome://selected-addon/content/backdoorOverlay.xul
Hard to detect
User trusts installed addons
Addon updates are a problem
23
Deployment - New Addon
24
25
Deployment alternatives
Install Manifest (install.rdf)
<em:updateURL>
<em:updateKey>
28
Avoiding detection
29
Capabilities Demo
30
Getting PGP Information
Hook enigMessageDecrypt
EnigGetSecretKeys &
enigmailSvc.extractKey FTW
31
Improvements
Unicode steganography
32
Alternative uses
others?
33
Conclusion
Multiplatform backdoor
34
Reference & Similar work
35
The End
Questions?
Esteban Guillardoy
[email protected]
@sagar38
36