A simple utility for bypassing amfid signature verification
Project description
amfidont
Description
A macOS utility that attaches to amfid with LLDB and bypasses app signature validation for explicitly allowed binaries.
Allowed targets are matched by executable path prefix and/or cdhash.
Requirements
- SIP configuration that allows debugging system processes by either:
- fully disable SIP
- disable only debugging restrictions (
csrutil enable --without debug)
Installation
xcrun python3 -m pip install -U amfidont
Usage
Usage: amfidont [OPTIONS] COMMAND [ARGS]...
A simple utility for bypassing amfid signature verification
Options:
--path, -p TEXT path of executable to allow (can be specified multiple times, merged with ~/.amfidont/paths)
--cdhash, -c TEXT cdhash of executable to allow (can be specified multiple times, merged with ~/.amfidont/cdhashes)
--verbose, -v enable verbose output
--allow-all allow all validations to pass
--install-completion Install completion for the current shell.
--show-completion Show completion for the current shell, to copy it or customize the installation.
--help Show this message and exit.
Commands:
daemon Start amfidont in daemon mode.
add-path Add an allowed path prefix to persistent configuration.
remove-path Remove an allowed path prefix from persistent configuration.
add-cdhash Add an allowed cdhash to persistent configuration.
remove-cdhash Remove an allowed cdhash from persistent configuration.
Example
-
Add a persistent allowed path:
sudo amfidont add-path /Users/user/dev/myapp/build/Release/MyApp.app/
-
Start bypass mode (foreground):
sudo amfidont --verbose
-
(Optional) Start as daemon instead:
sudo amfidont daemon --verbose
-
Stop foreground mode with
Ctrl-C(this detachesamfidontand leavesamfidrunning).
Inner implementation details
amfidontattaches to/usr/libexec/amfidusing LLDB.- It sets a breakpoint on:
-[AMFIPathValidator_macos validateWithError:]
- On each breakpoint hit, it inspects validator fields:
- code path (
codePath) - cdhash (
cdhashAsData) - validation state (
isValid)
- code path (
- If the validator is invalid but the path/cdhash matches configured allow-rules, the return register is patched to success and execution continues.
- Persistent configuration is stored in:
~/.amfidont/paths~/.amfidont/cdhashes
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file amfidont-0.0.2.tar.gz.
File metadata
- Download URL: amfidont-0.0.2.tar.gz
- Upload date:
- Size: 52.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0a9b6061e81ff03da922047ff6c1b1f39cdf7adf118c65824a8850e8139cc740
|
|
| MD5 |
96a5385b51b0166fa5e2c1d2f8d7bb2d
|
|
| BLAKE2b-256 |
c2526f34b77e0ddf78fb4bd89420124284a3de0edcc04c026cc4e64e6ad264f5
|
Provenance
The following attestation bundles were made for amfidont-0.0.2.tar.gz:
Publisher:
python-publish.yml on zqxwce/amfidont
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
amfidont-0.0.2.tar.gz -
Subject digest:
0a9b6061e81ff03da922047ff6c1b1f39cdf7adf118c65824a8850e8139cc740 - Sigstore transparency entry: 984947008
- Sigstore integration time:
-
Permalink:
zqxwce/amfidont@7e368c38f09c89666340da84cabe093b86fb2b09 -
Branch / Tag:
refs/tags/v0.0.2 - Owner: https://github.com/zqxwce
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@7e368c38f09c89666340da84cabe093b86fb2b09 -
Trigger Event:
release
-
Statement type:
File details
Details for the file amfidont-0.0.2-py3-none-any.whl.
File metadata
- Download URL: amfidont-0.0.2-py3-none-any.whl
- Upload date:
- Size: 39.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
972cd72b49e612bae5c4097b5215c30978d6caa79426347198850d93de714d12
|
|
| MD5 |
5e864335f8105611e64e22e87d31b94f
|
|
| BLAKE2b-256 |
4c272eb7a77275461e85d9f7f4b26ea7c66b305104774b31e1871ba50e4ec5ba
|
Provenance
The following attestation bundles were made for amfidont-0.0.2-py3-none-any.whl:
Publisher:
python-publish.yml on zqxwce/amfidont
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
amfidont-0.0.2-py3-none-any.whl -
Subject digest:
972cd72b49e612bae5c4097b5215c30978d6caa79426347198850d93de714d12 - Sigstore transparency entry: 984947009
- Sigstore integration time:
-
Permalink:
zqxwce/amfidont@7e368c38f09c89666340da84cabe093b86fb2b09 -
Branch / Tag:
refs/tags/v0.0.2 - Owner: https://github.com/zqxwce
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@7e368c38f09c89666340da84cabe093b86fb2b09 -
Trigger Event:
release
-
Statement type: