📜 ⬆️ ⬇️

Install Metasploit Framework Dev on Windows


Hello! After the release of Metasploit Community, which I didn’t like very much, I wondered how to return the structure of this tool I was used to. And I decided this question for myself by downloading and configuring the dev version. And everything was fine, until recently I did not have to configure the same on Windows. Who is interested in this problem, please under the cat.

In fact, I am writing these lines more for myself, so that when the problem reappears, do not step on the same rake, but if this information is demanded by the community, it will be very good.
Strangely enough, but downloading a metasploit branch will be almost the last stage, and at the beginning of preparation for this.
  1. Install Git for Windows
    Since metasploit has completely moved to git, it’s nowhere without it, so download Git for Windows and install it. The installation is banal, so I will not focus on it.
  2. Install Ruby 1.9.3
    Everyone knows that using metasploit without Ruby is nowhere, so the next step is to install Ruby.
    To do this, download the installer of Ruby 1.9.3 for Windows from here and run it. Installing Ruby shouldn't cause you problems either, but please pay attention to one thing - do not forget to tick off the checkbox “Add Ruby executables to your PATH” in order not to bother with Ruby paths later.

  3. Installing the Development Kit for Ruby and configuring WinPcap
    We also need DevKit for Ruby to work correctly for Metasploit, which can be downloaded from the same link as Ruby itself. After you have downloaded it, copy it to the folder where you want to unpack it (I have it c: \ rubydk) and unpack it. We also need the pcaprub package in the future, and for it you need to download and install the WinPcap and WinPcap Developer's Pack .
    With the installation of WinPcap, I think no one will have any problems. In DevPack, we are interested in two folders - / lib and / include. The contents of the lib folder need to be copied to the lib folder, which is in the folder with Ruby installed, and the contents of the Include folder to the Include / ruby-1.9.1 folder, which is also located in the Ruby folder.
    Well, to complete the DevKit installation, we need to call the command line, go to the folder with DevKit and execute two commands:
    ruby dk.rb init ruby dk.rb install 


    And if no errors are highlighted, then this stage is over
  4. Cloning a Metasploit Framework Branch and Preparing to Run
    Here we come to the Metasploit Framework itself. So for a start we plan it by executing the following command:
     git clone git://github.com/rapid7/metasploit-framework.git c:\git 

    Also, for the Metasploit Framework to work correctly, we need to install the necessary gems and execute msfupdate. To do this, execute the following commands:
     gem install bundler ruby c:\git\metasploit-framework\msfupdate 

    And if everything was successful, then you got the latest working version of Metasploit Framework Dev. Now you can run:
     ruby c:\git\metasploit-framework\msfconsole 

    and start working


And you can additionally put Msfgui like me. To do this, download the archive of its branch from github, copy the file msfgui.exe and the dist folder into the metasploit-framework folder from the archive and run msfgui.


That's all! It turned out such a small and modest instruction. Some parts of which were searched on a variety of forums, but I did not indicate them, because I do not remember, and only the teams were used from them. All requests, errors and omissions please in the comments. Also, if anyone is interested, I can help to do the same on Linux.

')

Source: https://habr.com/ru/post/217017/


All Articles