Skip to content
/ MasonC2 Public

Remote control tool for controlling Linux and Windows systems

License

Notifications You must be signed in to change notification settings

876N/MasonC2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Mason C2 - Remote Administration Tool

Tool

Overview

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

Key Features

  • 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

Installation

Prerequisites

  • Python 3.6 or higher
  • Required modules: socket, threading, subprocess, struct, os, tempfile, shutil, time, urllib, uuid, platform, hashlib, json

Quick Start

# Clone or download MasonC2.py
python MasonC2.py

Usage Guide

Server Mode (Control Center)

  1. Start the Control Server

    Select: 1
    Port (default: 4444): [Enter port or press Enter for default]
    
  2. Available Server Commands

    • help - Display all available commands
    • list all - Show all connected clients
    • list windows - Show only Windows clients
    • list linux - Show only Linux clients
    • list 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 clients
    • broadcast windows <command> - Send command to all Windows clients
    • broadcast linux <command> - Send command to all Linux clients
    • broadcast all <command> - Send command to all connected clients
    • kick - Disconnect specific or all clients
    • clean devices - Remove old device entries
    • clear - Clear the terminal
    • exit - Stop the server

Client Builder

  1. Generate Client

    Select: 2
    
  2. Connection Method

    • Option 1: Manual host/port configuration
    • Option 2: URL-based configuration (client fetches config from URL)
  3. Persistence Options

    • Without persistence: Standard client
    • With persistence: Client adds itself to system startup
  4. Output Format

    • Python script (.py): Cross-platform, requires Python
    • Executable (.exe): Windows-only, no Python required

Client Execution

Windows Systems

# Python version
python MasonClient.py

# Executable version
MasonClient.exe

Linux Systems

# Python version (requires Python 3)
python3 MasonClient.py

# Make executable and run
chmod +x MasonClient.py
./MasonClient.py

Command Examples

Basic Client Control

[@Server]~>> list all
[@Server]~>> select 1
[DEV-ABC123] >> dir
[DEV-ABC123] >> cd C:\Users
[DEV-ABC123] >> ipconfig
[DEV-ABC123] >> back

File Execution

[@Server]~>> run disk
[Select option: 1 for Linux, 2 for Windows, 3 for specific client]
[Enter path to executable file]

Broadcast Operations

[@Server]~>> broadcast windows whoami
[@Server]~>> broadcast linux uname -a
[@Server]~>> broadcast all echo "MasonGroup Active"

Persistence Mechanisms

Windows

  • Task Scheduler entry (runs every minute)
  • AppData folder copy
  • Hidden execution without console

Linux

  • Systemd service installation
  • Crontab entry (@reboot)
  • .bashrc/.profile modification
  • Autostart directory entry
  • RC.local integration

Device Tracking

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

Security Notes

  • The tool includes IP filtering capabilities (whitelist/blacklist)
  • Connection limiting per IP address
  • Anti-flood protection
  • Single-instance locking on client side

Building Executables

For Windows deployment, use the builder's executable option which utilizes PyInstaller to create standalone .exe files with no console window for stealth operation

Troubleshooting

  1. Connection Issues

    • Ensure firewall allows the selected port
    • Verify the client has network access to the server
  2. Client Not Starting

    • Check Python installation on target
    • Verify no other instances are running (single-instance lock)
  3. Commands Not Executing

    • Check client operating system compatibility
    • Verify proper permissions on target system

Development

Mason C2 is actively maintained by the MasonTeam. The architecture supports modular expansion and additional features can be integrated through the existing command structure

Legal Disclaimer

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

About

Remote control tool for controlling Linux and Windows systems

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages