background image

P O R T I N G   E X P L O I T S   T O   T H E  

M E T A S P L O I T   F R A M E W O R K

You can choose to convert exploits to Metasploit from 
a different format for many reasons, not the least of 
which is to give back to the community and the Frame-
work. Not all exploits are based on the Metasploit Frame-

work; some are programmed in Perl and Python or C 

and C++.

When you port exploits to Metasploit, you convert an existing stand-

alone exploit, such as a Python or Perl script, for use within Metasploit. And, 
of course, after you have imported an exploit into the Framework, you can 
leverage the Framework’s many high-end tools to handle routine tasks, so 
that you can concentrate on what is unique about your particular exploit. In 
addition, although stand-alone exploits often depend on your using a certain 
payload or operating system, once ported to the Framework, payloads can be 
created on the fly and the exploit can be used in multiple scenarios.

This chapter will walk you through the process of porting two stand-alone 

exploits to the Framework. With your knowledge of these basic concepts and 
a bit of hard work on your part, you should be able to begin porting exploits 
into the Framework yourself by the end of this chapter.