loadlibrary icon indicating copy to clipboard operation
loadlibrary copied to clipboard

mpclient: function at 0x5a741c8a attempted to call an unknown symbol

Open seoibiubiu opened this issue 2 years ago • 7 comments

Whats causing this error? :-(

seoibiubiu avatar Jul 21 '23 05:07 seoibiubiu

did you find the solution for this? I'm getting the same error

JEglez avatar Dec 15 '23 19:12 JEglez

I'm currently facing the same issue, in my case, it seems that the winapi functions are not being set into the crtexports so they remain unknown when the DLL is executed. Noticed that the constructors for these winapi calls are also not being executed somehow, so crtexports.size is 0. Could we be missing something when compiling or linking? @taviso

Gecko05 avatar Dec 15 '23 19:12 Gecko05

Ok I fixed this by following the solution proposed at the end of this thread: https://stackoverflow.com/questions/48212805/why-is-attribute-constructor-in-my-shared-library-not-working

Somehow, when compiling, the constructors for every winapi component are not being linked and thus never executed. So what I did was just append a dummy function at the end of each .c file in winapi and then calling them all somewhere in pe_linker.c.

Gecko05 avatar Dec 16 '23 16:12 Gecko05

https://github.com/Gecko05/loadlibrary/commit/7225e37c28e887188b8a5c019464c36cbc82ae35 See this commit in my fork to know what I did to compile and run it properly. It's about a bunch of loadSomething methods being called from pe_linker.c

Left some comments on the commit as well.

Gecko05 avatar Apr 01 '24 18:04 Gecko05

@Gecko05 i tried to use your repo, but i got the same error. Can you try make it in a docker container?

OzzyKampha avatar Apr 16 '24 08:04 OzzyKampha

@Gecko05 Your repo is getting the same error ./mpclient eicar.com mpclient: function at 0x5a6aaae8 attempted to call an unknown symbol Trace/breakpoint trap

exiftool mpengine.dll | grep 'Product Version Number' Product Version Number : 1.1.24030.4

What could be the reason??

oh yes, in your repo the file CriticalSection.h is missing in the peloader folder

MrX0r avatar Apr 29 '24 08:04 MrX0r