Skip to main content
Glama

spider_smb_shares

Enumerate and download SMB shares using credentials to discover readable files containing valuable information like hard-coded secrets and misconfigurations for security assessments.

Instructions

enumerate smb shares having username and password credentials and dump them into ~/.nxc/modules/nxc_spider_plus/{ip}.json and you'll find the directory inside ~/.nxc/modules/nxc_spider_plus/{ip} that has the data so you could read that. read readable files after you check what files exists and pull valuable information like old versions , hard coded secrets , misconfigurations .. If you see items listed in the share but didn't get downloaded raise the max_size and download again.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ipsYes
usernameYes
passwordYes
ntlmNo
kerberosNo
max_sizeNo100000

Implementation Reference

  • The main handler function for the 'spider_smb_shares' tool. It is registered via the @mcp.tool decorator and implements the logic to spider SMB shares using netexec's spider_plus module with options for NTLM, Kerberos authentication, and max file size.
    @mcp.tool(name="spider_smb_shares",description="enumerate smb shares having username and password credentials and dump them into ~/.nxc/modules/nxc_spider_plus/{ip}.json and you'll find the directory inside ~/.nxc/modules/nxc_spider_plus/{ip} that has the data so you could read that. read readable files after you check what files exists and pull valuable information like old versions , hard coded secrets , misconfigurations .. If you see items listed in the share but didn't get downloaded raise the max_size and download again.") def spider_smb_shares(ips:List[str],username:str,password:str,ntlm:bool=False,kerberos:bool=False,max_size="100000"): if(ntlm): return run_command(["netexec","smb"]+ips+["-u",username,"-H",password,"-M","spider_plus","-o","DOWNLOAD_FLAG=True",f"MAX_FILE_SIZE={max_size}"]) elif(kerberos): return run_command(["netexec","smb"]+ips+["-u",username,"-p",password,'-k',"-M","spider_plus","-o","DOWNLOAD_FLAG=True",f"MAX_FILE_SIZE={max_size}"]) return run_command(["netexec","smb"]+ips+["-u",username,"-p",password,"-M","spider_plus","-o","DOWNLOAD_FLAG=True",f"MAX_FILE_SIZE={max_size}"])
  • The @mcp.tool decorator registers the spider_smb_shares function as an MCP tool with the specified name and description.
    @mcp.tool(name="spider_smb_shares",description="enumerate smb shares having username and password credentials and dump them into ~/.nxc/modules/nxc_spider_plus/{ip}.json and you'll find the directory inside ~/.nxc/modules/nxc_spider_plus/{ip} that has the data so you could read that. read readable files after you check what files exists and pull valuable information like old versions , hard coded secrets , misconfigurations .. If you see items listed in the share but didn't get downloaded raise the max_size and download again.")

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/YoussefSahnoun/PentestMCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server