? How to use PHP, Perl, Python, C exploits ?

Lord777

Professional
Messages
2,577
Reaction score
1,563
Points
113
I will split this in different parts for a better overview.

First of all i will drop all download links...(except the exploits). Then i will post each language..

PHP:

WAMP:

XAMPP:

Perl:

Python:

Microsoft Visual C++:

Borland C++:

Dev-C++:

CygWin:

PHP

Exploit : https://www.exploit-db.com/exploits/2901 - DoS exploit for Filezilla FTP Server 0.9.20 beta

PHP exploit code usually starts with <?php and ends in ?>

First you need to install PHP onto your computer.
WAMP is a free web server that comes with PHP

Next, paste the PHP exploit into notepad and save it as "exploit.php".

On line 13 of this exploit you will see:
Code:
$address = gethostbyname('192.168.1.3');
here you will have to edit in the IP address of the target

Save this edited file into the PHP directory on your server that contains the PHP executable file

In WAMP the directory would be C:\wamp\bin\php\phpx.x.x

Next open up the command prompt or terminal and go to the PHP directory by using the CD (change directory) command followed by the directory location.
Code:
C:\wamp\bin\php\php5.2.5>
php exploit.php
 
Undefined variable:.....on line 18

If you go to line 18 of this exploit , will see the line
Code:
$junk.=”../../../sun-tzu/../../../sun-tzu/../../../sun-tzu”;

remove it,run the exploit again

PERL

Exploit: https://www.exploit-db.com/exploits/6581 DoS exploit for WinFTP Server 2.3.0

Edit the options like the target server and others as needed.
Then save the file as "exploit.pl".

As you can see Pearl exploits begin with "!/usr/bin/perl".

Open CMD or Terminal and change into the directory with the exploit using the CD (change directory command). Then run the exploit by typing:
Code:
"perl exploit.pl".
 
C:\Documents and Settings\User\Desktop\perl exploit.pl

PYTHON

Exploit: https://www.exploit-db.com/exploits/10100 FTPDMIN v. 0.96 LIST Denial of Service(DoS)

As you can see Python exploits begin with As "# usr/bin/python"

Paste the python exploit into notepad or any word processor and save it as "exploit.py" to folder where you installed Python ,C:\Python is by default

Open CMD or Terminal and change into the directory with the exploit using the CD (change directory command). Then run the exploit by typing:
Code:
"exploit.py".
 
C:\Python3\exploit.py

C\C++

C/C++ are the most popular programming languages used in developing exploit code.

Some C/C++ code can be compiled with any compiler and on any operating system.

There are also C/C++ scripts that are made to be compiled by a particular compiler, or in a particular operating system. You can usually find this information commented in the top of the script. Below is a list of the most popular compilers for each operating system.

Windows
• Microsoft Visual C++
• Borland C++
• Dev-C++
Mac
• MrC/MrCpp
• Xcode
Linux
• GCC

Most C/C++ exploit code is made to be compiled in Linux.
If you wish to run one them but you’re only option is Windows, then you can use Cygwin . Cygwin is a Linux-like environment that runs in Windows and acts as a Linux emulation layer, allowing you to run Linux scripts in windows.

Although many linux C/C++ exploit scripts will work with Cygwin, there are also many may not. I will show you how you can use Cygwin right after I give you an example of compiling and running a C/C++ script in Linux

Exploit : https://www.exploit-db.com/exploits/269 -BeroFTPD 1.3.4(1) Linux x86 remote root exploit

Save exploit as exploit.c
run the terminal and compile it:
Code:
#gcc -o whatever exploit.c
To run the exploit, simply type "./whatever".

run this script against a vulnerable box and you will got root acces

If you only have access to a Windows machine, and you come across a C/C++ script that is only meant to be compiled in Linux, then you can use Cygwin to make it possible in Windows

Cygwin

Using the same exploit as the last example, save and move it into the "C:\cygwin" directory as "exploit.c".
First you must change the directory to the home directory (C:\cygwin) by using the command "cd /". Next use the “ls” command to display all the files in the current directory.

You should see exploit.c compile it with gcc -o whatever exploit.c

To run the exploit, simply type "./exploit".
 
Top