mvt-project / mvt-project/androidqf
Collect full SELinux policy on Android
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 281
- Forks
- 48
- Avg merge
- 1h 28m
- Merged PRs (30d)
- 2
Description
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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with AndroidQF's existing device-collection flow and the MVT module structure. Use adb pull to collect /odm/etc/selinux/precompiled_sepolicy, /vendor/etc/selinux/precompiled_sepolicy, and /sys/fs/selinux/policy, then investigate how the active policy differs from the on-disk files. Done means both policy forms are collected and an MVT module parses them.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, go, linux
- Domain
- mobile-dev, operating-systems, security
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100