SlideShare une entreprise Scribd logo
1  sur  84
Télécharger pour lire hors ligne
1
Building Custom
Android Malware for
Penetration Testing
Stephan Chenette
Director of R&D, IOActive Labs
Who am I?
• Stephan Chenette
• About Me:
•Director of R&D @ IOActive
•eEye, SAIC, Websense [13+yrs]
•Breaking technology to expose weakness
•Building technology / innovation
•Offensive Defense Series
2
About this presentation
This presentation is an overview
of my experience and methodology
black box penetration testing a
android security control
3
Format
import time
...
start = time.time()
end = start + (60*75)
while True:
Present()
if Raise_Your_Hand() == True:
Try_To_Answer()
now = time.time()
if now >= end:
print(“Presentation Over!")
break
4
The goal we were given
• Test today’s In The Wild (ITW) malware techniques and
methodologies against a particular security control
• Create and/or use existing malicious android applications and get them
past the security control (test review/controls NOT security in phone)
• Suggest improvements to the security control
5
Security
Control
Android App User’s Phone
Why?
• Important to focus on Individual Security Controls/Process
•Mobile Device Management, Gateway AV,
Desktop AV, Application Stores, etc.
• Compartmentalizing “security tests”
(from ITW malware) (non contrived/theoretical)
• Systematically/Structurally attempt to bypass a security control
• Improvement in technology
• Improvement in education for the developer
• Help in determining and/or exposing risks to current
boundaries of a product/technology
6
Previous Presentations
Previous Known Work:
“Dissecting the Android Bouncer”
Jon Oberheide, Charlie Miller
http://jon.oberheide.org/files/summercon12-
bouncer.pdf
7
Agenda
• Approach to Accomplishing our Goal
• **Introduction to Android – Q&A**
• Reversing Android Applications – Q&A
• Defensive Technologies – Q&A
• Building Custom Android Malware – Q&A
• Philosophical Rant on “What is Malware?”
• Techniques/Methodologies
• Conclusion
8
Agenda
• Approach to Accomplishing our Goal
• **Introduction to Android – Q&A**
• Reversing Android Applications – Q&A
• Getting to know Defensive Technologies – Q&A
• Building Custom Android Malware – Q&A
• Philosophical Rant on “What is Malware?”
• Techniques/Methodologies
• Conclusion
9
Approach to Accomplishing our Goal
Given the goal of duplicating ITW techniques:
• Understand the Android Platform
• Studied Defensive Technology e.g. how would you detect malicious apps.
• Analyzed ITW Malware
• Categorized the Malware
• Functionality
• Class
• Duplicated individual functionality
• Made Alternative versions (building on prev. defensive tech. knowledge)
10
Agenda
• Approach to Accomplishing our Goal
• **Introduction to Android – Q&A**
• Reversing Android Applications – Q&A
• Goal/Approach
• Defensive Technologies – Q&A
• Building Custom Android Malware – Q&A
• Philosophical Rant on “What is Malware?”
• Techniques/Methodologies
• Conclusion
11
Introduction to Android
12
What is Android?
Android is a mostly open source operating system that runs on small devices. It is built on top of Linux
and runs a VM called Dalvik, similar to the Java VM, but optimized for speed.
From top to bottom, the stack looks like this:
13
Applications written in Java
A framework called the Android SDK
C++ Libraries and the Dalvik Virtual
Machine
Linux
Applications written in Java
14
Android SDK
Android SDK - Framework for developing applications:
• Like the .NET Framework
• APIs you can call to access key features of Android
15
Android NDK
• The Android Native Development Kit (NDK) is a toolset that allows you to
implement parts of your app using native-code languages such as C and
C++
• If you write native code, your applications are still packaged
into an .apk file and they still run inside of a virtual machine
on the device.
• Native code is no different from Java code running under the
Dalvik VM. All security in Android is enforced at the kernel
level through processes and uids
16
Android NDK
17
#include <string.h>
#include <jni.h>
#include <stdio.h>
jstring Java_com_example_hellojni_HelloJni_stringFromJNI( JNIEnv* env,
jobject thiz )
{
FILE* file = fopen("/sdcard/hello.txt","w+");
if (file != NULL) {
fputs("HELLO WORLD!n", file); fflush(file);
fclose(file);
}
return (*env)->NewStringUTF(env, "Hello from JNI (with file io)!");
}
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
int sockfd = socket(AF_INET, SOCK_STREAM, 0);
<uses-permission android:name="android.permission.INTERNET" />
Applications written in C/NDK (iOS port)
18
Java Virtual Machine (stack based)  much slower
Dalvik Virtual Machine (register based)  much faster
Dalvik VM
The applications built for Android are run on top the Dalvik Virtual Machine.
This is a Process Virtual Machine, like the Java Virtual Machine or the .NET Runtime
The Dalvik virtual machine (DVM)
• register-based machine which executes
Dalvik bytecode instructions.
• different from a JVM, hence its bytecode is different
from Java bytecode.
19
Android Linux
Linux - Underlying OS that runs the Dalvik VM
• Very lightly modified version of linux kernel
• But user space wholly unlike that of any other linux system.
• File IO
• Process Management
• Drivers for:
•Display
•Camera, Audio, Video
•Keypad
•WiFi and other networking resources
•Inter-process Communication
20
Developing an APK in Android
1. Android programmers write android apps in java.
Native apps can be included and written in native languages
e.g. C++ and are compiled for the native architecture
(ARM/MIPS, etc.)
2. The IDEs like eclipse use the JDK to generate .class files which
are then converted to .dex files (dalvik executable). AAPT is
then use to build the APK
3. The dalvik virtual machine (dalvikvm) in Android can
then run these dalvik executables by translating them
to native instructions.
21
Agenda
• Approach to Accomplishing our Goal
• **Introduction to Android – Q&A**
• Reversing Android Applications – Q&A
• Where to download Android Malware (research)
• Getting to know Defensive Technologies – Q&A
• Building Custom Android Malware – Q&A
• Philosophical Rant on “What is Malware?”
• Techniques/Methodologies
• Conclusion
22
Android APK Reversing
23
24
Where to get Android Malware
• Mal Genome Project
• Virus Share
• Virus Total
• Wepawet
• Kaspersky (+Other Security Vendors)
• Offensive Computing
• Contagio
Android APK Structure
25
PK ZIP
Android
APK
Android APK Structure
26
Decompiling an Android APK File
27
unzip
AXML-
Printer2
dex2jar
or ded
Android
Manifest
XML
classes
dex
Text
Version
XML
jd-gui
classes
jar
.java
unzip
classes
jar
classes
jar
classes
.class
jad
.java
.java
Android
APK
Sony Ericon has a tool that does all of the above in a graphic layout  APKAnalyzer
http://developer.sonymobile.com/knowledge-base/tools/analyze-your-apks-with-apkanalyzer/
Decompiling an Android APK File
28
JEB
Android
APK
Text
Version
XML
.java
.java
.java
res
res
res
assets
assets
assets
This is my preferred
method
Android Reversing Tool Bag
• The Android SDK, of course, and Eclipse
• Android APK Tool - for reverse engineering 3rd party, closed,
binary Android apps
• dex2jar, which converts Android’s Dalvik
executables into normal Java jar files.
• JD-GUI, which decompiles jar files into java source file
• ADB service (the Android Debug Bridge) – for debugging apps
• JEB – if you’re serious about reversing and can spend the $$$
http://www.android-decompiler.com/
29
Android Reversing Tool Bag
Source: http://tracedroid.few.vu.nl/thesis.pdf
30
Source Executable
1.Compile
2.Export (zip & sign)  APK
31
Executable  Source
• Dalvik bytecode is different from Java bytecode, Hence, Java decompilers cannot
decompile it.
• To overcome this issue is to use bytecode-to-bytecode compilers like
•DED (JED better version)
•dex2jar
• to transform the Dalvik bytecode into Java bytecode and then to use a regular Java
decompiler
•jd-gui
•dava
• Such a method is prone to errors that may exist in the conversion of the bytecode,
resulting erroneous source code.
32
Executable  Source
• dex files  dalvik opcode
• To convert.dex files to a more
understandable form we can
convert it to smali
representation
• Dalvik opcodes to smali
(intermediate/assembly based
language and is a direct
mapping.
33
Executable  Source (sort-of)
• smali can't be used to completely reconstruct java source code
• Java is a very developed language
• smali is more of an assembly based language.
• Doesn’t have necessary information to be translated to Java
• …Just use JEB =] http://www.android-decompiler.com/
34
Agenda
• Approach to Accomplishing our Goal
• Introduction to Android – Q&A
• Getting to know Defensive Technologies – Q&A
• Building Custom Android Malware – Q&A
• Philosophical Rant on “What is Malware?”
• Techniques/Methodologies
• Conclusion
35
Defensive Technologies
36
Detection Technologies
37
• Ultimate goal is to upload app to “walled garden” (restrictive environment)
• To do that you must bypass detection capabilities / review process
• Detection capabilities
• Hashes
• Native apps
• Dex files
• Dalvik opcodes sigs
• Decompile dalvik to smali and use sigs
• Fuzzy hashing against known apps
• AndroidManifest.xml file
• Dynamic Behavior Analysis
• DroidBox - https://code.google.com/p/droidbox/
Suspicious Permissions
android.permission.READ_FRAME_BUFFER (read frame buffer)
android.permission.CLEAR_APP_CACHE (delete all application cache data)
android.permission.WRITE_SECURE_SETTINGS (modify secure system settings)
android.permission.INJECT_EVENTS (inject user events)
android.permission.BIND_DEVICE_ADMIN (interact with device admin)
android.permission.INSTALL_PACKAGES (directly install applications)
android.permission.DELETE_PACKAGES (delete applications)
Etc.
Agenda
• Approach to Accomplishing our Goal
• Introduction to Android – Q&A
• Getting to know Defensive Technologies – Q&A
• Building Custom Android Malware – Q&A
• Philosophical Rant on “What is Malware?”
• Techniques/Methodologies
• Conclusion
38
Enough already,
Let’s Start
Building Malware!
39
Approach/Methodology
Research In The Wild
(ITW) Android Malware
• Techniques
• Methodologies
40
Research Defensive
Security Controls
• Techniques
• Methodologies
1. Probe Environment (RECON)
2. Upload and test ITW Malware (Test barrier to entry)
3. Regroup
4. Upload “trojaned” apps / altered versions of ITW Malware
5. Regroup
6. Upload unit-tests (real-world/fabricated samples)
7. Mix, max and combine unit-based tests into samples
41
Where do we start?
• What is malware?
• What are the different malware categories?
• Methodology/Techniques
42
What is Malware?
Malware
• Not always easy to define [ start philosophical rant]
• Anything that breaks the security model (without the users consent)
• Deceptive/hide true intent
• bad for user / good for attacker e.g. surveillance, collecting passwords, etc.
• Applications that are detrimental to the user running the device.
• Harms a user
• Financial
• Privacy
• Personal information – location (surveillance) ,
• Stealing resources – cracking, botnets – processing power
•Breaks Network policy
•Example of malware vs.. useful tool: not-compatible.
•1964 Jacob Elllis V.S. Ohio - How do you define P0rn? …“You know it when you see it”
43
What is Malware?
44
What is Malware? Is this
Malware?
45
Android Malware Categories
Android Premium
Service Abusers
Android Adware Android Data Stealers
Targeted
Spyware
Malicious Android
Downloaders
Source: https://www.lookout.com/
46
Android Malware Analysis
Infection Vector - How it installed on the device
Entry Point – How the malicious behavior is initiated
Elevated Privileges – if and how it gained root privileges
Payload – it’s Purpose and functionality
Hosting – does it contain embedded apps
Top Threats
47
Source: https://www.lookout.com/resources/top-threats
Top Threats
48
Infection Vector  DroidDream hid the malware in seemingly legitimate applications to trick
unsuspecting users into downloading the malware (more than 50 apps on the Android App
Store were found to contain Droid Dream)
Entry Point  Requires user to launch application. Post-Launch malware will start a service
then launch the host application’s primary activity
Elevated Privileges  1) “exploid” to attempt to exploit a vulnerability in udev event
handling in Android’s init. If “exploid” fails… 2) “rageagainstthecage”, leveraging a
vulnerability in adbd’s attempt to drop its privileges.
Payload  Sends device information to C&C e.g. IMEI, IMSI and device model and SDK
version, Checks if already infected, by checking package
com.android.providers.downloadsmanager is installed. If this package is not found it will
install the second payload, which is bundled as sqlite.db. This part of the malware will be
copied to the /system/app/ directory, installing itself as DownloadProviderManager.apk.
Copying the file using this method, to this directory will silently install the APK file, and not
prompt user to grant permissions as in a standard app installation process.
Droid Dream
Top Threats
49
Entry Point  triggered by Intents it listens for on the device.
• receiver for BOOT_COMPLETED and PHONE_STATE intents
• single service:
Payload  DownloadManageService controls a timer-scheduled task
Gather information and send to C&C and install:
• ProductID – Specific to the DroidDream variant
• Partner – Specific to the DroidDream variant
• IMSI
• IMEI
• Model & SDK value
• Language
• Country
• UserID – Though this does not appear to be fully implemented
Powerful zombie agent that can install any payload silently and execute code with root
privileges at will.
Droid Dream
Top Threats
50
Source: https://www.lookout.com/resources/top-threats
Top Threats
51
Source: https://blog.lookout.com/wp-content/uploads/2011/06/GGTracker-Teardown_Lookout-Mobile-Security.pdf
GGTracker
Infection Vector  User is phished into visiting to a website that tricks them into installing a
battery manager application file from a fake Android Market store.
Top Threats
52
Source: https://blog.lookout.com/wp-content/uploads/2011/06/GGTracker-Teardown_Lookout-Mobile-Security.pdf
GGTracker
Entry Point 
When installing, the user is prompted with a list of
permissions the application requires:
android.permission.ACCESS_WIFI_STATE
android.permission.CHANGE_WIFI_STATE
android.permission.CHANGE_NETWORK_STATE
android.permission.ACCESS_NETWORK_STATE
android.permission.RECEIVE_BOOT_COMPLETED
android.permission.INTERNET
android.permission.READ_PHONE_STATE
android.permission.READ_SMS
android.permission.RECEIVE_SMS
android.permission.SEND_SMS
• This malware will either start
itself after receiving an SMS or
having the application launched.
• On the first launch, it
communicates with the tracking
server, ggtrack.org.
Payload 
• The app posts the phone
number to the GGTracker
remote server, where the
malware starts to subscribe the
device to premium services.
Top Threats + 1000s Other Apps
53
Source: https://www.lookout.com/resources/top-threats
Most Sophisticated Malware Yet
OBAD
• Installs as device admin app (permissions)
• Very difficult to uninstall
• Heavily Obfuscated
• Send SMS to Premium numbers
• Download other malware
• Remote command execution
• Calles API methods via reflection
• Took advantages of bugs in DEX2JAR to break
manual/automated analysis if using DEX2JAR
(will break analysis only if using DEX2JAR)
54
Worth Investigating
HoseDex2Jar
• Injected files into the header
Source: Tim Strazzere http://hitcon.org/2013/download/Tim%20Strazzere%20-%20DexEducation.pdf
55
Obfuscation
• ProGuard / DexGuard
• Used at compile time
• API Reflection
• Used by desktop Java malware for years
• Reflection can allow a program to create a “method pointer” (a
rough analogy for better understanding) and invoke the target
method by using it.
• Uses this feature to deceive any casual static code analysis module
which tries to detect whether a sample is calling the method that
sends SMS messages. (e.g.:sendTextMessage())
• Encrypted Network Communication
• Encrypted Files
56
Building Custom
Android Malware
57
Methodology
• Define the target and objectives
• Profile target
• Determine environment
• Determine detection capabilities
•Upload ITW Malware
• Determine what gets caught and what doesn’t
• “Rinse and Repeat”
•Create Alternative Versions (Private)
• Decompile/Obfuscate/Re-Write
• Recompile
• Upload
•Merge with legitimate applications
•Fabricate Android Malware
58
Target
59
• Reviewer 
• End detection engine
• End user
• Internal resource that is adjacent to
the android device (e.g. internal
network)
• Etc.
Probes – Determine Environment
60
What’s the first thing you’d do if you go explore a new universe?
Send out a few probes to gather information, right?
No Different here.
Probes – Determine Environment
Red Pill/Blue Pill Test - Running in an emulator??
61
if (android.os.Build.MODEL.equals(“google_sdk”)) {
// emulator
} else {
//not emulator
}
Probes – Determine Environment
Anti-Emulation
62
Tim Strazzere’s Anti-Emulator Project (Lookout Security)
https://github.com/strazzere/anti-emulator
Probes – Determine Environment
• Device info
• IMEI, Device Model/Make etc.
• GEO Location  help determine language to write app in
• IP Address / 3G/4G or on wifi network?
• Scan for available blue-tooth devices
• Egress filtering? ports open, etc.
63
Probes – Determine Environment
64
• Record Audio
• Take Video
• Take Photos
• Send Existing Photos
Probes – Determine Environment
65
• Other Processes/Apps on device
• Other permissions/intents of installed apps
• Info-leak in error messages?
Upload ITW Malware
• ADRD
• AnserverBot
• Asroot
• BaseBridge
• BeanBot
• Bgserv
• CoinPirate
• CruseWin
• DogWars
66
• DroidCoupon
• DroidDeluxe
• DroidDream
• DroidDreamLight
• DroidKungFu1
• DroidKungFu2
• FakeNetflix
• EndofDay
• And many more…
Build Common Scenarios
67
Scenario Description
Android Premium Service Abusers Premium service abusers subscribe users to various "services"
that add to their phone bill at the end of the month
Android Adware Android apps that use abusive advertising tactics
Android Data Stealers Android data stealers often bilk users of information such as their
operating system version, product ID, International Mobile
Equipment Identity (IMEI) number and other information that
could be used in future attacks
Malicious Android Downloaders Once a malicious downloader has infected a
victim's Android device, it is designed to contact a
remote server to await instructions or download
additional Android malware
Android App Entry Point
Unlike other programming paradigms in which apps are launched
with a main() method, the Android system initiates code in
an Activity instance by invoking specific callback methods that
correspond to specific stages of its lifecycle.
• Services which start at broadcast receiver callback
• Callbacks which correspond to a user action
• Actions start immediately (service, thread, etc.)
• Actions which start based on a timer
68
Android App Entry Point
69
Layout/activity_main.xml:
<?xml version="1.0" encoding="utf-8"?> <LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_height="match_parent"
android:orientation="vertical" > <Button android:id="@+id/button1"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:onClick="onClick" android:text="Button" /> </LinearLayout>
A broadcast receiver (short receiver) is an Android component which allows you to register for
system or application events. All registered receivers for an event will be notified by the
Android runtime once this event happens.
For example applications can register for the ACTION_BOOT_COMPLETED system event
which is fired once the Android system has completed the boot process.
A receiver can be registered via the AndroidManifest.xml file.
Alternatively to this static registration, you can also register a broadcast receiver dynamically
via theContext.registerReceiver() method.
The Broadcast receiver can then start a service to perform any number of actions.
Android App Entry Point
70
Android App Entry Point
71
Android App Entry Point
72
Broadcast Actions
73
AndroidManifest.xml
74
Build functionality
75
Functionality
Autostart on boot
Get phone number, IMSI, IMEI, …
Send information to C&C
WiFi connection-aware ( run when phone
charging)
Hide application icon
Log SMS/Send SMS
Etc.
Collecting Device Data
76
import android.app.Activity;
import android.content.Context;
import android.telephony.TelephonyManager;
public class PhoneInfo {
public static String getMyPhoneNumber(Activity a) {
try {
TelephonyManager mTelephonyMgr; mTelephonyMgr =
(TelephonyManager) a.getSystemService(Context.TELEPHONY_SERVICE);
return mTelephonyMgr.getLine1Number();
} catch (Exception e) { return ""; }
}
public static String getMyIMEI(Activity a){
try {
TelephonyManager mTelephonyMgr; mTelephonyMgr =
(TelephonyManager) a.getSystemService(Context.TELEPHONY_SERVICE);
return mTelephonyMgr.getDeviceId();
} catch (Exception e) { return ""; }
…
Build Custom Scenarios
77
Scenario Description
Vulnerable Lib Build an android app that uses a vulnerable version of libcurl
(why? – because then the client will be exploitable)
ALL Intents Build an android app that asked for ALL POSSIBLE permission
(why? – this will help us determine if they are filtering by
permission)
Various NDK Examples Same functionality but as a native library
Can call any static Java API from the NDK going through JNI as
long as you’re running in a library instead of an application and
instead the dalvik vm
Android Exploitation Space
78
ASHMEM
The ASHMEM custom shared
memory allocator written by
Google has a nasty bug that allows
your device to be easily rooted.
Maybe they should have stuck with
POSIX SHM, but the bad guys
aren't complaining.
Exploid
Nearly identical to a vulnerability
fixed in the Linux udev daemon in
2009, Exploid impacts Android's
init daemon by forgetting to check
whether Netlink messages are
coming from the trusted kernel ...
or a malicious app.
Gingerbreak
A commonly-abused vulnerability
in the wild by Android malware,
Gingerbreak affects the Android
volume manager (vold) via, you
guessed it, the same Netlink issue
as Exploid. Badness ensues.
Levitator
Malicious apps will undoubtedly be
“levitating” their privileges using
this vulnerability that affects the
PowerVR kernel module used for
3D graphics on all S-series devices
and allows unfettered access to
kernel memory.
Mempodroid
Inherited from the upstream Linux
kernel, a vulnerability in the
/proc/pid/mem interface allows for
writing arbitrary memory in the
address space of a setuid process.
It's about as complicated as it
sounds, but attackers are smart
like that.
Wunderbar
Another crossover from the Linux
kernel, this NULL pointer
dereference was one of the first
privilege escalation vulnerabilities
exploited on the Android platform,
thanks to faulty mmap_min_addr
protection on ARM.
ZergRush
No, it has nothing to do with
StarCraft, sorry. The ZergRush
vulnerability in Android's libsysutils
allows an attacker to overwhelm
the system with command
arguments, not zerglings, and take
full control of your device.
Zimperlich
Always check return values.
Android's Zygote process, from
which all new apps are spawned,
forgets this important rule and fails
to check the return value of
setuid(2), leading to plentiful root
shells!
Source: http://www.xray.io/#vulnerabilities
Android Exploitation Space
• Android Master Key – one of the most recent and exploit
• It lets you get at system-android-app-level permissions, not full-out root, but that's enough to do some
serious harm (read text messages without permissions, etc.) Might be in a different class than the full-
out root exploits, though.
“The Android platform is a complicated system that consists of not only the Linux kernel,
but also the entire Android framework with more than 90 open-source libraries includingWebKit, SQLite,
and OpenSSL. The complexity naturally introduces software vulnerabilities that can be potentially exploited
for privilege escalation.”
“among 1260 samples in our dataset, 463 of them (36.7%) embed at least one root exploit”
79
Source: “A Survey of Android Malware”, Xuxian Jiang, Yajin Zhou
Considerations
80
• Store
• Set time of Application release to some date in the future (to make sureit’s not downloaded
• Gateway/Desktop AV
• Setup entire end-to-end test
• Behavior Analysis Engine
• None =]
Agenda
• Approach to Accomplishing our Goal
• Introduction to Android – Q&A
• Getting to know Defensive Technologies – Q&A
• Building Custom Android Malware – Q&A
• Philosophical Rant on “What is Malware?”
• Techniques/Methodologies
• Conclusion
81
Conclusion
82
• Malware is a matter of perspective
• Trivial to get “malware” onto a system
• Custom malware
• almost guaranteed to get through
• because majority detection techniques are focused on
known-bad (signatures/clustering)
Conclusion
83
• Hashes work (on known samples)
• Focus for detect engines should be apps that
break the security model (e.g. exploitation  root)
• Apps that conform to security model but deceive users can have
dangerous permissions highlighted for users
• App reviewers should thoroughly verify what an app does and what it’s
supposed to do before being downloaded to a user, auto-deny on key
permissions, and ask for more details
• App review process should involve running apps and reviewing code
coverage
• App review process should involve using any and all dynamic information
to help catch “known malicious artifacts” to consolidate ‘deep-review
bucket”
• App review process should have way to determine if good app has been
“trojanized” use certificates for known good and known bad
Questions?
Stephan Chenette,
Twitter: @StephanChenette
Slide Share: http://www.slideshare.net/schenette
Thanks to JEB Analysis Tool, Jurriaan Bremer,
Robert Erbes, Esteban Fayo and the IOActive Team!
84

Contenu connexe

Tendances

Stuxnet redux. malware attribution & lessons learned
Stuxnet redux. malware attribution & lessons learnedStuxnet redux. malware attribution & lessons learned
Stuxnet redux. malware attribution & lessons learnedYury Chemerkin
 
Android security
Android securityAndroid security
Android securityMobile Rtpl
 
Deep Dive Into Android Security
Deep Dive Into Android SecurityDeep Dive Into Android Security
Deep Dive Into Android SecurityMarakana Inc.
 
Android Security Overview and Safe Practices for Web-Based Android Applications
Android Security Overview and Safe Practices for Web-Based Android ApplicationsAndroid Security Overview and Safe Practices for Web-Based Android Applications
Android Security Overview and Safe Practices for Web-Based Android Applicationsh4oxer
 
Introduction to Android Development and Security
Introduction to Android Development and SecurityIntroduction to Android Development and Security
Introduction to Android Development and SecurityKelwin Yang
 
Sperasoft talks: Android Security Threats
Sperasoft talks: Android Security ThreatsSperasoft talks: Android Security Threats
Sperasoft talks: Android Security ThreatsSperasoft
 
Built-in Security Mindfulness for Software Developers
Built-in Security Mindfulness for Software DevelopersBuilt-in Security Mindfulness for Software Developers
Built-in Security Mindfulness for Software DevelopersPhú Phùng
 
Android Security - Common Security Pitfalls in Android Applications
Android Security - Common Security Pitfalls in Android ApplicationsAndroid Security - Common Security Pitfalls in Android Applications
Android Security - Common Security Pitfalls in Android ApplicationsBlrDroid
 
Anomaly Detection using String Analysis for Android Malware Detection - CISIS...
Anomaly Detection using String Analysis for Android Malware Detection - CISIS...Anomaly Detection using String Analysis for Android Malware Detection - CISIS...
Anomaly Detection using String Analysis for Android Malware Detection - CISIS...Carlos Laorden
 
A Large-Scale Empirical Study on the Effects of Code Obfuscations on Android ...
A Large-Scale Empirical Study on the Effects of Code Obfuscations on Android ...A Large-Scale Empirical Study on the Effects of Code Obfuscations on Android ...
A Large-Scale Empirical Study on the Effects of Code Obfuscations on Android ...Mahmoud Hammad
 
Security Best Practices
Security Best PracticesSecurity Best Practices
Security Best PracticesClint Edmonson
 
[Wroclaw #1] Android Security Workshop
[Wroclaw #1] Android Security Workshop[Wroclaw #1] Android Security Workshop
[Wroclaw #1] Android Security WorkshopOWASP
 
Understanding Android Security
Understanding Android SecurityUnderstanding Android Security
Understanding Android SecurityAsanka Dilruk
 
DELDroid: Determination & Enforcement of Least Privilege Architecture in AnDroid
DELDroid: Determination & Enforcement of Least Privilege Architecture in AnDroidDELDroid: Determination & Enforcement of Least Privilege Architecture in AnDroid
DELDroid: Determination & Enforcement of Least Privilege Architecture in AnDroidMahmoud Hammad
 
Android Security
Android SecurityAndroid Security
Android SecurityArqum Ahmad
 
Android security in depth
Android security in depthAndroid security in depth
Android security in depthSander Alberink
 
COVERT app
COVERT appCOVERT app
COVERT appitba9
 

Tendances (20)

Stuxnet redux. malware attribution & lessons learned
Stuxnet redux. malware attribution & lessons learnedStuxnet redux. malware attribution & lessons learned
Stuxnet redux. malware attribution & lessons learned
 
Android security
Android securityAndroid security
Android security
 
Brief Tour about Android Security
Brief Tour about Android SecurityBrief Tour about Android Security
Brief Tour about Android Security
 
Deep Dive Into Android Security
Deep Dive Into Android SecurityDeep Dive Into Android Security
Deep Dive Into Android Security
 
Android Secure Coding
Android Secure CodingAndroid Secure Coding
Android Secure Coding
 
Android Security Overview and Safe Practices for Web-Based Android Applications
Android Security Overview and Safe Practices for Web-Based Android ApplicationsAndroid Security Overview and Safe Practices for Web-Based Android Applications
Android Security Overview and Safe Practices for Web-Based Android Applications
 
Android Security
Android SecurityAndroid Security
Android Security
 
Introduction to Android Development and Security
Introduction to Android Development and SecurityIntroduction to Android Development and Security
Introduction to Android Development and Security
 
Sperasoft talks: Android Security Threats
Sperasoft talks: Android Security ThreatsSperasoft talks: Android Security Threats
Sperasoft talks: Android Security Threats
 
Built-in Security Mindfulness for Software Developers
Built-in Security Mindfulness for Software DevelopersBuilt-in Security Mindfulness for Software Developers
Built-in Security Mindfulness for Software Developers
 
Android Security - Common Security Pitfalls in Android Applications
Android Security - Common Security Pitfalls in Android ApplicationsAndroid Security - Common Security Pitfalls in Android Applications
Android Security - Common Security Pitfalls in Android Applications
 
Anomaly Detection using String Analysis for Android Malware Detection - CISIS...
Anomaly Detection using String Analysis for Android Malware Detection - CISIS...Anomaly Detection using String Analysis for Android Malware Detection - CISIS...
Anomaly Detection using String Analysis for Android Malware Detection - CISIS...
 
A Large-Scale Empirical Study on the Effects of Code Obfuscations on Android ...
A Large-Scale Empirical Study on the Effects of Code Obfuscations on Android ...A Large-Scale Empirical Study on the Effects of Code Obfuscations on Android ...
A Large-Scale Empirical Study on the Effects of Code Obfuscations on Android ...
 
Security Best Practices
Security Best PracticesSecurity Best Practices
Security Best Practices
 
[Wroclaw #1] Android Security Workshop
[Wroclaw #1] Android Security Workshop[Wroclaw #1] Android Security Workshop
[Wroclaw #1] Android Security Workshop
 
Understanding Android Security
Understanding Android SecurityUnderstanding Android Security
Understanding Android Security
 
DELDroid: Determination & Enforcement of Least Privilege Architecture in AnDroid
DELDroid: Determination & Enforcement of Least Privilege Architecture in AnDroidDELDroid: Determination & Enforcement of Least Privilege Architecture in AnDroid
DELDroid: Determination & Enforcement of Least Privilege Architecture in AnDroid
 
Android Security
Android SecurityAndroid Security
Android Security
 
Android security in depth
Android security in depthAndroid security in depth
Android security in depth
 
COVERT app
COVERT appCOVERT app
COVERT app
 

En vedette

Building Custom Android Malware BruCON 2013
Building Custom Android Malware BruCON 2013Building Custom Android Malware BruCON 2013
Building Custom Android Malware BruCON 2013Stephan Chenette
 
Android village @nullcon 2012
Android village @nullcon 2012 Android village @nullcon 2012
Android village @nullcon 2012 hakersinfo
 
Template ppt Android Menarik
Template ppt Android MenarikTemplate ppt Android Menarik
Template ppt Android MenarikSaeful Bahri
 
Automated Security Analysis of Android & iOS Applications with Mobile Securit...
Automated Security Analysis of Android & iOS Applications with Mobile Securit...Automated Security Analysis of Android & iOS Applications with Mobile Securit...
Automated Security Analysis of Android & iOS Applications with Mobile Securit...Ajin Abraham
 
Nullcon Goa 2016 - Automated Mobile Application Security Testing with Mobile ...
Nullcon Goa 2016 - Automated Mobile Application Security Testing with Mobile ...Nullcon Goa 2016 - Automated Mobile Application Security Testing with Mobile ...
Nullcon Goa 2016 - Automated Mobile Application Security Testing with Mobile ...Ajin Abraham
 
Malware by Ms. Allwood
Malware by Ms. AllwoodMalware by Ms. Allwood
Malware by Ms. AllwoodStavia
 
Technology Report
Technology ReportTechnology Report
Technology ReportMarq2014
 
It Security For Healthcare
It Security For HealthcareIt Security For Healthcare
It Security For HealthcareNicholas Davis
 
Introduction to Android
Introduction to Android Introduction to Android
Introduction to Android Suraj Ligade
 
Hacking Samsung's Tizen: The OS of Everything - Hack In the Box 2015
Hacking Samsung's Tizen: The OS of Everything - Hack In the Box 2015Hacking Samsung's Tizen: The OS of Everything - Hack In the Box 2015
Hacking Samsung's Tizen: The OS of Everything - Hack In the Box 2015Ajin Abraham
 
SmartphoneHacking_Android_Exploitation
SmartphoneHacking_Android_ExploitationSmartphoneHacking_Android_Exploitation
SmartphoneHacking_Android_ExploitationMalachi Jones
 
Abusing Google Apps and Data API: Google is My Command and Control Center
Abusing Google Apps and Data API: Google is My Command and Control CenterAbusing Google Apps and Data API: Google is My Command and Control Center
Abusing Google Apps and Data API: Google is My Command and Control CenterAjin Abraham
 
AppSec EU 2016: Automated Mobile Application Security Assessment with MobSF
AppSec EU 2016: Automated Mobile Application Security Assessment with MobSFAppSec EU 2016: Automated Mobile Application Security Assessment with MobSF
AppSec EU 2016: Automated Mobile Application Security Assessment with MobSFAjin Abraham
 
Android Malware Detection Mechanisms
Android Malware Detection MechanismsAndroid Malware Detection Mechanisms
Android Malware Detection MechanismsTalha Kabakus
 
AndroIDS: Mobile Security Reloaded
AndroIDS: Mobile Security ReloadedAndroIDS: Mobile Security Reloaded
AndroIDS: Mobile Security ReloadedJaime Sánchez
 
Smart Bombs: Mobile Vulnerability and Exploitation
Smart Bombs: Mobile Vulnerability and ExploitationSmart Bombs: Mobile Vulnerability and Exploitation
Smart Bombs: Mobile Vulnerability and ExploitationTom Eston
 
Android Security & Penetration Testing
Android Security & Penetration TestingAndroid Security & Penetration Testing
Android Security & Penetration TestingSubho Halder
 
Unique.! This is professional, clean, creative, simple presentation template..
Unique.! This is professional, clean, creative, simple presentation template..Unique.! This is professional, clean, creative, simple presentation template..
Unique.! This is professional, clean, creative, simple presentation template..Buddy Prescinton
 

En vedette (20)

Building Custom Android Malware BruCON 2013
Building Custom Android Malware BruCON 2013Building Custom Android Malware BruCON 2013
Building Custom Android Malware BruCON 2013
 
Android village @nullcon 2012
Android village @nullcon 2012 Android village @nullcon 2012
Android village @nullcon 2012
 
Tesina Sobri
Tesina SobriTesina Sobri
Tesina Sobri
 
Template ppt Android Menarik
Template ppt Android MenarikTemplate ppt Android Menarik
Template ppt Android Menarik
 
Automated Security Analysis of Android & iOS Applications with Mobile Securit...
Automated Security Analysis of Android & iOS Applications with Mobile Securit...Automated Security Analysis of Android & iOS Applications with Mobile Securit...
Automated Security Analysis of Android & iOS Applications with Mobile Securit...
 
Nullcon Goa 2016 - Automated Mobile Application Security Testing with Mobile ...
Nullcon Goa 2016 - Automated Mobile Application Security Testing with Mobile ...Nullcon Goa 2016 - Automated Mobile Application Security Testing with Mobile ...
Nullcon Goa 2016 - Automated Mobile Application Security Testing with Mobile ...
 
Malware by Ms. Allwood
Malware by Ms. AllwoodMalware by Ms. Allwood
Malware by Ms. Allwood
 
Technology Report
Technology ReportTechnology Report
Technology Report
 
It Security For Healthcare
It Security For HealthcareIt Security For Healthcare
It Security For Healthcare
 
Introduction to Android
Introduction to Android Introduction to Android
Introduction to Android
 
Hacking Samsung's Tizen: The OS of Everything - Hack In the Box 2015
Hacking Samsung's Tizen: The OS of Everything - Hack In the Box 2015Hacking Samsung's Tizen: The OS of Everything - Hack In the Box 2015
Hacking Samsung's Tizen: The OS of Everything - Hack In the Box 2015
 
SmartphoneHacking_Android_Exploitation
SmartphoneHacking_Android_ExploitationSmartphoneHacking_Android_Exploitation
SmartphoneHacking_Android_Exploitation
 
Abusing Google Apps and Data API: Google is My Command and Control Center
Abusing Google Apps and Data API: Google is My Command and Control CenterAbusing Google Apps and Data API: Google is My Command and Control Center
Abusing Google Apps and Data API: Google is My Command and Control Center
 
iOS Application Penetration Testing
iOS Application Penetration TestingiOS Application Penetration Testing
iOS Application Penetration Testing
 
AppSec EU 2016: Automated Mobile Application Security Assessment with MobSF
AppSec EU 2016: Automated Mobile Application Security Assessment with MobSFAppSec EU 2016: Automated Mobile Application Security Assessment with MobSF
AppSec EU 2016: Automated Mobile Application Security Assessment with MobSF
 
Android Malware Detection Mechanisms
Android Malware Detection MechanismsAndroid Malware Detection Mechanisms
Android Malware Detection Mechanisms
 
AndroIDS: Mobile Security Reloaded
AndroIDS: Mobile Security ReloadedAndroIDS: Mobile Security Reloaded
AndroIDS: Mobile Security Reloaded
 
Smart Bombs: Mobile Vulnerability and Exploitation
Smart Bombs: Mobile Vulnerability and ExploitationSmart Bombs: Mobile Vulnerability and Exploitation
Smart Bombs: Mobile Vulnerability and Exploitation
 
Android Security & Penetration Testing
Android Security & Penetration TestingAndroid Security & Penetration Testing
Android Security & Penetration Testing
 
Unique.! This is professional, clean, creative, simple presentation template..
Unique.! This is professional, clean, creative, simple presentation template..Unique.! This is professional, clean, creative, simple presentation template..
Unique.! This is professional, clean, creative, simple presentation template..
 

Similaire à 2013 Toorcon San Diego Building Custom Android Malware for Penetration Testing

DEF CON 24 - Dinesh and Shetty - practical android application exploitation
DEF CON 24 - Dinesh and Shetty - practical android application exploitationDEF CON 24 - Dinesh and Shetty - practical android application exploitation
DEF CON 24 - Dinesh and Shetty - practical android application exploitationFelipe Prado
 
Android pen test basics
Android pen test basicsAndroid pen test basics
Android pen test basicsOWASPKerala
 
MobSecCon 2015 - Dynamic Analysis of Android Apps
MobSecCon 2015 - Dynamic Analysis of Android AppsMobSecCon 2015 - Dynamic Analysis of Android Apps
MobSecCon 2015 - Dynamic Analysis of Android AppsRon Munitz
 
Null Mumbai Meet_Android Reverse Engineering by Samrat Das
Null Mumbai Meet_Android Reverse Engineering by Samrat DasNull Mumbai Meet_Android Reverse Engineering by Samrat Das
Null Mumbai Meet_Android Reverse Engineering by Samrat Dasnullowaspmumbai
 
androidPramming.ppt
androidPramming.pptandroidPramming.ppt
androidPramming.pptBijayKc16
 
Android Penetration testing - Day 2
 Android Penetration testing - Day 2 Android Penetration testing - Day 2
Android Penetration testing - Day 2Mohammed Adam
 
TDC2018SP | Trilha Mobile - Case VC+: Como tornar seguro um aplicativo mobile...
TDC2018SP | Trilha Mobile - Case VC+: Como tornar seguro um aplicativo mobile...TDC2018SP | Trilha Mobile - Case VC+: Como tornar seguro um aplicativo mobile...
TDC2018SP | Trilha Mobile - Case VC+: Como tornar seguro um aplicativo mobile...tdc-globalcode
 
Case VC+: Como tornar seguro um aplicativo mobile payment sem penalizar a exp...
Case VC+: Como tornar seguro um aplicativo mobile payment sem penalizar a exp...Case VC+: Como tornar seguro um aplicativo mobile payment sem penalizar a exp...
Case VC+: Como tornar seguro um aplicativo mobile payment sem penalizar a exp...Márcio Rosa
 
how-to-bypass-AM-PPL
how-to-bypass-AM-PPLhow-to-bypass-AM-PPL
how-to-bypass-AM-PPLnitinscribd
 
JSCONF 2018 - Baking security into DevOps - a tale of hunting down bugs befor...
JSCONF 2018 - Baking security into DevOps - a tale of hunting down bugs befor...JSCONF 2018 - Baking security into DevOps - a tale of hunting down bugs befor...
JSCONF 2018 - Baking security into DevOps - a tale of hunting down bugs befor...Wouter Bloeyaert
 
Mobile Testing with Selenium 2 by Jason Huggins
Mobile Testing with Selenium 2 by Jason HugginsMobile Testing with Selenium 2 by Jason Huggins
Mobile Testing with Selenium 2 by Jason HugginsSauce Labs
 
Security Vulnerabilities in Mobile Applications (Kristaps Felzenbergs)
Security Vulnerabilities in Mobile Applications (Kristaps Felzenbergs)Security Vulnerabilities in Mobile Applications (Kristaps Felzenbergs)
Security Vulnerabilities in Mobile Applications (Kristaps Felzenbergs)TestDevLab
 
Droidcon it-2014-marco-grassi-viaforensics
Droidcon it-2014-marco-grassi-viaforensicsDroidcon it-2014-marco-grassi-viaforensics
Droidcon it-2014-marco-grassi-viaforensicsviaForensics
 
Hacking your Android (slides)
Hacking your Android (slides)Hacking your Android (slides)
Hacking your Android (slides)Justin Hoang
 
The DevSecOps Builder’s Guide to the CI/CD Pipeline
The DevSecOps Builder’s Guide to the CI/CD PipelineThe DevSecOps Builder’s Guide to the CI/CD Pipeline
The DevSecOps Builder’s Guide to the CI/CD PipelineJames Wickett
 
Building world-class security response and secure development processes
Building world-class security response and secure development processesBuilding world-class security response and secure development processes
Building world-class security response and secure development processesDavid Jorm
 
selenium-2-mobile-web-testing
selenium-2-mobile-web-testingselenium-2-mobile-web-testing
selenium-2-mobile-web-testinghugs
 
Matteo Gazzurelli - Andorid introduction - Google Dev Fest 2013
Matteo Gazzurelli - Andorid introduction - Google Dev Fest 2013Matteo Gazzurelli - Andorid introduction - Google Dev Fest 2013
Matteo Gazzurelli - Andorid introduction - Google Dev Fest 2013DuckMa
 
2012 java one-con3648
2012 java one-con36482012 java one-con3648
2012 java one-con3648Eing Ong
 

Similaire à 2013 Toorcon San Diego Building Custom Android Malware for Penetration Testing (20)

DEF CON 24 - Dinesh and Shetty - practical android application exploitation
DEF CON 24 - Dinesh and Shetty - practical android application exploitationDEF CON 24 - Dinesh and Shetty - practical android application exploitation
DEF CON 24 - Dinesh and Shetty - practical android application exploitation
 
Android pen test basics
Android pen test basicsAndroid pen test basics
Android pen test basics
 
MobSecCon 2015 - Dynamic Analysis of Android Apps
MobSecCon 2015 - Dynamic Analysis of Android AppsMobSecCon 2015 - Dynamic Analysis of Android Apps
MobSecCon 2015 - Dynamic Analysis of Android Apps
 
Null Mumbai Meet_Android Reverse Engineering by Samrat Das
Null Mumbai Meet_Android Reverse Engineering by Samrat DasNull Mumbai Meet_Android Reverse Engineering by Samrat Das
Null Mumbai Meet_Android Reverse Engineering by Samrat Das
 
androidPramming.ppt
androidPramming.pptandroidPramming.ppt
androidPramming.ppt
 
Android Penetration testing - Day 2
 Android Penetration testing - Day 2 Android Penetration testing - Day 2
Android Penetration testing - Day 2
 
Session 2 beccse
Session 2 beccseSession 2 beccse
Session 2 beccse
 
TDC2018SP | Trilha Mobile - Case VC+: Como tornar seguro um aplicativo mobile...
TDC2018SP | Trilha Mobile - Case VC+: Como tornar seguro um aplicativo mobile...TDC2018SP | Trilha Mobile - Case VC+: Como tornar seguro um aplicativo mobile...
TDC2018SP | Trilha Mobile - Case VC+: Como tornar seguro um aplicativo mobile...
 
Case VC+: Como tornar seguro um aplicativo mobile payment sem penalizar a exp...
Case VC+: Como tornar seguro um aplicativo mobile payment sem penalizar a exp...Case VC+: Como tornar seguro um aplicativo mobile payment sem penalizar a exp...
Case VC+: Como tornar seguro um aplicativo mobile payment sem penalizar a exp...
 
how-to-bypass-AM-PPL
how-to-bypass-AM-PPLhow-to-bypass-AM-PPL
how-to-bypass-AM-PPL
 
JSCONF 2018 - Baking security into DevOps - a tale of hunting down bugs befor...
JSCONF 2018 - Baking security into DevOps - a tale of hunting down bugs befor...JSCONF 2018 - Baking security into DevOps - a tale of hunting down bugs befor...
JSCONF 2018 - Baking security into DevOps - a tale of hunting down bugs befor...
 
Mobile Testing with Selenium 2 by Jason Huggins
Mobile Testing with Selenium 2 by Jason HugginsMobile Testing with Selenium 2 by Jason Huggins
Mobile Testing with Selenium 2 by Jason Huggins
 
Security Vulnerabilities in Mobile Applications (Kristaps Felzenbergs)
Security Vulnerabilities in Mobile Applications (Kristaps Felzenbergs)Security Vulnerabilities in Mobile Applications (Kristaps Felzenbergs)
Security Vulnerabilities in Mobile Applications (Kristaps Felzenbergs)
 
Droidcon it-2014-marco-grassi-viaforensics
Droidcon it-2014-marco-grassi-viaforensicsDroidcon it-2014-marco-grassi-viaforensics
Droidcon it-2014-marco-grassi-viaforensics
 
Hacking your Android (slides)
Hacking your Android (slides)Hacking your Android (slides)
Hacking your Android (slides)
 
The DevSecOps Builder’s Guide to the CI/CD Pipeline
The DevSecOps Builder’s Guide to the CI/CD PipelineThe DevSecOps Builder’s Guide to the CI/CD Pipeline
The DevSecOps Builder’s Guide to the CI/CD Pipeline
 
Building world-class security response and secure development processes
Building world-class security response and secure development processesBuilding world-class security response and secure development processes
Building world-class security response and secure development processes
 
selenium-2-mobile-web-testing
selenium-2-mobile-web-testingselenium-2-mobile-web-testing
selenium-2-mobile-web-testing
 
Matteo Gazzurelli - Andorid introduction - Google Dev Fest 2013
Matteo Gazzurelli - Andorid introduction - Google Dev Fest 2013Matteo Gazzurelli - Andorid introduction - Google Dev Fest 2013
Matteo Gazzurelli - Andorid introduction - Google Dev Fest 2013
 
2012 java one-con3648
2012 java one-con36482012 java one-con3648
2012 java one-con3648
 

Plus de Stephan Chenette

B-Sides Seattle 2012 Offensive Defense
B-Sides Seattle 2012 Offensive DefenseB-Sides Seattle 2012 Offensive Defense
B-Sides Seattle 2012 Offensive DefenseStephan Chenette
 
Detecting Web Browser Heap Corruption Attacks - Stephan Chenette, Moti Joseph...
Detecting Web Browser Heap Corruption Attacks - Stephan Chenette, Moti Joseph...Detecting Web Browser Heap Corruption Attacks - Stephan Chenette, Moti Joseph...
Detecting Web Browser Heap Corruption Attacks - Stephan Chenette, Moti Joseph...Stephan Chenette
 
Automated JavaScript Deobfuscation - PacSec 2007
Automated JavaScript Deobfuscation - PacSec 2007Automated JavaScript Deobfuscation - PacSec 2007
Automated JavaScript Deobfuscation - PacSec 2007Stephan Chenette
 
Web Wreck-utation - CanSecWest 2008
Web Wreck-utation - CanSecWest 2008Web Wreck-utation - CanSecWest 2008
Web Wreck-utation - CanSecWest 2008Stephan Chenette
 
The Ultimate Deobfuscator - ToorCON San Diego 2008
The Ultimate Deobfuscator - ToorCON San Diego 2008The Ultimate Deobfuscator - ToorCON San Diego 2008
The Ultimate Deobfuscator - ToorCON San Diego 2008Stephan Chenette
 
Script Fragmentation - Stephan Chenette - OWASP/RSA 2008
Script Fragmentation - Stephan Chenette - OWASP/RSA 2008Script Fragmentation - Stephan Chenette - OWASP/RSA 2008
Script Fragmentation - Stephan Chenette - OWASP/RSA 2008Stephan Chenette
 
Watchtowers of the Internet - Source Boston 2012
Watchtowers of the Internet - Source Boston 2012Watchtowers of the Internet - Source Boston 2012
Watchtowers of the Internet - Source Boston 2012Stephan Chenette
 

Plus de Stephan Chenette (9)

Landing on Jupyter
Landing on JupyterLanding on Jupyter
Landing on Jupyter
 
B-Sides Seattle 2012 Offensive Defense
B-Sides Seattle 2012 Offensive DefenseB-Sides Seattle 2012 Offensive Defense
B-Sides Seattle 2012 Offensive Defense
 
Detecting Web Browser Heap Corruption Attacks - Stephan Chenette, Moti Joseph...
Detecting Web Browser Heap Corruption Attacks - Stephan Chenette, Moti Joseph...Detecting Web Browser Heap Corruption Attacks - Stephan Chenette, Moti Joseph...
Detecting Web Browser Heap Corruption Attacks - Stephan Chenette, Moti Joseph...
 
Automated JavaScript Deobfuscation - PacSec 2007
Automated JavaScript Deobfuscation - PacSec 2007Automated JavaScript Deobfuscation - PacSec 2007
Automated JavaScript Deobfuscation - PacSec 2007
 
Web Wreck-utation - CanSecWest 2008
Web Wreck-utation - CanSecWest 2008Web Wreck-utation - CanSecWest 2008
Web Wreck-utation - CanSecWest 2008
 
The Ultimate Deobfuscator - ToorCON San Diego 2008
The Ultimate Deobfuscator - ToorCON San Diego 2008The Ultimate Deobfuscator - ToorCON San Diego 2008
The Ultimate Deobfuscator - ToorCON San Diego 2008
 
Script Fragmentation - Stephan Chenette - OWASP/RSA 2008
Script Fragmentation - Stephan Chenette - OWASP/RSA 2008Script Fragmentation - Stephan Chenette - OWASP/RSA 2008
Script Fragmentation - Stephan Chenette - OWASP/RSA 2008
 
Fireshark - Brucon 2010
Fireshark - Brucon 2010Fireshark - Brucon 2010
Fireshark - Brucon 2010
 
Watchtowers of the Internet - Source Boston 2012
Watchtowers of the Internet - Source Boston 2012Watchtowers of the Internet - Source Boston 2012
Watchtowers of the Internet - Source Boston 2012
 

Dernier

Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 

Dernier (20)

Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 

2013 Toorcon San Diego Building Custom Android Malware for Penetration Testing

  • 1. 1 Building Custom Android Malware for Penetration Testing Stephan Chenette Director of R&D, IOActive Labs
  • 2. Who am I? • Stephan Chenette • About Me: •Director of R&D @ IOActive •eEye, SAIC, Websense [13+yrs] •Breaking technology to expose weakness •Building technology / innovation •Offensive Defense Series 2
  • 3. About this presentation This presentation is an overview of my experience and methodology black box penetration testing a android security control 3
  • 4. Format import time ... start = time.time() end = start + (60*75) while True: Present() if Raise_Your_Hand() == True: Try_To_Answer() now = time.time() if now >= end: print(“Presentation Over!") break 4
  • 5. The goal we were given • Test today’s In The Wild (ITW) malware techniques and methodologies against a particular security control • Create and/or use existing malicious android applications and get them past the security control (test review/controls NOT security in phone) • Suggest improvements to the security control 5 Security Control Android App User’s Phone
  • 6. Why? • Important to focus on Individual Security Controls/Process •Mobile Device Management, Gateway AV, Desktop AV, Application Stores, etc. • Compartmentalizing “security tests” (from ITW malware) (non contrived/theoretical) • Systematically/Structurally attempt to bypass a security control • Improvement in technology • Improvement in education for the developer • Help in determining and/or exposing risks to current boundaries of a product/technology 6
  • 7. Previous Presentations Previous Known Work: “Dissecting the Android Bouncer” Jon Oberheide, Charlie Miller http://jon.oberheide.org/files/summercon12- bouncer.pdf 7
  • 8. Agenda • Approach to Accomplishing our Goal • **Introduction to Android – Q&A** • Reversing Android Applications – Q&A • Defensive Technologies – Q&A • Building Custom Android Malware – Q&A • Philosophical Rant on “What is Malware?” • Techniques/Methodologies • Conclusion 8
  • 9. Agenda • Approach to Accomplishing our Goal • **Introduction to Android – Q&A** • Reversing Android Applications – Q&A • Getting to know Defensive Technologies – Q&A • Building Custom Android Malware – Q&A • Philosophical Rant on “What is Malware?” • Techniques/Methodologies • Conclusion 9
  • 10. Approach to Accomplishing our Goal Given the goal of duplicating ITW techniques: • Understand the Android Platform • Studied Defensive Technology e.g. how would you detect malicious apps. • Analyzed ITW Malware • Categorized the Malware • Functionality • Class • Duplicated individual functionality • Made Alternative versions (building on prev. defensive tech. knowledge) 10
  • 11. Agenda • Approach to Accomplishing our Goal • **Introduction to Android – Q&A** • Reversing Android Applications – Q&A • Goal/Approach • Defensive Technologies – Q&A • Building Custom Android Malware – Q&A • Philosophical Rant on “What is Malware?” • Techniques/Methodologies • Conclusion 11
  • 13. What is Android? Android is a mostly open source operating system that runs on small devices. It is built on top of Linux and runs a VM called Dalvik, similar to the Java VM, but optimized for speed. From top to bottom, the stack looks like this: 13 Applications written in Java A framework called the Android SDK C++ Libraries and the Dalvik Virtual Machine Linux
  • 15. Android SDK Android SDK - Framework for developing applications: • Like the .NET Framework • APIs you can call to access key features of Android 15
  • 16. Android NDK • The Android Native Development Kit (NDK) is a toolset that allows you to implement parts of your app using native-code languages such as C and C++ • If you write native code, your applications are still packaged into an .apk file and they still run inside of a virtual machine on the device. • Native code is no different from Java code running under the Dalvik VM. All security in Android is enforced at the kernel level through processes and uids 16
  • 17. Android NDK 17 #include <string.h> #include <jni.h> #include <stdio.h> jstring Java_com_example_hellojni_HelloJni_stringFromJNI( JNIEnv* env, jobject thiz ) { FILE* file = fopen("/sdcard/hello.txt","w+"); if (file != NULL) { fputs("HELLO WORLD!n", file); fflush(file); fclose(file); } return (*env)->NewStringUTF(env, "Hello from JNI (with file io)!"); } <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> int sockfd = socket(AF_INET, SOCK_STREAM, 0); <uses-permission android:name="android.permission.INTERNET" />
  • 18. Applications written in C/NDK (iOS port) 18
  • 19. Java Virtual Machine (stack based)  much slower Dalvik Virtual Machine (register based)  much faster Dalvik VM The applications built for Android are run on top the Dalvik Virtual Machine. This is a Process Virtual Machine, like the Java Virtual Machine or the .NET Runtime The Dalvik virtual machine (DVM) • register-based machine which executes Dalvik bytecode instructions. • different from a JVM, hence its bytecode is different from Java bytecode. 19
  • 20. Android Linux Linux - Underlying OS that runs the Dalvik VM • Very lightly modified version of linux kernel • But user space wholly unlike that of any other linux system. • File IO • Process Management • Drivers for: •Display •Camera, Audio, Video •Keypad •WiFi and other networking resources •Inter-process Communication 20
  • 21. Developing an APK in Android 1. Android programmers write android apps in java. Native apps can be included and written in native languages e.g. C++ and are compiled for the native architecture (ARM/MIPS, etc.) 2. The IDEs like eclipse use the JDK to generate .class files which are then converted to .dex files (dalvik executable). AAPT is then use to build the APK 3. The dalvik virtual machine (dalvikvm) in Android can then run these dalvik executables by translating them to native instructions. 21
  • 22. Agenda • Approach to Accomplishing our Goal • **Introduction to Android – Q&A** • Reversing Android Applications – Q&A • Where to download Android Malware (research) • Getting to know Defensive Technologies – Q&A • Building Custom Android Malware – Q&A • Philosophical Rant on “What is Malware?” • Techniques/Methodologies • Conclusion 22
  • 24. 24 Where to get Android Malware • Mal Genome Project • Virus Share • Virus Total • Wepawet • Kaspersky (+Other Security Vendors) • Offensive Computing • Contagio
  • 25. Android APK Structure 25 PK ZIP Android APK
  • 27. Decompiling an Android APK File 27 unzip AXML- Printer2 dex2jar or ded Android Manifest XML classes dex Text Version XML jd-gui classes jar .java unzip classes jar classes jar classes .class jad .java .java Android APK Sony Ericon has a tool that does all of the above in a graphic layout  APKAnalyzer http://developer.sonymobile.com/knowledge-base/tools/analyze-your-apks-with-apkanalyzer/
  • 28. Decompiling an Android APK File 28 JEB Android APK Text Version XML .java .java .java res res res assets assets assets This is my preferred method
  • 29. Android Reversing Tool Bag • The Android SDK, of course, and Eclipse • Android APK Tool - for reverse engineering 3rd party, closed, binary Android apps • dex2jar, which converts Android’s Dalvik executables into normal Java jar files. • JD-GUI, which decompiles jar files into java source file • ADB service (the Android Debug Bridge) – for debugging apps • JEB – if you’re serious about reversing and can spend the $$$ http://www.android-decompiler.com/ 29
  • 30. Android Reversing Tool Bag Source: http://tracedroid.few.vu.nl/thesis.pdf 30
  • 32. Executable  Source • Dalvik bytecode is different from Java bytecode, Hence, Java decompilers cannot decompile it. • To overcome this issue is to use bytecode-to-bytecode compilers like •DED (JED better version) •dex2jar • to transform the Dalvik bytecode into Java bytecode and then to use a regular Java decompiler •jd-gui •dava • Such a method is prone to errors that may exist in the conversion of the bytecode, resulting erroneous source code. 32
  • 33. Executable  Source • dex files  dalvik opcode • To convert.dex files to a more understandable form we can convert it to smali representation • Dalvik opcodes to smali (intermediate/assembly based language and is a direct mapping. 33
  • 34. Executable  Source (sort-of) • smali can't be used to completely reconstruct java source code • Java is a very developed language • smali is more of an assembly based language. • Doesn’t have necessary information to be translated to Java • …Just use JEB =] http://www.android-decompiler.com/ 34
  • 35. Agenda • Approach to Accomplishing our Goal • Introduction to Android – Q&A • Getting to know Defensive Technologies – Q&A • Building Custom Android Malware – Q&A • Philosophical Rant on “What is Malware?” • Techniques/Methodologies • Conclusion 35
  • 37. Detection Technologies 37 • Ultimate goal is to upload app to “walled garden” (restrictive environment) • To do that you must bypass detection capabilities / review process • Detection capabilities • Hashes • Native apps • Dex files • Dalvik opcodes sigs • Decompile dalvik to smali and use sigs • Fuzzy hashing against known apps • AndroidManifest.xml file • Dynamic Behavior Analysis • DroidBox - https://code.google.com/p/droidbox/ Suspicious Permissions android.permission.READ_FRAME_BUFFER (read frame buffer) android.permission.CLEAR_APP_CACHE (delete all application cache data) android.permission.WRITE_SECURE_SETTINGS (modify secure system settings) android.permission.INJECT_EVENTS (inject user events) android.permission.BIND_DEVICE_ADMIN (interact with device admin) android.permission.INSTALL_PACKAGES (directly install applications) android.permission.DELETE_PACKAGES (delete applications) Etc.
  • 38. Agenda • Approach to Accomplishing our Goal • Introduction to Android – Q&A • Getting to know Defensive Technologies – Q&A • Building Custom Android Malware – Q&A • Philosophical Rant on “What is Malware?” • Techniques/Methodologies • Conclusion 38
  • 40. Approach/Methodology Research In The Wild (ITW) Android Malware • Techniques • Methodologies 40 Research Defensive Security Controls • Techniques • Methodologies 1. Probe Environment (RECON) 2. Upload and test ITW Malware (Test barrier to entry) 3. Regroup 4. Upload “trojaned” apps / altered versions of ITW Malware 5. Regroup 6. Upload unit-tests (real-world/fabricated samples) 7. Mix, max and combine unit-based tests into samples
  • 41. 41 Where do we start? • What is malware? • What are the different malware categories? • Methodology/Techniques
  • 42. 42 What is Malware? Malware • Not always easy to define [ start philosophical rant] • Anything that breaks the security model (without the users consent) • Deceptive/hide true intent • bad for user / good for attacker e.g. surveillance, collecting passwords, etc. • Applications that are detrimental to the user running the device. • Harms a user • Financial • Privacy • Personal information – location (surveillance) , • Stealing resources – cracking, botnets – processing power •Breaks Network policy •Example of malware vs.. useful tool: not-compatible. •1964 Jacob Elllis V.S. Ohio - How do you define P0rn? …“You know it when you see it”
  • 44. 44 What is Malware? Is this Malware?
  • 45. 45 Android Malware Categories Android Premium Service Abusers Android Adware Android Data Stealers Targeted Spyware Malicious Android Downloaders Source: https://www.lookout.com/
  • 46. 46 Android Malware Analysis Infection Vector - How it installed on the device Entry Point – How the malicious behavior is initiated Elevated Privileges – if and how it gained root privileges Payload – it’s Purpose and functionality Hosting – does it contain embedded apps
  • 48. Top Threats 48 Infection Vector  DroidDream hid the malware in seemingly legitimate applications to trick unsuspecting users into downloading the malware (more than 50 apps on the Android App Store were found to contain Droid Dream) Entry Point  Requires user to launch application. Post-Launch malware will start a service then launch the host application’s primary activity Elevated Privileges  1) “exploid” to attempt to exploit a vulnerability in udev event handling in Android’s init. If “exploid” fails… 2) “rageagainstthecage”, leveraging a vulnerability in adbd’s attempt to drop its privileges. Payload  Sends device information to C&C e.g. IMEI, IMSI and device model and SDK version, Checks if already infected, by checking package com.android.providers.downloadsmanager is installed. If this package is not found it will install the second payload, which is bundled as sqlite.db. This part of the malware will be copied to the /system/app/ directory, installing itself as DownloadProviderManager.apk. Copying the file using this method, to this directory will silently install the APK file, and not prompt user to grant permissions as in a standard app installation process. Droid Dream
  • 49. Top Threats 49 Entry Point  triggered by Intents it listens for on the device. • receiver for BOOT_COMPLETED and PHONE_STATE intents • single service: Payload  DownloadManageService controls a timer-scheduled task Gather information and send to C&C and install: • ProductID – Specific to the DroidDream variant • Partner – Specific to the DroidDream variant • IMSI • IMEI • Model & SDK value • Language • Country • UserID – Though this does not appear to be fully implemented Powerful zombie agent that can install any payload silently and execute code with root privileges at will. Droid Dream
  • 51. Top Threats 51 Source: https://blog.lookout.com/wp-content/uploads/2011/06/GGTracker-Teardown_Lookout-Mobile-Security.pdf GGTracker Infection Vector  User is phished into visiting to a website that tricks them into installing a battery manager application file from a fake Android Market store.
  • 52. Top Threats 52 Source: https://blog.lookout.com/wp-content/uploads/2011/06/GGTracker-Teardown_Lookout-Mobile-Security.pdf GGTracker Entry Point  When installing, the user is prompted with a list of permissions the application requires: android.permission.ACCESS_WIFI_STATE android.permission.CHANGE_WIFI_STATE android.permission.CHANGE_NETWORK_STATE android.permission.ACCESS_NETWORK_STATE android.permission.RECEIVE_BOOT_COMPLETED android.permission.INTERNET android.permission.READ_PHONE_STATE android.permission.READ_SMS android.permission.RECEIVE_SMS android.permission.SEND_SMS • This malware will either start itself after receiving an SMS or having the application launched. • On the first launch, it communicates with the tracking server, ggtrack.org. Payload  • The app posts the phone number to the GGTracker remote server, where the malware starts to subscribe the device to premium services.
  • 53. Top Threats + 1000s Other Apps 53 Source: https://www.lookout.com/resources/top-threats
  • 54. Most Sophisticated Malware Yet OBAD • Installs as device admin app (permissions) • Very difficult to uninstall • Heavily Obfuscated • Send SMS to Premium numbers • Download other malware • Remote command execution • Calles API methods via reflection • Took advantages of bugs in DEX2JAR to break manual/automated analysis if using DEX2JAR (will break analysis only if using DEX2JAR) 54
  • 55. Worth Investigating HoseDex2Jar • Injected files into the header Source: Tim Strazzere http://hitcon.org/2013/download/Tim%20Strazzere%20-%20DexEducation.pdf 55
  • 56. Obfuscation • ProGuard / DexGuard • Used at compile time • API Reflection • Used by desktop Java malware for years • Reflection can allow a program to create a “method pointer” (a rough analogy for better understanding) and invoke the target method by using it. • Uses this feature to deceive any casual static code analysis module which tries to detect whether a sample is calling the method that sends SMS messages. (e.g.:sendTextMessage()) • Encrypted Network Communication • Encrypted Files 56
  • 58. Methodology • Define the target and objectives • Profile target • Determine environment • Determine detection capabilities •Upload ITW Malware • Determine what gets caught and what doesn’t • “Rinse and Repeat” •Create Alternative Versions (Private) • Decompile/Obfuscate/Re-Write • Recompile • Upload •Merge with legitimate applications •Fabricate Android Malware 58
  • 59. Target 59 • Reviewer  • End detection engine • End user • Internal resource that is adjacent to the android device (e.g. internal network) • Etc.
  • 60. Probes – Determine Environment 60 What’s the first thing you’d do if you go explore a new universe? Send out a few probes to gather information, right? No Different here.
  • 61. Probes – Determine Environment Red Pill/Blue Pill Test - Running in an emulator?? 61 if (android.os.Build.MODEL.equals(“google_sdk”)) { // emulator } else { //not emulator }
  • 62. Probes – Determine Environment Anti-Emulation 62 Tim Strazzere’s Anti-Emulator Project (Lookout Security) https://github.com/strazzere/anti-emulator
  • 63. Probes – Determine Environment • Device info • IMEI, Device Model/Make etc. • GEO Location  help determine language to write app in • IP Address / 3G/4G or on wifi network? • Scan for available blue-tooth devices • Egress filtering? ports open, etc. 63
  • 64. Probes – Determine Environment 64 • Record Audio • Take Video • Take Photos • Send Existing Photos
  • 65. Probes – Determine Environment 65 • Other Processes/Apps on device • Other permissions/intents of installed apps • Info-leak in error messages?
  • 66. Upload ITW Malware • ADRD • AnserverBot • Asroot • BaseBridge • BeanBot • Bgserv • CoinPirate • CruseWin • DogWars 66 • DroidCoupon • DroidDeluxe • DroidDream • DroidDreamLight • DroidKungFu1 • DroidKungFu2 • FakeNetflix • EndofDay • And many more…
  • 67. Build Common Scenarios 67 Scenario Description Android Premium Service Abusers Premium service abusers subscribe users to various "services" that add to their phone bill at the end of the month Android Adware Android apps that use abusive advertising tactics Android Data Stealers Android data stealers often bilk users of information such as their operating system version, product ID, International Mobile Equipment Identity (IMEI) number and other information that could be used in future attacks Malicious Android Downloaders Once a malicious downloader has infected a victim's Android device, it is designed to contact a remote server to await instructions or download additional Android malware
  • 68. Android App Entry Point Unlike other programming paradigms in which apps are launched with a main() method, the Android system initiates code in an Activity instance by invoking specific callback methods that correspond to specific stages of its lifecycle. • Services which start at broadcast receiver callback • Callbacks which correspond to a user action • Actions start immediately (service, thread, etc.) • Actions which start based on a timer 68
  • 69. Android App Entry Point 69 Layout/activity_main.xml: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > <Button android:id="@+id/button1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:onClick="onClick" android:text="Button" /> </LinearLayout> A broadcast receiver (short receiver) is an Android component which allows you to register for system or application events. All registered receivers for an event will be notified by the Android runtime once this event happens. For example applications can register for the ACTION_BOOT_COMPLETED system event which is fired once the Android system has completed the boot process. A receiver can be registered via the AndroidManifest.xml file. Alternatively to this static registration, you can also register a broadcast receiver dynamically via theContext.registerReceiver() method. The Broadcast receiver can then start a service to perform any number of actions.
  • 70. Android App Entry Point 70
  • 71. Android App Entry Point 71
  • 72. Android App Entry Point 72
  • 75. Build functionality 75 Functionality Autostart on boot Get phone number, IMSI, IMEI, … Send information to C&C WiFi connection-aware ( run when phone charging) Hide application icon Log SMS/Send SMS Etc.
  • 76. Collecting Device Data 76 import android.app.Activity; import android.content.Context; import android.telephony.TelephonyManager; public class PhoneInfo { public static String getMyPhoneNumber(Activity a) { try { TelephonyManager mTelephonyMgr; mTelephonyMgr = (TelephonyManager) a.getSystemService(Context.TELEPHONY_SERVICE); return mTelephonyMgr.getLine1Number(); } catch (Exception e) { return ""; } } public static String getMyIMEI(Activity a){ try { TelephonyManager mTelephonyMgr; mTelephonyMgr = (TelephonyManager) a.getSystemService(Context.TELEPHONY_SERVICE); return mTelephonyMgr.getDeviceId(); } catch (Exception e) { return ""; } …
  • 77. Build Custom Scenarios 77 Scenario Description Vulnerable Lib Build an android app that uses a vulnerable version of libcurl (why? – because then the client will be exploitable) ALL Intents Build an android app that asked for ALL POSSIBLE permission (why? – this will help us determine if they are filtering by permission) Various NDK Examples Same functionality but as a native library Can call any static Java API from the NDK going through JNI as long as you’re running in a library instead of an application and instead the dalvik vm
  • 78. Android Exploitation Space 78 ASHMEM The ASHMEM custom shared memory allocator written by Google has a nasty bug that allows your device to be easily rooted. Maybe they should have stuck with POSIX SHM, but the bad guys aren't complaining. Exploid Nearly identical to a vulnerability fixed in the Linux udev daemon in 2009, Exploid impacts Android's init daemon by forgetting to check whether Netlink messages are coming from the trusted kernel ... or a malicious app. Gingerbreak A commonly-abused vulnerability in the wild by Android malware, Gingerbreak affects the Android volume manager (vold) via, you guessed it, the same Netlink issue as Exploid. Badness ensues. Levitator Malicious apps will undoubtedly be “levitating” their privileges using this vulnerability that affects the PowerVR kernel module used for 3D graphics on all S-series devices and allows unfettered access to kernel memory. Mempodroid Inherited from the upstream Linux kernel, a vulnerability in the /proc/pid/mem interface allows for writing arbitrary memory in the address space of a setuid process. It's about as complicated as it sounds, but attackers are smart like that. Wunderbar Another crossover from the Linux kernel, this NULL pointer dereference was one of the first privilege escalation vulnerabilities exploited on the Android platform, thanks to faulty mmap_min_addr protection on ARM. ZergRush No, it has nothing to do with StarCraft, sorry. The ZergRush vulnerability in Android's libsysutils allows an attacker to overwhelm the system with command arguments, not zerglings, and take full control of your device. Zimperlich Always check return values. Android's Zygote process, from which all new apps are spawned, forgets this important rule and fails to check the return value of setuid(2), leading to plentiful root shells! Source: http://www.xray.io/#vulnerabilities
  • 79. Android Exploitation Space • Android Master Key – one of the most recent and exploit • It lets you get at system-android-app-level permissions, not full-out root, but that's enough to do some serious harm (read text messages without permissions, etc.) Might be in a different class than the full- out root exploits, though. “The Android platform is a complicated system that consists of not only the Linux kernel, but also the entire Android framework with more than 90 open-source libraries includingWebKit, SQLite, and OpenSSL. The complexity naturally introduces software vulnerabilities that can be potentially exploited for privilege escalation.” “among 1260 samples in our dataset, 463 of them (36.7%) embed at least one root exploit” 79 Source: “A Survey of Android Malware”, Xuxian Jiang, Yajin Zhou
  • 80. Considerations 80 • Store • Set time of Application release to some date in the future (to make sureit’s not downloaded • Gateway/Desktop AV • Setup entire end-to-end test • Behavior Analysis Engine • None =]
  • 81. Agenda • Approach to Accomplishing our Goal • Introduction to Android – Q&A • Getting to know Defensive Technologies – Q&A • Building Custom Android Malware – Q&A • Philosophical Rant on “What is Malware?” • Techniques/Methodologies • Conclusion 81
  • 82. Conclusion 82 • Malware is a matter of perspective • Trivial to get “malware” onto a system • Custom malware • almost guaranteed to get through • because majority detection techniques are focused on known-bad (signatures/clustering)
  • 83. Conclusion 83 • Hashes work (on known samples) • Focus for detect engines should be apps that break the security model (e.g. exploitation  root) • Apps that conform to security model but deceive users can have dangerous permissions highlighted for users • App reviewers should thoroughly verify what an app does and what it’s supposed to do before being downloaded to a user, auto-deny on key permissions, and ask for more details • App review process should involve running apps and reviewing code coverage • App review process should involve using any and all dynamic information to help catch “known malicious artifacts” to consolidate ‘deep-review bucket” • App review process should have way to determine if good app has been “trojanized” use certificates for known good and known bad
  • 84. Questions? Stephan Chenette, Twitter: @StephanChenette Slide Share: http://www.slideshare.net/schenette Thanks to JEB Analysis Tool, Jurriaan Bremer, Robert Erbes, Esteban Fayo and the IOActive Team! 84