{"id":1324,"date":"2021-03-08T00:14:08","date_gmt":"2021-03-08T00:14:08","guid":{"rendered":"https:\/\/dft.wiki\/?p=1324"},"modified":"2021-04-02T01:58:50","modified_gmt":"2021-04-02T01:58:50","slug":"running-docker-metasploit-msf-in-google-cloud-shell","status":"publish","type":"post","link":"https:\/\/dft.wiki\/?p=1324","title":{"rendered":"Running Docker Metasploit (MSF) in Google Cloud Shell"},"content":{"rendered":"<p>Google Cloud Shell [<a href=\"https:\/\/shell.cloud.google.com\/\">Link<\/a>] &#8211; Free cloud service that allows running shell commands on a Debian-based customized distribution.<\/p>\n<p>This service is a shared instance of a VM with 16GB of RAM, 4vCPU, and 5GB of Storage.<\/p>\n<p>It has a usage limit of 50 hours per week, and 20 minutes after logging out the instance resets itself.<\/p>\n<p>Note: there is no income port open to the internet, only HTTP traffic can come in through a reverse proxy (multi-handler will not work).<\/p>\n<pre>sudo docker pull metasploitframework\/metasploit-framework\r\nsudo docker run --name msf --rm -it -p 443:443 -v ${PWD}:\/root\/.msf4 metasploitframework\/metasploit-framework<\/pre>\n<p>An alternative would be Kali + Top 10 Tools.<\/p>\n<pre>sudo docker pull kalilinux\/kali-rolling\r\nsudo docker run --name kali -ti kalilinux\/kali-rolling \/bin\/bash<\/pre>\n<p>Then set up the environment:<\/p>\n<pre>apt update &amp;&amp; apt dist-upgrade -y &amp;&amp; apt autoremove &amp;&amp; apt clean\r\napt install kali-tools-top10<\/pre>\n<p>Keep in mind the time of both images:<\/p>\n<pre>REPOSITORY                                  SIZE\r\nmetasploitframework\/metasploit-framework    1.21GB\r\nkalilinux\/kali-rolling                      125MB<\/pre>\n<p>And then the size after Kali gets all the tools installed:<\/p>\n<pre>NAME   IMAGE                    SIZE\r\nkali   kalilinux\/kali-rolling   2.92GB (virtual 3.04GB)<\/pre>\n<p>Another alternative is to install The PenTesters Framework (PTF):<\/p>\n<pre>sudo docker run --name ptf -ti kalilinux\/kali-rolling \/bin\/bash<\/pre>\n<p>Then,<\/p>\n<pre>apt update &amp;&amp; apt dist-upgrade -y &amp;&amp; apt autoremove &amp;&amp; apt clean\r\napt install git pip -y\r\ngit clone https:\/\/github.com\/trustedsec\/ptf.git\r\ncd ptf\r\npip install -r requirements.txt\r\n.\/ptf<\/pre>\n<p>Inside the PTF install Metasploit:<\/p>\n<pre>use modules\/exploitation\/metasploit\r\ninstall<\/pre>\n<p>And then the size after install PTF + MSF on Kali the final size is:<\/p>\n<pre>NAME   IMAGE                    SIZE\r\nptf    kalilinux\/kali-rolling   1.97GB (virtual 2.09GB)<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Google Cloud Shell [Link] &#8211; Free cloud service that allows running shell commands on a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-1324","post","type-post","status-publish","format-standard","hentry","category-hacking"],"_links":{"self":[{"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/posts\/1324","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dft.wiki\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1324"}],"version-history":[{"count":9,"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/posts\/1324\/revisions"}],"predecessor-version":[{"id":1678,"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/posts\/1324\/revisions\/1678"}],"wp:attachment":[{"href":"https:\/\/dft.wiki\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1324"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dft.wiki\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1324"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dft.wiki\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1324"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}