Skip to content

Instantly share code, notes, and snippets.

@Trass3r
Last active July 21, 2025 13:53
Show Gist options
  • Save Trass3r/0815ecdf0ee4a5592b67aaeb97e576b0 to your computer and use it in GitHub Desktop.
Save Trass3r/0815ecdf0ee4a5592b67aaeb97e576b0 to your computer and use it in GitHub Desktop.
unpacking dgvoodoo

Unpacking an Executable using UPX + Anti-Unpacking Tricks

  1. Restore Section Header Names

    • The section header names had been erased.
    • Rename the relevant sections to UPX0 and UPX1 to match the original UPX convention.
  2. Restore the UPX! Magic

    • The UPX! magic signature was zeroed out.
    • It is normally located 32 bytes before the start of the actual UPX1 section data.
    • Use a hex editor to write UPX! at this location.
  3. Unpack Using UPX

    • With section names and magic restored, you can now unpack the executable using UPX:
      upx -d <filename>
  4. Reconstruct Missing Original First Thunks (OFTs)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment