Capture Β· Deploy Β· Clone Your Mac
v3.0 Β ββΒ cyberspartan77 Β ββΒ 2026
Capture your Mac's complete configuration DNA and deploy it to any new machine.
MacDNA scans your current Mac β preferences, apps, dock layout, dotfiles, security settings, keyboard, fonts, network β and saves everything into a portable profile. Take that profile to a brand new Mac, deploy it, and your setup is restored.
No dependencies. Pure Python. Runs from a USB stick.
# Clone the repo
git clone https://github.com/fjimenez77/MacDNA.git
cd MacDNA
# Run it
python3 macdna.pyThat's it. You get an interactive menu:
ββββββββββββββββββββββββββββββββββββββββββββββββ
β 𧬠M a c D N A v 3 β
β Capture - Deploy - Clone Your Mac β
β βββββββββββββββββββββββββββββββββββββββββββββββ£
β Author: cyberspartan77 | v3.0 | 2026 β
ββββββββββββββββββββββββββββββββββββββββββββββββ
βββ MAIN MENU ββββββββββββββββββββββββββββββββ
1 Capture This Mac
2 Deploy to This Mac
3 View Profile
4 Compare Profiles
5 Delete Profile
6 Security & Asset Audit
7 Settings
8 Exit MacDNA
| Category | What's Grabbed |
|---|---|
| Machine Identity | Hostname, macOS version, chip type, serial |
| System Preferences | Dark mode, Finder settings, trackpad, mouse, screenshots |
| Dock | All dock apps, position, size, autohide, magnification |
| Applications | Homebrew formulae & casks, Mac App Store apps, all /Applications |
| Keyboard & Input | Key repeat, hot corners, auto-correct, smart quotes |
| Security | FileVault, firewall, Gatekeeper, SIP, screen lock |
| Shell & Dotfiles | .zshrc, .bashrc, .gitconfig, .vimrc, PATH, oh-my-zsh detection |
| Login Items | Login apps + LaunchAgents |
| Fonts | User-installed fonts in ~/Library/Fonts |
| Network | DNS servers, custom /etc/hosts entries |
Each capture creates a folder with two files:
profiles/
CyberSpartan77s_MacBook_Pro_2026-03-17/
profile.json β machine-readable, used for deploy
profile.html β interactive browser viewer
The HTML report is a dark-themed, searchable, expandable viewer you can open in any browser β no server needed. It shows:
- Stats dashboard (app count, formulae, casks, dock apps, dotfiles, fonts)
- Collapsible sections for every category
- Color-coded tags for apps, casks, dock items
- Syntax-highlighted dotfile contents
- Full raw JSON toggle
- Search bar to find any setting
Run with sudo for full results: sudo python3 macdna.py β option 6.
| Feature | Without sudo | With sudo |
|---|---|---|
| Capture settings | β Full | β Full |
| Deploy settings | β Full | β Full |
| Security audit β asset intel | β Full | β Full |
| Security audit β compliance | β Full | |
| Security audit β event logs | β Full | |
| Security audit β threats | β Full | β Full |
| Security audit β certificates | β Full | β Full |
A comprehensive security assessment covering 8 audit domains with 60+ checks:
| Section | What's Scanned |
|---|---|
| Asset Intelligence | CPU, RAM, GPU, storage volumes, battery health, USB/Thunderbolt/Bluetooth devices, serial, board ID |
| User Accounts & Access | Local users, admin status, hidden accounts, sudoers, SSH config, authorized_keys |
| Certificates | System keychain certs, expiry dates, self-signed detection, 30/60/90-day expiry warnings |
| Network & Connections | Listening ports, established connections, UDP, interfaces, VPN tunnels, routing table, sharing services |
| Domain & Management | Active Directory, LDAP, MDM enrollment, configuration profiles, managed preferences |
| Threat Detection & IOCs | Reverse shells, suspicious processes, unsigned binaries, crypto miners, malware names, cron jobs, browser extensions, env variable anomalies, recently modified system files |
| Compliance Posture | FileVault, SIP, Gatekeeper, firewall, stealth mode, auto-updates, screen lock, remote login, guest account, AirDrop, Time Machine, secure boot |
| Logs & Forensics | Failed logins, sudo history, SSH history, kernel panics, app crashes, quarantine events, mounted volumes |
Every failed check or threat finding includes actionable remediation:
- What β plain English description of the issue
- Risk β why it matters to your security posture
- Fix β the exact terminal command to remediate
- Settings Path β where to fix it in System Settings UI
- CIS Reference β CIS Benchmark ID where applicable
Findings are color-coded: π΄ Critical | π‘ Warning | π’ Pass
profiles/
CyberSpartan77s_MacBook_Pro_2026-03-17/
profile.json β system capture
profile.html β system capture viewer
audit.json β security audit data
audit.html β security audit viewer with guidance
Pick a saved profile β select which categories to apply β dry-run or live.
- Dry Run β previews every change, touches nothing
- Apply β writes settings via
defaults write, installs apps viabrew/mas, restores dotfiles - Auto-backup β existing dotfiles are backed up to
~/.macdna_backup/before overwrite - Idempotent β skips already-installed apps
- Confirmation β requires typing
YESbefore any changes
Configurable via the in-app Settings menu (option 6):
| Setting | Default |
|---|---|
| Profile save location | ./profiles/ |
| Backup directory | ~/.macdna_backup/ |
| Auto-backup before deploy | ON |
| Dry-run by default | OFF |
| Confirm before apply | ON |
| Exclude sensitive dotfiles (.netrc, .npmrc) | ON |
| Auto-name profiles | OFF |
| Compact JSON | OFF |
| Color output | ON |
| Default capture categories | All |
| Security audit with capture | OFF |
| Threat alert level | medium |
Settings persist in settings.json.
- Never captures passwords, tokens, SSH keys, keychains, or credentials
- Sensitive dotfiles (.netrc, .npmrc, .pypirc) excluded by default
- Profiles stay local β .gitignore excludes them from version control
- Capture is read-only β safe to run anytime
- Deploy is cautious β confirmation required, dry-run available
- macOS 12+ (Monterey through Sequoia)
- Python 3 (pre-installed on macOS)
- Apple Silicon or Intel
- Optional: Homebrew (for app install/restore)
- Optional: mas (for App Store app capture)
MacDNA/
βββ macdna.py # Main app β capture, deploy, menus, HTML reports
βββ securityaudit.py # Security & Asset Audit engine + guidance
βββ profiles/ # Saved captures and audits
βββ LICENSE
βββ README.md
- WinDNA β Windows counterpart (Python + PowerShell, x64/x86/ARM)
macOS system backup, Mac settings capture, Mac migration tool, deploy Mac preferences, clone Mac setup, macOS configuration DNA, system preferences backup, Mac dotfile backup, FileVault audit, SIP compliance check, macOS security audit, CIS benchmark Mac, Mac forensic snapshot, Homebrew backup restore, Mac App Store backup, dark mode capture, dock layout backup, Python macOS tool, Mac IT admin tool, macOS compliance checker
Pull requests, bug reports, and feature suggestions are welcome.
Quick version:
# 1. Fork the repo on GitHub
# 2. Clone your fork
git clone https://github.com/YOUR_USERNAME/MacDNA.git
cd MacDNA
# 3. Create a feature branch
git checkout -b feature/your-idea
# 4. Make changes, test locally
python3 macdna.py
python3 -m py_compile macdna.py
# 5. Commit + push + open a PR
git commit -m "Add: your change"
git push origin feature/your-ideaBefore opening a PR:
- Open an issue first for non-trivial changes
- Keep PRs focused (one logical change per PR)
- Test the affected functionality manually
- No new external dependencies without discussion
- No real credentials, SSH keys, or PII in commits
Reporting bugs? Include macOS version, Python version, and reproduction steps.
Found a security issue? Don't open a public issue β use GitHub Security Advisories instead.
- @fjimenez77 (Felix J.)
- @canadayb (Brian Canaday)
- @DevForgeAtlas
Apache License 2.0 β see LICENSE for full text.
Copyright 2026 Felix J. (@fjimenez77) and contributors
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0