PDA

View Full Version : mingw-w64 on Kali 2



david_frog
2015-11-11, 14:46
Hi everyone I have a problem with the mingw compiler using kali 2 on vmware.
First of all I read lots post on the internet and now I'm very confused. At the beginning I thought that mingw-w64 was not install on kali 2 but then looking at the kali linux package tracker I found out that it should be already installed in the distro (http://pkg.kali.org/pkg/mingw-w64) but cant figure out how it works.
So I have downloaded the windows exe of the mingw compiler from this website
http://sourceforge.net/projects/mingw/files/latest/download?source=files
and tried to open it with wine (tried both 32 and 64) but I always get this error



root@kali:~/Downloads# wine mingw-get-setup.exe
wine: Bad EXE format for Z:\root\Downloads\mingw-get-setup.exe.
root@kali:~/Downloads# wine64 mingw-get-setup.exe
fixme:service:scmdatabase_autostart_services Auto-start service L"MountMgr" failed to start: 2
wine: Bad EXE format for Z:\root\Downloads\mingw-get-setup.exe.


I'm trying to compile Hyperion 1.2 (http://nullsecurity.net/tools/binary.html)but can't work out how to do it.
Can anyone see what I'm doing wrong? Not trying to look for someone who does it for me but I'm clearly on the wrong track now.
thanks for your help

zimmaro
2015-11-11, 19:51
Hi everyone I have a problem with the mingw compiler using kali 2 on vmware.
First of all I read lots post on the internet and now I'm very confused. At the beginning I thought that mingw-w64 was not install on kali 2 but then looking at the kali linux package tracker I found out that it should be already installed in the distro (http://pkg.kali.org/pkg/mingw-w64) but cant figure out how it works.
So I have downloaded the windows exe of the mingw compiler from this website
http://sourceforge.net/projects/mingw/files/latest/download?source=files
and tried to open it with wine (tried both 32 and 64) but I always get this error



root@kali:~/Downloads# wine mingw-get-setup.exe
wine: Bad EXE format for Z:\root\Downloads\mingw-get-setup.exe.
root@kali:~/Downloads# wine64 mingw-get-setup.exe
fixme:service:scmdatabase_autostart_services Auto-start service L"MountMgr" failed to start: 2
wine: Bad EXE format for Z:\root\Downloads\mingw-get-setup.exe.


I'm trying to compile Hyperion 1.2 (http://nullsecurity.net/tools/binary.html)but can't work out how to do it.
Can anyone see what I'm doing wrong? Not trying to look for someone who does it for me but I'm clearly on the wrong track now.
thanks for your help

hi :)
if this can help you:
the command wine setup.xx-exe for me started!(tested only start of wizard)
occurs if in your kali-distro the packages mingw - w64..are installed
if there'isnt ...install it from repository with the command apt- get install -y ............
http://postimg.org/image/dm8neo6a1/
sorry my english! & good-luck

david_frog
2015-11-12, 03:32
thanks for the reply,
I thought mingw was installed as it says on http://pkg.kali.org/pkg/mingw-w64 but checking with the following command realised it wasn't


root@kali:~# dpkg -l mingw
dpkg-query: no packages found matching mingw

tried to install the package but din't work


root@kali:~# apt-get install -y mingw
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package mingw
root@kali:~# apt-get install -y mingw-w64
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package mingw-w64

and can't run the mingw exe file with wine as I get this error


root@kali:~/Downloads# wine mingw-get-setup.exe
wine: Bad EXE format for Z:\root\Downloads\mingw-get-setup.exe.
root@kali:~/Downloads# wine64 mingw-get-setup.exe
fixme:service:scmdatabase_autostart_services Auto-start service L"MountMgr" failed to start: 2
wine: Bad EXE format for Z:\root\Downloads\mingw-get-setup.exe.

the command wine setup.xx-exe doesnt work either
any advice here?

zimmaro
2015-11-12, 17:11
http://postimg.org/image/ab7a81tyv/

david_frog
2015-11-14, 15:23
http://postimg.org/image/ab7a81tyv/

thabks again for your help but i still get this error


root@kali:~# apt-cache search mingw
libconfig9 - parsing/manipulation of structured configuration files
root@kali:~# apt-get install mingw-w64 -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package mingw-w64

could it be a problem related with the repo?

zimmaro
2015-11-14, 17:49
thabks again for your help but i still get this error


root@kali:~# apt-cache search mingw
libconfig9 - parsing/manipulation of structured configuration files
root@kali:~# apt-get install mingw-w64 -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package mingw-w64

could it be a problem related with the repo?
for me ..yes!!! your repo are "broken" or your kali-distro &&connection are currupted
READ official-documentation
look into my-repo:

root@kali:~# leafpad /etc/apt/sources.list

# Regular repositories
deb http://http.kali.org/kali sana main non-free contrib
deb http://security.kali.org/kali-security sana/updates main contrib non-free
# Source repositories
deb-src http://http.kali.org/kali sana main non-free contrib
deb-src http://security.kali.org/kali-security sana/updates main contrib non-free

copy & paste it & save...after type :
apt-get clean && apt-get update && apt-get dist-upgrade

& replace the procedure to install mingw-w64...
good-luck

david_frog
2015-11-15, 19:46
for me ..yes!!! your repo are "broken" or your kali-distro &&connection are currupted
READ official-documentation
look into my-repo:

root@kali:~# leafpad /etc/apt/sources.list

# Regular repositories
deb http://http.kali.org/kali sana main non-free contrib
deb http://security.kali.org/kali-security sana/updates main contrib non-free
# Source repositories
deb-src http://http.kali.org/kali sana main non-free contrib
deb-src http://security.kali.org/kali-security sana/updates main contrib non-free

copy & paste it & save...after type :
apt-get clean && apt-get update && apt-get dist-upgrade

& replace the procedure to install mingw-w64...
good-luck

Thanks very much zimmaro, I have fixed the repo and managed to install mingw correctly following your previous posts and to compile hyperion 1.2.
;)

trebin
2016-02-12, 16:20
How did you get the compiler to work after you installed mingw64? I am working through the same book (I assume) and I was able to get the repository updated, install mingw64 but this command I cannot figure out:

i586-mingw32msvc-c++ Hyperion-1.0/Src/Crypter/*.cpp -o hyperion.exe

I tried using i686 etc based on what I found but cannot get it to work

nitnit21
2016-03-03, 03:28
were you able to install mingw?

Pratyush
2016-03-03, 19:28
Hello Everyone,

I am facing similar issue. I am not able to install mingw. I am following Penetration Testing by Georgia Weidman. The linux wersion is Kali GNU/Linux Rolling /n /l .
I tried the command apt-get install mingw32 and apt-get install mingw64 (I am running 64 bit) but it is giving me the following error messages respectively.

E:Unable to locate package mingw64
E:Unable to locate package mingw32

zimmaro
2016-03-05, 10:38
Hello Everyone,

I am facing similar issue. I am not able to install mingw. I am following Penetration Testing by Georgia Weidman. The linux wersion is Kali GNU/Linux Rolling /n /l .
I tried the command apt-get install mingw32 and apt-get install mingw64 (I am running 64 bit) but it is giving me the following error messages respectively.

E:Unable to locate package mingw64
E:Unable to locate package mingw32

hi :-)
if you want to try this:
http://postimg.org/image/tc7zzize1/full/

nitnit21
2016-03-10, 03:11
hi :-)
if you want to try this:
http://postimg.org/image/tc7zzize1/full/

Spot on. This worked thank you. Before reading this I tried, apt-get dist-upgrade and that did not work.

MoNo
2016-03-10, 21:13
How did you get the compiler to work after you installed mingw64? I am working through the same book (I assume) and I was able to get the repository updated, install mingw64 but this command I cannot figure out:

i586-mingw32msvc-c++ Hyperion-1.0/Src/Crypter/*.cpp -o hyperion.exe

I tried using i686 etc based on what I found but cannot get it to work

Give this a try

Hyperion 1.0:
i686-w64-mingw32-c++ Hyperion-1.0/Src/Crypter/*.cpp -o hyperion.exe
Hyperion 1.2
i686-w64-mingw32-c++ Hyperion-1.2/Src/Crypter/*.cpp -o hyperion.exe

msr400
2016-03-26, 19:24
hi
i try to install the exe file in kali linux but i'm not
my error is
root@kali:/media/root/C69ED4BA9ED4A469/program# wine HSS-2.59-install-p25-274-conduit.exe
wine: Bad EXE format for Z:\media\root\C69ED4BA9ED4A469\program\HSS-2.59-install-p25-274-conduit.exe.

piyush tyagi
2016-04-06, 11:20
Hey, I faced all the same problems as you. But I am unable to fix them. Can you tell me, how did you fix yours?



Thanks very much zimmaro, I have fixed the repo and managed to install mingw correctly following your previous posts and to compile hyperion 1.2.
;)