Using Claude Desktop and Metasploit for Agentic Penetration Testing

· Original article ↗

Summary

A lab walkthrough connects Claude Desktop to Metasploit through MCP, demonstrating scans, exploitation of Linux and Windows lab hosts, post-exploitation and payload delivery, with human approval gates and mitigation guidance.

Key points

  • The author connects Claude Desktop to Metasploit through an MCP bridge and runs the demonstration in an isolated lab network.
  • On a Metasploitable 2 host, the walkthrough demonstrates exploitation of the vsftpd 2.3.4 and UnrealIRCd backdoors.
  • On a Windows Server 2019 Domain Controller, the demonstration uses valid lab administrator credentials with psexec to obtain a SYSTEM session.
  • The workflow generates and hosts a Windows reverse payload, then starts a listener; the article reports a callback from the lab Domain Controller.
  • Human approval gates are required before offensive actions, and the article emphasizes authorization and isolation.
  • Mitigations discussed include retiring vulnerable legacy services, network segmentation, limiting privileged credentials, securing SMB shares, monitoring outbound connections, and auditing MCP tool calls.

Article Details

Topic
Agentic penetration testing with Claude Desktop and Metasploit through MCP in an isolated lab

MITRE ATT&CK

CVE

Products

Tools

Related Articles