Skip to content

DaxxSec/SecVF

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

63 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

macOS Swift Apple Silicon License: MIT Tag Stars


Run malware. Capture everything. Stay isolated.

SecVF spins up hardware-isolated VMs via Apple's Virtualization framework, routes their traffic through an instrumented Kali Linux router, and gives you Wireshark-grade packet analysis β€” all in a native macOS app.



⚑ What It Does

πŸ”¬ Malware Analysis

Detonate samples in isolated VMs with full network visibility. Every packet captured, every connection logged. Hardware-enforced containment via Apple Virtualization Framework β€” no escape to host.

🌐 Network Forensics

L2/L3 software switch with real-time packet capture. Wireshark-style display filters, live protocol breakdown, PCAP export. Kali router VM sits between your malware and the internet.

πŸ€– AI Sandbox

Ephemeral macOS guest VMs for AI agent execution. APFS CoW session cloning (~0ms), VirtioFS workspace sharing, vsock IPC bridge, DTrace/ESF telemetry β€” spin up, run, destroy.

πŸ›‘οΈ Incident Response

Security audit logging with severity levels (INFO β†’ EMERGENCY). Real-time filesystem monitoring, process telemetry, ISO checksum validation. Full audit trail at ~/.avf/logs/.


πŸ–₯️ Screenshots

VM Library Packet Analysis
Multi-VM management with live packet log panel Wireshark-style deep packet inspection

πŸ“Έ Screenshots coming soon β€” build from source and run to see it in action.


πŸš€ Quick Start

Prerequisites

Requirement Version Notes
macOS 14.0+ Sonoma Required for Virtualization framework features
Xcode 15.0+ For building from source
Apple Silicon M1+ Required for macOS guest VMs; Intel for Linux VMs
tshark optional Enables packet capture: brew install wireshark

Install

git clone https://github.com/DaxxSec/SecVF.git
cd SecVF
open SecVF.xcodeproj
# Build & Run: ⌘R

Optional: tshark for packet capture

brew install wireshark

πŸ”§ Features

Virtual Machine Management

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  VM Library                              [+ New VM]  β”‚
β”‚  ─────────────────────────────────────────────────  β”‚
β”‚  ● Kali-Router     Running   Virtual Net   192MB     β”‚
β”‚  ● Ubuntu-Sandbox  Running   Virtual Net   512MB     β”‚
β”‚  β—‹ Windows-11      Stopped   NAT           -         β”‚
β”‚  β—‹ macOS-14-AI     Stopped   NAT           -         β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
  • 🐧 8 Linux distros β€” Kali, Ubuntu, Debian, Fedora, Arch & more
  • 🍎 macOS guest VMs β€” Full IPSW install via Apple CDN (Apple Silicon only)
  • πŸ”„ Multi-window sessions β€” Each VM gets its own window
  • πŸ’Ύ ISO cache manager β€” SHA256-verified downloads, no re-downloading

Network Stack

  [ Malware VM ] ──┐
  [ Analysis VM ] ────▢ [ Virtual Switch ] ──▢ [ Kali Router ] ──▢ Internet
  [ AI Sandbox ] β”€β”€β”˜         (L2/L3)           (traffic tap)
                                β”‚
                         [ PacketCapture ]
                         [ tshark/PCAP   ]
Mode Use Case
🌍 NAT Standard internet access through host
πŸ”’ Virtual Network Isolated VM-to-VM, no host internet
πŸ•΅οΈ Router VM Kali as gateway β€” full traffic interception
🎭 FakeNet DNS/HTTP honeypot β€” capture malware C2 comms

Packet Analysis

Access via Monitoring β†’ Packet Analysis or βŒ˜β‡§P

Feature Details
πŸ”΄ Live Capture Start/Stop/Clear with real-time packet stream
πŸ” Display Filters Wireshark-style: tcp, ip.addr == 10.0.100.1, dns
πŸ“Š Protocol Stats Live breakdown: TCP/UDP/DNS/ARP/ICMP/HTTP
πŸ”¬ Packet Decode Layer-by-layer: Ethernet β†’ IP β†’ TCP/UDP β†’ Application
πŸ’Ύ PCAP Export Save captures for Wireshark or offline analysis
πŸ“Ÿ Hex Dump Raw bytes with ASCII representation

Real-Time Monitoring

Window Shortcut What You See
πŸ” Security Logs βŒ˜β‡§1 Filesystem events, process activity, severity alerts
🌐 Network Logs βŒ˜β‡§2 Virtual switch traffic, connection log
πŸ“¦ Packet Analysis βŒ˜β‡§P Deep packet inspection (tshark)
πŸ“ˆ Switch Statistics βŒ˜β‡§3 Forwarding rates, MAC table, dropped packets
βœ… ISO Cache Audit βŒ˜β‡§4 Download history, checksum validation log

πŸ—οΈ Architecture

SecVF/
β”œβ”€β”€ 🧠 Core
β”‚   β”œβ”€β”€ AppDelegate.swift              # App lifecycle, VM window management
β”‚   β”œβ”€β”€ VMManager.swift                # VM CRUD, bundle management
β”‚   └── VMConfiguration.swift         # Codable VM settings model
β”‚
β”œβ”€β”€ 🌐 Network Stack
β”‚   β”œβ”€β”€ VirtualNetworkSwitch.swift     # L2/L3 software switch, MAC learning
β”‚   β”œβ”€β”€ PacketCaptureManager.swift     # tshark integration, Combine publishers
β”‚   └── PacketAnalysisWindowController.swift  # Wireshark-style UI
β”‚
β”œβ”€β”€ πŸ–₯️ UI
β”‚   └── VMLibraryWindowController.swift  # Main window (~2600 LOC)
β”‚
β”œβ”€β”€ πŸ€– AI Sandbox
β”‚   └── AISandboxMacVMConfiguration.swift  # macOS guest VM + vsock IPC
β”‚
β”œβ”€β”€ πŸ”’ Security
β”‚   β”œβ”€β”€ VMSecurityMonitor.swift        # Real-time security event logging
β”‚   └── SecVFError.swift               # Typed errors, audit trail
β”‚
β”œβ”€β”€ πŸ“¦ Supporting
β”‚   β”œβ”€β”€ ISOCacheManager.swift          # ISO download + SHA256 verification
β”‚   β”œβ”€β”€ MacOSVMInstaller.swift         # IPSW download from Apple CDN
β”‚   └── ScriptsUSBManager.swift        # Guest VM script delivery
β”‚
└── πŸ“œ Scripts
    β”œβ”€β”€ kali-router-setup.sh           # Kali as NAT router + traffic tap
    β”œβ”€β”€ kali-fakenet-setup.sh          # FakeNet DNS/HTTP honeypot
    └── provision-macos-vm.sh          # AI Sandbox macOS guest provisioning

🦠 Malware Analysis Workflow

# 1. Set up your analysis environment
#    Create Kali Router VM β†’ run kali-router-setup.sh inside it

# 2. Create your malware sandbox VM
#    New VM β†’ Linux/Windows β†’ Virtual Network mode

# 3. Start monitoring
#    βŒ˜β‡§P  β†’  Start Capture

# 4. Detonate
#    Execute malware sample in sandbox VM

# 5. Analyze
#    Watch live traffic in packet panel
#    Export PCAP for deeper Wireshark analysis
#    Check Security Logs (βŒ˜β‡§1) for filesystem activity

πŸ€– AI Sandbox Workflow

Ephemeral macOS VMs for safe AI agent execution:

Build once:   AISandboxMacVMInstaller.downloadAndInstall()
               └─▢ IPSW download β†’ macOS install β†’ provision
               └─▢ ai-sandbox-base-v1.bundle  (~/.avf/AISandbox/)

Each session: AISandboxVMSession.cloneBase()   # APFS CoW, ~0ms
              AISandboxVMSession.boot()
              AISandboxVMSession.run("your command")  # vsock:2222
              AISandboxVMSession.destroy()      # wipe session bundle

Isolation guarantees: hardware VM boundary Β· non-admin agent user Β· workspace-only write access Β· DTrace + ESF telemetry


⌨️ Keyboard Shortcuts

Action Shortcut
New VM ⌘N
Start VM ⌘S
Stop VM ⌘.
Packet Analysis βŒ˜β‡§P
Security Logs βŒ˜β‡§1
Network Logs βŒ˜β‡§2
Switch Stats βŒ˜β‡§3
ISO Cache Audit βŒ˜β‡§4

πŸ› οΈ Tech Stack

Swift Apple Virtualization AppKit Combine tshark

  • Apple Virtualization Framework β€” Hardware-enforced VM isolation (macOS 14+)
  • Swift Concurrency β€” async/await, @MainActor, Combine for reactive packet updates
  • tshark β€” Packet capture via FIFO pipe, JSON output parsing
  • VirtioFS β€” High-performance host↔guest file sharing
  • vsock β€” Low-latency host↔VM IPC (AI Sandbox command channel)

πŸ” Security Model

  • Hardware isolation β€” Apple Virtualization Framework, not containers
  • No shared folders by default β€” VMs are air-gapped from host filesystem
  • IPSW validation β€” Downloads only from *.cdn-apple.com, TLS 1.2+, extension check
  • ISO verification β€” SHA256 checksums fetched from official distro mirrors
  • URL domain whitelisting β€” Hardcoded allowlist for all network downloads
  • Severity-levelled alerting β€” INFO / WARNING / CRITICAL / EMERGENCY events
  • Audit trail β€” ~/.avf/logs/security-*.log, error-audit.log

🀝 Contributing

# Fork β†’ branch β†’ commit β†’ PR
git checkout -b feature/your-feature
git commit -m "feat: add your feature"
git push origin feature/your-feature
# Open a Pull Request on GitHub

πŸ“„ License

MIT β€” see LICENSE.txt


Built by DaxxSec

GitHub

If SecVF saves you time on an investigation, give it a ⭐

About

A native macOS virtualization framework for security research, malware analysis, and incident response. Built with Swift using Apple's Virtualization framework.

Resources

License

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors