Skip to content

Commit adfc51b

Browse files
committed
Major Upgrade v5.0
1 parent 7131a8a commit adfc51b

File tree

124 files changed

+3592
-2726
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

124 files changed

+3592
-2726
lines changed

README.md

Lines changed: 33 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ As a security engineer, do you struggle with validating bug bounty reports, perf
66

77
I've got you covered - all from the comfort of your own device!
88

9-
[YouTube: Malware APK v4.5 - Proxy Intent Injection PoC](https://www.youtube.com/shorts/gI1WlW9FRZ8)
9+
[YouTube: Malware APK v5.0 - Proxy Intent Injection PoC](https://youtube.com/shorts/hMcJ4JhPhnQ)
1010

1111
---
1212

@@ -50,7 +50,7 @@ Future plans:
5050

5151
## About the App
5252

53-
Version: `4.9`
53+
Version: `5.0`
5454

5555
APK name: `Malware APK`
5656

@@ -76,11 +76,12 @@ Permissions required:
7676
* `android.permission.BIND_NOTIFICATION_LISTENER_SERVICE`
7777
* `android.permission.POST_NOTIFICATIONS`
7878

79-
URIs for internal QA testing:
79+
URIs for internal quality assurance:
8080

8181
* `kira://hidden`
8282
* `content://com.kira.malware.TestFileProvider/files/test.txt`
8383
* `content://com.kira.malware.TestSQLiteProvider`
84+
* `javascript:alert(JavaScriptBridge.test())`
8485

8586
## Usage
8687

@@ -90,7 +91,7 @@ URIs for internal QA testing:
9091

9192
**#2:** Read world-readable shared preferences of another app.
9293

93-
**#3:** To read files of another app, modify the `sharedUserId` in this app's `AndroidManifest.xml`, then rebuild the APK - this works only if another app has the shared user ID defined, also make sure to fully uninstall this app first, or reinstall might fail
94+
**#3:** To access files of another app, modify the [sharedUserId](https://developer.android.com/guide/topics/manifest/manifest-element#uid) in this app's [AndroidManifest.xml](https://github.com/ivan-sincek/malware-apk/blob/main/src/Malware/app/src/main/AndroidManifest.xml#L4), then rebuild the APK - this works only if another app has the shared user ID defined.
9495

9596
<p align="center"><img src="https://github.com/ivan-sincek/malware-apk/blob/main/img/file_system.png" alt="File System" height="600em"></p>
9697

@@ -100,7 +101,7 @@ URIs for internal QA testing:
100101

101102
**#1:** Not all devices or root tools store the `su` (switch user) binary in the same location.
102103

103-
**#2:** Run CLI tools like `/system/bin/logcat` or start a reverse shell with user `/bin/sh` or root `/bin/su` privileges.
104+
**#2:** Run CLI tools such as `/system/bin/logcat` or start a reverse shell with user `/bin/sh` or root `/bin/su` privileges.
104105

105106
<p align="center"><img src="https://github.com/ivan-sincek/malware-apk/blob/main/img/running_cli_tools.png" alt="Running CLI Tools" height="600em"></p>
106107

@@ -131,31 +132,25 @@ URIs for internal QA testing:
131132

132133
**#1:** Test an intent filter of another app.
133134

134-
**#2:** Send an intent to another app to bypass its biometrics / security.
135+
**#2:** Send an intent to another app to directly bypass its biometric / security.
135136

136-
**#3:** Send an intent to another app to bypass its biometrics / security by triggering its push notification manager, then manually opening the received push notification.
137+
**#3:** Send an intent to another app to indirectly bypass its biometric / security by triggering its push notification manager, then manually opening the received push notification.
137138

138139
**#4:** Send an intent to another app to poison its widget.
139140

140141
**#5:** Send a \[pending\] intent to another app multiple times to cause Denial of Service (DoS).
141142

142143
**#6:** Send a mutable pending intent to another app to extract subsequently added intent extras.
143144

144-
**#7:** Access a protected component, such as a file or SQLite content provider of another app, by exploiting its exported (proxy) component.
145+
**#7:** Access a protected component, such as a file or SQLite content provider of another app, by exploiting the app's exported (proxy) component.
145146

146147
**#8:** Test a deep link of another app.
147148

148-
```xml
149-
<data
150-
android:host="hidden"
151-
android:scheme="kira" />
152-
```
153-
154-
**#9:** Perform a battering ram attack on a deep link or content provider URI of another app by adding `</payload>` placeholder into the intent's URI.
149+
**#9:** Perform a battering ram attack on a deep link or content provider URI of another app by adding `</payload>` placeholder in the intent's URI.
155150

156-
**#10:** You can send an intent to `HiddenActivity` for inspection before sending it to the target.
151+
**#10:** You can send an intent to `HiddenActivity` for inspection before sending it to another app.
157152

158-
**#11:** Test a file content provider for path traversal via `../`, and for arbitrary file read/write.
153+
**#11:** Test a file content provider for path traversal via `../`, and for arbitrary file read / write.
159154

160155
**#12:** Test an SQLite content provider for SQL injection via projection and selection.
161156

@@ -215,7 +210,7 @@ The following applies to both the `proxy intent` and `target intent` extras, but
215210
* key `HiddenActivityClose`,
216211
* and value `</close-on-success>`.
217212

218-
When testing intent injections, you will often need to specify [com.kira.malware.activities.HiddenActivity](https://github.com/ivan-sincek/malware-apk/blob/main/src/Malware/app/src/main/java/com/kira/malware/activities/HiddenActivity.java) as the `target intent` class name, and set the file or SQLite content provider intent extra to the same `target intent`, as shown in the images below.
213+
When testing intent injections, you will often need to specify [com.kira.malware.activities.HiddenActivity](https://github.com/ivan-sincek/malware-apk/blob/main/src/Malware/app/src/main/java/com/kira/malware/activities/HiddenActivity.java) as the `target intent` class name, and scope the file or SQLite content provider intent extra to the same `target intent`, as shown in the images below.
219214

220215
---
221216

@@ -241,18 +236,24 @@ When testing intent injections, you will often need to specify [com.kira.malware
241236

242237
### Broadcast Monitor
243238

244-
**#1:** Listen for a broadcast intent from another app and extract sensitive information from its extras.
239+
**#1:** Listen for a broadcast intent from another app and extract sensitive information from the intent extras.
245240

246241
<p align="center"><img src="https://github.com/ivan-sincek/malware-apk/blob/main/img/broadcast_monitor.png" alt="Broadcast Monitor" height="600em"></p>
247242

248243
<p align="center">Figure 9 - Broadcast Monitor</p>
249244

250245
### Web
251246

252-
**#1:** Verify whether misconfigured asset links allow [app link](https://developer.android.com/training/app-links/verify-applinks) hijacking this applies only on intent filters with `autoVerify` attribute.
247+
**#1:** Verify whether misconfigured asset links allow [app link](https://developer.android.com/training/app-links/verify-applinks) hijacking - this applies only to intent filters with `autoVerify` attribute.
253248

254249
**#2:** Hijack a deep link of another app by specifying it in this app's `AndroidManifest.xml` under [HiddenActivity](https://github.com/ivan-sincek/malware-apk/blob/main/src/Malware/app/src/main/AndroidManifest.xml#L66), then rebuild the APK.
255250

251+
```xml
252+
<data
253+
android:host="hidden"
254+
android:scheme="kira" />
255+
```
256+
256257
**#3:** Initiate a deep link callback from a website to hijack the flow of another app.
257258

258259
**#4:** Leverage existing web browser sessions to hijack the authenticated flow of another app.
@@ -267,15 +268,15 @@ When testing intent injections, you will often need to specify [com.kira.malware
267268

268269
<p align="center">Figure 10 - Web</p>
269270

270-
<p align="center"><img src="https://github.com/ivan-sincek/malware-apk/blob/main/img/deep_link_callback_flow.png" alt="Deep Link Callback Flow" height="600em"></p>
271+
<p align="center"><img src="https://github.com/ivan-sincek/malware-apk/blob/main/img/deep_link_callback.png" alt="Deep Link Callback" height="600em"></p>
271272

272-
<p align="center">Figure 11 - Deep Link Callback Flow</p>
273+
<p align="center">Figure 11 - Deep Link Callback</p>
273274

274275
### Task Hijacking
275276

276277
**#1:** Changing the task affinity at runtime is not possible.
277278

278-
**#2:** To hijack a task of another app, modify the task affinity in this app's `AndroidManifest.xml` under [MainActivity](https://github.com/ivan-sincek/malware-apk/blob/main/src/Malware/app/src/main/AndroidManifest.xml#L48), then rebuild the APK.
279+
**#2:** To hijack a task of another app, modify the task affinity in this app's `AndroidManifest.xml` under [MainActivity](https://github.com/ivan-sincek/malware-apk/blob/main/src/Malware/app/src/main/AndroidManifest.xml#L48), then rebuild the APK
279280

280281
Read more about the taskjacking [here](https://developer.android.com/privacy-and-security/risks/strandhogg).
281282

@@ -287,7 +288,7 @@ Read more about the taskjacking [here](https://developer.android.com/privacy-and
287288

288289
**#1**: Test if another app can detect an overlay.
289290

290-
**#2**: Detect an overlay by checking [MotionEvent.FLAG_WINDOW_IS_OBSCURED and MotionEvent.FLAG_WINDOW_IS_PARTIALLY_OBSCURED](https://github.com/ivan-sincek/malware-apk/blob/main/src/Malware/app/src/main/java/com/kira/malware/fragments/TapHijackingFragment.java#L33) flags - this solution works only on older Android versions.
291+
**#2**: Detect an overlay by checking [MotionEvent.FLAG_WINDOW_IS_OBSCURED and MotionEvent.FLAG_WINDOW_IS_PARTIALLY_OBSCURED](https://github.com/ivan-sincek/malware-apk/blob/main/src/Malware/app/src/main/java/com/kira/malware/fragments/TapHijackingFragment.java#L35) flags - this solution works only on older Android versions.
291292

292293
Read more about tapjacking [here](https://developer.android.com/privacy-and-security/risks/tapjacking).
293294

@@ -297,17 +298,17 @@ Read more about tapjacking [here](https://developer.android.com/privacy-and-secu
297298

298299
### Accessibility Monitor
299300

300-
**#1**: Extract sensitive information from another app's UI by abusing the accessibility service.
301+
**#1**: Extract sensitive information from the UI of another app by abusing the accessibility service.
301302

302-
Read more about the solution [here](https://developer.android.com/reference/android/view/View#attr_android:importantForAccessibility);
303+
Read more about the solution [here](https://developer.android.com/reference/android/view/View#attr_android:importantForAccessibility).
303304

304305
<p align="center"><img src="https://github.com/ivan-sincek/malware-apk/blob/main/img/accessibility_monitor.png" alt="Accessibility Monitor" height="600em"></p>
305306

306307
<p align="center">Figure 14 - Accessibility Monitor</p>
307308

308309
### Notification Monitor
309310

310-
**#1**: Extract sensitive information from another app's notification by abusing the notification service.
311+
**#1**: Extract sensitive information from a push notification of another app by abusing the notification service.
311312

312313
<p align="center"><img src="https://github.com/ivan-sincek/malware-apk/blob/main/img/notification_monitor.png" alt="Notification Monitor" height="600em"></p>
313314

@@ -325,17 +326,19 @@ Read more about the solution [here](https://developer.android.com/reference/andr
325326

326327
### State Manager
327328

328-
**#1:** Save and load the UI state at any time.
329+
**#1:** Save and load UI states at any time.
329330

330-
**#2:** Download and share UI state files with others, and upload files shared by others at any time.
331+
**#2:** Download and share UI state files with others, and upload UI state files shared by others at any time.
331332

332333
<p align="center"><img src="https://github.com/ivan-sincek/malware-apk/blob/main/img/state_manager.png" alt="State Manager" height="600em"></p>
333334

334335
<p align="center">Figure 17 - State Manager</p>
335336

336337
### Settings
337338

338-
**#1:** Additional system controls and UI customizations, minimizing the need to rebuild the APK.
339+
**#1:** Additional system controls and UI customizations.
340+
341+
**#2:** Biometric unlock prompts only once at launch. Clear all tasks to enable it again.
339342

340343
<p align="center"><img src="https://github.com/ivan-sincek/malware-apk/blob/main/img/settings.png" alt="Settings" height="600em"></p>
341344

img/accessibility_monitor.png

290 Bytes
Loading

img/broadcast_monitor.png

719 Bytes
Loading

img/clipboard.png

1.36 KB
Loading

img/deep_link_callback.png

550 KB
Loading

img/deep_link_callback_flow.png

-552 KB
Binary file not shown.

img/deep_link_fuzzing.png

1.57 KB
Loading

img/enumeration.png

1.88 KB
Loading

img/file_system.png

580 Bytes
Loading

img/intent_injection_1.png

2.01 KB
Loading

0 commit comments

Comments
 (0)