smb-share-webshell

Deploy PHP, ASPX, or JSP webshells to writable SMB shares for RCE.

253|37|Updated Feb 22, 2026
One-click install
npx skills add https://github.com/blacklanternsecurity/red-run --skill smb-share-webshell
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: smb-share-webshell
Source: https://github.com/blacklanternsecurity/red-run/tree/main/skills/web/smb-share-webshell
Command: npx skills add https://github.com/blacklanternsecurity/red-run --skill smb-share-webshell

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill enables the deployment of webshells to web server directories by exploiting write access to SMB shares, leading to Remote Code Execution (RCE).

Core Features & Use Cases

  • Web Share Identification: Detects writable SMB shares that map to web server document roots.
  • Webshell Deployment: Uploads PHP, ASPX, or JSP webshells to target web servers.
  • RCE Achievement: Triggers the deployed webshell via HTTP to gain command execution.
  • Use Case: You have credentials for a domain user with write access to a share named 'wwwroot' on a server hosting an IIS website. This Skill will upload a webshell to that share and then allow you to execute commands on the web server.

Quick Start

Use the smb-share-webshell skill to deploy a PHP webshell to the 'Web' share on TARGET using the provided domain credentials.

Frequently Asked Questions about smb-share-webshell

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

FAQPage Schema
How do I get RCE by writing a webshell to an SMB share?

Deploying webshells via SMB share write access allows attackers to gain remote code execution on IIS, Apache, or Tomcat servers by uploading PHP, ASPX, or JSP payloads to writable web root directories and triggering them through HTTP requests, enabling command execution and potential lateral movement through .NET impersonation.

Can I deploy an ASPX webshell to an IIS server using smbclient?

Yes, you can deploy ASPX webshells to IIS web servers using smbclient or netexec by uploading the payload to a writable SMB share mapped to the web document root, such as 'wwwroot', then triggering the webshell via HTTP requests to achieve remote code execution.

Does deploying webshells via SMB write access support internal site discovery?

Yes, deploying webshells via SMB write access supports internal site discovery and .NET impersonation for same-host lateral movement. Once the webshell is triggered via HTTP, it executes commands on the web server to discover internal sites and facilitate lateral movement within the network.

What is the best way to upload a PHP webshell to an Apache web root share?

The best way to upload a PHP webshell to an Apache web root share is using smbclient or netexec to write the payload to a writable SMB share mapped to the document root. After uploading the PHP file via SMB, trigger the webshell by sending an HTTP request to the deployed payload to achieve RCE.

When do I need SMB share write access to deploy a webshell for RCE?

You need SMB share write access to deploy a webshell for RCE when you have valid credentials for a domain user with write permissions to a share mapping to a web server's document root, such as 'wwwroot' on IIS. This allows uploading PHP, ASPX, or JSP payloads via SMB and triggering them via HTTP to execute commands on the web server.