You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MachScope Permission Check
Feature Status Notes
------------------------------------------------------------
Static Analysis ✓ Ready No special permissions needed
Disassembly ✓ Ready No special permissions needed
Debugger ✗ Denied Missing debugger entitlement
→ Developer Tools ✗ Off Enable in System Settings
→ Entitlement ✗ No Run codesign with entitlements
SIP Status: Enabled
Note: System binaries cannot be debugged with SIP enabled
Capability Level: Analysis (parse + disasm only)
To enable debugging:
1. Open System Settings > Privacy & Security > Developer Tools
2. Enable "Terminal" (or add MachScope if installed)
3. Restart Terminal
• Sign binary: codesign --force --sign - --entitlements Resources/MachScope.entitlements .build/debug/machscope
Capability Levels
Level
Features
Exit Code
Full
parse + disasm + debug
0
Analysis
parse + disasm only
20
Read-Only
parse only
21
Exit Codes
Code
Description
0
Full capabilities available
20
Partial capabilities (analysis only)
21
Minimal capabilities (parse only)
Debug Command
Attach to and debug a running process.
Prerequisites
Sign MachScope with debugger entitlement
Enable Developer Tools in System Settings
Target process must have get-task-allow entitlement (for non-system binaries)
Syntax
machscope debug <pid> [options]
Arguments
Argument
Description
<pid>
Process ID to attach to
Options
Option
Short
Description
--json
-j
Output in JSON format (non-interactive)
Setup
# Sign with debugger entitlement
codesign --force --sign - \
--entitlements Resources/MachScope.entitlements \
.build/debug/machscope
# Find a process ID
ps aux | grep MyApp
Interactive Commands
Once attached, use these commands:
Command
Short
Description
help
h
Show available commands
continue
c
Continue execution
step
s
Single step one instruction
break <addr>
b
Set breakpoint at address
delete <id>
d
Delete breakpoint
info breakpoints
List all breakpoints
info registers
Show register values
registers
regs
Show all registers
x <addr> [count]
Examine memory
disasm [addr] [count]
dis
Disassemble at address
backtrace
bt
Show call stack
detach
Detach from process
quit
q
Quit debugger
Examples
# Attach to process
machscope debug 12345
# In debugger:
(machscope) info registers
(machscope) break 0x100003f40
(machscope) continue
(machscope) step
(machscope) x 0x100000000 16
(machscope) backtrace
(machscope) quit
# Get executable name from Info.plist
APP="/Applications/Safari.app"
EXEC=$(defaults read"$APP/Contents/Info.plist" CFBundleExecutable)
machscope parse "$APP/Contents/MacOS/$EXEC"
Batch Analysis
# Analyze all binaries in /binforbinin /bin/*;doecho"=== $bin ==="
machscope parse "$bin" --headers 2>/dev/null
done