Hacker News new | past | comments | ask | show | jobs | submit login
Wcc: The Witchcraft Compiler Collection (github.com)
153 points by api on Apr 4, 2018 | hide | past | web | favorite | 14 comments



I had to scroll way too far before encountering some basic description of wtf this is. "binary black magic" is cute and entirely unhelpful.

It appears to be: 'The primary use of wcc is to "unlink" (undo the work of a linker) ELF binaries, either executables or shared libraries, back into relocatable shared objects.'


That's the purpose of the titular program, but the package as a whole includes a lot of other utilities.


I clicked the link thinking/hoping it'd be a funny joke project of some kind... turns out it was way cooler.


Holy moly! This is incredibly cool, novel and useful for hacking around binaries and such.

edit: Previous discussion on this: https://news.ycombinator.com/item?id=12281803


Does anyone have real world use cases for this? The ls example ends too early but I think I know what they're getting at.

wsh looks amazing for dynamic analysis though.


Say you have an interactive graphics application but it uses a drm library called SmokeLib, you could unlink it, provide an alternative and regenerate the executable.


Or link the app to a (Lua?) script which drives the menus for you for repetitive work.

Not unlike the image processing work my daughter is doing for a bio research lab she is interning at. Fortunately, the image processing tool they are using has a built in “macro” scripting language. But my girl was the only student who knew how to use it :-)


this is so incredibly badass


I saw Jonathan‘s presentation about WCC at BlackHat in 2016 and it was a lot of fun. It also helped me to understand the power and limits of WCC‘s approach, which wasn‘t clear to me from reading the documentation back then.

There seems to be no video of the BlackHat talk freely available but I found this version [1] from DEF CON.

[1] https://m.youtube.com/watch?v=3DUflmm7O8Y


So it lets you use anything as a library? Am I reading that right?


Yes, and you can also de-link a binary into an object (.o) file and then re-link it into another binary.


Hmm. Can Bob use it on the Laundry, though?

Ob. Charles Stross reference :-)

Seriously, though, this sounds like a really interesting hack for reusing stuff that wasn’t intended to be reused. Cool.


I can see this being very useful for patching binaries, I'm curious how well it works in practice.


If it's a compiler collection, what languages does it compile? And, more importantly, does it finally contain the SufficientlySmartCompiler®? With a title like that it would be really disappointing if it didn't.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: