{"id":22288,"date":"2022-06-14T00:15:57","date_gmt":"2022-06-14T00:15:57","guid":{"rendered":"https:\/\/www.esecurityplanet.com\/?p=22288"},"modified":"2023-04-10T13:32:22","modified_gmt":"2023-04-10T13:32:22","slug":"metasploit-framework-tutorial","status":"publish","type":"post","link":"https:\/\/www.esecurityplanet.com\/products\/metasploit-framework-tutorial\/","title":{"rendered":"Getting Started With the Metasploit Framework: A Pentesting Tutorial"},"content":{"rendered":"\r\n<p>The Metasploit project contains some of the best security tools available, including the open source Metasploit Framework. Both <a href=\"https:\/\/www.esecurityplanet.com\/networks\/penetration-testing\/\">pen testers<\/a> and hackers use it to find and exploit vulnerabilities as well as to set up reverse shells, develop malicious <a href=\"https:\/\/www.esecurityplanet.com\/threats\/how-hackers-use-payloads-to-take-over-your-machine\/\">payloads<\/a>, or generate reports.<\/p>\r\n\r\n\r\n\r\n<p>The tool, maintained by <a href=\"https:\/\/www.esecurityplanet.com\/products\/rapid7-insightidr-review\/\">Rapid7<\/a>, even offers <a href=\"https:\/\/docs.rapid7.com\/metasploit\/\" target=\"_blank\" rel=\"noreferrer noopener\">comprehensive documentation<\/a>, where you can learn the basics to start using it.<\/p>\r\n\r\n\r\n\r\n<p>However, Metasploit is not just another hacking tool. It\u2019s a whole platform with command lines and modules you can use to attack a target. It offers several different features, web interfaces, and free trials. But, here we\u2019ll focus on <a href=\"https:\/\/github.com\/rapid7\/metasploit-framework\" target=\"_blank\" rel=\"noreferrer noopener\">Metasploit Framework<\/a>, which is the free, open-source edition.<\/p>\r\n\r\n\r\n\r\n<p>Also read: <a href=\"https:\/\/www.esecurityplanet.com\/applications\/open-source-penetration-testing-tools\/\">10 Top Open Source Penetration Testing Tools<\/a><\/p>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\">Setting Up a Test Environment<\/h2>\r\n\r\n\r\n\r\n<p>The idea with Metasploit is to attack another machine, so you\u2019ll need another machine to run your tests. Most beginners use a virtual machine with <a href=\"https:\/\/www.esecurityplanet.com\/networks\/kali-linux-tutorial\/\">Kali Linux<\/a> and their own machine as a target.<\/p>\r\n\r\n\r\n\r\n<p>While it might seem convenient, it\u2019s not recommended to use such a configuration. It is better to use several virtual machines; for example, one for the attacker and one for the victim. This way, you can train with various operating systems and disable <a href=\"https:\/\/www.esecurityplanet.com\/products\/antivirus-software\/\">antivirus software<\/a> and <a href=\"https:\/\/www.esecurityplanet.com\/products\/top-ngfw\/\">firewalls<\/a> safely.<\/p>\r\n\r\n\r\n\r\n<h3 class=\"wp-block-heading\">Prerequisites<\/h3>\r\n\r\n\r\n\r\n<p>For convenience, we\u2019ll use <a href=\"https:\/\/www.kali.org\/docs\/tools\/starting-metasploit-framework-in-kali\/\" target=\"_blank\" rel=\"noreferrer noopener\">Kali Linux<\/a>, but you can use <a href=\"https:\/\/github.com\/rapid7\/metasploit-framework\/wiki\/Nightly-Installers\" target=\"_blank\" rel=\"noreferrer noopener\">Nightly Installers<\/a> if you prefer. The Metasploit Framework is available on all major operating systems, including macOS, Windows, and Linux distributions.<\/p>\r\n\r\n\r\n\r\n<p>If you\u2019re ready to install Kali, the easy way is to spin up a <a href=\"https:\/\/www.kali.org\/get-kali\/#kali-virtual-machines\" target=\"_blank\" rel=\"noreferrer noopener\">virtual machine<\/a>. Once you have that, connect to a new Kali session and search <em>Metasploit Framework<\/em> in the menu to launch the console. Alternatively, you can open the terminal and type <em>msfconsole<\/em>.<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh5.googleusercontent.com\/UMTRj1m13y6rOCBjUMpBAphoIZniX8W0AKJ5Ui99xVgr0OzngaXN5L1-cbXYp6y0mQDl2_pbw9IS1bbx9Z5nnftnNZxO8flIHu8jLQ4QOIZwSMe25o1y5Z41vsb4f_K62MkXYbXNJnr9rfZ5Bg\" alt=\"\" \/><\/figure>\r\n\r\n\r\n\r\n<p>As a general rule, it is strongly recommended to keep your system up to date to get the latest version of exploits and other software. To do so, open the Kali terminal and type <em>apt update<\/em>.<\/p>\r\n\r\n\r\n\r\n<p>While it might take some time, don\u2019t skip this step unless it\u2019s the first time you install and use Kali.<\/p>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\">Your First Exploit<\/h2>\r\n\r\n\r\n\r\n<p>Metasploit provides a great database of all kinds of exploits. For example, you can use the command <em>search type:exploit platform:unix<\/em> to search exploits for Unix systems.<\/p>\r\n\r\n\r\n\r\n<p>You\u2019ll get a large list of potential exploits to attack your target. And commands such as <em>use exploit\/unix\/local\/chkrootkit<\/em> can be used directly in the console.<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh6.googleusercontent.com\/Hi8kNq7IIvEkcLy9cHQ6YQ99lokrseXJNCN-pQ0nzZHeQMJHhEZEIAB3L52fUhKnVWgnxRX40apj0R8eukIIPfTSR8qRlRZhEA3xX24LmUptjbjUOA2_4w85AHo3D8sbcjUE6QaY9QcIVjKiYA\" alt=\"\" \/><\/figure>\r\n\r\n\r\n\r\n<p>If there\u2019s a default payload, Metasploit will select it for you, but you can show all payloads with the command <em>show payloads<\/em>.<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh3.googleusercontent.com\/GDdtY6DBOPLdPIGVzbgHx1sJFwYNFxLviLSqcy8NmQjX_1E_B4nxRb57RxFkRcGFT7Hun0mbAcF6Ot9ZiLQV7FwIAISvvFBETIV-JTnmbLiM5rOvyvO5bJoDp41bhgguNlFEkNvztMdRVOEE-A\" alt=\"\" \/><\/figure>\r\n\r\n\r\n\r\n<p>To select a payload, use the command <em>set payload<\/em>. For example, <em>set payload cmd\/unix\/bind_awk<\/em> would select the first option above.<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh3.googleusercontent.com\/3f-PoE6CsVSJDP_Z14dZsErABTziJfD_jxWzgn63TrU6Nfm-0YE8eb0VDIA7rzsHfDDwlh8S_XSchB19W-YuIYX5FMkwXbHWBapc-1pefQSFWhvxc6cuuE34PoO3W3s__bneEYbRbRjYUV6wUw\" alt=\"\" \/><\/figure>\r\n\r\n\r\n\r\n<p>After that, you would logically use the <em>run<\/em> command. However, some payloads require additional configurations, like an active session and a host.<\/p>\r\n\r\n\r\n\r\n<p>To list all options you can continue with, type <em>show options<\/em> in the terminal, and to get more information, you can type <em>info<\/em>.<\/p>\r\n\r\n\r\n\r\n<p>These commands will give you everything you need to know, including the current status of your payload, parameters, all details about the exploit you are generating, and many more.<\/p>\r\n\r\n\r\n\r\n<p>Additionally, you can use the <em>setg<\/em> command to set some parameters as global variables, so you won\u2019t need to type the same configurations again during your tests with other exploits.<\/p>\r\n\r\n\r\n\r\n<p>Once you have everything set correctly, you can type <em>run<\/em> or <em>exploit<\/em>. After that, the following steps usually consist of sending the generated executable to a targeted machine to exploit the vulnerability.<\/p>\r\n\r\n\r\n\r\n<p><span style=\"font-weight: 400;\">Also read:<\/span><\/p>\r\n<ul>\r\n<li style=\"font-weight: 400;\" aria-level=\"1\"><a href=\"https:\/\/www.esecurityplanet.com\/networks\/nmap-vulnerability-scanning-made-easy\/\"><span style=\"font-weight: 400;\">Nmap Vulnerability Scanning Made Easy: Tutorial<\/span><\/a><\/li>\r\n<li style=\"font-weight: 400;\" aria-level=\"1\"><a href=\"https:\/\/www.esecurityplanet.com\/networks\/getting-started-with-burp-suite-pentest-tutorial\/\"><span style=\"font-weight: 400;\">Getting Started with the Burp Suite: A Pentesting Tutorial<\/span><\/a><\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\">Key Metasploit Concepts and Features<\/h2>\r\n\r\n\r\n\r\n<p>To fully take advantage of Metasploit Framework, there are more advanced concepts (not necessarily more complicated) you need to understand.<\/p>\r\n\r\n\r\n\r\n<h3 class=\"wp-block-heading\">Auxiliaries<\/h3>\r\n\r\n\r\n\r\n<p>In addition to the exploits and payloads, Metasploit provides auxiliaries, which are pre-configured modules to ease the work.<\/p>\r\n\r\n\r\n\r\n<p>For example, the command <em>use auxiliary\/scanner\/ftp\/easy_file_sharing_ftp\u00a0<\/em><\/p>\r\n\r\n\r\n\r\n<p>allows you to exploit a directory traversal vulnerability found in <a href=\"https:\/\/www.rapid7.com\/db\/modules\/auxiliary\/scanner\/ftp\/easy_file_sharing_ftp\/\" target=\"_blank\" rel=\"noreferrer noopener\">Easy File Sharing FTP Server 3.6<\/a>. And scanners use a simple <em>run<\/em> command to efficiently spot vulnerabilities to exploit.<\/p>\r\n\r\n\r\n\r\n<p>In addition, auxiliaries are relatively organized with the use of categories (subfolders), which can be useful to help speed up work processes.<\/p>\r\n\r\n\r\n\r\n<h3 class=\"wp-block-heading\">Encoders<\/h3>\r\n\r\n\r\n\r\n<p>Encoders allow obfuscating your payloads to evade detection. For example, the command <em>use encoder\/x64\/xor<\/em> uses an 8-byte key and takes advantage of <a href=\"https:\/\/www.rapid7.com\/db\/modules\/encoder\/x64\/xor\/\" target=\"_blank\" rel=\"noreferrer noopener\">x64 relative addressing<\/a>.<\/p>\r\n\r\n\r\n\r\n<h3 class=\"wp-block-heading\">Evasion<\/h3>\r\n\r\n\r\n\r\n<p>Once you have generated your first payloads, there are more advanced settings you might appreciate, such as the evasion options, which can be found with the command <em>show evasion<\/em>.<\/p>\r\n\r\n\r\n\r\n<p>It\u2019s not always set by default for all payloads, but, if there are evasions available, you can use them to evade typical detection mechanisms, such as antivirus software, <a href=\"https:\/\/www.esecurityplanet.com\/products\/edr-solutions\/\">endpoint detection and response (EDR)<\/a> software, or firewalls.<\/p>\r\n\r\n\r\n\r\n<h3 class=\"wp-block-heading\">nops<\/h3>\r\n\r\n\r\n\r\n<p>Nops are another type of modules provided by Metasploit. They can be shown with the command <em>use nop\/tty\/generic<\/em>.<\/p>\r\n\r\n\r\n\r\n<p>These generators produce \u201ca series of random bytes that you can use to bypass standard <a href=\"https:\/\/www.esecurityplanet.com\/trends\/ids-ips-still-matter\/\">IDS and IPS<\/a> NOP sled signatures.\u201d<\/p>\r\n\r\n\r\n\r\n<h3 class=\"wp-block-heading\">Post-exploitation<\/h3>\r\n\r\n\r\n\r\n<p>Metasploit can help with post modules to escalate root privileges, install keyloggers, or execute <a href=\"https:\/\/www.esecurityplanet.com\/threats\/powershell-source-of-third-of-critical-security-threats\/\">PowerShell<\/a> scripts after you have gained unauthorized access.<\/p>\r\n\r\n\r\n\r\n<p>Such post-exploitation techniques are extremely useful to speed up operations during a pen test. For example, <em>use post\/osx\/capture\/keylog_recorder<\/em> can be used to record keystrokes and other keyboard events.<\/p>\r\n\r\n\r\n\r\n<h3>Grep<\/h3>\r\n\r\n\r\n\r\n<p>When you search for exploits or other modules, use <em>grep<\/em> to speed up the process and select only the relevant results. It is a useful command for all types of modules, not just auxiliary scanners. Use grep along with the search command. For example:<\/p>\r\n<p><em>grep scanner search ssh<\/em><\/p>\r\n\r\n\r\n\r\n<h3>Meterpreter<\/h3>\r\n\r\n\r\n\r\n<p><a href=\"https:\/\/docs.metasploit.com\/docs\/using-metasploit\/advanced\/meterpreter\/meterpreter.html\" target=\"_blank\" rel=\"noreferrer noopener\">Meterpreter<\/a> is an advanced payload that is one of the most widely used payloads for Metasploit. It is often used in development to emulate attacks, and it has special features that allow migrating to another process or taking screenshots inside the target machine.<\/p>\r\n\r\n\r\n\r\n<h3>Msfvenom<\/h3>\r\n\r\n\r\n\r\n<p>Msfvenom is the combination of payload generation and encoding that replaced msfpayload and msfencode in 2015. The syntax is not that complicated, and you can use it directly in Kali Linux by typing the command or just <em>msfpc<\/em> in the terminal (outside the msf console). Moreover, it\u2019s not limited to one output format (e.i., you can generate .exe and other file types).<\/p>\r\n\r\n\r\n\r\n<p>Also read: <a href=\"https:\/\/www.esecurityplanet.com\/networks\/vulnerability-scanning-tools\/\">13 Best Vulnerability Scanner Tools<\/a><\/p>\r\n\r\n\r\n\r\n<h2>What Attackers Can Do With Minimum Effort<\/h2>\r\n\r\n\r\n\r\n<p>Metasploit is a powerful tool that pen testers (and hackers) can use to:<\/p>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\">\r\n<li>Perform all kinds of scans and enumerations<\/li>\r\n<li>Gain unauthorized access (e.g. listing <a href=\"https:\/\/www.esecurityplanet.com\/threats\/tokenization-vs-encryption\/\">tokens<\/a>)<\/li>\r\n<li>Impersonate users<\/li>\r\n<li>Exfiltrate confidential data<\/li>\r\n<li>Take screenshots<\/li>\r\n<li>Copy the login page of a website frequently visited by the victim and redirect them to a rogue server (e.g., by modifying the hosts file)<\/li>\r\n<li>Install keyloggers<\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<p>In other words, an attacker can take full control of a targeted machine with minimum effort and limited technical ability using Metasploit Framework.<\/p>\r\n\r\n\r\n\r\n<p>Read next: <a href=\"https:\/\/www.esecurityplanet.com\/products\/vulnerability-management-software\/\">Top Vulnerability Management Tools<\/a><\/p>\r\n\n\n<div id=\"ta-campaign-widget-66d6fb5acd5a8-popup-wrapper\" class=\"ta-campaign-widget__popup-wrapper\">\n    \n<div\n    style=\"\n        --ta-campaign-plugin-primary: #3545ed;\n        --ta-campaign-plugin-button-text: #fff;\n        --ta-campaign-plugin-button-hover-background: #3231b4;\n        --ta-campaign-plugin-button-hover-text: #fff;\n        --ta-campaign-plugin-button-toggle-background: #3231b4;\n        --ta-campaign-plugin-button-toggle-text: #3231B4;\n    \"\n    data-ajax-url=\"https:\/\/www.esecurityplanet.com\/wp\/wp-admin\/admin-ajax.php\">\n    <div\n        id=\"ta-campaign-widget-66d6fb5acd5a8\"\n        class=\"ta-campaign-widget ta-campaign-widget--popup\"\n        data-campaign-fields='{\"properties\":{\"campaign_type\":\"popup\",\"campaign_category\":false,\"sailthru_list\":[\"cybersecurity-insider\"],\"popup_type\":\"exit_intent\",\"appearance\":{\"colors\":{\"primary_color\":\"#3545ed\",\"button\":{\"button_text_color\":\"#fff\",\"hover\":{\"button_hover_background_color\":\"#3231b4\",\"button_hover_text_color\":\"#fff\"},\"toggle\":{\"button_toggle_background_color\":\"#3231b4\",\"button_toggle_text_color\":\"#3231B4\"}}},\"custom_scss\":\"\"},\"behavior\":{\"opt_in_enabled\":true},\"language\":{\"tagline\":\"Get the Free Cybersecurity Newsletter\",\"subtagline\":\"\",\"content\":\"Strengthen your organization&#39;s IT security defenses by keeping up to date on the latest cybersecurity news, solutions, and best practices. Delivered every Monday, Tuesday and Thursday\",\"email_placeholder\":\"Work Email Address\",\"opt_in\":\"By signing up to receive our newsletter, you agree to our Terms of Use and Privacy Policy. You can unsubscribe at any time.\",\"subscribe_button\":\"Subscribe\"}},\"identifier\":\"66d6fb5acd5a8\",\"campaign_id\":26045,\"campaign_type\":\"popup\",\"popup_type\":\"exit_intent\",\"newsletters\":[\"cybersecurity-insider\"],\"behavior\":{\"opt_in_enabled\":true},\"appearance\":{\"colors\":{\"primary\":\"#3545ed\",\"button\":{\"text\":\"#fff\",\"hover\":{\"background\":\"#3231b4\",\"text\":\"#fff\"},\"toggle\":{\"background\":\"#3231b4\",\"text\":\"#3231B4\"}}},\"custom_css\":\"\"},\"language\":{\"tagline\":\"Get the Free Cybersecurity Newsletter\",\"subtagline\":\"\",\"content\":\"Strengthen your organization&#39;s IT security defenses by keeping up to date on the latest cybersecurity news, solutions, and best practices. Delivered every Monday, Tuesday and Thursday\",\"email_placeholder\":\"Work Email Address\",\"opt_in\":\"By signing up to receive our newsletter, you agree to our Terms of Use and Privacy Policy. You can unsubscribe at any time.\",\"subscribe_button\":\"Subscribe\"}}'>\n\n                <div class=\"ta-campaign-widget__exit\">\n            <svg class=\"w-8\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" viewBox=\"0 0 24 24\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" aria-hidden=\"true\">\n                <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M6 18L18 6M6 6l12 12\"><\/path>\n            <\/svg>\n        <\/div>\n        \n        <div class=\"ta-campaign-widget__wrapper\">\n            <div class=\"ta-campaign-widget__header mb-6\">\n                                <h3 class=\"ta-campaign-widget__tagline\">\n                    Get the Free Cybersecurity Newsletter                <\/h3>\n                \n                \n                                <p class=\"ta-campaign-widget__content mt-6\">\n                    Strengthen your organization's IT security defenses by keeping up to date on the latest cybersecurity news, solutions, and best practices. Delivered every Monday, Tuesday and Thursday                <\/p>\n                            <\/div>\n\n            <form class=\"ta-campaign-widget__form\">\n                <div class=\"ta-campaign-widget__input mb-4\"  data-field=\"email\">\n                    <label\n                        class=\"sr-only\"\n                        for=\"email-66d6fb5acd5a8\">\n                        Email Address\n                    <\/label>\n                    <input\n                        class=\"ta-campaign-widget__input__text\"\n                        placeholder=\"Work Email Address\"\n                        id=\"email-66d6fb5acd5a8\"\n                        name=\"email\"\n                        type=\"email\">\n                <\/div>\n\n                                <div class=\"ta-campaign-widget__checkbox mb-4\" data-field=\"opt_in\">\n                    <div class=\"flex items-start\">\n                        <input\n                            id=\"opt-in-66d6fb5acd5a8\"\n                            class=\"ta-campaign-widget__checkbox__input mr-2\"\n                            name=\"opt-in\"\n                            type=\"checkbox\"\/>\n                        <label\n                            class=\"ta-campaign-widget__checkbox__label\"\n                            for=\"opt-in-66d6fb5acd5a8\">\n                            By signing up to receive our newsletter, you agree to our Terms of Use and Privacy Policy. You can unsubscribe at any time.                        <\/label>\n                    <\/div>\n                <\/div>\n                \n                <button class=\"ta-campaign-widget__button\" type=\"submit\" >\n                    Subscribe                <\/button>\n            <\/form>\n        <\/div>\n    <\/div>\n<\/div>\n\n<style>\n<\/style><\/div>\n","protected":false},"excerpt":{"rendered":"<p>The Metasploit project contains some of the best security tools available, including the open source Metasploit Framework. Both pen testers and hackers use it to find and exploit vulnerabilities as well as to set up reverse shells, develop malicious payloads, or generate reports. The tool, maintained by Rapid7, even offers comprehensive documentation, where you can [&hellip;]<\/p>\n","protected":false},"author":267,"featured_media":22291,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_gazelle_contributing_experts":"","footnotes":""},"categories":[14,17],"tags":[653,3414,9454,730,5277],"b2b_audience":[33,35],"b2b_industry":[],"b2b_product":[382],"class_list":["post-22288","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-networks","category-products","tag-metasploit","tag-network-security","tag-rapid7","tag-security","tag-web-security","b2b_audience-awareness-and-consideration","b2b_audience-implementation-and-support","b2b_product-application-security-vulnerability-management"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Getting Started With the Metasploit Framework: A Pentesting Tutorial | eSecurity Planet<\/title>\n<meta name=\"description\" content=\"The Metasploit Framework is a powerful open source pentesting tool. Here&#039;s a tutorial to help get you started.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.esecurityplanet.com\/products\/metasploit-framework-tutorial\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Getting Started With the Metasploit Framework: A Pentesting Tutorial | eSecurity Planet\" \/>\n<meta property=\"og:description\" content=\"The Metasploit Framework is a powerful open source pentesting tool. Here&#039;s a tutorial to help get you started.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.esecurityplanet.com\/products\/metasploit-framework-tutorial\/\" \/>\n<meta property=\"og:site_name\" content=\"eSecurity Planet\" \/>\n<meta property=\"article:published_time\" content=\"2022-06-14T00:15:57+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-04-10T13:32:22+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/assets.esecurityplanet.com\/uploads\/2022\/06\/metasploit-framework.png\" \/>\n\t<meta property=\"og:image:width\" content=\"873\" \/>\n\t<meta property=\"og:image:height\" content=\"293\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Julien Maury\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@eSecurityPlanet\" \/>\n<meta name=\"twitter:site\" content=\"@eSecurityPlanet\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Julien Maury\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.esecurityplanet.com\/products\/metasploit-framework-tutorial\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.esecurityplanet.com\/products\/metasploit-framework-tutorial\/\"},\"author\":{\"name\":\"Julien Maury\",\"@id\":\"https:\/\/www.esecurityplanet.com\/#\/schema\/person\/4723f5dca54d7ee1d8111912ac8b1d4a\"},\"headline\":\"Getting Started With the Metasploit Framework: A Pentesting Tutorial\",\"datePublished\":\"2022-06-14T00:15:57+00:00\",\"dateModified\":\"2023-04-10T13:32:22+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.esecurityplanet.com\/products\/metasploit-framework-tutorial\/\"},\"wordCount\":1174,\"publisher\":{\"@id\":\"https:\/\/www.esecurityplanet.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.esecurityplanet.com\/products\/metasploit-framework-tutorial\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/assets.esecurityplanet.com\/uploads\/2022\/06\/metasploit-framework.png\",\"keywords\":[\"Metasploit\",\"network security\",\"Rapid7\",\"security\",\"Web security\"],\"articleSection\":[\"Networks\",\"Products\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.esecurityplanet.com\/products\/metasploit-framework-tutorial\/\",\"url\":\"https:\/\/www.esecurityplanet.com\/products\/metasploit-framework-tutorial\/\",\"name\":\"Getting Started With the Metasploit Framework: A Pentesting Tutorial | eSecurity Planet\",\"isPartOf\":{\"@id\":\"https:\/\/www.esecurityplanet.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.esecurityplanet.com\/products\/metasploit-framework-tutorial\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.esecurityplanet.com\/products\/metasploit-framework-tutorial\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/assets.esecurityplanet.com\/uploads\/2022\/06\/metasploit-framework.png\",\"datePublished\":\"2022-06-14T00:15:57+00:00\",\"dateModified\":\"2023-04-10T13:32:22+00:00\",\"description\":\"The Metasploit Framework is a powerful open source pentesting tool. Here's a tutorial to help get you started.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.esecurityplanet.com\/products\/metasploit-framework-tutorial\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.esecurityplanet.com\/products\/metasploit-framework-tutorial\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.esecurityplanet.com\/products\/metasploit-framework-tutorial\/#primaryimage\",\"url\":\"https:\/\/assets.esecurityplanet.com\/uploads\/2022\/06\/metasploit-framework.png\",\"contentUrl\":\"https:\/\/assets.esecurityplanet.com\/uploads\/2022\/06\/metasploit-framework.png\",\"width\":873,\"height\":293,\"caption\":\"metasploit tutorial\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.esecurityplanet.com\/products\/metasploit-framework-tutorial\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.esecurityplanet.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Getting Started With the Metasploit Framework: A Pentesting Tutorial\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.esecurityplanet.com\/#website\",\"url\":\"https:\/\/www.esecurityplanet.com\/\",\"name\":\"eSecurity Planet\",\"description\":\"Industry-leading guidance and analysis for how to keep your business secure.\",\"publisher\":{\"@id\":\"https:\/\/www.esecurityplanet.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.esecurityplanet.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.esecurityplanet.com\/#organization\",\"name\":\"eSecurityPlanet\",\"url\":\"https:\/\/www.esecurityplanet.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.esecurityplanet.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/assets.esecurityplanet.com\/uploads\/2020\/10\/eSecurity_logo_MainLogo.png\",\"contentUrl\":\"https:\/\/assets.esecurityplanet.com\/uploads\/2020\/10\/eSecurity_logo_MainLogo.png\",\"width\":1134,\"height\":375,\"caption\":\"eSecurityPlanet\"},\"image\":{\"@id\":\"https:\/\/www.esecurityplanet.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/eSecurityPlanet\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.esecurityplanet.com\/#\/schema\/person\/4723f5dca54d7ee1d8111912ac8b1d4a\",\"name\":\"Julien Maury\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.esecurityplanet.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/assets.esecurityplanet.com\/uploads\/2023\/02\/JulienMaury-AvatarImg-150x150.webp\",\"contentUrl\":\"https:\/\/assets.esecurityplanet.com\/uploads\/2023\/02\/JulienMaury-AvatarImg-150x150.webp\",\"caption\":\"Julien Maury\"},\"description\":\"eSecurity Planet contributor Julien Maury writes about penetration testing, code security, open source security and more. He is a backend developer, a mentor and a technical writer who enjoys sharing his knowledge and learning new concepts.\",\"url\":\"https:\/\/www.esecurityplanet.com\/author\/jmaury\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Getting Started With the Metasploit Framework: A Pentesting Tutorial | eSecurity Planet","description":"The Metasploit Framework is a powerful open source pentesting tool. Here's a tutorial to help get you started.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.esecurityplanet.com\/products\/metasploit-framework-tutorial\/","og_locale":"en_US","og_type":"article","og_title":"Getting Started With the Metasploit Framework: A Pentesting Tutorial | eSecurity Planet","og_description":"The Metasploit Framework is a powerful open source pentesting tool. Here's a tutorial to help get you started.","og_url":"https:\/\/www.esecurityplanet.com\/products\/metasploit-framework-tutorial\/","og_site_name":"eSecurity Planet","article_published_time":"2022-06-14T00:15:57+00:00","article_modified_time":"2023-04-10T13:32:22+00:00","og_image":[{"width":873,"height":293,"url":"https:\/\/assets.esecurityplanet.com\/uploads\/2022\/06\/metasploit-framework.png","type":"image\/png"}],"author":"Julien Maury","twitter_card":"summary_large_image","twitter_creator":"@eSecurityPlanet","twitter_site":"@eSecurityPlanet","twitter_misc":{"Written by":"Julien Maury","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.esecurityplanet.com\/products\/metasploit-framework-tutorial\/#article","isPartOf":{"@id":"https:\/\/www.esecurityplanet.com\/products\/metasploit-framework-tutorial\/"},"author":{"name":"Julien Maury","@id":"https:\/\/www.esecurityplanet.com\/#\/schema\/person\/4723f5dca54d7ee1d8111912ac8b1d4a"},"headline":"Getting Started With the Metasploit Framework: A Pentesting Tutorial","datePublished":"2022-06-14T00:15:57+00:00","dateModified":"2023-04-10T13:32:22+00:00","mainEntityOfPage":{"@id":"https:\/\/www.esecurityplanet.com\/products\/metasploit-framework-tutorial\/"},"wordCount":1174,"publisher":{"@id":"https:\/\/www.esecurityplanet.com\/#organization"},"image":{"@id":"https:\/\/www.esecurityplanet.com\/products\/metasploit-framework-tutorial\/#primaryimage"},"thumbnailUrl":"https:\/\/assets.esecurityplanet.com\/uploads\/2022\/06\/metasploit-framework.png","keywords":["Metasploit","network security","Rapid7","security","Web security"],"articleSection":["Networks","Products"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.esecurityplanet.com\/products\/metasploit-framework-tutorial\/","url":"https:\/\/www.esecurityplanet.com\/products\/metasploit-framework-tutorial\/","name":"Getting Started With the Metasploit Framework: A Pentesting Tutorial | eSecurity Planet","isPartOf":{"@id":"https:\/\/www.esecurityplanet.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.esecurityplanet.com\/products\/metasploit-framework-tutorial\/#primaryimage"},"image":{"@id":"https:\/\/www.esecurityplanet.com\/products\/metasploit-framework-tutorial\/#primaryimage"},"thumbnailUrl":"https:\/\/assets.esecurityplanet.com\/uploads\/2022\/06\/metasploit-framework.png","datePublished":"2022-06-14T00:15:57+00:00","dateModified":"2023-04-10T13:32:22+00:00","description":"The Metasploit Framework is a powerful open source pentesting tool. Here's a tutorial to help get you started.","breadcrumb":{"@id":"https:\/\/www.esecurityplanet.com\/products\/metasploit-framework-tutorial\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.esecurityplanet.com\/products\/metasploit-framework-tutorial\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.esecurityplanet.com\/products\/metasploit-framework-tutorial\/#primaryimage","url":"https:\/\/assets.esecurityplanet.com\/uploads\/2022\/06\/metasploit-framework.png","contentUrl":"https:\/\/assets.esecurityplanet.com\/uploads\/2022\/06\/metasploit-framework.png","width":873,"height":293,"caption":"metasploit tutorial"},{"@type":"BreadcrumbList","@id":"https:\/\/www.esecurityplanet.com\/products\/metasploit-framework-tutorial\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.esecurityplanet.com\/"},{"@type":"ListItem","position":2,"name":"Getting Started With the Metasploit Framework: A Pentesting Tutorial"}]},{"@type":"WebSite","@id":"https:\/\/www.esecurityplanet.com\/#website","url":"https:\/\/www.esecurityplanet.com\/","name":"eSecurity Planet","description":"Industry-leading guidance and analysis for how to keep your business secure.","publisher":{"@id":"https:\/\/www.esecurityplanet.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.esecurityplanet.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.esecurityplanet.com\/#organization","name":"eSecurityPlanet","url":"https:\/\/www.esecurityplanet.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.esecurityplanet.com\/#\/schema\/logo\/image\/","url":"https:\/\/assets.esecurityplanet.com\/uploads\/2020\/10\/eSecurity_logo_MainLogo.png","contentUrl":"https:\/\/assets.esecurityplanet.com\/uploads\/2020\/10\/eSecurity_logo_MainLogo.png","width":1134,"height":375,"caption":"eSecurityPlanet"},"image":{"@id":"https:\/\/www.esecurityplanet.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/eSecurityPlanet"]},{"@type":"Person","@id":"https:\/\/www.esecurityplanet.com\/#\/schema\/person\/4723f5dca54d7ee1d8111912ac8b1d4a","name":"Julien Maury","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.esecurityplanet.com\/#\/schema\/person\/image\/","url":"https:\/\/assets.esecurityplanet.com\/uploads\/2023\/02\/JulienMaury-AvatarImg-150x150.webp","contentUrl":"https:\/\/assets.esecurityplanet.com\/uploads\/2023\/02\/JulienMaury-AvatarImg-150x150.webp","caption":"Julien Maury"},"description":"eSecurity Planet contributor Julien Maury writes about penetration testing, code security, open source security and more. He is a backend developer, a mentor and a technical writer who enjoys sharing his knowledge and learning new concepts.","url":"https:\/\/www.esecurityplanet.com\/author\/jmaury\/"}]}},"_links":{"self":[{"href":"https:\/\/www.esecurityplanet.com\/wp-json\/wp\/v2\/posts\/22288"}],"collection":[{"href":"https:\/\/www.esecurityplanet.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.esecurityplanet.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.esecurityplanet.com\/wp-json\/wp\/v2\/users\/267"}],"replies":[{"embeddable":true,"href":"https:\/\/www.esecurityplanet.com\/wp-json\/wp\/v2\/comments?post=22288"}],"version-history":[{"count":0,"href":"https:\/\/www.esecurityplanet.com\/wp-json\/wp\/v2\/posts\/22288\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.esecurityplanet.com\/wp-json\/wp\/v2\/media\/22291"}],"wp:attachment":[{"href":"https:\/\/www.esecurityplanet.com\/wp-json\/wp\/v2\/media?parent=22288"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.esecurityplanet.com\/wp-json\/wp\/v2\/categories?post=22288"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.esecurityplanet.com\/wp-json\/wp\/v2\/tags?post=22288"},{"taxonomy":"b2b_audience","embeddable":true,"href":"https:\/\/www.esecurityplanet.com\/wp-json\/wp\/v2\/b2b_audience?post=22288"},{"taxonomy":"b2b_industry","embeddable":true,"href":"https:\/\/www.esecurityplanet.com\/wp-json\/wp\/v2\/b2b_industry?post=22288"},{"taxonomy":"b2b_product","embeddable":true,"href":"https:\/\/www.esecurityplanet.com\/wp-json\/wp\/v2\/b2b_product?post=22288"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}