macos-post-exploitation
Skill này làm gì
Hướng dẫn này nói về các kiểm soát quyền riêng tư và bảo mật của macOS, cùng dấu hiệu lạm dụng trên máy Apple. Dành cho quản trị viên Mac và đội bảo mật chạy kiểm thử được ủy quyền.
Khi nào nên dùng
- ✓Khi một bài kiểm tra được ủy quyền trên thiết bị Mac cần kiểm tra các kiểm soát và biện pháp bảo vệ quyền riêng tư.
- ✓Khi một quản trị viên Mac muốn rà soát ứng dụng nào có quyền truy cập nhạy cảm.
- ✓Khi người phòng thủ muốn biết các lệnh tích hợp sẵn của macOS tiết lộ điều gì về một máy bị xâm nhập.
Liên kết skill
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/post-exploit/macos/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Bạn có thể kiểm tra các máy Mac của công ty để tìm ứng dụng có quyền truy cập nhạy cảm và xác nhận các biện pháp bảo vệ tích hợp đang bật không?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent rà soát trạng thái bảo vệ hệ thống, kiểm tra ứng dụng nào giữ quyền nhạy cảm, rồi báo cáo các cài đặt cần siết chặt.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
macOS post-exploitation
Post-compromise operations on Apple/macOS endpoints. Apple's controls
(TCC, Gatekeeper/quarantine, SIP, code signing, AMFI) shape every step, so the
playbook is organized around defeating or living within them. Prefer
on-host built-ins (launchctl, security, sqlite3, dscl, system_profiler,
codesign, xattr) over dropped tooling for OPSEC.
Authorized engagements only. Stay within RoE scope; emulate destructive actions as benign proofs unless explicitly authorized.
Discovery (T1087.001 / T1518 / T1647)
system_profiler SPSoftwareDataType SPHardwareDataType— OS build, model, SIP.csrutil status— System Integrity Protection on/off.dscl . -list /Users | grep -v '^_'— local accounts;id,groups.sw_vers,profiles status -type enrollment— MDM/Jamf managed? (T1647 plist prefs).- Installed security tooling:
ls /Library/Objective-See,pgrep -l 'CrowdStrike|SentinelOne|falcon|Jamf|santad'.
Privilege escalation
- TCC bypass / abuse (T1548 family). TCC gates access to Documents, Desktop,
Downloads, camera/mic, Full Disk Access. Check
sqlite3 ~/Library/Application\ Support/com.apple.TCC/TCC.db 'select * from access'(user) and/Library/Application Support/com.apple.TCC/TCC.db(system, needs root). Abuse an already-FDA-granted app (e.g. a terminal/Electron app) to read protected data instead of triggering a prompt. - Sudo / admin group.
sudo -n true(cached creds), membership inadmin. - Setuid hunting:
find / -perm -4000 -type f 2>/dev/null.
Persistence
- LaunchAgents / LaunchDaemons (T1543.001 / T1543.004). Drop a plist in
~/Library/LaunchAgents(user, no root) or/Library/LaunchDaemons(root, runs as root at boot);launchctl bootstrap gui/$(id -u) <plist>. The classic, noisy-but-reliable mechanism. - Login items (T1547.015) via
osascript -e 'tell application "System Events" to make login item ...'or a Service Management (SMAppService) helper. - Dylib hijacking / proxying (T1574.004). Find apps with a writable/missing
@rpathor weak-linked dylib (otool -l <app>); plant a malicious dylib that re-exports the original. Survives as the host app's identity. - Re-opened apps / cron / emond / at — lower-signal fallbacks.
Defense evasion
- Gatekeeper / quarantine (T1553.001). Downloaded files carry the
com.apple.quarantinexattr;xattr -d com.apple.quarantine <file>(orxattr -c) strips it so the binary runs without the Gatekeeper prompt. - Code signing (T1553).
codesign --force --deep --sign - <bundle>ad-hoc signs a tampered bundle; checkcodesign -dv --verbose=4andspctl -a -vv. - File-permission/attribute manipulation (T1222.002):
chflags,chmod. - AppleScript / osascript execution (T1059.002) for living-off-the-land.
Credential access (T1555.001)
- Keychain.
security find-generic-password -ga <svc>/security find-internet-password;security dump-keychain -d ~/Library/Keychains/login.keychain-db(prompts unless unlocked). Offline: exfil the*.keychain-db+ the login password and crack withchainbreaker. - Browser & app secrets under
~/Library/Application Support/...(often TCC-protected — see TCC abuse above). - Sudo/SSH keys in
~/.ssh,~/.aws,~/.kube.
Collection, C2 & exfil
- Stage under
/tmpor~/Library/Caches; archive withtar/ditto. - C2: prefer signed, allow-listed channels; see
post-exploit/c2andpost-exploit/c2-sliver(Sliver has a macOS implant). Beacon over HTTPS to blend with managed-device telemetry.
Detection & defense (blue-cell notes)
- Monitor new plists in
*/LaunchAgentsand*/LaunchDaemonsandlaunchctlbootstraps; alert onxattr -d com.apple.quarantine, ad-hoccodesign,security dump-keychain, and TCC.db reads by non-Apple binaries. - Endpoint Security framework (ES) + tools like santad/Objective-See catch most
of the above; LOTL via
osascript/launchctlis the gap to watch.
See also
post-exploit/credential-access, post-exploit/lateral-movement,
post-exploit/privilege-escalation, shared/defense-evasion, reverser/ios-static.
Câu hỏi thường gặp
Cơ sở dữ liệu kiểm soát quyền riêng tư là gì?
Đó là cơ sở dữ liệu của macOS ghi lại ứng dụng nào được phép truy cập dữ liệu được bảo vệ như file và camera.
Vì sao kiểm tra System Integrity Protection?
Hướng dẫn nói nó bảo vệ các file hệ thống cốt lõi, nên trạng thái của nó quan trọng trong mọi rà soát.
Có dùng công cụ tích hợp sẵn không?
Có. Hướng dẫn ưu tiên các lệnh macOS tích hợp sẵn để kiểm tra.
Chi tiết
Mô tả gốc của tác giả
macOS endpoint post-exploitation — launchd persistence, TCC bypass, Keychain credential access, dylib hijacking, Gatekeeper/quarantine evasion, and discovery on Apple hosts.
Độ phổ biến
- Sao GitHub
- 6.5k
- Vị trí xếp hạng
- #14136
- Giấy phép
- Apache-2.0
- Cập nhật
- 1/11/2026
Bình luận
- …
Thêm skill từ kho mã này
detector-overview
6.5kGiúp agent của bạn đọc code mà một công cụ quét đã đánh dấu, rồi quyết định điểm nào là lỗ hổng bảo mật thật và điểm nào là báo động giả.
exploiter-overview
6.5kGiúp agent của bạn ghép nhiều lỗ hổng bảo mật đã xác nhận thành một chuỗi kiểm thử và kiểm tra chuỗi đó có thể gây hậu quả đến đâu.
llm-redteam-overview
6.5kGiúp agent của bạn tìm đúng hướng dẫn red-team AI cho một bài kiểm thử, bao quát 15 nhóm chiến thuật từ prompt injection đến lạm dụng mô hình.
aatmf-t01-prompt-injection
6.5kGiải thích prompt injection, khi các chỉ dẫn ẩn cố ghi đè một hệ thống AI, để chuyên gia bảo mật có thể kiểm tra lỗi này.
Skill tương tự
reverse-engineer-anything
422kGiúp agent của bạn xem bên trong các app và package đã phát hành để giải thích tính năng, so sánh phiên bản hoặc hướng dẫn dựng lại bằng công cụ REA.
1password
394kGiúp agent của bạn cài đặt CLI của 1Password, đăng nhập, và đọc hoặc đưa thông tin bí mật vào mà không in giá trị ra cuộc trò chuyện.
healthcheck
394kGiúp agent của bạn rà soát bảo mật máy tính hoặc máy chủ đang chạy OpenClaw, như SSH, tường lửa, cập nhật và sao lưu, rồi đề xuất cách sửa an toàn.