Mugen無限 Mugen
/

How to build and install Mugen on your system.

Requirements

DependencyVersion
GCC10+
CMake3.19+
Qt55.15+
Python3.10+
Go1.21+
libcurlany recent

Debian / Ubuntu / Kali

sudo apt install -y build-essential cmake qt5-default qtbase5-dev \
  libqt5websockets5-dev python3-dev libssl-dev libcurl4-openssl-dev
bash

Arch Linux

sudo pacman -S base-devel cmake qt5-base qt5-websockets python openssl curl go
bash

Build

git clone https://github.com/MugenFramework/Mugen
cd Mugen
make
bash

This builds the teamserver (./mugen) and the Qt client (./mugen client). make / make ts-build also downloads the musl.cc MinGW toolchains into data/x86_64-w64-mingw32-cross and data/i686-w64-mingw32-cross. The default profile (profiles/mugen.yaotl) points at those binaries.

Rebuild after code changes

make rebuild
bash

Recompiles the teamserver and client. It does not re-download MinGW or recreate data/.

TargetWhat it does
make / make allFirst install: MinGW into data/, then teamserver + client
make rebuildRecompile only
make ts-buildRestore MinGW into data/ and rebuild the teamserver
./teamserver/Install.shRestore MinGW only (safe to run from the repo root)

Resetting loot / the database

data/ holds more than operator loot:

  • data/x86_64-w64-mingw32-cross, data/i686-w64-mingw32-cross — payload compilers
  • data/teamserver.db — listeners, agents, resources, task history
  • data/loot/ — screenshots and downloads
  • data/resources/ — uploaded operator files

Do not rm -rf data/ for a fresh ops database. That removes MinGW and the teamserver exits with Compiler x64 path doesn't exist. Delete only what you want to reset, for example:

rm -rf data/loot data/teamserver.db data/resources
bash

If data/ is already gone, restore the compilers before starting the server:

make ts-build
# or
./teamserver/Install.sh
bash

First Run

1. Start the teamserver

Create a profile file (e.g. ops.yaotl):

Teamserver {
    Host = "0.0.0.0"
    Port = 40056
 
    Build {
        Compiler64 = "/usr/bin/x86_64-w64-mingw32-gcc"
        Compiler86 = "/usr/bin/i686-w64-mingw32-gcc"
        Nasm       = "/usr/bin/nasm"
    }
}
 
Operators {
    operator "alice" {
        Password = "changeme"
    }
}
 
Demon {
    Sleep = 2
    Jitter = 15
}
hcl

Then start the server:

./mugen server --profile ops.yaotl
bash

Or with the bundled profile (expects MinGW under data/):

./mugen server --profile profiles/mugen.yaotl
bash

2. Connect the client

./mugen client
bash

Fill in the connection dialog:

  • Host - teamserver IP
  • Port - as configured (default 40056)
  • User - operator name
  • Password - operator password

Service API (optional)

To allow external Python agents or ExternalC2 connections, add a Service block to your profile:

Service {
    Endpoint = "service-ws"
    Password = "service-password"
}
hcl

External processes connect to ws://<host>:<port>/service-ws.