Sep 18, 2014 - Android malware authors have always liked to hide malicious parts in applications they create ..... src/angecryption/slides/AngeCryption.pdf. 10 ...
@K33nTeam. AH! UNIVERSAL ANDROID. ROOTING IS BACK ... Present Situadon of Android Roodng. ⢠Awesome Bug (CVE-â2015-â3636) ... Page 10 ...
Analyzing obfuscated Javascript code. â The âeasyâ way ... s/eval/print/. â Hooking the eval function with Javas
2. What is a Darknet? A private network where users can freely exchange ideas and content. Darknets ... Server/Client Peer-2-Peer ... HTML 5 Features.
is, inject frame busting code when the user agent is an iPhone or Android and ..... A screenshot of our attack tool is visible in figure 10 and a video of the attack is ...
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to op
Figure 4: Our Google Android Developer Account Activated . ... 10. Figure 7: First Sign of Bouncer . ... Figure 10: SMS Bloxor Available to Purchase â Cheap!
Neohapsis 2014 â www.Neohapsis.com. 10. 2 Simple Examples: #2. Err? .... Linux, BSD, Android), and baked in some way into commercial kit (. ).
... under certain scenarios with a few tricks. Bypassing the important stuff: demo #2 ... An entire HTML page can be stored in Data URI. Let's do a facebook ...
3 Android Basics. This section contains information on the specifics of the Android operating system. and the Android ap
Android is a complicated environment. ⢠Do we work in Java? JNI? ... Page 10 ... Android. Was Born. â¢9/2008. Fake Player. â¢8/2010. â¢First SMS Trojan. â¢Just asks ...
are exceptions to this which are introduced by shared user IDs (see section 3.3.1). Page 4 of 22. Black-Hat-AD ... astle
Increasing use of C++ code in malware .... test eax, eax ; eax = address of allocated memory ..... Developed in Python .
... a userland memory allocator that is being increasingly adopted by software projects as a high performance heap manag
Apr 14, 2010 - Backdoors in the Authentication Procedure. â« Onapsis Integrity .... No CRC or signature check on the st
is, inject frame busting code when the user agent is an iPhone or Android and do not inject it if the browser is an olde
The Powerful Interactive Android Debugger for Android Malware ... Monitor behavior of android application at runtime. ⢠ex) DroidBox, Mobile .... Page 10 ...
Click to edit Master title style • Click to edit Master text styles — Second level
DABiD • Third level
— Fourth level » Fifth level
The Powerful Interactive Android Debugger for Android Malware Analysis
Click to edit Reversing Android Masterapplication title style • Static Analysis Click to edit Master text styles — — Analyze Secondintent level of application by decoding DEX(Dalvik Executable) into readable bytecode • Third level
— Monitor behavior of android application at runtime • ex) DroidBox, Mobile Sandbox, Anubis etc.
— Conduct step by step debugging with disassembled Dalvik executable code • ex) SmaliDebugging, IDAPro
Click toExecutable Dalvik edit Master Debugging title style ••
Smali ClickDebugging to edit Master
text styles
— Use apktool and NetBeans(Java IDE) in combination
— Second • Apktool :level disassemble DEX and repackage app in debug mode ••
Java IDElevel : support step by step debugging Third
— Fourth level » Fifth level
Click toExecutable Dalvik edit Master Debugging title style ••
IDA Proto Debugging Click edit Master
text styles
— Supports dalvik debugging from version 6.6 — levelDebugging but use own DEX disassembler — Second Similar to Smali
• Third level
— Fourth level » Fifth level
Click toExecutable Dalvik edit Master Debugging title style • Smali Debugging VS. IDA Pro Debugging • Click to edit Master text styles — SecondPreprocessing level
Dalvik Executable Disassemble
• Third levelDebugging Application Modification
Smali Debugging
— Fourth level » Fifth level Jdwp socket host & port modified as debuggable
IDA Pro
Settings
Package & lauchable activity name
Should be done manually!
Debugging
Disassembler
Register Type
Debugging Starting Point
Smali
Correct Type
First BP hit after debugger attached
IDA Pro
All registers casted as “Object” (java.lang.Object)
Bad Type Fault!
What if…The dex I am debugging is not the one running??
Methods at launchable activity Can’t debug from the start..
Dex Used In Debugging
Extracted from apk
Click to editinMaster Challenges Android title Analysis style : Modification of DEX bytes at runtime BlueBox verified tempering davik bytecode during •• Click toSecurity edit Master text styles runtime is possible
— level — Second Load library and execute function which write bytes into memory where executable •dalvik Third level is loaded • •
Find codeItemlevel of “add()” method from DEX loaded in memory — Fourth Write bytes into codeItem of “add()” method
» Fifth level
“Ljava/lang/String;”
“add”
ClassIdItem
MethodIdItem
Find codeItem of “add()” CodeItem
Write “inject” bytes into codeItem
Click to editinMaster Challenges Android title Analysis style : Dynamic DEX Loading encrypted • • GoogleAppsToy Click to edit malware Masterload text styles DEX at runtime —Analysts can obtain classes.dex from APK and conduct static or dynamic
— Second analysis onlevel classes.dex
• Third level from APK has no malicious actions —But, classes.dex • Only dynamic loading routine exist in classes.dex — decrypt Fourthand level • No ?way»to debug Fifth malicious level code…. classes.dex ?
classes.dex classes.dex Loading Stub Loading Stub
classes.dex Loading Stub Loading Stub
Encrypted dex dex Encrypted (Asset) (Asset) File System File System
Dynamically Dynamically loaded dex loaded dex Malcode Malcode Process Process
Click to editinMaster Challenges Android title Debugging style • DEX(Dalvik Executable) can be different in memory Click to edit Master text styles — Second level • Third level Classes.dex — Fourth level in APK» Fifth level
≈
Classes.dex in Dalvk-cache (optimized)
≠
Dex in Memory
Analysis Target
Analysis with current analyzers might be useless..
Click to edit Master title style • Click to edit Master text styles — Second level
DABiD : • Third level
— Fourth level » Fifth level
Dynamic Android Binary Debugger
Click to edit Master title style Goal • To develop android debugger which is able to debug Click to edit Master text styles “the same DEX” — Second level running on memory • Third level
• To make android debugging more effective and — Fourth level convenient » for Fifthanalysts level
ClickApproach Our to edit Master (1/2) title style • To develop android debugger which is able to debug Click to edit Master text styles “the same DEX” — Second level running on memory — Monitor dynamic changes in memory and reflect them to • Third level debugger — Fourth level • Self modification » Fifth level of DEX bytes in memory • Dynamic DEX loading
• To make android debugging more effective and convenient for analysts
ClickApproach Our to edit Master (2/2) title style • To develop android debugger which is able to debug Click to edit Master text styles “the same DEX” — Second level running on memory • To make android • Third level debugging more effective and convenient forlevel analysts — Fourth Fifth leveldebugging features — Provide»advanced • Code update by analyst • Register value acquisition — Automate bothersome settings for android debugging
Click to- edit DABiD Overview Master title style DABiD Master text styles • Click to edit DEX disassembler — Second level
J D I
JDWP
Debug Event • Third level Handler
A D B D
D
App Process classes.dex libraries.so
— Fourth level » Fifth level
•
Resembles java debugger structure — DEX disassembler : disassemble DEX from both apk file and memory — Debug Event Handler : create and handle debugging event from JDWP
•
But, JDWP has limitations…
Click to- edit DABiD Overview Master title style DABiD Master text styles • Click to edit DEX disassembler — Second level
Make our service module reside in application process — —
Notify supervision results of dynamic changes in memory Give a control over the application
Monitoring Dynamic Changes Click to edit Master title style : Self modification of DEX bytes ••
DABiD detects memory write function call Click Service to editmodule Master textthat styles is made and alarm debugger when event happens
— Second level • Third level
— Fourth level » Fifth level
• Analysts is now able to analyze hidden bytes
Monitoring Dynamic Changes Click to edit Master title style : Dynamic DEX loading ••
DABiD findtext and dump new DEX bytes in memory Click Service to editmodule Master styles
— Second level • Third level — Fourth level » Fifth level
•
With DABiD, Analysts no longer need to — Find the location of hidden or newly downloaded DEXs — Conduct static analysis for new DEXs by pulling them to local
Advanced Debugging Feature Click to edit Master title style : Code update by Analyst
• Analysts bytecodes on the fly Click to can editmodify Master text styles — input bytes from DABiD — Analysts Second can level
— DABiD • Thirdservice level module writes input bytes to proper location in memory — Fourth level — Debuggee runslevel with modified bytes » Fifth
• Analysts are able to — Force to execute code — Skip code part should not be executed to continue analysis
Force to execute code before the time of event
Advanced Debugging Feature Click to edit Master title style : Register value acquisition •
provides register values only with debug symbols • JDI Click to edit Master text styles — But, Not all registers have debug symbols
Get register value using slot number Eliminate evaluation check whether the register is visible variable or not Cast value with type information by emulating bytecodes in DEX disassembler Java int a = 3; Log.d(“Info”, “a :” +a);
– int – Ljava/lang/String; – Ljava/lang/StringBuilder; – Ljava/lang/String;
Analyzed type info
Automation of Master debuggingtitle setting Click to edit style • DABiD automates followings to aid debugging Click to edit Master text styles — — — — —
Transform application into debuggable Second level Install and start application • Third level Set — jdwp socket Fourth levelconnection Set breakpoints at the starting point of application » Fifth level
Click to edit Master title style • Click to edit Master text styles — Second level
DEMO
• Third level — Fourth level » Fifth level
Click towork Future edit Master title style forMaster Android text Runtime (ART) •• Debugging Click to edit styles — Second Supportlevel ART features — — •Resolve Code Protections on ART Third level — Fourth level coverage » Fifth level
• Code — Support native code debug included in APK • Anti-Debugging — Counter anti-debugging techniques