Dirty Sepolicy

Verified safeOpen sourceExclusive
No reviews reviews
222
downloads
10
android

AI summary

Security research tool that detects root access and userspace su solutions by analyzing SELinux policy rules through the App Zygote process. Originally discovered by LSPosed in 2024 and published after independent public disclosure. Cannot be bypassed in userspace; kernel modification would be required to evade detection.

Generated by AI. May contain inaccuracies.

About this app

This project discloses a method to detect the Android device sepolicy. It can accurately identify all userspace su solutions, and it is impossible to bypass.

Background

The LSPosed team originally discovered this method in August 2024. At that time, we decided not to disclose it and chose not to implement this detection mechanism.

In May 2025, FldBudin independently discovered this method and made it public in Duck Detector. Given that the method is now publicly known, we have decided to publish our example implementation as well.

How it works

The detection utilizes the App Zygote process. An App Zygote is an application-specific Zygote process that preloads resources and forks isolated services for the application. To function correctly, the App Zygote must transition into the restricted context of the isolated service. Because of this requirement, it is indispensable for it to have permission to query and check SELinux access rules. This inherent design makes it the perfect candidate for querying SELinux without being restricted by normal untrusted app constraints.

In this implementation, the App Zygote uses the SELinux.checkSELinuxAccess API to analyze the system's global SELinux policies for "dirty" rules injected by common root and hooking solutions. Developers can easily extend this implementation by adding the specific SELinux rule characteristics of other future popular su solutions or root tools. Because the App Zygote and Zygote share code, SELinux permissions must be checked; otherwise, the process will crash. Therefore, this detection cannot be bypassed in userspace. The only way to circumvent it is by modifying the kernel itself.

License

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.

About this version

Version
1.0 (1)
Size
12.26 KB
Requires Android
10
Target SDK
29
Architecture
universal
Downloads
222
Updated
May 10, 2026
Package
org.lsposed.dirtysepolicy

Ratings & reviews

0 ratings
  • 5
    0
  • 4
    0
  • 3
    0
  • 2
    0
  • 1
    0

Write a review

Tap a star to rate this app