1

I dont have much knowledge with assemblers. I beg ur pardon in advance.

I need to change an IP address in a win-binary (Net) where the IP its hard-coded. Just changing the IP with an Hex Editor would be that easy. But the new IP has longer Octet - e.g.

enter image description here

I want to change the 123.12.12.123 to 123.123.123.123 Just inserting some digits per Hex Editor makes the file corrupt (adresses from routines etc. are moving I guess).

What would be the "easiest" way to do that? Thanks.

4
  • 1
    When you speak about a "win-binary (Net)", are you referring to a .Net (dot net) application ?
    – Guillaume
    Commented Jul 16, 2021 at 11:43
  • I guess so. In Ghidra I can see that "mscoree.dll" is been imported.
    – TefoD
    Commented Jul 16, 2021 at 12:04
  • 1
    You can then use 'dnSpy' to edit the method/class you want to, and recompile your application when you are done
    – Guillaume
    Commented Jul 16, 2021 at 12:17
  • @Guillaume.. Wow, that was a great hint.. dnSpy is a great piece of software with intuitive operation.. I am just amazed, how easy this was possible, Thank you very much. btw: I can't accept a comment as a solution - if you dont mind, just post it as answer; I will accept.
    – TefoD
    Commented Jul 16, 2021 at 14:20

1 Answer 1

2

Since you are dealing with a dot Net application, this will be super easy.

As dot Net application are 'compiled' using an Intermediate Language (IL), you may be able to recover something very close to the original source code. If the binary is not obfuscated/protected, you just have to open-up your application in a .NET editor.

DnSpy is the one that I find the most complete. Other software can be used, like ILSpy for instance.

Theses tools allows you to edit the decompiled code, then to re-compile it.

In your case, you have to find where this IP is being declared, change it to whatever you want, then recompile the binary.

This is not allays that easy, but you are lucky: you found the easier reverse-engineering case :)

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.