Skip to content
This repository was archived by the owner on Nov 16, 2025. It is now read-only.

added the "set_bytes" tool to /handlers/set#4

Merged
DaCodeChick merged 1 commit intoDaCodeChick:mainfrom
Jegghins:main
Jul 31, 2025
Merged

added the "set_bytes" tool to /handlers/set#4
DaCodeChick merged 1 commit intoDaCodeChick:mainfrom
Jegghins:main

Conversation

@Jegghins
Copy link
Contributor

Add "set_bytes" endpoint

This commit introduce new endpoint to the GhidraMCP plugin that enable writing raw bytes directly to the program memory.


New features:

  • /set_bytes: Write a sequence of bytes (hexadecimal, space-separated) to a given memory address.

Technical Details:

  • set_bytes:
    • Parameters: address (hex string), bytes_hex (space-separated hex)
    • Returns: Success/error status

Example of use case:

Context:

I used the endpoint to alter specific byte sequences in an old game.

Patching memory with /set_bytes

Used the set_bytes endpoint to overwrite a specific instruction at address 0x0804d384, replacing a CALL to the rob_new function with 5 NOP instructions (0x90). This effectively disables enemy spawning in the game. Verified the change by reading back the bytes.

image

Security Considerations:

  • These endpoints modify program memory directly
  • Intended for reverse engineering and analysis purposes
  • Use with caution on production systems

@DaCodeChick
Copy link
Owner

Oh wow! I'll merge this later today. Great job!

@DaCodeChick DaCodeChick merged commit 05ab49d into DaCodeChick:main Jul 31, 2025
1 check passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants