Mason C2 is a sophisticated remote administration and control tool developed by the MasonGroup collective. Built entirely in Python, this single-file solution provides seamless cross-platform control capabilities for both Windows and Linux systems The tool emphasizes reliability, persistence, and ease of use while maintaining a low profile on target systems
- Cross-Platform Support: Control both Windows and Linux systems from a unified interface
- Device Tracking: Unique device identification and persistent tracking across connections
- File Transfer: Execute files directly from disk on connected clients
- Persistence Mechanisms: Automatic startup integration for both Windows and Linux
- Broadcast Commands: Send commands to multiple clients simultaneously
- Stealth Operation: No-console execution and system integration options
- Python 3.6 or higher
- Required modules:
socket,threading,subprocess,struct,os,tempfile,shutil,time,urllib,uuid,platform,hashlib,json
# Clone or download MasonC2.py
python MasonC2.py-
Start the Control Server
Select: 1 Port (default: 4444): [Enter port or press Enter for default] -
Available Server Commands
help- Display all available commandslist all- Show all connected clientslist windows- Show only Windows clientslist linux- Show only Linux clientslist devices- View tracked devices (even when offline)select <ID>- Control a specific client (use number or DeviceID)run disk- Execute a local file on connected clientsbroadcast windows <command>- Send command to all Windows clientsbroadcast linux <command>- Send command to all Linux clientsbroadcast all <command>- Send command to all connected clientskick- Disconnect specific or all clientsclean devices- Remove old device entriesclear- Clear the terminalexit- Stop the server
-
Generate Client
Select: 2 -
Connection Method
- Option 1: Manual host/port configuration
- Option 2: URL-based configuration (client fetches config from URL)
-
Persistence Options
- Without persistence: Standard client
- With persistence: Client adds itself to system startup
-
Output Format
- Python script (.py): Cross-platform, requires Python
- Executable (.exe): Windows-only, no Python required
# Python version
python MasonClient.py
# Executable version
MasonClient.exe# Python version (requires Python 3)
python3 MasonClient.py
# Make executable and run
chmod +x MasonClient.py
./MasonClient.py[@Server]~>> list all
[@Server]~>> select 1
[DEV-ABC123] >> dir
[DEV-ABC123] >> cd C:\Users
[DEV-ABC123] >> ipconfig
[DEV-ABC123] >> back
[@Server]~>> run disk
[Select option: 1 for Linux, 2 for Windows, 3 for specific client]
[Enter path to executable file]
[@Server]~>> broadcast windows whoami
[@Server]~>> broadcast linux uname -a
[@Server]~>> broadcast all echo "MasonGroup Active"
- Task Scheduler entry (runs every minute)
- AppData folder copy
- Hidden execution without console
- Systemd service installation
- Crontab entry (@reboot)
- .bashrc/.profile modification
- Autostart directory entry
- RC.local integration
Mason C2 generates unique device IDs based on system fingerprints. These are stored in MasonDevices.json and allow tracking of devices even after they disconnect and reconnect from different IP addresses
- The tool includes IP filtering capabilities (whitelist/blacklist)
- Connection limiting per IP address
- Anti-flood protection
- Single-instance locking on client side
For Windows deployment, use the builder's executable option which utilizes PyInstaller to create standalone .exe files with no console window for stealth operation
-
Connection Issues
- Ensure firewall allows the selected port
- Verify the client has network access to the server
-
Client Not Starting
- Check Python installation on target
- Verify no other instances are running (single-instance lock)
-
Commands Not Executing
- Check client operating system compatibility
- Verify proper permissions on target system
Mason C2 is actively maintained by the MasonTeam. The architecture supports modular expansion and additional features can be integrated through the existing command structure
This tool is intended for authorized administrative and educational purposes only. Always ensure you have explicit permission before deploying any remote administration software on systems you do not own or administrate
MasonGroup - Precision Tools for Discerning Administrators
Version 2.0 | Coded by Freemasonry Collective
