Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dll Compilation Error #35

Closed
pasoles opened this issue Dec 8, 2018 · 4 comments
Closed

Dll Compilation Error #35

pasoles opened this issue Dec 8, 2018 · 4 comments

Comments

@pasoles
Copy link

pasoles commented Dec 8, 2018

I think that its not an issue of Merlin but an issue of gcc.
When I try to compile (gcc -shared -pthread -o merlin.dll merlin.c main.a -lwinmm -lntdll -lws2_32) both in windows and kali I get an error exit status and many undefined references.
image
Which version of gcc do you use? Have you done any special modifications?
Thanks

@Ne0nd0g
Copy link
Owner

Ne0nd0g commented Dec 8, 2018

Try adding these command line options

gcc -shared -pthread -o merlin.dll merlin.c main.a -lwinmm -lntdll -lws2_32

You can also try make agent-dll

More details are here https://github.com/Ne0nd0g/merlin/wiki/DLL-Agent

@pasoles
Copy link
Author

pasoles commented Dec 9, 2018

I repeated all the process again in windows and worked like a charm.
In linux I still get the aforementioned error message. Maybe its something about charcacters encoding, spaces etc.
Anyway thanks for your fast response

@Ne0nd0g
Copy link
Owner

Ne0nd0g commented Dec 10, 2018

Does make agent-dll generate the same errors?
Are you using MinGW-w64 for the compiler?

@pasoles
Copy link
Author

pasoles commented Dec 10, 2018

Yes I was getting the same errors.
I figured out what was going wrong. The compiler couldn't find the libraries(libntdll etc) so I had to specify the path:

x86_64-w64-mingw32-gcc -shared -pthread -o merlin.dll merlin.c main.a -lwinmm -lntdll -lws2_32 -L /usr/x86_64-w64-mingw32/lib/

@pasoles pasoles closed this as completed Dec 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants