35
TAG ME IF YOU CAN Ido Naor Sr. Researcher, Kaspersky Lab Tw: @idonaor1 Dani Goland Founder & CEO, Undot Tw: @danigoland

[CB16] Facebook Malware: Tag Me If You Can by Ido Naor & Dani Goland

Embed Size (px)

Citation preview

Page 1: [CB16] Facebook Malware: Tag Me If You Can by Ido Naor & Dani Goland

TAG ME IF YOU CAN

Ido NaorSr. Researcher, Kaspersky Lab Tw: @idonaor1

Dani GolandFounder & CEO, Undot Tw: @danigoland

Ido Naor
Ido
Page 2: [CB16] Facebook Malware: Tag Me If You Can by Ido Naor & Dani Goland

GReAT - Kaspersky Lab Elite Team Of Researchers

Global Research & Analysis Team, Since 2008

Threat Intelligence, research and innovation leadership

Focus: APTs, critical infrastructure threat, banking threats, sophisticated targeted attacks.

• A decade in security eco• Manage regional research in

Israel• ExpertiZ

• Malware analysis• Reverse Engineering• Penetration Testing

• HobbiZ Responsible Disclosure:

Ido Naor
Ido
Page 3: [CB16] Facebook Malware: Tag Me If You Can by Ido Naor & Dani Goland

Undot – Uncovering Ideas

• Founder & CEO, Undot

• ExpertiZ• Full-Stack Developer• Entrepreneur• Data Science Freak

• HobbiZOrganizing and competing

in Hackathons

UndotExpertswith

Control It – Remotes Unified!

~500K downloads

Front

Mobile

Back

Cloud

Ido Naor
dani
Page 4: [CB16] Facebook Malware: Tag Me If You Can by Ido Naor & Dani Goland

IN THE NEWS…

Ido Naor
dani
Page 5: [CB16] Facebook Malware: Tag Me If You Can by Ido Naor & Dani Goland

RECAP

Ido Naor
ido
Page 6: [CB16] Facebook Malware: Tag Me If You Can by Ido Naor & Dani Goland
Ido Naor
ido
Page 7: [CB16] Facebook Malware: Tag Me If You Can by Ido Naor & Dani Goland

MENTIONED BY A FRIEND

Ido Naor
ido
Page 8: [CB16] Facebook Malware: Tag Me If You Can by Ido Naor & Dani Goland

WINDOWS DESIGNATED

• File: comment_27734045.jse• Language: JScript• Size: ~5.31 KB• MD5: 9D3DF2A89FDB7DA40CEB4DE02D605CFA• SHA1: 6D658331FE6D7F684FEE384A29CE95F561A5C2EA

JScript is Microsoft's dialect of the ECMAScript standard[2] that is used in Microsoft's Internet Explorer.

JScript is implemented as an Active Scripting engine. This means that it can be "plugged in" to OLE Automation

applications that support Active Scripting, such as Internet Explorer, Active Server Pages, and Windows Script Host.[3] It

also means such applications can use multiple Active Scripting languages, e.g., JScript, VBScript or PerlScript.

Ido Naor
dani
Page 9: [CB16] Facebook Malware: Tag Me If You Can by Ido Naor & Dani Goland

GLIMPSE INTOTHE JSE TROJAN

1) Domain name2) Msxml2.XMLHTTP3) ADODB.Stream4) Wscript.Shell5) JPG ext?6) %AppData%7) Autoit.exe8) Manifest.json9) Run.bat10) Ping.js

Ido Naor
dani
Page 10: [CB16] Facebook Malware: Tag Me If You Can by Ido Naor & Dani Goland

WHO IS REALLY AMONG US?

/Stats/history/pingjse3462

Dani Goland
[email protected] Check the highlighted text in the description
Ido Naor
how about now?
Ido Naor
dani
Page 11: [CB16] Facebook Malware: Tag Me If You Can by Ido Naor & Dani Goland

BACKGROUND CHECK

• Emerged: January 2015 on• Turkish variables and comments in its files• Threat actor: BePush/Killim• Innovative techniques to spread malware through social networks• Favor multi-layered obfuscation, mainly in JavaScript, and utilize

multi-layered URL shorteners, third-party hosting providers and multi-stage payloads.

• Obfuscate their infrastructure using Cloudflare

Ido Naor
ido
Page 12: [CB16] Facebook Malware: Tag Me If You Can by Ido Naor & Dani Goland

INITIAL INFECTION

Ido Naor
ido
Page 13: [CB16] Facebook Malware: Tag Me If You Can by Ido Naor & Dani Goland

DYNAMIC ANALYSIS

Ido Naor
ido
Page 14: [CB16] Facebook Malware: Tag Me If You Can by Ido Naor & Dani Goland

CHROME EXTENSION AS A MITM

Ido Naor
ido
Page 15: [CB16] Facebook Malware: Tag Me If You Can by Ido Naor & Dani Goland

?A HIDDEN VULNERABILITY

Ido Naor
dani
Page 16: [CB16] Facebook Malware: Tag Me If You Can by Ido Naor & Dani Goland

THE MISSING PIECE

Ido Naor
dani
Page 17: [CB16] Facebook Malware: Tag Me If You Can by Ido Naor & Dani Goland

OBFUSCATED DROPPER

Ido Naor
ido
Page 18: [CB16] Facebook Malware: Tag Me If You Can by Ido Naor & Dani Goland

DEOBFUSCATION

Ido Naor
ido
Page 19: [CB16] Facebook Malware: Tag Me If You Can by Ido Naor & Dani Goland

ANTI-ANALYSIS

• Debugger;

Ido Naor
ido
Page 20: [CB16] Facebook Malware: Tag Me If You Can by Ido Naor & Dani Goland

ANTI-ANALYSIS

• Code hashes

Ido Naor
ido
Page 21: [CB16] Facebook Malware: Tag Me If You Can by Ido Naor & Dani Goland

INITIATING THE CODE CRASH

Dani Goland
[email protected] Who is doing this?
Ido Naor
dani (:
Page 22: [CB16] Facebook Malware: Tag Me If You Can by Ido Naor & Dani Goland

GOOGLE TOKEN HIJACK

• Google URL Shortner• Google Drive API

Ido Naor
dani
Page 23: [CB16] Facebook Malware: Tag Me If You Can by Ido Naor & Dani Goland

GOOGLE DRIVE AS A MALWARE HUB

Ido Naor
dani
Page 24: [CB16] Facebook Malware: Tag Me If You Can by Ido Naor & Dani Goland

VICTIM INFO STEALERDropper → Chrome Takeover → Malicious JS → Google Permissions → Uploading malware to storage → HERE

Ido Naor
ido
Page 25: [CB16] Facebook Malware: Tag Me If You Can by Ido Naor & Dani Goland

VICTIM INFO STEALER

Ido Naor
ido
Page 26: [CB16] Facebook Malware: Tag Me If You Can by Ido Naor & Dani Goland

VICTIM INFO STEALER

Ido Naor
ido
Page 27: [CB16] Facebook Malware: Tag Me If You Can by Ido Naor & Dani Goland

GOOGLE DRIVE PERMISSION MODIFICATION

Ido Naor
dani
Page 28: [CB16] Facebook Malware: Tag Me If You Can by Ido Naor & Dani Goland

CREATING MALICIOUS CALLERS

Ido Naor
dani
Page 29: [CB16] Facebook Malware: Tag Me If You Can by Ido Naor & Dani Goland

FACEBOOK TOKEN HIJACK

Ido Naor
dani
Page 30: [CB16] Facebook Malware: Tag Me If You Can by Ido Naor & Dani Goland

HOW TO FAIL SAFE

Dani Goland
[email protected] Who is doing this?
Page 31: [CB16] Facebook Malware: Tag Me If You Can by Ido Naor & Dani Goland

HOW TO FAIL SAFE

Ido Naor
ido
Page 32: [CB16] Facebook Malware: Tag Me If You Can by Ido Naor & Dani Goland

VULNERABILITY IN THE WILD

1) Initialize a request to the comment plugin

2) Get api_key & comment data3) Create a comment on the

plugin, containing url to Google Drive

4) Post is now posted – get its ID5) Create a new comment on the

web platform6) Inject the ID from the FB plugin

to the web FB comment ID 7) Notification generated8) FB debug check9) Set privacy to public10) Set comment text to null

deleting the traces.

this.commentData["share_id"] = globalFunction["between"]('"commentIDs":["', '"', f["responseText"])["split"]("_")[1]; // 400539608410_10153962897128411

post_params = {"ft_ent_identifier": this["commentData"]["share_id"], ← injection!!"comment_text": gF["chain"](10)["toLowerCase"](),"source": 21,"client_id": Date["now"]() + ":" + Math["floor"](U2e[F](Date["now"](), 1000)),"session_id": globalFunction["chain"](8)["toLowerCase"](),"comment_text": "Array of tagged friends"}url: "https://www.facebook.com/ufi/add/comment/?dpr=1",type: "POST",async: true,headers: {  "content-type": "application/x-www-form-urlencoded"}

www.facebook.com/plugins/feedback.php?api_key=<ID>&href=https://<GOOGLE_DRIVE>/<JSE_FILE>

Ido Naor
dani
Ido Naor
fix animation
Page 33: [CB16] Facebook Malware: Tag Me If You Can by Ido Naor & Dani Goland

ALL IN ALL

Ido Naor
dani
Page 34: [CB16] Facebook Malware: Tag Me If You Can by Ido Naor & Dani Goland

QUESTIONS?

Ido Naor
dani
Page 35: [CB16] Facebook Malware: Tag Me If You Can by Ido Naor & Dani Goland

THANK YOU!Follow us on Twitter:

@IdoNaor1@DaniGoland