Hacking metasploit with metasploit

_Y000_
InfoSec Write-ups
Published in
2 min readMar 26, 2021

msfd — Provides an instance of msfconsole that remote clients can connect to

root@kali:~# msfd -h

Usage: msfd <options>

OPTIONS:

-A <opt> Specify list of hosts allowed to connect
-D <opt> Specify list of hosts not allowed to connect
-a <opt> Bind to this IP address instead of loopback
-f Run the daemon in the foreground
-h Help banner
-p <opt> Bind to this port instead of 55554
-q Do not print the banner on startup
-s Use SSL

https://tools.kali.org/exploitation-tools/metasploit-framework

Msfd allows us to connect to a metasploit session no matter what machine we are on, just by having the service running on the main machine.

But how are we going to hack metasploit with metasploit?

for that you need 2 things:
1-identify a network with the msfd service running
2-a system with metasploit to “attack” the metasploit system that is running

In kali I run the msfd service

On my android I run metasploit and do a scan in nmap to validate that the msfd service is running on my kali

using the exploit:

msfd_rce_remote

we are going to configure the rhost with the vulnerable machine (kali linux) and voila, when executing the exploit it gives us a session inside the vulnerable machine. so we are hacking metasploit with metasploit!

Metasploit is a very powerful framework! but if it is configured in an incorrect way it can leave us vulnerable.

Did you already know this method?

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Published in InfoSec Write-ups

A collection of write-ups from the best hackers in the world on topics ranging from bug bounties and CTFs to vulnhub machines, hardware challenges and real life encounters. Subscribe to our weekly newsletter for the coolest infosec updates: https://weekly.infosecwriteups.com/

Written by _Y000_

Hola, Bienvenido a mi perfil de Medium! Soy Y000! 😊 ¿Quién soy? 🤔 Bueno… soy yo jaja soy solo un apasionado por la seguridad informatica.

No responses yet

Write a response