macos-post-exploitation
できること
このガイドは、Appleのコンピューター上のmacOSのプライバシーとセキュリティの制御、および不正利用の兆候を扱います。許可されたテストを行うMacの管理者とセキュリティチーム向けです。
使う場面
- ✓Macのエンドポイントで許可されたテストを行い、プライバシーの制御と保護を確認する必要があるとき。
- ✓Macの管理者が、どのアプリが機密性の高いアクセス権を持っているかをレビューしたいとき。
- ✓防御側が、組み込みのmacOSコマンドで侵害されたマシンについて何がわかるかを知りたいとき。
スキルのリンク
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/post-exploit/macos/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“会社のMacを確認して、機密性の高いアクセス権を持つアプリがないかを調べ、組み込みの保護が有効かどうかを確かめてください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントはシステムの保護状態を確認し、どのアプリが機密性の高い権限を持っているかを調べます。締める必要がある設定を報告します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
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.
よくある質問
プライバシー制御のデータベースとは何ですか?
ファイルやカメラなどの保護されたデータに、どのアプリがアクセスしてよいかを記録するmacOSのデータベースです。
なぜシステムインテグリティ保護を確認するのですか?
ガイドによると、それは重要なシステムファイルを守るため、どのレビューでもその状態が重要だからです。
組み込みのツールも使いますか?
はい。ガイドは、確認のために組み込みのmacOSコマンドを優先しています。
詳細
作者による元の説明
macOS endpoint post-exploitation — launchd persistence, TCC bypass, Keychain credential access, dylib hijacking, Gatekeeper/quarantine evasion, and discovery on Apple hosts.
人気
- GitHubのスター
- 6.5k
- ランキング
- #14136
- ライセンス
- Apache-2.0
- 更新日
- 2026/11/1
コメント
- …
このリポジトリの他のスキル
detector-overview
6.5kエージェントが、スキャナーが指摘したコードを読み、本物のセキュリティバグと誤検知を見分けられるよう支援します。
exploiter-overview
6.5kエージェントが、確認済みの複数のセキュリティ上の弱点を一つのテストの連鎖にまとめ、その影響がどこまで及ぶかを確認できるよう支援します。
llm-redteam-overview
6.5kエージェントが、プロンプトインジェクションからモデルの悪用まで、15の戦術グループの中から適切なAIレッドチーム用ガイドを見つけられるよう支援します。
aatmf-t01-prompt-injection
6.5kプロンプトインジェクションを説明します。隠された指示でAIシステムを乗っ取ろうとする手口を、セキュリティテスターが確認できるようにします。
似ているスキル
reverse-engineer-anything
422kREAツールを使って、出荷済みのアプリやパッケージの中身を調べ、機能の説明、版の比較、再構築の手順をエージェントが支援します。
1password
394k1Password CLIをセットアップし、サインインして、秘密情報の値を会話に表示せずに読み取ったり注入したりするようエージェントを支援します。
healthcheck
394kOpenClawを動かすコンピューターやサーバーを、SSH、ファイアウォール、更新、バックアップなどのセキュリティリスクについて監査し、安全な修正案を提案するようエージェントを支援します。