Mugen無限 Mugen
/

Teamserver configuration using the Yaotl profile format.

Mugen uses profile files written in Yaotl (a dialect of HCL) to configure the teamserver, operators, listeners, and agent behavior.

./mugen server --profile myops.yaotl
bash

Full example

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"
    }
    operator "bob" {
        Password = "changeme2"
    }
}
 
Listeners {
    Http {
        Name         = "http-main"
        Hosts        = ["192.168.1.10:80"]
        HostBind     = "0.0.0.0"
        PortBind     = "80"
        PortConn     = "80"
        Secure       = false
        UserAgent    = "Mozilla/5.0 (Windows NT 10.0; Win64; x64)"
        Uris         = ["/updates", "/cdn/static", "/api/v1/ping"]
        Headers      = ["X-Forwarded-For: 1.2.3.4", "Cache-Control: no-cache"]
    }
}
 
Demon {
    Sleep   = 5
    Jitter  = 20
 
    TrustXForwardedFor = false
 
    Injection {
        Spawn64 = "C:\\Windows\\System32\\notepad.exe"
        Spawn86 = "C:\\Windows\\SysWOW64\\notepad.exe"
    }
}
 
Service {
    Endpoint = "service-ws"
    Password = "service-password"
}
 
WebHook {
    Discord {
        Url = "https://discord.com/api/webhooks/..."
    }
}
hcl

Blocks

Teamserver

FieldTypeDescription
HoststringBind address for the client WebSocket
PortintPort for client connections
Build.Compiler64stringPath to 64-bit MinGW (data/x86_64-w64-mingw32-cross/... after make, or /usr/bin/x86_64-w64-mingw32-gcc)
Build.Compiler86stringPath to 32-bit MinGW (data/i686-w64-mingw32-cross/... after make, or /usr/bin/i686-w64-mingw32-gcc)
Build.NasmstringPath to nasm assembler

The default profiles/mugen.yaotl uses the compilers in data/. Those are not reinstalled by make rebuild. See Installation if you wiped data/.

Operators

Each operator gets a named block with a Password field.

Operators {
    operator "username" {
        Password = "password"
    }
}
hcl

Listeners

Listeners defined in the profile are started automatically on server boot.

HTTP/HTTPS fields:

FieldTypeDescription
NamestringListener identifier
HostslistHost rotation list ("host:port" format)
HostBindstringInterface to bind on
PortBindstringListening port
PortConnstringPort agents connect to (if different from bind)
SecureboolEnable TLS (HTTPS)
UserAgentstringAgent User-Agent (Tengu: embedded in payload; Demon: used as filter)
UrislistURI list (Tengu: agent rotates through them per beacon; Demon: used as filter)
HeaderslistTengu only: HTTP request headers embedded in payload and sent on every check-in
Response.HeaderslistExtra headers added to server HTTP responses
CertstringPath to TLS certificate (HTTPS only)
KeystringPath to TLS private key (HTTPS only)

DNS fields:

Listeners {
    Dns {
        Name     = "dns-main"
        Domains  = ["c2.example.com"]
        HostBind = "0.0.0.0"
        PortBind = "53"
    }
}
hcl

DoH fields:

Listeners {
    Doh {
        Name     = "doh-main"
        Domains  = ["c2.example.com"]
        HostBind = "0.0.0.0"
        PortBind = "443"
        Cert     = "/path/to/cert.pem"
        Key      = "/path/to/key.pem"
    }
}
hcl

TCP fields:

Listeners {
    Tcp {
        Name     = "tcp-pivot"
        HostBind = "0.0.0.0"
        PortBind = "4444"
    }
}
hcl

Tengu HTTP payload fields

Three listener fields are embedded in the Tengu binary at build time and control how the agent behaves at runtime. Rebuild the payload after changing them.

FieldEffect
UserAgentOverrides the default Mozilla/5.0 string sent on every request
UrisAgent cycles through the list per beacon (round-robin). Falls back to / if empty
HeadersEach string is appended as an HTTP request header on every check-in. Format: "Name: Value"

:::note Headers on a Tengu listener are request headers sent by the agent. For Demon, the same field controls server response headers - the semantics differ between agent types. :::

Demon

FieldTypeDescription
SleepintDefault sleep in seconds
JitterintSleep jitter percentage
TrustXForwardedForboolLog X-Forwarded-For as agent IP
Injection.Spawn64stringDefault 64-bit spawn-to process
Injection.Spawn86stringDefault 32-bit spawn-to process

Service

Enables the Service API WebSocket endpoint for external agents and ExternalC2.

FieldTypeDescription
EndpointstringURL path (e.g. "service-ws" -> /service-ws)
PasswordstringAuthentication password

WebHook

Posts agent check-in metadata to a Discord webhook. The block name is WebHook (capital H) - the parser is case-sensitive.

WebHook {
    Discord {
        Url       = "https://discord.com/api/webhooks/ID/TOKEN"
        AvatarUrl = "https://..."   # optional
        User      = "Mugen"         # optional - bot display name
    }
}
hcl
FieldRequiredDescription
UrlyesFull Discord webhook URL
AvatarUrlnoBot avatar image URL
UsernoBot display name