williballenthin / lancelot

intel x86(-64) code analysis library that reconstructs control flow
Apache License 2.0
100 stars 12 forks source link

build error: emulator/hooks.go:109: not enough arguments in call to emu.u.HookAdd #28

Closed mewmew closed 5 years ago

mewmew commented 7 years ago

Hi Willi,

From a glance, your binary analysis project looks very interesting, and I'd like to take it out for a spin to see that stage its at and where it may go!

When trying to build it however, I got the following build error.

rev: f70f98f992f6f2a2504826a197b7f478951423d1

rev: unicorn-engine/unicorn@744c34261f699a3b04230c7404490602211aeb86

u@x220 ~> go get -u github.com/williballenthin/Lancelot/...
# github.com/williballenthin/Lancelot/emulator
goget/src/github.com/williballenthin/Lancelot/emulator/hooks.go:109: not enough arguments in call to emu.u.HookAdd
    have (number, func(unicorn.Unicorn, int, uint64, int, int64))
    want (int, interface {}, uint64, uint64, ...int)
goget/src/github.com/williballenthin/Lancelot/emulator/hooks.go:130: not enough arguments in call to emu.u.HookAdd
    have (number, func(unicorn.Unicorn, int, uint64, int, int64))
    want (int, interface {}, uint64, uint64, ...int)
goget/src/github.com/williballenthin/Lancelot/emulator/hooks.go:154: not enough arguments in call to emu.u.HookAdd
    have (number, func(unicorn.Unicorn, int, uint64, int, int64) bool)
    want (int, interface {}, uint64, uint64, ...int)
goget/src/github.com/williballenthin/Lancelot/emulator/hooks.go:175: not enough arguments in call to emu.u.HookAdd
    have (number, func(unicorn.Unicorn, uint64, uint32))
    want (int, interface {}, uint64, uint64, ...int)
# github.com/williballenthin/Lancelot/app/emudbg
goget/src/github.com/williballenthin/Lancelot/app/emudbg/emudbg.go:93: undefined: workspace.Emulator
goget/src/github.com/williballenthin/Lancelot/app/emudbg/emudbg.go:127: undefined: workspace.Emulator
goget/src/github.com/williballenthin/Lancelot/app/emudbg/emudbg.go:128: undefined: workspace.Snapshot

Cheers /u

williballenthin commented 7 years ago

hey @mewmew

I'm surprised you found this project, but I can see from your repo history that you've also been exploring similar ideas. This project was me 1) learning Go better, and 2) messing around with the appropriate organization for a binary analysis framework. Unfortunately, I haven't really touched it in a year or so, and the unicorn bindings have probably fallen out of date.

You may be able to get it to compile by using a rev of unicorn from last January, perhaps https://github.com/unicorn-engine/unicorn/commit/2341f5dd1aab8a0cdd20128b47535f07f16f613a for example. I don't think it would be hard to update to the latest bindings, since unicorn hasn't changed too much. However, realistically, I'm unlikely to pick this project up again soon, so I'd recommend that you take a stab rather than waiting for a fix. Sorry :-(

Happy to continue to discuss the design and ideas of this project, or even the analysis/decompilation projects you've got going on!

mewmew commented 7 years ago

Hej Willi,

I'm surprised you found this project, but I can see from your repo history that you've also been exploring similar ideas. This project was me 1) learning Go better, and 2) messing around with the appropriate organization for a binary analysis framework. Unfortunately, I haven't really touched it in a year or so, and the unicorn bindings have probably fallen out of date.

Yes, we seem to have been playing with similar ideas :)

Happy to continue to discuss the design and ideas of this project, or even the analysis/decompilation projects you've got going on!

What did you learn from working on this project, and are you playing with any other binary analysis projects atm? I'd be curious to learn about your initial intentions for the project. What were you aiming for? A full blown decompiler and binary analysis framework? What were the main issues that you faced?

If you were to take up a similar project in the future, what would the main idea be that you learnt from working on this project?

I'd of course be very happy to discuss anything related to binary analysis and decompilation, and would be curious to bounce ideas with one another, on what problems needs to be solved to reach a somewhat mature level of decompilation.

Cheers /u

mewmew commented 7 years ago

@williballenthin I opened up a chat room on Gitter if you'd like to join : )

https://gitter.im/decomp/decomp

mewmew commented 5 years ago

Hi Willi,

How is life and what projects are you currently playing on? I've been messing around with LLVM IR and control flow analysis, among others. Would be fun to chat at some point and bounce ideas, if you'd be interested.

Wish you all the best and a happy winter holidays! :)

Robin

williballenthin commented 5 years ago

Happy holidays @mewmew nice to hear from you again!

Would be fun to chat and bounce ideas around, so I'm definitely interested. Lets sync via email for this.

Lots of various projects flying around my brain right now. This project has transitioned from me do binary analysis in Go, to me learning Rust via binary analysis. Long term, I'm hoping to emit wasm modules for the analysis engine so we can move tools into the browser (begrudgingly). Will support function/capability matching on a large scale, too.