Is there anyway to compile Exploit Codes [that must be compiled on Linux] in Windows?
Does anybody have any experience about it?
|
Full Version: How To Compile Linux Codes On Windows
Is there anyway to compile Exploit Codes [that must be compiled on Linux] in Windows?
Does anybody have any experience about it?
cygwin is a linux envirenment that runs under windows. Its a free application and I think somebody made a tutorial here about compiling exploits under cygwin.
it just will work if you install *nix on your windows!
I'd heard about cygwin but where is the link please
Cygwin seems difficult to use and may not have all the Libs [at least that's what l find usually].Like Spyfire said, probably best to put linux on a partition with windows [or use Knoppix which doesn't need to be installed].
If ur a student or something like this 'buy' vmware , it is very nice to set up multiple Operating Systems.
Then it is possible to use Linux in a window(s) =)
may someone pls kick that lazy-bums ass? getting the answer for an even 1000 times answered before question and beeing still too lazy to google a bit... or even use the search-func of this board.. im quite sure that searching for "compile linux exploit" would have done its job
I didn't have the heart before to say this cause i'm a trial member but u r absolute right. And this is not the first totally lame question.
I hope that there will be some changes next time bcause it became boring to read this everyday. btw can someone explain me how they get memberstatus for questions like Where is secure.bat /How to use a sql with sql_error etc ?
Another viable option to script kiddie-ing it up, is to learn how to code. Then you can understand how an exploit works and do something 'magical' called "porting it over".
i think there are three ways
1) cgywin 2)knoppix 3)vmware or vitrual pc
he could use any linux live-cd, like slax, gentoo or knoppix.
you can use cygwin but if you want dont waste lots of hard disk space for installing linux on vmware go and download the project in source forge called KDE on Cygwin thath simulate KDE tools and inviorment on the pre installed version of cygwin
ooo, I didn't know about cygwin compilator. I wil try it...
a few things to mention
flaming isn't allowed lol membership status is in depth by the admins this topic (about it) was put as a sticky in exploit section & as a sticky, you're suppost to read them before asking questions like it, since they're asked alot link- http://www.governmentsecurity.org/forum/in...?showtopic=6976 Knoppix-STD is what i use (CD-bootable)... you can get access to other windows partitions to compile it (over linux).. works nice.
hi
i'm using vmware with knoppix STD running on it. win2000 seems ok to for gaming and oll other things. But for 'security' i prefer pingu by the way, since i'm not allowed to post a new topic, here's a little question.. command : #sudo su u gain root acces with that (maybe u all already knew but what the heck ... can somebody pleas explain how & why ? i already did some searching here, but found nothing or maybe i didn t searched well enough ? tx
How about compiling them in borland C/C++, wont that work?
as far as i know linux are written in C and C++ so a version of a C/C++ Compiler that runs under windows will propably compile linux exploits such as the one you want to compile. (correct me if i'm wrong, don't let me spread wrong ideas)
linux is written is C and ASM, there's no "++" ^^ (i mean in linux, not in 3rd party apps or in some libraries)
you can compil unix code on windows only if the code is a written in pure ANSI C, without using unix library (inet arpa etc...) otherwise, the code will need some tweaks. and yes sudo/su are command to gain root level, its usefull for admins when they need it and dont want to log out and log in as root just for one or two commands. if you're wondering if everybody can do that, of course not, you need the root password do to that, but since there's no root password on knoppix..... (btw knoppix is fun becoz you can always have your linux in your pocket, but people should keep in mind that it's a live cd, for a everyday use, they must install a hd distro ^^)
The Problem is with Header files doesn't Exist on windows versions.
btw, I've download Cygwin and installed it. But I don't know how to begin compileing! Any Help about it please?
Simple way to compile (using a gcc compiler and Cygwin is a windows-variation IIRC) is:
gcc filetobecompiled.c -o compiledfile gcc ---> compiler name filetobecompiled.c ---> the original source code -o ---> send it to output compiledfile ---> what you want to call the binary file when it compiles
I know gcc but,when I type gcc then cygwin (for windows) replies "command not found"
I thought this was a problem 2 when i first downloaded cygwin . but what you acualy have to do is download with the same setup.exe the gcc installers . You see the deffault installed doesn;t contain thouse . You just have to download them .. or directly install from internet .
Best Regards
No.. get cygwin up and running first. Where did you install it to (you have installed it right? it is a fairly large install IIRC)? When it's running, it's like having a bash shell on windows.
I've installed it on Root Drive (C:\cygwin) and I think I did it right !
I've Bash shell But I don't know anything about IIRC ?!
You did not install gcc, it is not installed by default. See this link
http://cplus.about.com/library/weekly/aa031202b.htm
Your can try the following, download the latest version of Dev-cpp, it free!!
it already comes with a gcc compiler as default and it works great. Then open a new project, add the code. link any libraries that you may need and compile. i've never found any problems with it. and its fairly easy to use.
You could get a shell account from somewhere (like rootshell) which runs emacs and get a windows ssh client (like SSH secure shell client) to connect to it in windows and use that to compile and run exploits, but lots of people that provide shells dont like the idea that you are using it to run exploits so watch what you are doing.
Stupid question perhaps but...
If i compile the C code with CYGWIN do i need CYGWIN to run the compiled file? For example, If i want to use it on another WIndows Machine....
This could be considered OT, but in a backwards sort of way it has the effect of creating a windows executable by compiling linux c (or c++) code. I figure someone would be interested.
I have a box running slackware, and I use it to compile programs for use on windows. It is nifty because I can use all the linux only libraries to produce a working win32 exe. Essentially is is a recompiled version of gcc with the mingw32 module included which allows for cross compilation. For more info: hxxp://www.libsdl.org/extras/win32/cross/ QUOTE(forza @ May 7 2004, 01:06 PM) Stupid question perhaps but... If i compile the C code with CYGWIN do i need CYGWIN to run the compiled file? For example, If i want to use it on another WIndows Machine.... You will need cygwin1.dll ( and possibly some other .dll from /bin ) in the same dir or system path to run a cygwin compiled exe. This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
|
||||||