Skip to content

zeishr/strafthack

Repository files navigation

strafthack

Description

strafthack is a managed Unity mod for STRAFTAT, built for private sessions, local testing, and security research on the game's peer-to-peer networking model.

The project builds a .NET Framework 4.8 assembly named Strafthack.dll. It is meant to be injected into the running game process with a Mono injector, then controlled in-game through an IMGUI menu.

Default runtime controls:

  • Open or close the menu with Right Control.
  • Inject through Strafthack.Loader.Init.
  • Eject through Strafthack.Loader.Unload.

Use this only in sessions you own, control, or have explicit permission to test. Do not use it to ruin public matches.

Showcase

Menu screenshots:

Strafthack menu showcase 01 Strafthack menu showcase 02
Strafthack menu showcase 03

In-game screenshots:

Strafthack game showcase 01 Strafthack game showcase 02
Strafthack game showcase 03 Strafthack game showcase 04

Features by categories

Aimbot

  • Legitbot and ragebot modes.
  • Target selection with FOV, visibility, wallbang, distance, ally filtering, and hit group control.
  • Hit preference for body, head, or body-if-lethal targeting.
  • Legit smoothing with static or dynamic behavior.
  • Auto fire with hit chance, delay, and reaction-time tuning.
  • Trigger bot with dedicated FOV.
  • Auto scope and silent aim.
  • Projectile prediction with ping, gravity, velocity smoothing, and projectile-speed compensation.

Player

  • God mode.
  • No clip and fly mode.
  • Speed, air speed, jump, wall jump, and gravity overrides.
  • Infinite slide.
  • Bunny hop.
  • Anti-aim modes: static, jitter, spin, teleport, and legit strafe.
  • Anti-aim tuning for pitch, yaw, roll, jitter, spin, teleport, and legit strafe behavior.
  • Real and sent anti-aim visualization.

Players

  • 2D and 3D player ESP.
  • Names, visibility indicators, health bars, and tracers.
  • Look traces and movement prediction traces.
  • Weapon, ammo, reserve ammo, and kill count display.
  • Per-feature team filtering for enemies, allies, or both.
  • Anchor and offset controls for ESP layout.

Chams

  • Player chams with optional X-ray rendering.
  • Team filtering for enemy-only, ally-only, or both.

Loadouts

  • Loadout profile list.
  • Loadout editor.
  • Right-hand and left-hand loadout slots.
  • Weapon search and selection.
  • Save, update, and apply custom loadouts in-game.

Cosmetics

  • Skin, hat, and smoke selection.
  • In-game cosmetic apply flow with respawn fallback.
  • Unlocked-only filtering.
  • Random cosmetic swapper for skins, hats, and smoke.
  • Avoid-repeat randomization.
  • Cosmetic sync/status display.

Visuals

  • FOV circle.
  • Projectile prediction path with bounce support.
  • Shot tracker for local shots, enemy shots, or all shots.
  • Hitscan and projectile trace support.
  • Damage numbers with icons, headshot/lethal handling, and health-aware scaling.

View

  • No camera shake.
  • Third person with distance and angle control.
  • Viewmodel controls for visibility, arms, FOV, and offsets.
  • Dynamic FOV for run and slide states.
  • Bullet trail and muzzle flash controls.

World

  • Environment overrides for fog, skybox, fullbright, and textures.
  • Interaction range and force controls.
  • Weapon ESP with names, boxes, outlines, X-ray outlines, and distance.
  • Mine ESP with names, boxes, outlines, X-ray outlines, distance, type, state, and radius.
  • Wall visualization and wall opacity tools.
  • Hitbox visualization with optional X-ray.
  • Player ghost trail.
  • Future ghost prediction with ping, gravity, steering, and ground-follow options.

Text

  • Menu font configuration.
  • Header font configuration.
  • ESP font configuration.
  • Font family, size, bold, shadow, and outline controls.

Weapons

  • Rapid fire.
  • Bullets per shot.
  • One-press shooting.
  • No recoil.
  • No spread.
  • Infinite ammo.
  • Custom damage with instant or slider-based modes.
  • Custom melee propulsion and repulse force modifiers.

Host

  • Entity spawning from the game's entity catalog.
  • Entity search for host tools.
  • Orbital shield with count, distance, rotation, height, and face-center controls.
  • Entity rain with rate, radius, height, and active-count controls.
  • Entity trail with interval, length, and height controls.
  • Entity burst with count, radius, impulse, upward bias, and auto-despawn.
  • Entity gun with velocity, spread, shot count, auto fire, fire rate, spawn offset, and auto-despawn.
  • Target orbit with target player, count, distance, rotation, height, and face-center controls.

Session

  • Session state tools.
  • Kick and ban related test controls.
  • Auto rejoin and lobby-ban metadata test options.
  • Round amount configuration.
  • Winning team selection.
  • Map selection.
  • Session launch controls.
  • Rematch controls.

Config

  • Menu movement-blocking option.
  • Profile list.
  • New profile creation.
  • Config save/load workflow through the in-game menu.

Docs

Build

Requirements:

  • Windows.
  • .NET SDK capable of building net48 projects.
  • NuGet access for Lib.Harmony 2.4.2.
  • just, if you want to use the provided setup/build tasks.
  • A local STRAFTAT installation.
  • paths.props pointing at the root of the game install.

Create paths.props from the example:

<Project>
  <PropertyGroup>
    <StraftatPath>C:\Program Files (x86)\Steam\steamapps\common\STRAFTAT</StraftatPath>
  </PropertyGroup>
</Project>

Install or restore the Harmony dependency through NuGet:

dotnet add Strafthack.csproj package Lib.Harmony --version 2.4.2
dotnet restore Strafthack.csproj

The project already references Lib.Harmony 2.4.2; the dotnet add command is only needed if the package reference is missing or you are recreating the project file. A normal restore/build is enough after cloning.

Build the assembly directly with dotnet:

dotnet build Strafthack.csproj -c Release

Or build through just:

just build config=Release

The output assembly is expected at:

bin\Release\net48\Strafthack.dll

If the build cannot find game assemblies, verify that StraftatPath points to the folder that contains STRAFTAT_Data\Managed.

One-time runtime setup:

just build
just install-deps
just setup-fonts

just install-deps copies bin\Debug\net48\0Harmony.dll into STRAFTAT_Data\Managed. This is needed because the injected assembly uses Harmony patches at runtime.

just setup-fonts downloads Font Awesome 6 Solid into STRAFTAT_Data\Managed\Fonts\fa-solid-900.ttf. This is needed for the menu icons.

Useful maintenance tasks:

just
just format
just clean

How does it work

The mod is a managed Unity assembly. It does not replace game files on disk.

Runtime flow:

  1. A Mono injector loads Strafthack.dll into the running STRAFTAT process.
  2. The injector calls Strafthack.Loader.Init.
  3. Loader.Init creates a persistent Unity GameObject and attaches Strafthack.Engine.
  4. Engine.Start initializes logging and the game reflection bridge.
  5. Engine.Update handles the Right Control menu toggle and runs Runner.Tick.
  6. Engine.LateUpdate runs late feature updates through Runner.LateTick.
  7. Engine.OnGUI draws ESP, overlays, and the menu.
  8. Loader.Unload destroys the engine object.
  9. Engine.OnDestroy disposes patches, world resources, UI resources, and logging.

Most game integration is isolated behind wrappers under Strafthack/Game. Features live under Strafthack/Features, UI code lives under Strafthack/UI, and Harmony patches live under Strafthack/Patches.

Recommended use with mono-injector

Recommended injector: https://github.com/theo-abel/mono-injector

First, build this project and run the one-time runtime setup:

just build
just install-deps
just setup-fonts
just build

install-deps only needs to be run again when Harmony changes. setup-fonts only downloads the font if it is missing.

List Unity or Mono processes to confirm the exact process name:

mono-injector list --unity --modules

Inject manually:

mono-injector inject `
  --process STRAFTAT.exe `
  --assembly C:\path\to\strafthack\bin\Release\net48\Strafthack.dll `
  --namespace Strafthack `
  --class Loader `
  --method Init `
  --eject-method Unload `
  --wait `
  --wait-module UnityPlayer.dll `
  --settle-ms 3000ms

Eject using the remembered injection record:

mono-injector eject --process STRAFTAT.exe --latest

Recommended profile:

[profiles.strafthack]
process = "STRAFTAT.exe"
assembly = "C:\\path\\to\\strafthack\\bin\\Release\\net48\\Strafthack.dll"
namespace = "Strafthack"
class = "Loader"
inject_method = "Init"
eject_method = "Unload"
wait_module = "UnityPlayer.dll"
settle_ms = 3000

Use the profile:

mono-injector inject strafthack --wait
mono-injector eject strafthack --latest

If injection fails, run a dry-run first and verify the process, assembly path, namespace, class, and method names:

mono-injector inject strafthack --dry-run

License

This project is released into the public domain under the Unlicense. See LICENSE for the full text.

About

Managed Unity mod for STRAFTAT private-session testing, with ESP, aim tools, movement, visuals, host utilities, and more.

Topics

Resources

License

Stars

Watchers

Forks

Contributors