Friday, November 8, 2013

Compiling de4d0t

There are a few steps you need to do in order to compile de4d0t from source. The tools you will need are:

Start by cloning the repository. Open a Git Bash and input the following commands:

git clone https://bitbucket.org/0xd4d/de4dot.git
cd de4dot/
git submodule init
Don't close git bash. Edit the .git/config file to change the last line

url = git@bitbucket.org:0xd4d/dnlib.git

to
url = https://bitbucket.org/0xd4d/dnlib.git
unless you do have an account in bitbucket and you have configures git to automatically load your public key.
Back to the git bash and post the following:
git submodule update
This should clone dnlib right in the dnlib folder. You can close git bash now.
Open a visual studio command prompt and head to the cloned repository's root folder. Create a signing key using the following commands:
sn -k de4dot.snk
de4dot.public
sn -tp de4dot.public
The last command will output the public key of your newly generated certificate. Copy that and remove the new lines. Open the solution and hit Ctrl + Shift + H to open the Find and Replace dialog. Replace all occurrences of
00240000048000009400000006020000002400005253413100040000010001007b5ffd8f48f1397cd4e21c9e30a5cb36b2c013d6f20688c90e3f0c2d24e6d67cbeea7a6ec3faf9ba081f3d6b6fbe389677adbb8337d3a16187cd13b16a34008a22b89089da41c4a08fd35615c77de0827adcca6d49b08c0ed3e0404a1c44b7d083be614acb1779e4fb275e14427f3687f375d03f3b465c8a6cdeebd1f8c7f4ea
with the new public key you just got.
Make sure you select "Entire Solution" in the Look in field.

At the moment there are only 2 references of this key inside the assembly info of de4dot.cui project but better be safe than sorry.
You should now be able to build de4dot and get the executable inside the Debug folder in the root of the repository.

2 comments:

Julfo said...

Very useful indeed - thank you.

andreas.wolfgang.bauer@gmail.com said...

cool thanks!
are you available as a contractor?
if sp then please email me.