agentleFS
HeathHowrenHeathHowren/claude-game-re-plugin/skills/make-a-signature/SKILL.md

make-a-signature

Skill0 starsChanged 48 days agoMITView on GitHub

Make a byte signature (array-of-bytes pattern, AOB) for an instruction so it can be found again after the program is updated or loaded at a new address, then prove it is unique with Pointer Lab's find_pattern, pe-mcp's find_pattern or sigscan. Covers Signature Lab's sigmake in x64dbg and building one by hand from disassembly. Use when the user asks for a signature, AOB, pattern, aobscanmodule line, or wants an address to survive a game update, or is on Pointer Lab tutorial step 8.

The file

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 6 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Check the target against the safety skill first.

    line 14
  2. Distinctive:

    Only one debugger can attach to a process.

    line 23
  3. Distinctive:

    Ask the user to attach x64dbg and run, in its command bar:

    line 31
  4. Distinctive:

    Ask the user to paste the log.

    line 39
  5. Very specific:

    Read the log. The first line ends in unique or a match count.

    line 41
  6. Distinctive:

    Read the instructions from the target address on.

    line 52
  7. Distinctive:

    Write the bytes out and wildcard, per instruction:

    line 58
  8. Distinctive:

    Start with the target instruction and add whole instructions until the pattern is unique and has at least five fixed bytes.

    line 69

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Make a signature

An address is good until the next build. A signature is the instruction's own bytes with everything that moves between builds turned into wildcards, so a scanner finds the same code again. Handbook: Ch. 14 Pattern Scanning, Ch. 15 Debugging with x64dbg. Tutorial: step 8, whose injection template finds its instruction with aobscanmodule(...) rather than an address.

Check the target against the safety skill first. Start from an instruction address, usually from find-what-writes, written as module+offset.

Route A: Signature Lab in x64dbg

Signature Lab is the Handbook's tool for this. It decodes every instruction and wildcards by operand, and checks uniqueness across the whole module.

  1. Only one debugger can attach to a process. If Pointer Lab's access watch or debugger is on, release it first:

    access_watch_stop {}
    debugger_detach {}
  2. Ask the user to attach x64dbg and run, in its command bar:

    sigmake pointerlabtutorial.exe+1670

    x64dbg reads the offset as hex. Use sigxref <address> instead for a reference signature, when the code is not unique or the address is data. Ask the user to paste the log.

  3. Read the log. The first line ends in unique or a match count. wildcards names every masked byte and why. A caution line means the pattern runs past a ret, int3 or jmp into code a rebuild may change. A reference signature has a resolve line: the C++ that turns a match back into the address.

Signature Lab prints five forms. Inside x64dbg use the x64dbg form (??); a single ? there is half a byte, so an IDA pattern finds nothing.

Route B: from Pointer Lab's disassembly

  1. Read the instructions from the target address on.

    disassemble {"address": "PointerLabTutorial.exe+0x1670", "count": 8}
  2. Write the bytes out and wildcard, per instruction:

    OperandExampleWildcard it?
    rel32 call or jmp targetE8 xx xx xx xxYes
    RIP-relative displacement48 8B 05 xx xx xx xxYes
    Absolute address (32-bit code)A1 xx xx xx xxYes
    Opcode, ModRM, SIB48 8B, 89 86No
    Struct or stack offset89 86 xx xx xx xx, [rsp+08]No, unless the struct changes between versions
    rel8 short jump74 xxNo; it only changes when the function does

    Start with the target instruction and add whole instructions until the pattern is unique and has at least five fixed bytes.

Prove it is unique

A signature that matches twice finds the wrong code half the time. Check it live and on disk.

Live, across the module:

modules {"filter": "pointerlabtutorial"}
find_pattern {"start": "pointerlabtutorial.exe", "size": 212992, "pattern": "48 89 5C 24 08 57 48 83 EC 20 48 8B 05 ?? ?? ?? ?? 48 8B D9", "max_results": 64}

size is the module's size from modules. count must be 1.

On disk, with pe-mcp, whose find_pattern reads every form Signature Lab writes:

find_pattern {"pattern": "48 89 5C 24 08 57 48 83 EC 20 48 8B 05 ?? ?? ?? ?? 48 8B D9"}

A real run against the tutorial's executable:

{"pattern":"48 89 5C 24 08 57 48 83 EC 20 48 8B 05 ?? ?? ?? ?? 48 8B D9","total":1,"items":[{"rva":"0x1670","offset":"0xA70","section":".text"}],"next":null}

The same pattern cut to its last ten bytes, 48 8B 05 ?? ?? ?? ?? 48 8B D9, returns "total":6. The prologue in front is what makes it unique.

Or from a terminal, with sigscan:

sigscan --file PointerLabTutorial.exe 48 89 5C 24 08 57 48 83 EC 20 48 8B 05 ?? ?? ?? ?? 48 8B D9
sigscan --pid 5120 --module PointerLabTutorial.exe "48 89 5C 24 08 57 48 83 EC 20 48 8B 05 ? ? ? ? 48 8B D9"

Match sigscan's bitness to the target's for --pid: the 32-bit build reads 32-bit processes.

Hand it over in every form

FormExample
x64dbg48 89 5C 24 08 57 48 83 EC 20 48 8B 05 ?? ?? ?? ?? 48 8B D9
IDA48 89 5C 24 08 57 48 83 EC 20 48 8B 05 ? ? ? ? 48 8B D9
code+mask"\x48\x89\x5C\x24\x08\x57\x48\x83\xEC\x20\x48\x8B\x05\x00\x00\x00\x00\x48\x8B\xD9" "xxxxxxxxxxxxx????xxx"
Pointer Labaobscanmodule(INJECT, pointerlabtutorial.exe, 48 89 5C 24 08 57 48 83 EC 20 48 8B 05 ?? ?? ?? ?? 48 8B D9)

Give the match offset too when the signature does not start at the target instruction: "the write is at match + 0x7".

Success, and dead ends

Success is exactly one match live, exactly one match in the file on disk, at the RVA describe reported, with every moving operand wildcarded.

What happenedWhat it meansNext step
More than one matchThe code is repeated: a small function the compiler duplicated, or an inlined copyAdd instructions, or make a reference signature on a caller (sigxref, or sign the call to this function and resolve its rel32)
1 match live, 0 on diskA byte you kept is relocated or patched at run timeWildcard absolute addresses. Check for hooks with hookscan: hookscan --pid 5120 --module PointerLabTutorial.exe
0 matches live, 1 on diskThe code was changed in memory (a patch you applied, or self-modifying code)patches_list; restore with patch_restore_all and scan again
Unique, but under five fixed bytesIt works today and may match new code tomorrowExtend it, or use a reference signature
find_pattern says it is not a byte patternPointer Lab takes hex with ?/?? wildcards onlyPass the x64dbg or IDA form. pe-mcp and sigscan also read code+mask, C++ arrays and aobscanmodule(...)

Next: put the aobscanmodule(...) line in an auto-assembler script (step 8), or /game-re:report to record it.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.