Edit DLL variable having G9, RID, token & everything without compiling libraries – Digitalmunition




Home Forums Edit DLL variable having G9, RID, token & everything without compiling libraries

This topic contains 1 reply, has 2 voices, and was last updated by  TrustmeImaConsultant 2 weeks, 4 days ago.

  • Author
    Posts
  • #313679

    anonymous
    Participant

    I have a DLL open with dnSpy, I can see all the methods and variables without problem, and I just want to change the value of one of them. I cannot, since I don’t have the libraries to compile it.

    I have all this information about the code I want to change: Token, RID, RVA, File Offset. Is there another editor I can use just to change that line? Or some raw editor to find the address? Thanks in advance

  • #313680

    TrustmeImaConsultant

    If you know enough assembler and have a decent disassembler at hand, you could take a look at the disassembly, find the code in the file (look for the relocation table in the PE header, then calculate from there) and patch the values you want into the file.

  • #313681

    Tompazi

    Yes, you should be able to edit it with dnSpy and save it without having to compile it. Make sure you use the exactly the same number of bytes in your patch as before. However this might still fail, because dnSpy might change some other stuff while saving. In this case, make your changes in dnSpy, go to the hex view copy the relevant bytes and note down the exact offset in the file and the use a hex editor (e.g. HxD) to directly overwrite the target bytes.

You must be logged in to reply to this topic.