Files
CoM-c2itall/templates/havoc-config.yaotl.j2
T
2025-04-24 14:52:50 -04:00

186 lines
6.5 KiB
Django/Jinja

{% set random_hex = lookup('password', '/dev/null chars=hex_lower length=8') %}
Teamserver {
Host = "0.0.0.0"
Port = {{ havoc_teamserver_port | default(40056) }}
Build {
Compiler64 = "/usr/bin/x86_64-w64-mingw32-gcc"
Compiler86 = "/usr/bin/i686-w64-mingw32-gcc"
Nasm = "/usr/bin/nasm"
}
}
Operators {
user "{{ havoc_admin_user | default('admin') }}" {
Password = "{{ havoc_admin_password | default(lookup('password', '/dev/null chars=ascii_letters,digits length=24')) }}"
Secret = "{{ havoc_auth_secret | default(lookup('password', '/dev/null chars=hex_lower length=32')) }}"
}
{% if havoc_operators is defined %}
{% for operator in havoc_operators %}
user "{{ operator.name }}" {
Password = "{{ operator.password }}"
Secret = "{{ operator.secret | default(lookup('password', '/dev/null chars=hex_lower length=32')) }}"
}
{% endfor %}
{% endif %}
}
Listeners {
Http {
Name = "http"
KillDate = "{{ havoc_killdate | default('2030-01-01') }}"
WorkingHours = "{{ havoc_working_hours | default('0:00-23:59') }}"
{% if havoc_hosts is defined %}
Hosts = [
{% for host in havoc_hosts %}
"{{ host }}"{% if not loop.last %},{% endif %}
{% endfor %}
]
{% else %}
Hosts = ["0.0.0.0"]
{% endif %}
HostBind = "0.0.0.0"
HostRotation = "{{ havoc_host_rotation | default('round-robin') }}"
PortBind = {{ havoc_http_port | default(8080) }}
{% if havoc_user_agent is defined %}
UserAgent = "{{ havoc_user_agent }}"
{% else %}
UserAgent = "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:{{ random_hex[1] | int + 90 }}.0) Gecko/20100101 Firefox/{{ random_hex[2] | int + 95 }}.0"
{% endif %}
Headers = [
{% if havoc_http_headers is defined %}
{% for header in havoc_http_headers %}
"{{ header }}"{% if not loop.last %},{% endif %}
{% endfor %}
{% else %}
"Accept: */*",
"Accept-Language: en-US,en;q=0.9",
"X-Requested-With: XMLHttpRequest"
{% endif %}
]
Uris = [
{% if havoc_http_uris is defined %}
{% for uri in havoc_http_uris %}
"{{ uri }}"{% if not loop.last %},{% endif %}
{% endfor %}
{% else %}
"/api/v{{ random_hex[6] | int + 1 }}",
"/dashboard",
"/content/{{ random_hex[1:4] }}",
"/wp-includes/{{ random_hex[1:6] }}.js"
{% endif %}
]
Secure = false
{% if havoc_proxy_enabled | default(false) %}
Proxy {
Host = "{{ havoc_proxy_host }}"
Port = {{ havoc_proxy_port }}
Username = "{{ havoc_proxy_username | default('') }}"
Password = "{{ havoc_proxy_password | default('') }}"
}
{% endif %}
}
Http {
Name = "https"
KillDate = "{{ havoc_killdate | default('2030-01-01') }}"
WorkingHours = "{{ havoc_working_hours | default('0:00-23:59') }}"
{% if havoc_hosts is defined %}
Hosts = [
{% for host in havoc_hosts %}
"{{ host }}"{% if not loop.last %},{% endif %}
{% endfor %}
]
{% else %}
Hosts = ["0.0.0.0"]
{% endif %}
HostBind = "0.0.0.0"
HostRotation = "{{ havoc_host_rotation | default('round-robin') }}"
PortBind = {{ havoc_https_port | default(443) }}
{% if havoc_user_agent is defined %}
UserAgent = "{{ havoc_user_agent }}"
{% else %}
UserAgent = "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:{{ random_hex[1] | int + 90 }}.0) Gecko/20100101 Firefox/{{ random_hex[2] | int + 95 }}.0"
{% endif %}
Headers = [
{% if havoc_https_headers is defined %}
{% for header in havoc_https_headers %}
"{{ header }}"{% if not loop.last %},{% endif %}
{% endfor %}
{% else %}
"Accept: */*",
"Accept-Language: en-US,en;q=0.9",
"X-Requested-With: XMLHttpRequest"
{% endif %}
]
Uris = [
{% if havoc_https_uris is defined %}
{% for uri in havoc_https_uris %}
"{{ uri }}"{% if not loop.last %},{% endif %}
{% endfor %}
{% else %}
"/api/v{{ random_hex[6] | int + 2 }}",
"/content",
"/static/{{ random_hex[2:5] }}",
"/wp-content/plugins/{{ random_hex[1:6] }}"
{% endif %}
]
Secure = true
Cert {
Cert = "{{ havoc_cert_path | default('/root/Tools/havoc/data/certs/havoc.crt') }}"
Key = "{{ havoc_key_path | default('/root/Tools/havoc/data/certs/havoc.key') }}"
}
{% if havoc_proxy_enabled | default(false) %}
Proxy {
Host = "{{ havoc_proxy_host }}"
Port = {{ havoc_proxy_port }}
Username = "{{ havoc_proxy_username | default('') }}"
Password = "{{ havoc_proxy_password | default('') }}"
}
{% endif %}
}
{% if havoc_smb_enabled | default(false) %}
Smb {
Name = "smb"
PipeName = "{{ havoc_smb_pipename | default('havoc-' ~ random_hex[0:6]) }}"
}
{% endif %}
}
Demon {
Sleep = {{ havoc_sleep | default(random_hex[0:2] | int % 5 + 2) }}
Jitter = {{ havoc_jitter | default(random_hex[2:4] | int % 30 + 20) }}
Injection {
{% if havoc_spawn64 is defined %}
Spawn64 = "{{ havoc_spawn64 }}"
{% else %}
Spawn64 = "C:\\Windows\\System32\\dllhost.exe"
{% endif %}
{% if havoc_spawn32 is defined %}
Spawn32 = "{{ havoc_spawn32 }}"
{% else %}
Spawn32 = "C:\\Windows\\SysWOW64\\dllhost.exe"
{% endif %}
}
{% if havoc_evasion_enabled | default(true) %}
Evasion {
StackSpoofing = {{ havoc_stack_spoofing | default(true) | lower }}
SleazeUnhook = {{ havoc_sleaze_unhook | default(true) | lower }}
AmsiEtwPatching = {{ havoc_amsi_etw_patching | default(true) | lower }}
ApiFiltering = {{ havoc_api_filtering | default(true) | lower }}
{% if havoc_syscall_method is defined %}
SyscallMethod = {{ havoc_syscall_method }}
{% else %}
SyscallMethod = {{ random_hex[4] | int % 3 }}
{% endif %}
}
{% endif %}
}