r/ReverseEngineering • • 3d ago

GitHub - razecrs/windissect: Turns Windows binaries and their PDBs into proven C, C++ and Rust interfaces, with per-build history and diffs.

https://github.com/razecrs/windissect
65 Upvotes

17 comments sorted by

5

u/sumobit 3d ago

So will this contribute to an open source Windows eventually? What's the goal?

1

u/razecrsx 3d ago

Not open source Windows, thats more ReactOS's job. It's a helper for anyone modding Windows (or building an open source one): it generates headers for undocumented PE/COFF binaries. The diff command is my fav since it's per build,The bigger output lives in the ReWindows org.

2

u/GoogleIsYourFrenemy 3d ago

That's cool. Took me way to long to realize it's for RE of Windows itself.

0

u/razecrsx 3d ago

Thanks!!!! works on any pe/coff tbh, but windows dlls are where it shines since microsoft gives u the pdbs for free (or other binaries where u have the pes even without them windissect can still give you something somewhat workable).

2

u/pfak 3d ago

Neat.
Couple questions:

  1. Why does it try to download a pdb if I have one in the cwd (decompile)?
  2. Does this complement or replace Hexrays?

2

u/razecrsx 3d ago

okay first of all thank u for trying it much appreciated (really) now to ur questions

  1. lowk i got my first bug thnx 😭 it only checks its own cache and since i had a cache from the fleet i thought it was using the pdb in my testing dir but it wasnt. imma fix it so it picks up a matching pdb next to the binary or in cwd, for now windissect analyze foo.dll --pdb foo.pdb uses urs directly
  2. it complements. windissect doesnt decompile itself it drives ida as a backend (u can use it via the tui for a quick look) that outputs candidates while the pdb proven parts like types vtables and signatures become headers u can build against thnx again for catching a bug based on my assumption and for trying it :)

2

u/addmoreice 3d ago

OK this looks neat. I've been doing some things and experimenting with some tools which dig into PE's and this is definitely helpful.

2

u/razecrsx 3d ago

thnx!!!!! frl glad its helpful, if u try it and anything breaks or feels missing lmk (theres issue templates now or the discord) also 1.0.1 just dropped with linux support (be warned tho i havent tested it on my linux machine yet)if ur on that

1

u/addmoreice 3d ago edited 3d ago

I'm on linux and I've even got a project I call 'Rine' which is supposed to be a rust replacement for wine using modern processes and should be usable as a more 'library-able' version of wine. This exact tool will be a godsend for what I've been currently doing in a very ad hoc manner.

1

u/mim4k 3d ago

does it work with 3rd party binaries too or just system ones

1

u/razecrsx 3d ago

yep works on 3rd party ones too. without a pdb u still get exports strings disasm and function recovery from unwind/cfg data, and u can drive ida through it for candidates. with a pdb (ur own builds or stuff that ships symbols) u get the full thing like system dlls, just drop it next to the binary or pass --pdb. the fleet manifest schema lets u add ur own binaries too

pdb downloads only go to microsofts symbol server rn, but u just gave me an idea: a resolver where u add ur own symbol servers. adding it to the todo

fun fact the tui literally came from me doing crackmes 😭 needed a quick way to poke at random binaries

1

u/redmctrashface 3d ago

Sounds interesting! Is it entirely AI coded though? Don't get me wrong, I am a reverser and I do have (small) tools which coding workflows were driven by AI... but I know their internals in details and could debug them. So, before digging into this project's code, I'd like to know what I am looking at ;)

1

u/razecrsx 3d ago

hmm good question no its not ai coded but i did tab alot whenever the complete made sense so in a way it is ai coded ? but yh whenever it completed a perfectly looking function i would just tab away

1

u/metaspl00t 1d ago

The Microsoft symbol server use case is what I'd want this for. Diffing ntdll and kernel32 across Windows builds to track export and type changes is a manual, miserable job.

2

u/razecrsx 1d ago

Exactly!!! Especially if you are used to working with undocumented libs, Windissect makes it a very easy job, also check out the ReWindows where i have already sent multiple history/diffs compressed so it is ready to use right away (but its not every single release and might lag behind ). Feel free to drop your historys or diffs in the ReWindows whenever you feel like it thank you for considering Windissect.

1

u/metaspl00t 17h ago

I mostly care about syscall tables, so a little lag is fine since numbering is generally stable across cumulative updates within a given release. Which format do you prefer for the diffs? I'll drop a set in.