Metasploit is a penetration testing framework that helps you find and exploit vulnerabilities.
Metasploit是一个渗透测试框架,可以帮助您发现和利用漏洞。
The Metasploit Framework is one of the most useful testing tools available to security professionals. Using Metasploit, you can access disclosed exploits for a wide variety of applications and operating systems. You can automatically scan, test, and exploit systems using code that other hackers have written.
Otherwise, you can download the installer for your platform here.
否则,您可以在此处下载适合您平台的安装程序。
让我们开始吧 (Let’s Get Started)
After you’ve installed Metasploit, the first thing that you will want to do is to launch the platform. You can launch Metasploit by running this command in your terminal:
You will see your terminal prompt changed to msf >.
您将看到终端提示符更改为msf > 。
msf >
复制代码
First, you can run help to see the help menu. This will show you the list of commands available.
首先,您可以运行help以查看帮助菜单。 这将显示可用命令列表。
msf > help
复制代码
You can also run search to look for modules if you already have an idea of what you want to do. For example, this command will search for exploits and scripts related to MySQL.
You can also run help search to display the filters that can be used with search. For example, you can search by the CVE year, platform name, or module type.
The info command displays additional information about a module. The command will show you information about a particular module, including its author, description, intended targets, options for exploitation, and reference links.
The command will display the variables that you can customize and the payloads options that you can choose.
该命令将显示您可以自定义的变量以及可以选择的有效负载选项。
You can configure framework options and parameters for the module using set. For example, to set the target host for exploitation, you can run:
您可以使用set配置模块的框架选项和参数。 例如,要将目标主机设置为可利用,可以运行:
msf exploit(linux/http/librenms_collectd_cmd_inject) > set RHOSTS 172.16.194.134
复制代码
You will need to set all the required variables before you can run the exploit. For this particular module, you have to provide the PASSWORD, RHOSTS, RPORT, TARGETURI, and USERNAME.
In Metasploit, LHOST, RHOST and SRVHOST are some of the most commonly used variable names. LHOST refers to the IP of your machine, which is usually used to create a reverse connection to your machine after the attack succeeds. RHOST refers to the IP address of the target host. And SRVHOST is where the module will connect to download additional payload elements.
Today, we covered the basic usage of Metasploit. Metasploit is a feature-rich framework and has a lot more to explore. But by learning how to configure and run an exploit, you now have the basic skills to start utilizing this powerful tool!