Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collect full SELinux policy on Android #26

Open
DonnchaC opened this issue Aug 11, 2023 · 1 comment
Open

Collect full SELinux policy on Android #26

DonnchaC opened this issue Aug 11, 2023 · 1 comment
Labels
enhancement New feature or request
Milestone

Comments

@DonnchaC
Copy link
Contributor

DonnchaC commented Aug 11, 2023

Some exploits add additional rules to the local in-memory SELinux policy to give their implants extra capabilities rather than completely disabling SELinux.

On Android the SELinux policies are part of the OEM system image and show should be fixed for a particular build. They can be found at multiple paths included:

/odm/etc/selinux/precompiled_sepolicy
/vendor/etc/selinux/precompiled_sepolicy

The currently active SELinux compiled policy is accessible under /sys. This file is accesible via adb pull even if its not directly readable from the ADB shell.

/sys/fs/selinux/policy

Unfortunately the in-memory file is not byte-for-byte identical in the few tests I have seen. There may be some standard transformation happening to the roles when loaded which would also us to detect rule changes with some further analysis.

We should collect the on-disk and active SELinux policies in AndroidQF and add an MVT module to parse them

@DonnchaC DonnchaC added the enhancement New feature or request label Aug 11, 2023
@Te-k
Copy link
Contributor

Te-k commented Aug 24, 2023

Should we keep that for v1.1?

@Te-k Te-k added this to the v1 milestone Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants