SlideShare a Scribd company logo
1 of 65
Download to read offline
Bulletproof AndroidBulletproof Android
Godfrey Nolan
How did we get hereHow did we get here
Virtual Machines
Static information
Dynamic information
Decompilation 101Decompilation 101
Decompilation 101Decompilation 101
Decompilation 101Decompilation 101
$ adb shell pm path com.united.mobile.android
package:/data/app/com.united.mobile.android-1/base.apk
$ adb pull /data/app/com.united.mobile.android-1/base.apk
4349 KB/s (51855610 bytes in 11.642s)
$ jadx-gui base.apk
$ adb backup com.united.mobile.android
Now unlock your device and confirm the backup operation.
$ java -jar abe.jar unpack backup.ab backup.tar
$ tar -xvf backup.tar
$ sqlite3 apps/com.united.mobile.android/db/united.db
Decompilation 101Decompilation 101
Decompilation 101Decompilation 101
Audit ReportsAudit Reports
OWASP Top 10OWASP Top 10
Weak Server Side Controls
Insecure Data Storage
Insuļ¬ƒcient Transport Layer Protection
Unintended Data Leakage
Poor Authorization and Authentication
Broken Cryptography
Client Side Injection
Security Decision via Untrusted Input
Improper Session Handling
Lack of Binary Protections
ProblemProblem
Weak Server Side Controls
Insecure Data Storage
Insuļ¬ƒcient Transport Layer Protection
Unintended Data Leakage
Poor Authorization and Authentication
Broken Cryptography
Client Side Injection
Security Decision via Untrusted Input
Improper Session Handling
Lack of Binary Protections
ProblemProblem
Weak Server Side Controls
Insecure Data Storage
Insuļ¬ƒcient Transport Layer Protection
Unintended Data Leakage
Poor Authorization and Authentication
Broken Cryptography
Client Side Injection
Security Decision via Untrusted Input
Improper Session Handling
Lack of Binary Protections
GET http://herdfinancial.com/api/v1/balances/1234567899/
{"success":"true","checkingBalance":"0.0","savingsBalance":"0.0"}
ProblemProblem
Weak Server Side Controls
Insecure Data Storage
Insuļ¬ƒcient Transport Layer Protection
Unintended Data Leakage
Poor Authorization and Authentication
Broken Cryptography
Client Side Injection
Security Decision via Untrusted Input
Improper Session Handling
Lack of Binary Protections
GET http://herdfinancial.com/api/v1/balances/1234567890/
{"success":"true","checkingBalance":"947.3","savingsBalance":"0.0"}
ExampleExample
"actor": {ā€œfirst_name": "Rita","last_name": "D.","title": "Rita D.","gender": "F",
"is_mvp": false,
"preferred_brand": 32,
"_links": {"self": [{"href": "/v7.0/user/3273986/","id": "3273986"}]},
"type": "user",
"friendship": null,
"id": 3273986
},"id": "1-3273986-9-1440092847",
FixFix
Weak Server Side Controls
Insecure Data Storage
Insuļ¬ƒcient Transport Layer Protection
Unintended Data Leakage
Poor Authorization and Authentication
Broken Cryptography
Client Side Injection
Security Decision via Untrusted Input
Improper Session Handling
Lack of Binary Protections
Use GUID that maps to ID
REST verbs are easy to guess
OWASP Web/Cloud top 10
Donā€™t trust the client, verify
ProblemProblem
Weak Server Side Controls
Insecure Data Storage
Insuļ¬ƒcient Transport Layer Protection
Unintended Data Leakage
Poor Authorization and Authentication
Broken Cryptography
Client Side Injection
Security Decision via Untrusted Input
Improper Session Handling
Lack of Binary Protections
ProblemProblem
Weak Server Side Controls
Insecure Data Storage
Insuļ¬ƒcient Transport Layer Protection
Unintended Data Leakage
Poor Authorization and Authentication
Broken Cryptography
Client Side Injection
Security Decision via Untrusted Input
Improper Session Handling
Lack of Binary Protections
<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
<map>
<boolean name="remember" value="true" />
<string name="password">goatdroid</string>
<string name="username">goatdroid</string>
</map>
ExampleExample
Weak Server Side Controls
Insecure Data Storage
Insuļ¬ƒcient Transport Layer Protection
Unintended Data Leakage
Poor Authorization and Authentication
Broken Cryptography
Client Side Injection
Security Decision via Untrusted Input
Improper Session Handling
Lack of Binary Protections
FixFix
Weak Server Side Controls
Insecure Data Storage
Insuļ¬ƒcient Transport Layer Protection
Unintended Data Leakage
Poor Authorization and Authentication
Broken Cryptography
Client Side Injection
Security Decision via Untrusted Input
Improper Session Handling
Lack of Binary Protections
No caching of passwords, SSNs etc.
Multi-factor authentication
Client / Server side access control
"Sensitive data should be encrypted
and very sensitive data should be
stored on server" - Zapata
ProblemProblem
Weak Server Side Controls
Insecure Data Storage
Insuļ¬ƒcient Transport
Layer Protection
Unintended Data Leakage
Poor Authorization and Authentication
Broken Cryptography
Client Side Injection
Security Decision via Untrusted Input
Improper Session Handling
Lack of Binary Protections
ExampleExample
Weak Server Side Controls
Insecure Data Storage
Insuļ¬ƒcient Transport
Layer Protection
Unintended Data Leakage
Poor Authorization and Authentication
Broken Cryptography
Client Side Injection
Security Decision via Untrusted Input
Improper Session Handling
Lack of Binary Protections
ExampleExample
Weak Server Side Controls
Insecure Data Storage
Insuļ¬ƒcient Transport
Layer Protection
Unintended Data Leakage
Poor Authorization and Authentication
Broken Cryptography
Client Side Injection
Security Decision via Untrusted Input
Improper Session Handling
Lack of Binary Protections
More ProblemsMore Problems
Weak Server Side Controls
Insecure Data Storage
Insuļ¬ƒcient Transport
Layer Protection
Unintended Data Leakage
Poor Authorization and Authentication
Broken Cryptography
Client Side Injection
Security Decision via Untrusted Input
Improper Session Handling
Lack of Binary Protections
FixFix
private static String PUB_KEY = "30820122300d06092a864886f70d0101" +
"0105000382010f003082010a0282010100b35ea8adaf4cb6db86068a836f3c85" +
"5a545b1f0cc8afb19e38213bac4d55c3f2f19df6dee82ead67f70a990131b6bc" +
"ac1a9116acc883862f00593199df19ce027c8eaaae8e3121f7f329219464e657" +
"2cbf66e8e229eac2992dd795c4f23df0fe72b6ceef457eba0b9029619e0395b8" +
"609851849dd6214589a2ceba4f7a7dcceb7ab2a6b60c27c69317bd7ab2135f50" +
"c6317e5dbfb9d1e55936e4109b7b911450c746fe0d5d07165b6b23ada7700b00" +
"33238c858ad179a82459c4718019c111b4ef7be53e5972e06ca68a112406da38" +
"cf60d2f4fda4d1cd52f1da9fd6104d91a34455cd7b328b02525320a35253147b" +
"e0b7a5bc860966dc84f10d723ce7eed5430203010001";
// Pin it!
final boolean expected = PUB_KEY.equalsIgnoreCase(encoded);
if (!expected) {
throw new CertificateException("checkServerTrusted: Expected public key: "
+ PUB_KEY + ", got public key:" + encoded);
}
}
FixFix
Weak Server Side Controls
Insecure Data Storage
Insuļ¬ƒcient Transport
Layer Protection
Unintended Data Leakage
Poor Authorization and Authentication
Broken Cryptography
Client Side Injection
Security Decision via Untrusted Input
Improper Session Handling
Lack of Binary Protections
Error out on SSLHandshakeException
Assume SSL is broken, root level CA's
SSL pinning
Do more on the server
Scan server with nogotofail
ProblemProblem
Weak Server Side Controls
Insecure Data Storage
Insuļ¬ƒcient Transport Layer Protection
Unintended Data Leakage
Poor Authorization and Authentication
Broken Cryptography
Client Side Injection
Security Decision via Untrusted Input
Improper Session Handling
Lack of Binary Protections
ProblemProblem
Weak Server Side Controls
Insecure Data Storage
Insuļ¬ƒcient Transport Layer Protection
Unintended Data Leakage
Poor Authorization and Authentication
Broken Cryptography
Client Side Injection
Security Decision via Untrusted Input
Improper Session Handling
Lack of Binary Protections
ExampleExample
Weak Server Side Controls
Insecure Data Storage
Insuļ¬ƒcient Transport Layer Protection
Unintended Data Leakage
Poor Authorization and Authentication
Broken Cryptography
Client Side Injection
Security Decision via Untrusted Input
Improper Session Handling
Lack of Binary Protections
ExampleExamplepublic ActivityLaunchAppLoad() {
this.WAY_WAY_TOO_LOW = 49;
this.A_LITTLE_LESS_WAY_TOO_LOW = 50;
this.LESSER_WAY_TOO_LOW = 51;
this.BIT_TOO_LOW = 52;
this.TOO_LOW = 53;
this.MORE = 54;
this.A_LITTLE_MORE = 55;
this.WAY_TOO_MORE = 97;
this.BIG_DADDY = 102;
this.orderOfTheThronesTrois = new int[]{this.BIG_DADDY, this.MORE, this.WAY_TOO_MORE, this.MORE};
this.orderOfTheThronesQuatre = new int[]{this.LESSER_WAY_TOO_LOW, this.MORE, this.LESSER_WAY_TOO_LOW, this.TOO_LOW};
this.orderOfTheThronesUn = new int[]{this.BIT_TOO_LOW, this.BIT_TOO_LOW, this.WAY_WAY_TOO_LOW, this.BIT_TOO_LOW};
this.orderOfTheThronesDeux = new int[]{this.MORE, this.A_LITTLE_MORE, this.A_LITTLE_LESS_WAY_TOO_LOW, this.BIT_TOO_LOW};
}
String createTheHalfBloodPrince() {
String strTemp = StringUtils.EMPTY;
int x = 0;
while (x < 4) {
int[] xyz = null;
if (x == 0) {
xyz = this.orderOfTheThronesTrois;
} else if (x == 1) {
xyz = this.orderOfTheThronesQuatre;
} else if (x == 2) {
xyz = this.orderOfTheThronesUn;
} else if (x == 3) {
xyz = this.orderOfTheThronesDeux;
}
int y = 3;
while (y >= 0) {
strTemp = new StringBuilder(String.valueOf(strTemp)).append(Character.toString((char) xyz[y])).toString();
y--;
}
x++;
}
return strTemp;
}
FixFix
Weak Server Side Controls
Insecure Data Storage
Insuļ¬ƒcient Transport Layer Protection
Unintended Data Leakage
Poor Authorization and Authentication
Broken Cryptography
Client Side Injection
Security Decision via Untrusted Input
Improper Session Handling
Lack of Binary Protections
Strip out unneccesary logging code
Obfuscate method names
Check any third party libraries
Double check your webview caches
Download and unzip your APK
ProblemProblem
Weak Server Side Controls
Insecure Data Storage
Insuļ¬ƒcient Transport Layer Protection
Unintended Data Leakage
Poor Authorization and
Authentication
Broken Cryptography
Client Side Injection
Security Decision via Untrusted Input
Improper Session Handling
Lack of Binary Protections
ExampleExample
Weak Server Side Controls
Insecure Data Storage
Insuļ¬ƒcient Transport Layer Protection
Unintended Data Leakage
Poor Authorization and
Authentication
Broken Cryptography
Client Side Injection
Security Decision via Untrusted Input
Improper Session Handling
Lack of Binary Protections
<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
<map>
<string name="TM_MEMBER_EMAIL">godfrey@riis.com</string>
<int name="TM_MEMBER_MARKET_ID" value="7" />
<string name="TM_MEMBER_TAP_ID">77ef62159ad9c32913dfdbee0e58aea3</string>
<string name="TM_MEMBER_LNAME"></string>
<string name="TM_MEMBER_LANGUAGE">en-us</string>
<int name="TM_BILLING_COUNTRY_CODE" value="-1" />
<string name="TM_MEMBER_POSTCODE">48070</string>
<string name="TM_LAST_BILLING_ID"></string>
<int name="TM_MEMBER_COUNTRY" value="840" />
<string name="TM_MEMBER_PASSWORD">2secret4me</string>
<string name="TM_MEMBER_FNAME">Godfrey</string>
</map>
FixFix
Weak Server Side Controls
Insecure Data Storage
Insuļ¬ƒcient Transport Layer Protection
Unintended Data Leakage
Poor Authorization and
Authentication
Broken Cryptography
Client Side Injection
Security Decision via Untrusted Input
Improper Session Handling
Lack of Binary Protections
No password caching
Multi Factor Authentication
Encryption
Public-Private Key exchange
Tokens, tokens, tokens
OAuth
Use Server side nonceā€™s
ProblemProblem
Weak Server Side Controls
Insecure Data Storage
Insuļ¬ƒcient Transport Layer Protection
Unintended Data Leakage
Poor Authorization and Authentication
Broken Cryptography
Client Side Injection
Security Decision via Untrusted Input
Improper Session Handling
Lack of Binary Protections
ExampleExample
public static String decrypt(String paramString)
throws Exception
{
if (paramString != null)
return new String(decrypt(getRawKey("3lIoM_d0idrn4|4TleD".getBytes()), toByte(paramString)
return null;
}
private static byte[] decrypt(byte[] paramArrayOfByte1, byte[] paramArrayOfByte2)
throws Exception
{
SecretKeySpec localSecretKeySpec = new SecretKeySpec(paramArrayOfByte1, "AES");
Cipher localCipher = Cipher.getInstance("AES");
localCipher.init(2, localSecretKeySpec);
return localCipher.doFinal(paramArrayOfByte2);
}
ExampleExample
// NDK code - still see the code in disassembler
jstring Java_com_riis_decompilingandroid_getPassword(JNIEnv* env, jobject thiz)
{
return (*env)->NewStringUTF(env, "xeHnwfiy4uzefrabruebeb");
}
ExampleExample
Weak Server Side Controls
Insecure Data Storage
Insuļ¬ƒcient Transport Layer Protection
Unintended Data Leakage
Poor Authorization and Authentication
Broken Cryptography
Client Side Injection
Security Decision via Untrusted Input
Improper Session Handling
Lack of Binary Protections
FixFix
Weak Server Side Controls
Insecure Data Storage
Insuļ¬ƒcient Transport Layer Protection
Unintended Data Leakage
Poor Authorization and Authentication
Broken Cryptography
Client Side Injection
Security Decision via Untrusted Input
Improper Session Handling
Lack of Binary Protections
FixFix
Weak Server Side Controls
Insecure Data Storage
Insuļ¬ƒcient Transport Layer Protection
Unintended Data Leakage
Poor Authorization and Authentication
Broken Cryptography
Client Side Injection
Security Decision via Untrusted Input
Improper Session Handling
Lack of Binary Protections
Use asymmetric encryption
Encrypt databases
Android Keystore is broken
ProblemProblem
Weak Server Side Controls
Insecure Data Storage
Insuļ¬ƒcient Transport Layer Protection
Unintended Data Leakage
Poor Authorization and Authentication
Broken Cryptography
Client Side Injection
Security Decision via Untrusted Input
Improper Session Handling
Lack of Binary Protections
ProblemProblem
public boolean checkLogin(String param1, String param2)
{
boolean bool = false;
Cursor cursor = db.rawQuery("select * from login where USERNAME = '" +
param1 + "' and PASSWORD = '" + param2 + "';", null);
if (cursor != null) {
if (cursor.moveToFirst())
bool = true;
cursor.close();
}
return bool;
}
select * from login where USERNAME = '' OR 1=1 --' and PASSWORD = 'test'
FixFix
public boolean checkLogin(String param1, String param2)
{
boolean bool = false;
Cursor cursor = db.rawQuery("select * from login where " +
"USERNAME = ? and PASSWORD = ?", new String[]{param1, param2});
if (cursor != null) {
if (cursor.moveToFirst())
bool = true;
cursor.close();
}
return bool;
}
ProblemProblem
Weak Server Side Controls
Insecure Data Storage
Insuļ¬ƒcient Transport Layer Protection
Unintended Data Leakage
Poor Authorization and Authentication
Broken Cryptography
Client Side Injection
Security Decision via Untrusted Input
Improper Session Handling
Lack of Binary Protections
WebView myWebView = (WebView) findViewById(R.id.webview);
WebSettings webSettings = myWebView.getSettings();
webSettings.setJavaScriptEnabled(true);
<script>alert("xss");</script>
FixFix
Weak Server Side Controls
Insecure Data Storage
Insuļ¬ƒcient Transport Layer Protection
Unintended Data Leakage
Poor Authorization and Authentication
Broken Cryptography
Client Side Injection
Security Decision via Untrusted Input
Improper Session Handling
Lack of Binary Protections
Use parameterized queries
setJavaScriptEnabled(false)
ProblemProblem
Weak Server Side Controls
Insecure Data Storage
Insuļ¬ƒcient Transport Layer Protection
Unintended Data Leakage
Poor Authorization and Authentication
Broken Cryptography
Client Side Injection
Security Decision via
Untrusted Input
Improper Session Handling
Lack of Binary Protections
ProblemProblem
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.riis.login"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.riis.login.LoginActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.riis.login.IntentReceiverActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="com.riis.login.IntentReceiverActivity" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
</manifest>
ProblemProblem
<activity
android:name="com.riis.login.IntentReceiverActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="com.riis.login.IntentReceiverActivity" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
ProblemProblem
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.riis.hellointent"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="18" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.riis.hellointent.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="com.riis.login.IntentReceiverActivity" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
</manifest>
FixFix
// implicit
Intent intent = new Intent();
// explicit
Intent intent = new Intent(this, IntentReceiverActivity.class);
Weak Server Side Controls
Insecure Data Storage
Insuļ¬ƒcient Transport Layer Protection
Unintended Data Leakage
Poor Authorization and Authentication
Broken Cryptography
Client Side Injection
Security Decision via
Untrusted Input
Improper Session Handling
Lack of Binary Protections
FixFix
Weak Server Side Controls
Insecure Data Storage
Insuļ¬ƒcient Transport Layer Protection
Unintended Data Leakage
Poor Authorization and Authentication
Broken Cryptography
Client Side Injection
Security Decision via
Untrusted Input
Improper Session Handling
Lack of Binary Protections
Use explicit intents
Scan app using Intent Sniļ¬€er
ProblemProblem
Weak Server Side Controls
Insecure Data Storage
Insuļ¬ƒcient Transport Layer Protection
Unintended Data Leakage
Poor Authorization and Authentication
Broken Cryptography
Client Side Injection
Security Decision via Untrusted Input
Improper Session Handling
Lack of Binary Protections
if (dao.isDevicePermanentlyAuthorized(deviceID)) {
String newAuthToken = Utils.generateAutToken();
doa.updateAuthrizedDeviceAuth(deviceID, newAuthToken);
login.setAuthToken(newAuthToken);
login.setUserName(dao.getUserName(newAuthToken));
login.setAccountNumber(dao.getAccountNumber(newAuthToken));
login.setSuccess(true);
}
ExampleExample
Weak Server Side Controls
Insecure Data Storage
Insuļ¬ƒcient Transport Layer Protection
Unintended Data Leakage
Poor Authorization and Authentication
Broken Cryptography
Client Side Injection
Security Decision via Untrusted Input
Improper Session Handling
Lack of Binary Protections
ExampleExample
Weak Server Side Controls
Insecure Data Storage
Insuļ¬ƒcient Transport Layer Protection
Unintended Data Leakage
Poor Authorization and Authentication
Broken Cryptography
Client Side Injection
Security Decision via Untrusted Input
Improper Session Handling
Lack of Binary Protections
FixFix
Weak Server Side Controls
Insecure Data Storage
Insuļ¬ƒcient Transport Layer Protection
Unintended Data Leakage
Poor Authorization and Authentication
Broken Cryptography
Client Side Injection
Security Decision via Untrusted Input
Improper Session Handling
Lack of Binary Protections
Expire sessions
Try backup to another phone
Careful using OAuth logins to FB etc.
ProblemProblem
Weak Server Side Controls
Insecure Data Storage
Insuļ¬ƒcient Transport Layer Protection
Unintended Data Leakage
Poor Authorization and Authentication
Broken Cryptography
Client Side Injection
Security Decision via Untrusted Input
Improper Session Handling
Lack of Binary Protections
/**
* Logs you into your SIP provider, registering this device as the location to
* send SIP calls to for your SIP address.
*/
public void initializeLocalProfile() {
if (manager == null) {
return;
}
if (me != null) {
closeLocalProfile();
}
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getBaseContext());
String username = prefs.getString("namePref", "");
String domain = prefs.getString("domainPref", "");
String password = prefs.getString("passPref", "");
ExampleExample
FixFix
Weak Server Side Controls
Insecure Data Storage
Insuļ¬ƒcient Transport Layer Protection
Unintended Data Leakage
Poor Authorization and Authentication
Broken Cryptography
Client Side Injection
Security Decision via Untrusted Input
Improper Session Handling
Lack of Binary Protections
Obfuscation helps remove useful info
Set minifyEnabled = true
Not a silver bullet
Anti ProGuard apps out there
Hackers just move to Smali
Code in C++ using NDK
Much harder to read
Can still disassemble C++
What's NewWhat's New
Jadx
android:debuggable(true)
some Smali required
SSL Pinning
Bug Bounties
What's NewWhat's New
What's NewWhat's New
Disassemble using apktool
Find main class in AdroidManifest.xml
Add debug wait to onCreate method
ā€‹
Recompile using apktool
Sign and install
java -jar apktool.jar d -d test.apk -o out
<activity android:label="@string/app_name" android:name="com.riis.helloworld.MainActivity">
a=0;// # virtual methods
a=0;// .method protected onCreate(Landroid/os/Bundle;)V
a=0;// invoke-static {}, Landroid/os/Debug;->waitForDebugger()V
a=0;//
a=0;// .locals 1
a=0;// .param p1, "savedInstanceState" # Landroid/os/Bundle;
java -jar apktool.jar b -d out -o debug.apk
What's NewWhat's New
Security is too diļ¬ƒcult to keep up with??
Crowdsource it with Bug Bounties
United Airlines oļ¬€ering substantial airmiles
Lessons Learned
Requires eļ¬€ort to keep up with submissions
Update your app often to keep interest alive
Not a tool for shutting down researchers
Reasons to Ignore SecurityReasons to Ignore Security
Security is too diļ¬ƒcult to keep up with
Requires physical access
Avast report - 80k old phones on eBay
allowBackup=false
Proguard / DexGuard is too hard to use
The code is already obfuscated
You need to talk to the API team
Fragmentation
We don't have time - (Credit Union audit)
RecommendationsRecommendations
Understand debuggable=true, allowbackup=true
Donā€™t trust, verify
Rewrite SSL code, use asymmetric encryption
Provide an email or security page for white hats
Attacks are going to get more complex
Start a Bug Bounty
Store nothing important on the device
Don't ignore Smali attacks
Secure your server
ResourcesResources
http://www.decompilingandroid.com
http://www.owasp.org
https://github.com/nelenkov/android-backup-extractor
http://www.charlesproxy.com
http://www.programering.com/a/MjM5UTMwATg.html
http://www.cs.ru.nl/~joeri/papers/spsm14.pdf
https://www.mwrinfosecurity.com/products/drozer
https://github.com/skylot/jadx
http://keyczar.org
https://www.nccgroup.trust/us/about-us/resources/intent-sniļ¬€er/
http://www.guardsquare.com
http://sqlitebrowser.org
http://bit.ly/1JlPoiY - How to hide your android API key
http://bit.ly/1hIeNNi - Where to store your password
https://github.com/google/nogotofail
https://github.com/godfreynolan/bulletproof
Gist List of Old HacksGist List of Old Hacks
Delta: https://gist.github.com/cbeyer-riis/32e3d028c0deebca4057
Groupon: https://gist.github.com/cbeyer-riis/151a3eeed66a0516d50f
Walgreens: https://gist.github.com/cbeyer-riis/4f3758f9a58f554d40a4
Target: https://gist.github.com/cbeyer-riis/a55d90e38554c7122c89
Match: https://gist.github.com/cbeyer-riis/73318ee997132024b17d
Walgreens: https://gist.github.com/cbeyer-riis/372212c1fb5128841dcf
eHarmony: https://gist.github.com/cbeyer-riis/9e21e9b9996ea536cc5c
Hilton Honors: https://gist.github.com/cbeyer-riis/0834606d33c581b2a045
Hyatt: https://gist.github.com/cbeyer-riis/bfcab3d7673fba868624
Holiday Inn: https://gist.github.com/godfreynolan/e01f6ae1fab31ab66c39
Contact DetailsContact Details
godfrey@riis.com
@godfreynolan
slideshare.com/godfreynolan

More Related Content

What's hot

Penetrating Android Aapplications
Penetrating Android AapplicationsPenetrating Android Aapplications
Penetrating Android AapplicationsRoshan Thomas
Ā 
Sperasoft talks: Android Security Threats
Sperasoft talks: Android Security ThreatsSperasoft talks: Android Security Threats
Sperasoft talks: Android Security ThreatsSperasoft
Ā 
Beyond the mcse red teaming active directory
Beyond the mcse  red teaming active directoryBeyond the mcse  red teaming active directory
Beyond the mcse red teaming active directoryPriyanka Aash
Ā 
History & Future of Credentials Theft
History & Future of Credentials TheftHistory & Future of Credentials Theft
History & Future of Credentials TheftLavi Lazarovitz
Ā 
Mobile arsenal
Mobile arsenalMobile arsenal
Mobile arsenalAckcent
Ā 
The New OWASP Top Ten: Let's Cut to the Chase
The New OWASP Top Ten: Let's Cut to the ChaseThe New OWASP Top Ten: Let's Cut to the Chase
The New OWASP Top Ten: Let's Cut to the ChaseSecurity Innovation
Ā 
Penetration testing web application web application (in) security
Penetration testing web application web application (in) securityPenetration testing web application web application (in) security
Penetration testing web application web application (in) securityNahidul Kibria
Ā 
Web Application Penetration Testing Introduction
Web Application Penetration Testing IntroductionWeb Application Penetration Testing Introduction
Web Application Penetration Testing Introductiongbud7
Ā 
Secure coding presentation Oct 3 2020
Secure coding presentation Oct 3 2020Secure coding presentation Oct 3 2020
Secure coding presentation Oct 3 2020Moataz Kamel
Ā 
Testing Android Security Codemotion Amsterdam edition
Testing Android Security Codemotion Amsterdam editionTesting Android Security Codemotion Amsterdam edition
Testing Android Security Codemotion Amsterdam editionJose Manuel Ortega Candel
Ā 
Certificate Pinning in Mobile Applications
Certificate Pinning in Mobile ApplicationsCertificate Pinning in Mobile Applications
Certificate Pinning in Mobile ApplicationsLuca Bongiorni
Ā 
How to find Zero day vulnerabilities
How to find Zero day vulnerabilitiesHow to find Zero day vulnerabilities
How to find Zero day vulnerabilitiesMohammed A. Imran
Ā 
Bypass Security Checking with Frida
Bypass Security Checking with FridaBypass Security Checking with Frida
Bypass Security Checking with FridaSatria Ady Pradana
Ā 
Analysis of web application penetration testing
Analysis of web application penetration testingAnalysis of web application penetration testing
Analysis of web application penetration testingEngr Md Yusuf Miah
Ā 
Abusing, Exploiting and Pwning with Firefox Add-ons
Abusing, Exploiting and Pwning with Firefox Add-onsAbusing, Exploiting and Pwning with Firefox Add-ons
Abusing, Exploiting and Pwning with Firefox Add-onsAjin Abraham
Ā 
Pentesting Your Own Wireless Networks, June 2011 Issue
Pentesting Your Own Wireless Networks, June 2011 IssuePentesting Your Own Wireless Networks, June 2011 Issue
Pentesting Your Own Wireless Networks, June 2011 IssueIshan Girdhar
Ā 
From Reversing to Exploitation
From Reversing to ExploitationFrom Reversing to Exploitation
From Reversing to ExploitationSatria Ady Pradana
Ā 
Android malware analysis
Android malware analysisAndroid malware analysis
Android malware analysisJason Ross
Ā 
Android Application Penetration Testing - Mohammed Adam
Android Application Penetration Testing - Mohammed AdamAndroid Application Penetration Testing - Mohammed Adam
Android Application Penetration Testing - Mohammed AdamMohammed Adam
Ā 
How to authenticate users in your apps using FI-WARE Account - Introduction
How to authenticate users in your apps using FI-WARE Account - IntroductionHow to authenticate users in your apps using FI-WARE Account - Introduction
How to authenticate users in your apps using FI-WARE Account - IntroductionJavier CerviƱo
Ā 

What's hot (20)

Penetrating Android Aapplications
Penetrating Android AapplicationsPenetrating Android Aapplications
Penetrating Android Aapplications
Ā 
Sperasoft talks: Android Security Threats
Sperasoft talks: Android Security ThreatsSperasoft talks: Android Security Threats
Sperasoft talks: Android Security Threats
Ā 
Beyond the mcse red teaming active directory
Beyond the mcse  red teaming active directoryBeyond the mcse  red teaming active directory
Beyond the mcse red teaming active directory
Ā 
History & Future of Credentials Theft
History & Future of Credentials TheftHistory & Future of Credentials Theft
History & Future of Credentials Theft
Ā 
Mobile arsenal
Mobile arsenalMobile arsenal
Mobile arsenal
Ā 
The New OWASP Top Ten: Let's Cut to the Chase
The New OWASP Top Ten: Let's Cut to the ChaseThe New OWASP Top Ten: Let's Cut to the Chase
The New OWASP Top Ten: Let's Cut to the Chase
Ā 
Penetration testing web application web application (in) security
Penetration testing web application web application (in) securityPenetration testing web application web application (in) security
Penetration testing web application web application (in) security
Ā 
Web Application Penetration Testing Introduction
Web Application Penetration Testing IntroductionWeb Application Penetration Testing Introduction
Web Application Penetration Testing Introduction
Ā 
Secure coding presentation Oct 3 2020
Secure coding presentation Oct 3 2020Secure coding presentation Oct 3 2020
Secure coding presentation Oct 3 2020
Ā 
Testing Android Security Codemotion Amsterdam edition
Testing Android Security Codemotion Amsterdam editionTesting Android Security Codemotion Amsterdam edition
Testing Android Security Codemotion Amsterdam edition
Ā 
Certificate Pinning in Mobile Applications
Certificate Pinning in Mobile ApplicationsCertificate Pinning in Mobile Applications
Certificate Pinning in Mobile Applications
Ā 
How to find Zero day vulnerabilities
How to find Zero day vulnerabilitiesHow to find Zero day vulnerabilities
How to find Zero day vulnerabilities
Ā 
Bypass Security Checking with Frida
Bypass Security Checking with FridaBypass Security Checking with Frida
Bypass Security Checking with Frida
Ā 
Analysis of web application penetration testing
Analysis of web application penetration testingAnalysis of web application penetration testing
Analysis of web application penetration testing
Ā 
Abusing, Exploiting and Pwning with Firefox Add-ons
Abusing, Exploiting and Pwning with Firefox Add-onsAbusing, Exploiting and Pwning with Firefox Add-ons
Abusing, Exploiting and Pwning with Firefox Add-ons
Ā 
Pentesting Your Own Wireless Networks, June 2011 Issue
Pentesting Your Own Wireless Networks, June 2011 IssuePentesting Your Own Wireless Networks, June 2011 Issue
Pentesting Your Own Wireless Networks, June 2011 Issue
Ā 
From Reversing to Exploitation
From Reversing to ExploitationFrom Reversing to Exploitation
From Reversing to Exploitation
Ā 
Android malware analysis
Android malware analysisAndroid malware analysis
Android malware analysis
Ā 
Android Application Penetration Testing - Mohammed Adam
Android Application Penetration Testing - Mohammed AdamAndroid Application Penetration Testing - Mohammed Adam
Android Application Penetration Testing - Mohammed Adam
Ā 
How to authenticate users in your apps using FI-WARE Account - Introduction
How to authenticate users in your apps using FI-WARE Account - IntroductionHow to authenticate users in your apps using FI-WARE Account - Introduction
How to authenticate users in your apps using FI-WARE Account - Introduction
Ā 

Similar to Bulletproof Android: OWASP Top 10

APIsecure 2023 - What if privacy had an API?, Sean Falconer (Skyflow)
APIsecure 2023 - What if privacy had an API?, Sean Falconer (Skyflow)APIsecure 2023 - What if privacy had an API?, Sean Falconer (Skyflow)
APIsecure 2023 - What if privacy had an API?, Sean Falconer (Skyflow)apidays
Ā 
Code securely
Code securelyCode securely
Code securelyMaksym Hopei
Ā 
MySQL server security
MySQL server securityMySQL server security
MySQL server securityDamien Seguy
Ā 
Which Came First: The Phish or the Opportunity to Defend Against It
Which Came First: The Phish or the Opportunity to Defend Against ItWhich Came First: The Phish or the Opportunity to Defend Against It
Which Came First: The Phish or the Opportunity to Defend Against ItJamieWilliams130
Ā 
It's a Dangerous World
It's a Dangerous World It's a Dangerous World
It's a Dangerous World MongoDB
Ā 
Jan 2008 Allup
Jan 2008 AllupJan 2008 Allup
Jan 2008 Allupllangit
Ā 
Big security for big data
Big security for big dataBig security for big data
Big security for big dataAri Elias-Bachrach
Ā 
Minor Mistakes In Web Portals
Minor Mistakes In Web PortalsMinor Mistakes In Web Portals
Minor Mistakes In Web Portalsmsobiegraj
Ā 
DevBeat 2013 - Developer-first Security
DevBeat 2013 - Developer-first SecurityDevBeat 2013 - Developer-first Security
DevBeat 2013 - Developer-first SecurityCoverity
Ā 
[OPD 2019] Threat modeling at scale
[OPD 2019] Threat modeling at scale[OPD 2019] Threat modeling at scale
[OPD 2019] Threat modeling at scaleOWASP
Ā 
PHPUG Presentation
PHPUG PresentationPHPUG Presentation
PHPUG PresentationDamon Cortesi
Ā 
3DConsulting_Presentation
3DConsulting_Presentation3DConsulting_Presentation
3DConsulting_PresentationJoseph Baca
Ā 
Application and Website Security -- Fundamental Edition
Application and Website Security -- Fundamental EditionApplication and Website Security -- Fundamental Edition
Application and Website Security -- Fundamental EditionDaniel Owens
Ā 
Automating Threat Detection and Remediation at ZocDoc
Automating Threat Detection and Remediation at ZocDocAutomating Threat Detection and Remediation at ZocDoc
Automating Threat Detection and Remediation at ZocDocAmazon Web Services
Ā 
Practical advice for cloud data protection ulf mattsson - jun 2014
Practical advice for cloud data protection   ulf mattsson - jun 2014Practical advice for cloud data protection   ulf mattsson - jun 2014
Practical advice for cloud data protection ulf mattsson - jun 2014Ulf Mattsson
Ā 
MongoDB World 2018: Pissing Off IT and Delivery: A Tale of 2 ODSā€™s
MongoDB World 2018: Pissing Off IT and Delivery: A Tale of 2 ODSā€™sMongoDB World 2018: Pissing Off IT and Delivery: A Tale of 2 ODSā€™s
MongoDB World 2018: Pissing Off IT and Delivery: A Tale of 2 ODSā€™sMongoDB
Ā 
MongoDB.local Austin 2018: Pissing Off IT and Delivery: A Tale of 2 ODS's
MongoDB.local Austin 2018:  Pissing Off IT and Delivery: A Tale of 2 ODS'sMongoDB.local Austin 2018:  Pissing Off IT and Delivery: A Tale of 2 ODS's
MongoDB.local Austin 2018: Pissing Off IT and Delivery: A Tale of 2 ODS'sMongoDB
Ā 
Securing an Azure full-PaaS architecture - Data saturday #0001 Pordenone
Securing an Azure full-PaaS architecture - Data saturday #0001 PordenoneSecuring an Azure full-PaaS architecture - Data saturday #0001 Pordenone
Securing an Azure full-PaaS architecture - Data saturday #0001 PordenoneMarco Obinu
Ā 
Application Security 101 (OWASP DC)
Application Security 101 (OWASP DC)Application Security 101 (OWASP DC)
Application Security 101 (OWASP DC)mikemcbryde
Ā 
Making application threat intelligence practical - DEM06 - AWS reInforce 2019
Making application threat intelligence practical - DEM06 - AWS reInforce 2019 Making application threat intelligence practical - DEM06 - AWS reInforce 2019
Making application threat intelligence practical - DEM06 - AWS reInforce 2019 Amazon Web Services
Ā 

Similar to Bulletproof Android: OWASP Top 10 (20)

APIsecure 2023 - What if privacy had an API?, Sean Falconer (Skyflow)
APIsecure 2023 - What if privacy had an API?, Sean Falconer (Skyflow)APIsecure 2023 - What if privacy had an API?, Sean Falconer (Skyflow)
APIsecure 2023 - What if privacy had an API?, Sean Falconer (Skyflow)
Ā 
Code securely
Code securelyCode securely
Code securely
Ā 
MySQL server security
MySQL server securityMySQL server security
MySQL server security
Ā 
Which Came First: The Phish or the Opportunity to Defend Against It
Which Came First: The Phish or the Opportunity to Defend Against ItWhich Came First: The Phish or the Opportunity to Defend Against It
Which Came First: The Phish or the Opportunity to Defend Against It
Ā 
It's a Dangerous World
It's a Dangerous World It's a Dangerous World
It's a Dangerous World
Ā 
Jan 2008 Allup
Jan 2008 AllupJan 2008 Allup
Jan 2008 Allup
Ā 
Big security for big data
Big security for big dataBig security for big data
Big security for big data
Ā 
Minor Mistakes In Web Portals
Minor Mistakes In Web PortalsMinor Mistakes In Web Portals
Minor Mistakes In Web Portals
Ā 
DevBeat 2013 - Developer-first Security
DevBeat 2013 - Developer-first SecurityDevBeat 2013 - Developer-first Security
DevBeat 2013 - Developer-first Security
Ā 
[OPD 2019] Threat modeling at scale
[OPD 2019] Threat modeling at scale[OPD 2019] Threat modeling at scale
[OPD 2019] Threat modeling at scale
Ā 
PHPUG Presentation
PHPUG PresentationPHPUG Presentation
PHPUG Presentation
Ā 
3DConsulting_Presentation
3DConsulting_Presentation3DConsulting_Presentation
3DConsulting_Presentation
Ā 
Application and Website Security -- Fundamental Edition
Application and Website Security -- Fundamental EditionApplication and Website Security -- Fundamental Edition
Application and Website Security -- Fundamental Edition
Ā 
Automating Threat Detection and Remediation at ZocDoc
Automating Threat Detection and Remediation at ZocDocAutomating Threat Detection and Remediation at ZocDoc
Automating Threat Detection and Remediation at ZocDoc
Ā 
Practical advice for cloud data protection ulf mattsson - jun 2014
Practical advice for cloud data protection   ulf mattsson - jun 2014Practical advice for cloud data protection   ulf mattsson - jun 2014
Practical advice for cloud data protection ulf mattsson - jun 2014
Ā 
MongoDB World 2018: Pissing Off IT and Delivery: A Tale of 2 ODSā€™s
MongoDB World 2018: Pissing Off IT and Delivery: A Tale of 2 ODSā€™sMongoDB World 2018: Pissing Off IT and Delivery: A Tale of 2 ODSā€™s
MongoDB World 2018: Pissing Off IT and Delivery: A Tale of 2 ODSā€™s
Ā 
MongoDB.local Austin 2018: Pissing Off IT and Delivery: A Tale of 2 ODS's
MongoDB.local Austin 2018:  Pissing Off IT and Delivery: A Tale of 2 ODS'sMongoDB.local Austin 2018:  Pissing Off IT and Delivery: A Tale of 2 ODS's
MongoDB.local Austin 2018: Pissing Off IT and Delivery: A Tale of 2 ODS's
Ā 
Securing an Azure full-PaaS architecture - Data saturday #0001 Pordenone
Securing an Azure full-PaaS architecture - Data saturday #0001 PordenoneSecuring an Azure full-PaaS architecture - Data saturday #0001 Pordenone
Securing an Azure full-PaaS architecture - Data saturday #0001 Pordenone
Ā 
Application Security 101 (OWASP DC)
Application Security 101 (OWASP DC)Application Security 101 (OWASP DC)
Application Security 101 (OWASP DC)
Ā 
Making application threat intelligence practical - DEM06 - AWS reInforce 2019
Making application threat intelligence practical - DEM06 - AWS reInforce 2019 Making application threat intelligence practical - DEM06 - AWS reInforce 2019
Making application threat intelligence practical - DEM06 - AWS reInforce 2019
Ā 

More from Godfrey Nolan

Counting Cars with Drones
Counting Cars with DronesCounting Cars with Drones
Counting Cars with DronesGodfrey Nolan
Ā 
Customising QGroundControl
Customising QGroundControlCustomising QGroundControl
Customising QGroundControlGodfrey Nolan
Ā 
DJI Payload SDK
DJI Payload SDKDJI Payload SDK
DJI Payload SDKGodfrey Nolan
Ā 
Parrot Tutorials in Kotlin
Parrot Tutorials in KotlinParrot Tutorials in Kotlin
Parrot Tutorials in KotlinGodfrey Nolan
Ā 
DJI Mobile SDK Tutorials in kotlin
DJI Mobile SDK Tutorials in kotlinDJI Mobile SDK Tutorials in kotlin
DJI Mobile SDK Tutorials in kotlinGodfrey Nolan
Ā 
Drone sdk showdown
Drone sdk showdownDrone sdk showdown
Drone sdk showdownGodfrey Nolan
Ā 
AI/ML in drones
AI/ML in dronesAI/ML in drones
AI/ML in dronesGodfrey Nolan
Ā 
Getting started with tensor flow datasets
Getting started with tensor flow datasets Getting started with tensor flow datasets
Getting started with tensor flow datasets Godfrey Nolan
Ā 
Using ML to make your UI tests more robust
Using ML to make your UI tests more robustUsing ML to make your UI tests more robust
Using ML to make your UI tests more robustGodfrey Nolan
Ā 
Java best practices
Java best practicesJava best practices
Java best practicesGodfrey Nolan
Ā 
Counting sheep with Drones and AI
Counting sheep with Drones and AICounting sheep with Drones and AI
Counting sheep with Drones and AIGodfrey Nolan
Ā 
Writing Secure Mobile Apps for Drones
Writing Secure Mobile Apps for DronesWriting Secure Mobile Apps for Drones
Writing Secure Mobile Apps for DronesGodfrey Nolan
Ā 
Android Device Labs
Android Device LabsAndroid Device Labs
Android Device LabsGodfrey Nolan
Ā 
The Day We Infected Ourselves with Ransomware
The Day We Infected Ourselves with RansomwareThe Day We Infected Ourselves with Ransomware
The Day We Infected Ourselves with RansomwareGodfrey Nolan
Ā 
Android Refactoring
Android RefactoringAndroid Refactoring
Android RefactoringGodfrey Nolan
Ā 
From Maps to Apps the Future of Drone Technology
From Maps to Apps the Future of Drone TechnologyFrom Maps to Apps the Future of Drone Technology
From Maps to Apps the Future of Drone TechnologyGodfrey Nolan
Ā 
Tableau 10 and quickbooks
Tableau 10 and quickbooksTableau 10 and quickbooks
Tableau 10 and quickbooksGodfrey Nolan
Ā 

More from Godfrey Nolan (20)

Counting Cars with Drones
Counting Cars with DronesCounting Cars with Drones
Counting Cars with Drones
Ā 
Customising QGroundControl
Customising QGroundControlCustomising QGroundControl
Customising QGroundControl
Ā 
DJI Payload SDK
DJI Payload SDKDJI Payload SDK
DJI Payload SDK
Ā 
Parrot Tutorials in Kotlin
Parrot Tutorials in KotlinParrot Tutorials in Kotlin
Parrot Tutorials in Kotlin
Ā 
DJI Mobile SDK Tutorials in kotlin
DJI Mobile SDK Tutorials in kotlinDJI Mobile SDK Tutorials in kotlin
DJI Mobile SDK Tutorials in kotlin
Ā 
Drone sdk showdown
Drone sdk showdownDrone sdk showdown
Drone sdk showdown
Ā 
AI/ML in drones
AI/ML in dronesAI/ML in drones
AI/ML in drones
Ā 
Getting started with tensor flow datasets
Getting started with tensor flow datasets Getting started with tensor flow datasets
Getting started with tensor flow datasets
Ā 
Using ML to make your UI tests more robust
Using ML to make your UI tests more robustUsing ML to make your UI tests more robust
Using ML to make your UI tests more robust
Ā 
Java best practices
Java best practicesJava best practices
Java best practices
Ā 
Counting sheep with Drones and AI
Counting sheep with Drones and AICounting sheep with Drones and AI
Counting sheep with Drones and AI
Ā 
Writing Secure Mobile Apps for Drones
Writing Secure Mobile Apps for DronesWriting Secure Mobile Apps for Drones
Writing Secure Mobile Apps for Drones
Ā 
Android Device Labs
Android Device LabsAndroid Device Labs
Android Device Labs
Ā 
The Day We Infected Ourselves with Ransomware
The Day We Infected Ourselves with RansomwareThe Day We Infected Ourselves with Ransomware
The Day We Infected Ourselves with Ransomware
Ā 
Agile Android
Agile AndroidAgile Android
Agile Android
Ā 
Agile Swift
Agile SwiftAgile Swift
Agile Swift
Ā 
Android Refactoring
Android RefactoringAndroid Refactoring
Android Refactoring
Ā 
Agile mobile
Agile mobileAgile mobile
Agile mobile
Ā 
From Maps to Apps the Future of Drone Technology
From Maps to Apps the Future of Drone TechnologyFrom Maps to Apps the Future of Drone Technology
From Maps to Apps the Future of Drone Technology
Ā 
Tableau 10 and quickbooks
Tableau 10 and quickbooksTableau 10 and quickbooks
Tableau 10 and quickbooks
Ā 

Recently uploaded

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
Ā 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
Ā 
Finology Group ā€“ Insurtech Innovation Award 2024
Finology Group ā€“ Insurtech Innovation Award 2024Finology Group ā€“ Insurtech Innovation Award 2024
Finology Group ā€“ Insurtech Innovation Award 2024The Digital Insurer
Ā 
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
Ā 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
Ā 
[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
Ā 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service šŸø 8923113531 šŸŽ° Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service šŸø 8923113531 šŸŽ° Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service šŸø 8923113531 šŸŽ° Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service šŸø 8923113531 šŸŽ° Avail...gurkirankumar98700
Ā 
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
Ā 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
Ā 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel AraĆŗjo
Ā 
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
Ā 
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
Ā 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
Ā 
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
Ā 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
Ā 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
Ā 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
Ā 
Scaling API-first ā€“ The story of a global engineering organization
Scaling API-first ā€“ The story of a global engineering organizationScaling API-first ā€“ The story of a global engineering organization
Scaling API-first ā€“ The story of a global engineering organizationRadu Cotescu
Ā 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
Ā 

Recently uploaded (20)

Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
Ā 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
Ā 
Finology Group ā€“ Insurtech Innovation Award 2024
Finology Group ā€“ Insurtech Innovation Award 2024Finology Group ā€“ Insurtech Innovation Award 2024
Finology Group ā€“ Insurtech Innovation Award 2024
Ā 
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
Ā 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Ā 
[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
Ā 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service šŸø 8923113531 šŸŽ° Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service šŸø 8923113531 šŸŽ° Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service šŸø 8923113531 šŸŽ° Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service šŸø 8923113531 šŸŽ° Avail...
Ā 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
Ā 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Ā 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Ā 
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
Ā 
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
Ā 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
Ā 
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
Ā 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
Ā 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
Ā 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
Ā 
Scaling API-first ā€“ The story of a global engineering organization
Scaling API-first ā€“ The story of a global engineering organizationScaling API-first ā€“ The story of a global engineering organization
Scaling API-first ā€“ The story of a global engineering organization
Ā 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
Ā 

Bulletproof Android: OWASP Top 10

  • 2. How did we get hereHow did we get here Virtual Machines Static information Dynamic information
  • 5. Decompilation 101Decompilation 101 $ adb shell pm path com.united.mobile.android package:/data/app/com.united.mobile.android-1/base.apk $ adb pull /data/app/com.united.mobile.android-1/base.apk 4349 KB/s (51855610 bytes in 11.642s) $ jadx-gui base.apk $ adb backup com.united.mobile.android Now unlock your device and confirm the backup operation. $ java -jar abe.jar unpack backup.ab backup.tar $ tar -xvf backup.tar $ sqlite3 apps/com.united.mobile.android/db/united.db
  • 9. OWASP Top 10OWASP Top 10 Weak Server Side Controls Insecure Data Storage Insuļ¬ƒcient Transport Layer Protection Unintended Data Leakage Poor Authorization and Authentication Broken Cryptography Client Side Injection Security Decision via Untrusted Input Improper Session Handling Lack of Binary Protections
  • 10. ProblemProblem Weak Server Side Controls Insecure Data Storage Insuļ¬ƒcient Transport Layer Protection Unintended Data Leakage Poor Authorization and Authentication Broken Cryptography Client Side Injection Security Decision via Untrusted Input Improper Session Handling Lack of Binary Protections
  • 11. ProblemProblem Weak Server Side Controls Insecure Data Storage Insuļ¬ƒcient Transport Layer Protection Unintended Data Leakage Poor Authorization and Authentication Broken Cryptography Client Side Injection Security Decision via Untrusted Input Improper Session Handling Lack of Binary Protections GET http://herdfinancial.com/api/v1/balances/1234567899/ {"success":"true","checkingBalance":"0.0","savingsBalance":"0.0"}
  • 12. ProblemProblem Weak Server Side Controls Insecure Data Storage Insuļ¬ƒcient Transport Layer Protection Unintended Data Leakage Poor Authorization and Authentication Broken Cryptography Client Side Injection Security Decision via Untrusted Input Improper Session Handling Lack of Binary Protections GET http://herdfinancial.com/api/v1/balances/1234567890/ {"success":"true","checkingBalance":"947.3","savingsBalance":"0.0"}
  • 13. ExampleExample "actor": {ā€œfirst_name": "Rita","last_name": "D.","title": "Rita D.","gender": "F", "is_mvp": false, "preferred_brand": 32, "_links": {"self": [{"href": "/v7.0/user/3273986/","id": "3273986"}]}, "type": "user", "friendship": null, "id": 3273986 },"id": "1-3273986-9-1440092847",
  • 14. FixFix Weak Server Side Controls Insecure Data Storage Insuļ¬ƒcient Transport Layer Protection Unintended Data Leakage Poor Authorization and Authentication Broken Cryptography Client Side Injection Security Decision via Untrusted Input Improper Session Handling Lack of Binary Protections Use GUID that maps to ID REST verbs are easy to guess OWASP Web/Cloud top 10 Donā€™t trust the client, verify
  • 15. ProblemProblem Weak Server Side Controls Insecure Data Storage Insuļ¬ƒcient Transport Layer Protection Unintended Data Leakage Poor Authorization and Authentication Broken Cryptography Client Side Injection Security Decision via Untrusted Input Improper Session Handling Lack of Binary Protections
  • 16. ProblemProblem Weak Server Side Controls Insecure Data Storage Insuļ¬ƒcient Transport Layer Protection Unintended Data Leakage Poor Authorization and Authentication Broken Cryptography Client Side Injection Security Decision via Untrusted Input Improper Session Handling Lack of Binary Protections <?xml version='1.0' encoding='utf-8' standalone='yes' ?> <map> <boolean name="remember" value="true" /> <string name="password">goatdroid</string> <string name="username">goatdroid</string> </map>
  • 17. ExampleExample Weak Server Side Controls Insecure Data Storage Insuļ¬ƒcient Transport Layer Protection Unintended Data Leakage Poor Authorization and Authentication Broken Cryptography Client Side Injection Security Decision via Untrusted Input Improper Session Handling Lack of Binary Protections
  • 18. FixFix Weak Server Side Controls Insecure Data Storage Insuļ¬ƒcient Transport Layer Protection Unintended Data Leakage Poor Authorization and Authentication Broken Cryptography Client Side Injection Security Decision via Untrusted Input Improper Session Handling Lack of Binary Protections No caching of passwords, SSNs etc. Multi-factor authentication Client / Server side access control "Sensitive data should be encrypted and very sensitive data should be stored on server" - Zapata
  • 19. ProblemProblem Weak Server Side Controls Insecure Data Storage Insuļ¬ƒcient Transport Layer Protection Unintended Data Leakage Poor Authorization and Authentication Broken Cryptography Client Side Injection Security Decision via Untrusted Input Improper Session Handling Lack of Binary Protections
  • 20. ExampleExample Weak Server Side Controls Insecure Data Storage Insuļ¬ƒcient Transport Layer Protection Unintended Data Leakage Poor Authorization and Authentication Broken Cryptography Client Side Injection Security Decision via Untrusted Input Improper Session Handling Lack of Binary Protections
  • 21. ExampleExample Weak Server Side Controls Insecure Data Storage Insuļ¬ƒcient Transport Layer Protection Unintended Data Leakage Poor Authorization and Authentication Broken Cryptography Client Side Injection Security Decision via Untrusted Input Improper Session Handling Lack of Binary Protections
  • 22. More ProblemsMore Problems Weak Server Side Controls Insecure Data Storage Insuļ¬ƒcient Transport Layer Protection Unintended Data Leakage Poor Authorization and Authentication Broken Cryptography Client Side Injection Security Decision via Untrusted Input Improper Session Handling Lack of Binary Protections
  • 23. FixFix private static String PUB_KEY = "30820122300d06092a864886f70d0101" + "0105000382010f003082010a0282010100b35ea8adaf4cb6db86068a836f3c85" + "5a545b1f0cc8afb19e38213bac4d55c3f2f19df6dee82ead67f70a990131b6bc" + "ac1a9116acc883862f00593199df19ce027c8eaaae8e3121f7f329219464e657" + "2cbf66e8e229eac2992dd795c4f23df0fe72b6ceef457eba0b9029619e0395b8" + "609851849dd6214589a2ceba4f7a7dcceb7ab2a6b60c27c69317bd7ab2135f50" + "c6317e5dbfb9d1e55936e4109b7b911450c746fe0d5d07165b6b23ada7700b00" + "33238c858ad179a82459c4718019c111b4ef7be53e5972e06ca68a112406da38" + "cf60d2f4fda4d1cd52f1da9fd6104d91a34455cd7b328b02525320a35253147b" + "e0b7a5bc860966dc84f10d723ce7eed5430203010001"; // Pin it! final boolean expected = PUB_KEY.equalsIgnoreCase(encoded); if (!expected) { throw new CertificateException("checkServerTrusted: Expected public key: " + PUB_KEY + ", got public key:" + encoded); } }
  • 24. FixFix Weak Server Side Controls Insecure Data Storage Insuļ¬ƒcient Transport Layer Protection Unintended Data Leakage Poor Authorization and Authentication Broken Cryptography Client Side Injection Security Decision via Untrusted Input Improper Session Handling Lack of Binary Protections Error out on SSLHandshakeException Assume SSL is broken, root level CA's SSL pinning Do more on the server Scan server with nogotofail
  • 25. ProblemProblem Weak Server Side Controls Insecure Data Storage Insuļ¬ƒcient Transport Layer Protection Unintended Data Leakage Poor Authorization and Authentication Broken Cryptography Client Side Injection Security Decision via Untrusted Input Improper Session Handling Lack of Binary Protections
  • 26. ProblemProblem Weak Server Side Controls Insecure Data Storage Insuļ¬ƒcient Transport Layer Protection Unintended Data Leakage Poor Authorization and Authentication Broken Cryptography Client Side Injection Security Decision via Untrusted Input Improper Session Handling Lack of Binary Protections
  • 27. ExampleExample Weak Server Side Controls Insecure Data Storage Insuļ¬ƒcient Transport Layer Protection Unintended Data Leakage Poor Authorization and Authentication Broken Cryptography Client Side Injection Security Decision via Untrusted Input Improper Session Handling Lack of Binary Protections
  • 28. ExampleExamplepublic ActivityLaunchAppLoad() { this.WAY_WAY_TOO_LOW = 49; this.A_LITTLE_LESS_WAY_TOO_LOW = 50; this.LESSER_WAY_TOO_LOW = 51; this.BIT_TOO_LOW = 52; this.TOO_LOW = 53; this.MORE = 54; this.A_LITTLE_MORE = 55; this.WAY_TOO_MORE = 97; this.BIG_DADDY = 102; this.orderOfTheThronesTrois = new int[]{this.BIG_DADDY, this.MORE, this.WAY_TOO_MORE, this.MORE}; this.orderOfTheThronesQuatre = new int[]{this.LESSER_WAY_TOO_LOW, this.MORE, this.LESSER_WAY_TOO_LOW, this.TOO_LOW}; this.orderOfTheThronesUn = new int[]{this.BIT_TOO_LOW, this.BIT_TOO_LOW, this.WAY_WAY_TOO_LOW, this.BIT_TOO_LOW}; this.orderOfTheThronesDeux = new int[]{this.MORE, this.A_LITTLE_MORE, this.A_LITTLE_LESS_WAY_TOO_LOW, this.BIT_TOO_LOW}; } String createTheHalfBloodPrince() { String strTemp = StringUtils.EMPTY; int x = 0; while (x < 4) { int[] xyz = null; if (x == 0) { xyz = this.orderOfTheThronesTrois; } else if (x == 1) { xyz = this.orderOfTheThronesQuatre; } else if (x == 2) { xyz = this.orderOfTheThronesUn; } else if (x == 3) { xyz = this.orderOfTheThronesDeux; } int y = 3; while (y >= 0) { strTemp = new StringBuilder(String.valueOf(strTemp)).append(Character.toString((char) xyz[y])).toString(); y--; } x++; } return strTemp; }
  • 29. FixFix Weak Server Side Controls Insecure Data Storage Insuļ¬ƒcient Transport Layer Protection Unintended Data Leakage Poor Authorization and Authentication Broken Cryptography Client Side Injection Security Decision via Untrusted Input Improper Session Handling Lack of Binary Protections Strip out unneccesary logging code Obfuscate method names Check any third party libraries Double check your webview caches Download and unzip your APK
  • 30. ProblemProblem Weak Server Side Controls Insecure Data Storage Insuļ¬ƒcient Transport Layer Protection Unintended Data Leakage Poor Authorization and Authentication Broken Cryptography Client Side Injection Security Decision via Untrusted Input Improper Session Handling Lack of Binary Protections
  • 31. ExampleExample Weak Server Side Controls Insecure Data Storage Insuļ¬ƒcient Transport Layer Protection Unintended Data Leakage Poor Authorization and Authentication Broken Cryptography Client Side Injection Security Decision via Untrusted Input Improper Session Handling Lack of Binary Protections <?xml version='1.0' encoding='utf-8' standalone='yes' ?> <map> <string name="TM_MEMBER_EMAIL">godfrey@riis.com</string> <int name="TM_MEMBER_MARKET_ID" value="7" /> <string name="TM_MEMBER_TAP_ID">77ef62159ad9c32913dfdbee0e58aea3</string> <string name="TM_MEMBER_LNAME"></string> <string name="TM_MEMBER_LANGUAGE">en-us</string> <int name="TM_BILLING_COUNTRY_CODE" value="-1" /> <string name="TM_MEMBER_POSTCODE">48070</string> <string name="TM_LAST_BILLING_ID"></string> <int name="TM_MEMBER_COUNTRY" value="840" /> <string name="TM_MEMBER_PASSWORD">2secret4me</string> <string name="TM_MEMBER_FNAME">Godfrey</string> </map>
  • 32. FixFix Weak Server Side Controls Insecure Data Storage Insuļ¬ƒcient Transport Layer Protection Unintended Data Leakage Poor Authorization and Authentication Broken Cryptography Client Side Injection Security Decision via Untrusted Input Improper Session Handling Lack of Binary Protections No password caching Multi Factor Authentication Encryption Public-Private Key exchange Tokens, tokens, tokens OAuth Use Server side nonceā€™s
  • 33. ProblemProblem Weak Server Side Controls Insecure Data Storage Insuļ¬ƒcient Transport Layer Protection Unintended Data Leakage Poor Authorization and Authentication Broken Cryptography Client Side Injection Security Decision via Untrusted Input Improper Session Handling Lack of Binary Protections
  • 34. ExampleExample public static String decrypt(String paramString) throws Exception { if (paramString != null) return new String(decrypt(getRawKey("3lIoM_d0idrn4|4TleD".getBytes()), toByte(paramString) return null; } private static byte[] decrypt(byte[] paramArrayOfByte1, byte[] paramArrayOfByte2) throws Exception { SecretKeySpec localSecretKeySpec = new SecretKeySpec(paramArrayOfByte1, "AES"); Cipher localCipher = Cipher.getInstance("AES"); localCipher.init(2, localSecretKeySpec); return localCipher.doFinal(paramArrayOfByte2); }
  • 35. ExampleExample // NDK code - still see the code in disassembler jstring Java_com_riis_decompilingandroid_getPassword(JNIEnv* env, jobject thiz) { return (*env)->NewStringUTF(env, "xeHnwfiy4uzefrabruebeb"); }
  • 36. ExampleExample Weak Server Side Controls Insecure Data Storage Insuļ¬ƒcient Transport Layer Protection Unintended Data Leakage Poor Authorization and Authentication Broken Cryptography Client Side Injection Security Decision via Untrusted Input Improper Session Handling Lack of Binary Protections
  • 37. FixFix Weak Server Side Controls Insecure Data Storage Insuļ¬ƒcient Transport Layer Protection Unintended Data Leakage Poor Authorization and Authentication Broken Cryptography Client Side Injection Security Decision via Untrusted Input Improper Session Handling Lack of Binary Protections
  • 38. FixFix Weak Server Side Controls Insecure Data Storage Insuļ¬ƒcient Transport Layer Protection Unintended Data Leakage Poor Authorization and Authentication Broken Cryptography Client Side Injection Security Decision via Untrusted Input Improper Session Handling Lack of Binary Protections Use asymmetric encryption Encrypt databases Android Keystore is broken
  • 39. ProblemProblem Weak Server Side Controls Insecure Data Storage Insuļ¬ƒcient Transport Layer Protection Unintended Data Leakage Poor Authorization and Authentication Broken Cryptography Client Side Injection Security Decision via Untrusted Input Improper Session Handling Lack of Binary Protections
  • 40. ProblemProblem public boolean checkLogin(String param1, String param2) { boolean bool = false; Cursor cursor = db.rawQuery("select * from login where USERNAME = '" + param1 + "' and PASSWORD = '" + param2 + "';", null); if (cursor != null) { if (cursor.moveToFirst()) bool = true; cursor.close(); } return bool; } select * from login where USERNAME = '' OR 1=1 --' and PASSWORD = 'test'
  • 41. FixFix public boolean checkLogin(String param1, String param2) { boolean bool = false; Cursor cursor = db.rawQuery("select * from login where " + "USERNAME = ? and PASSWORD = ?", new String[]{param1, param2}); if (cursor != null) { if (cursor.moveToFirst()) bool = true; cursor.close(); } return bool; }
  • 42. ProblemProblem Weak Server Side Controls Insecure Data Storage Insuļ¬ƒcient Transport Layer Protection Unintended Data Leakage Poor Authorization and Authentication Broken Cryptography Client Side Injection Security Decision via Untrusted Input Improper Session Handling Lack of Binary Protections WebView myWebView = (WebView) findViewById(R.id.webview); WebSettings webSettings = myWebView.getSettings(); webSettings.setJavaScriptEnabled(true); <script>alert("xss");</script>
  • 43. FixFix Weak Server Side Controls Insecure Data Storage Insuļ¬ƒcient Transport Layer Protection Unintended Data Leakage Poor Authorization and Authentication Broken Cryptography Client Side Injection Security Decision via Untrusted Input Improper Session Handling Lack of Binary Protections Use parameterized queries setJavaScriptEnabled(false)
  • 44. ProblemProblem Weak Server Side Controls Insecure Data Storage Insuļ¬ƒcient Transport Layer Protection Unintended Data Leakage Poor Authorization and Authentication Broken Cryptography Client Side Injection Security Decision via Untrusted Input Improper Session Handling Lack of Binary Protections
  • 45. ProblemProblem <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.riis.login" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="8" /> <application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > <activity android:name="com.riis.login.LoginActivity" android:label="@string/app_name" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <activity android:name="com.riis.login.IntentReceiverActivity" android:label="@string/app_name" > <intent-filter> <action android:name="com.riis.login.IntentReceiverActivity" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> </activity> </application> </manifest>
  • 47. ProblemProblem <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.riis.hellointent" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="18" /> <application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > <activity android:name="com.riis.hellointent.MainActivity" android:label="@string/app_name" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> <intent-filter> <action android:name="com.riis.login.IntentReceiverActivity" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> </activity> </application> </manifest>
  • 48. FixFix // implicit Intent intent = new Intent(); // explicit Intent intent = new Intent(this, IntentReceiverActivity.class); Weak Server Side Controls Insecure Data Storage Insuļ¬ƒcient Transport Layer Protection Unintended Data Leakage Poor Authorization and Authentication Broken Cryptography Client Side Injection Security Decision via Untrusted Input Improper Session Handling Lack of Binary Protections
  • 49. FixFix Weak Server Side Controls Insecure Data Storage Insuļ¬ƒcient Transport Layer Protection Unintended Data Leakage Poor Authorization and Authentication Broken Cryptography Client Side Injection Security Decision via Untrusted Input Improper Session Handling Lack of Binary Protections Use explicit intents Scan app using Intent Sniļ¬€er
  • 50. ProblemProblem Weak Server Side Controls Insecure Data Storage Insuļ¬ƒcient Transport Layer Protection Unintended Data Leakage Poor Authorization and Authentication Broken Cryptography Client Side Injection Security Decision via Untrusted Input Improper Session Handling Lack of Binary Protections if (dao.isDevicePermanentlyAuthorized(deviceID)) { String newAuthToken = Utils.generateAutToken(); doa.updateAuthrizedDeviceAuth(deviceID, newAuthToken); login.setAuthToken(newAuthToken); login.setUserName(dao.getUserName(newAuthToken)); login.setAccountNumber(dao.getAccountNumber(newAuthToken)); login.setSuccess(true); }
  • 51. ExampleExample Weak Server Side Controls Insecure Data Storage Insuļ¬ƒcient Transport Layer Protection Unintended Data Leakage Poor Authorization and Authentication Broken Cryptography Client Side Injection Security Decision via Untrusted Input Improper Session Handling Lack of Binary Protections
  • 52. ExampleExample Weak Server Side Controls Insecure Data Storage Insuļ¬ƒcient Transport Layer Protection Unintended Data Leakage Poor Authorization and Authentication Broken Cryptography Client Side Injection Security Decision via Untrusted Input Improper Session Handling Lack of Binary Protections
  • 53. FixFix Weak Server Side Controls Insecure Data Storage Insuļ¬ƒcient Transport Layer Protection Unintended Data Leakage Poor Authorization and Authentication Broken Cryptography Client Side Injection Security Decision via Untrusted Input Improper Session Handling Lack of Binary Protections Expire sessions Try backup to another phone Careful using OAuth logins to FB etc.
  • 54. ProblemProblem Weak Server Side Controls Insecure Data Storage Insuļ¬ƒcient Transport Layer Protection Unintended Data Leakage Poor Authorization and Authentication Broken Cryptography Client Side Injection Security Decision via Untrusted Input Improper Session Handling Lack of Binary Protections /** * Logs you into your SIP provider, registering this device as the location to * send SIP calls to for your SIP address. */ public void initializeLocalProfile() { if (manager == null) { return; } if (me != null) { closeLocalProfile(); } SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getBaseContext()); String username = prefs.getString("namePref", ""); String domain = prefs.getString("domainPref", ""); String password = prefs.getString("passPref", "");
  • 56. FixFix Weak Server Side Controls Insecure Data Storage Insuļ¬ƒcient Transport Layer Protection Unintended Data Leakage Poor Authorization and Authentication Broken Cryptography Client Side Injection Security Decision via Untrusted Input Improper Session Handling Lack of Binary Protections Obfuscation helps remove useful info Set minifyEnabled = true Not a silver bullet Anti ProGuard apps out there Hackers just move to Smali Code in C++ using NDK Much harder to read Can still disassemble C++
  • 57. What's NewWhat's New Jadx android:debuggable(true) some Smali required SSL Pinning Bug Bounties
  • 59. What's NewWhat's New Disassemble using apktool Find main class in AdroidManifest.xml Add debug wait to onCreate method ā€‹ Recompile using apktool Sign and install java -jar apktool.jar d -d test.apk -o out <activity android:label="@string/app_name" android:name="com.riis.helloworld.MainActivity"> a=0;// # virtual methods a=0;// .method protected onCreate(Landroid/os/Bundle;)V a=0;// invoke-static {}, Landroid/os/Debug;->waitForDebugger()V a=0;// a=0;// .locals 1 a=0;// .param p1, "savedInstanceState" # Landroid/os/Bundle; java -jar apktool.jar b -d out -o debug.apk
  • 60. What's NewWhat's New Security is too diļ¬ƒcult to keep up with?? Crowdsource it with Bug Bounties United Airlines oļ¬€ering substantial airmiles Lessons Learned Requires eļ¬€ort to keep up with submissions Update your app often to keep interest alive Not a tool for shutting down researchers
  • 61. Reasons to Ignore SecurityReasons to Ignore Security Security is too diļ¬ƒcult to keep up with Requires physical access Avast report - 80k old phones on eBay allowBackup=false Proguard / DexGuard is too hard to use The code is already obfuscated You need to talk to the API team Fragmentation We don't have time - (Credit Union audit)
  • 62. RecommendationsRecommendations Understand debuggable=true, allowbackup=true Donā€™t trust, verify Rewrite SSL code, use asymmetric encryption Provide an email or security page for white hats Attacks are going to get more complex Start a Bug Bounty Store nothing important on the device Don't ignore Smali attacks Secure your server
  • 64. Gist List of Old HacksGist List of Old Hacks Delta: https://gist.github.com/cbeyer-riis/32e3d028c0deebca4057 Groupon: https://gist.github.com/cbeyer-riis/151a3eeed66a0516d50f Walgreens: https://gist.github.com/cbeyer-riis/4f3758f9a58f554d40a4 Target: https://gist.github.com/cbeyer-riis/a55d90e38554c7122c89 Match: https://gist.github.com/cbeyer-riis/73318ee997132024b17d Walgreens: https://gist.github.com/cbeyer-riis/372212c1fb5128841dcf eHarmony: https://gist.github.com/cbeyer-riis/9e21e9b9996ea536cc5c Hilton Honors: https://gist.github.com/cbeyer-riis/0834606d33c581b2a045 Hyatt: https://gist.github.com/cbeyer-riis/bfcab3d7673fba868624 Holiday Inn: https://gist.github.com/godfreynolan/e01f6ae1fab31ab66c39