govolution/avet

Mingw Dll error

tugdualnicolas opened this issue · 2 comments

I know its not a script issue. But i cant fix the error.```
write shellcode from sc.txt to defs.h
err:module:import_dll Library libmingwex-0.dll (which is needed by L"C:\MinGW\libexec\gcc\mingw32\6.3.0\cc1.exe") not found
err:module:import_dll Library libisl-15.dll (which is needed by L"C:\MinGW\libexec\gcc\mingw32\6.3.0\cc1.exe") not found
err:module:import_dll Library libmpc-3.dll (which is needed by L"C:\MinGW\libexec\gcc\mingw32\6.3.0\cc1.exe") not found
err:module:import_dll Library libmpfr-4.dll (which is needed by L"C:\MinGW\libexec\gcc\mingw32\6.3.0\cc1.exe") not found
err:module:LdrInitializeThunk Main exe initialization for L"C:\MinGW\libexec\gcc\mingw32\6.3.0\cc1.exe" failed, status c0000135

Not enough information to help. Maybe the compiler is not installed correct?

This worked for me on Kali and may help someone else.

After installing Wine, you need to set the path to DLLs.

After installing Wine, run it once as your ordinary user (just type 'wine'). This creates the Wine local configuration in your $HOME/.wine folder

Then edit the system.reg file locate here

nano /root/.wine/system.reg

Search down for the section marked:

[System\\CurrentControlSet\\Control\\Session Manager\\Environment]

which should contain multiple lines like this:

"ComSpec"=str(2):"C:\\windows\\system32\\cmd.exe"
"NUMBER_OF_PROCESSORS"="1"
"OS"="Windows_NT"
"PATH"=str(2):"C:\\windows\\system32;C:\\windows;C:\\windows\\system32\\wbem"
"PATHEXT"=".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH"
"PROCESSOR_ARCHITECTURE"="x86"

We need to edit the line containing PATH like this (so it contains the location of the dll's

"PATH"="C:\\windows\\system32;C:\\windows;C:\\windows\\system32\\wbem;/root/.wine/drive_c/MinGW/bin/"

Save the file and you should be able to run command line programs using wine without errors about missing DLLs.