exploiting-smb-vulnerabilities-with-metasploit

Identifies and exploits SMB vulnerabilities using Metasploit during authorized penetration tests.

Updated May 27, 2026
One-click install
npx skills add https://github.com/baljinnyamday/autonomous-red-team-agent --skill exploiting-smb-vulnerabilities-with-metasploit-baljinnyamday
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: exploiting-smb-vulnerabilities-with-metasploit
Source: https://github.com/baljinnyamday/autonomous-red-team-agent/tree/main/harness/src/agent_redteam/skill_library/exploiting-smb-vulnerabilities-with-metasploit
Command: npx skills add https://github.com/baljinnyamday/autonomous-red-team-agent --skill exploiting-smb-vulnerabilities-with-metasploit-baljinnyamday

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Windows environments frequently contain unpatched SMB services, disabled SMB signing, and reused local administrator credentials that enable remote code execution and lateral movement. This Skill provides a structured workflow to enumerate, exploit, and document these weaknesses during authorized penetration tests so organizations can validate patch management and segmentation controls. ## Core Features & Use Cases - SMB Enumeration and Vulnerability Scanning: Discovers SMB hosts with Nmap and CrackMapExec, then checks for MS17-010 (EternalBlue), MS08-067, SMBGhost, and PrintNightmare using Metasploit auxiliary modules. - Exploitation and Lateral Movement: Executes EternalBlue for SYSTEM-level access, performs NTLM relay attacks against hosts without SMB signing, and uses pass-the-hash with CrackMapExec, Impacket psexec, or Metasploit psexec to move laterally. - Use Case: During an internal penetration test of a 200-host Active Directory domain, a tester identifies 12 unpatched servers, exploits EternalBlue on a file server, reuses the extracted local admin hash across 47 hosts, and documents a full attack chain leading to domain compromise. ## Quick Start Use this skill to scan the authorized target range 10.10.0.0/24 for SMB vulnerabilities with Metasploit and CrackMapExec, then exploit any hosts vulnerable to MS17-010 and document the findings.

Frequently Asked Questions about exploiting-smb-vulnerabilities-with-metasploit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I exploit EternalBlue (MS17-010) with Metasploit?

Use the exploit/windows/smb/ms17_010_eternalblue module, set RHOSTS to the target, LHOST to your listener, and a windows/x64/meterpreter/reverse_tcp payload, then run exploit. First verify vulnerability with the auxiliary/scanner/smb/smb_ms17_010 scanner to reduce crash risk.

How to perform pass-the-hash attacks against SMB hosts?

Pass-the-hash uses captured NTLM hashes directly for authentication without cracking them. Run crackmapexec smb with -u and -H flags to test the hash across hosts, or use impacket-psexec with the -hashes parameter for an interactive shell.

What tools work best for SMB enumeration besides Metasploit?

CrackMapExec handles rapid SMB enumeration, share listing, signing checks, and command execution across subnets. Impacket provides low-level tools like ntlmrelayx and psexec, while Nmap scripts such as smb-os-discovery and smb-protocols fingerprint versions.

Can SMB relay attacks work when SMB signing is enabled?

No, SMB relay attacks require SMB signing to be disabled or not enforced on the target. Use crackmapexec smb with --gen-relay-list to identify hosts without signing before configuring impacket-ntlmrelayx for the relay.

What are the risks of running EternalBlue against production systems?

EternalBlue can cause a blue screen of death on older or unstable targets, potentially disrupting production services. Only run it against in-scope systems during an approved maintenance window, and set MaxExploitAttempts to limit repeated crash attempts.