首页
社区
课程
招聘
[原创]时代重大变化,用户态root被封杀
发表于: 2026-5-11 00:52 2473

[原创]时代重大变化,用户态root被封杀

2026-5-11 00:52
2473

检测原理

该检测无法在用户空间被绕过。
App Zygote是一个特定于应用程序的Zygote进程,它会预加载资源并为应用程序创建独立的子进程。 为了正常运行,App Zygote 必须转换到隔离服务的受限上下文中。因此,它必须拥有查询和检查 SELinux 访问规则的权限。 这种固有的设计使其成为查询 SELinux 的完美候选者,而不会受到普通不受信任应用程序限制的约束。

//安卓源码如下: app_zygote.te
# Get seapp_contexts
allow app_zygote seapp_contexts_file:file r_file_perms;
# Check validity of SELinux context before use.
selinux_check_context(app_zygote)
# Check SELinux permissions.
selinux_check_access(app_zygote)

检测示例

var sb = new StringBuilder();
if (SELinux.checkSELinuxAccess("u:r:system_server:s0", "u:r:system_server:s0", "process", "execmem")) {
    sb.append("system_server can execmem; ");
}
if (SELinux.checkSELinuxAccess("u:r:untrusted_app:s0", "u:r:magisk:s0", "binder", "call")) {
    sb.append("found Magisk; ");
}
if (SELinux.checkSELinuxAccess("u:r:untrusted_app:s0", "u:r:ksu:s0", "binder", "call")) {
    sb.append("found KernelSU; ");
}
if (SELinux.checkSELinuxAccess("u:r:untrusted_app:s0", "u:object_r:lsposed_file:s0", "file", "read")) {
    sb.append("found LSPosed; ");
}

[培训]《冰与火的战歌:Windows内核攻防实战》!从零到实战,融合AI与Windows内核攻防全技术栈,打造具备自动化能力的内核开发高手。

收藏
免费 6
打赏
分享
最新回复 (3)
雪    币: 1835
活跃值: (2390)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
tmi
2
2026-5-11 10:12
0
雪    币: 104
活跃值: (8697)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
3
tql
2026-5-11 15:26
0
雪    币: 6170
活跃值: (2678)
能力值: ( LV4,RANK:156 )
在线值:
发帖
回帖
粉丝
4
一开始就没踩这个坑,嘻嘻
2026-5-15 17:28
0
游客
登录 | 注册 方可回帖
返回