OnPrivilege
On-Privilege scanning module is a threat hunting tool for macOS Endpoint using EndpointSecurity Framework
Install / Use
/learn @Will03/OnPrivilegeREADME
onPrivilege Module
Synopsis
On-Privilege scanning module is a threat hunting tool for macOS Endpoint using EndpointSecurity Framework
Motivation
One of the most dangous actions of malware is escape the privilege management of an infected host to execute more malicious behaviors. recent malware such as XCSSET.2020, MacMa.2021, dazzlespy.2022, CloudMensis.2022 all attempt to LPE on MacOS users. onPrivilege module continually monitors the system for events that may connect to privilege escalation attack. Specifically it watches for process rooting, bypass TCC, by SIP events.
To detect LPE on MacOS, this module does the following:
- Process rooting detection
- TCC.db file protection
- Legacy APP detection
- Special entitlement file tracking
This is a prove-of-concept project, please always running in virtual machine.
Dependence
brew install expect
build
mkdir ./build
cd ./build
cmake ..
make
Usage
sudo ./OPApplication
Todo
- [x] XPC service tracing
- [x] TCC.db manipulate
- [x] root privilege detect
- [ ] Protected folder collecting
- [ ] File attribute qurantine clear
Reference
Related Tools
- macprocmon
- https://github.com/gyunaev/macprocmon
- Shield
- https://github.com/theevilbit/Shield
- ESFang
- https://github.com/WithSecureLabs/ESFang
- ESFplayground
- https://themittenmac.com/the-esf-playground/
- OverSight
- https://github.com/objective-see/OverSight
- BlockBlock
- https://github.com/objective-see/BlockBlock
Related Skills
node-connect
345.4kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
104.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
345.4kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
345.4kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
