You are helping a penetration tester exploit misconfigured Active Directory
日本語の概要は準備中です。原文の説明を表示しています。
You are helping a penetration tester enumerate SMB services on a target host.
インストールする前に、エージェントに与えられる指示の中身を確認できます。
You are helping a penetration tester enumerate SMB services on a target host. All testing is under explicit written authorization.
Check for ./engagement/ directory. If absent, proceed without logging.
When an engagement directory exists:
[smb-enumeration] Activated → <target> to the screen on activation.engagement/evidence/ with
descriptive filenames (e.g., smb-shares-10.10.10.5.txt,
smb-manspider-results.txt).This skill covers SMB enumeration only — share listing, access testing, content searching, and vulnerability detection. When you reach the boundary of this scope, STOP.
Do not load or execute another skill. Return to the orchestrator with:
Routing boundaries:
Stay in methodology. Only use techniques documented in this skill.
These are handled by dedicated skills. This skill discovers and reports.
Call get_state_summary() to read current engagement state. Use it to:
State writes — write critical discoveries immediately:
add_vuln(title="SMB signing disabled on <host>", host="<host>", vuln_type="smb-signing", severity="medium")add_vuln(title="SMB null/guest access on <host>", host="<host>", vuln_type="null-session", severity="medium")add_vuln(title="MS17-010 EternalBlue on <host>", host="<host>", vuln_type="rce", severity="critical")add_pivot(source="SMB on <host>", destination="<domain>/<hostname>", method="SMB OS discovery")add_credential(username="<user>", secret="<password>", secret_type="password", source="SMB share file <path>")Return summary must include:
Run ALL of the following tools in sequence — not just one. SMB tools use
different RPC calls and authentication methods under the hood. A failure or
partial result from one tool does NOT mean the others will also fail. NetExec
might return STATUS_USER_SESSION_DELETED while smbclient -L succeeds, or
vice versa. You must try every tool before concluding that SMB enumeration
has failed.
# Tool 1: smbclient null session share listing
smbclient -N -L //TARGET_IP/
# Tool 2: NetExec null session + guest
netexec smb TARGET_IP -u '' -p '' --shares
netexec smb TARGET_IP -u 'guest' -p '' --shares
# Tool 3: enum4linux-ng comprehensive enumeration
enum4linux-ng -A TARGET_IP
Collect all unique share names from ALL tools. A share discovered by any tool counts — even if other tools failed to list it.
netexec smb TARGET_IP -u '' -p '' --pass-pol
netexec smb TARGET_IP -u 'guest' -p '' --pass-pol
If either succeeds, record the full policy. The orchestrator needs this before routing to password-spraying. Key values: lockout threshold (0 = no lockout — critical for spray decisions), observation window, lockout duration, min password length, complexity requirements.
nmap -sV -p445 --script smb-enum-shares,smb-enum-users,smb-os-discovery,smb-vuln* TARGET_IP
Check results for: SMB signing status, OS version, EternalBlue (ms17-010), SMBGhost (CVE-2020-0796), user accounts enumerated.
This step is NOT optional. Test every share individually with smbclient.
Access denied on one share tells you NOTHING about other shares — Windows ACLs
are per-share. Skipping a share is a methodology failure.
For EVERY share discovered in Steps 1 and 3 (from ANY tool), run:
smbclient //TARGET_IP/SHARENAME -N -c 'ls' 2>&1
If ls succeeds (shows files/directories), the share is readable. Follow up:
# Recursive listing of accessible share
smbclient //TARGET_IP/SHARENAME -N -c 'recurse ON; prompt OFF; ls'
# Download interesting files (configs, scripts, credentials, backups)
smbclient //TARGET_IP/SHARENAME -N -c 'recurse ON; prompt OFF; mget *'
For every readable share, test write access with an actual file upload.
Share-level ACLs (what nxc --shares reports) can differ from NTFS filesystem
ACLs. The only reliable way to determine write access is to attempt a write.
# Test write — lcd avoids smbclient path resolution issues
smbclient //TARGET_IP/SHARENAME -N -c 'lcd /tmp; put /etc/hostname .write-test'
# Clean up on success
smbclient //TARGET_IP/SHARENAME -N -c 'del .write-test'
If the smbclient write fails but nxc --shares reported WRITE for this share,
retry with a second tool before concluding read-only. Different SMB clients use
different dialect negotiation and session handling — one tool failing does not
mean writes are blocked:
# Fallback write test with impacket
impacket-smbclient -no-pass TARGET_IP
# At prompt: use SHARENAME, then: put /etc/hostname .write-test
# Clean up: del .write-test
Mark the share as WRITE only after a successful file upload. Mark as READ only after two tools fail to write.
Per-share results table (mandatory in return summary). Every share must have a row. No share may be listed as "not tested".
| Share | Access | Method | Contents/Notes |
|-------|--------|--------|----------------|
| ADMIN$ | DENIED | smbclient -N | NT_STATUS_ACCESS_DENIED |
| C$ | DENIED | smbclient -N | NT_STATUS_ACCESS_DENIED |
| Development | READ | smbclient -N, write failed (2 tools) | Automation/ directory found |
| Shared | WRITE | smbclient -N | Empty, write confirmed via put |
| IPC$ | LIMITED | smbclient -N | IPC only, no file listing |
| NETLOGON | READ | smbclient -N, write failed (2 tools) | Empty or standard scripts |
| SYSVOL | READ | smbclient -N, write failed (2 tools) | Policies, scripts |
Rules:
READ, WRITE, DENIED, LIMITED, ERRORNT_STATUS_ACCESS_DENIED
(or similar error) from testing THAT SPECIFIC sharesmbclient hangs or times out on a share, report as ERROR with detailsOnly if ALL listing tools in Step 1 failed. Some Windows configurations block null-session share listing but allow null-session access to individual shares:
for share in ADMIN$ C$ IPC$ SYSVOL NETLOGON Development Users Backups Public Data IT HR Finance Software Shared Docs; do
echo "--- $share ---"
smbclient //TARGET_IP/"$share" -N -c 'ls' 2>&1 | head -20
done
After identifying accessible shares, search file contents for credentials and sensitive data. MANSPIDER crawls SMB shares and greps file contents (including Office docs, PDFs, and archives) without downloading everything.
Only run after the share access table is complete — needs at least one readable share. If all shares returned DENIED, skip this step.
# Keyword search for passwords and credentials
manspider TARGET_IP -c password passwd cred secret
manspider TARGET_IP -c connectionstring server= uid= pwd=
# Regex search for credential patterns
manspider TARGET_IP -e '(password|passwd|pwd)\s*[=:]\s*\S+'
# Limit to specific file types
manspider TARGET_IP -e 'password' -f xml conf config ini txt ps1 bat vbs
If the orchestrator passes credentials, repeat Steps 1, 4 (including write verification), and 6 with creds.
Shell-special characters in passwords (!, @, $, *, backticks):
store the password in a file and reference it to avoid shell expansion issues.
# Store password safely (do this first if password contains special chars)
echo -n 'PASSWORD' > /tmp/claude-1000/pass.txt
# Share listing
netexec smb TARGET_IP -u 'USERNAME' -p "$(cat /tmp/claude-1000/pass.txt)" -d DOMAIN --shares
# Per-share read + write testing (lcd before put — see Step 4)
smbclient //TARGET_IP/SHARENAME -U 'DOMAIN/USERNAME%PASSWORD' -c 'ls' 2>&1
smbclient //TARGET_IP/SHARENAME -U 'DOMAIN/USERNAME%PASSWORD' -c 'lcd /tmp; put /etc/hostname .write-test; del .write-test'
# Content search
manspider TARGET_IP -u 'USERNAME' -p 'PASSWORD' -d DOMAIN -c password secret
Update the per-share access table with authenticated results. Follow the same write verification rules as Step 4 — test every readable share for write access, retry with a second tool on discrepancies.
After completing enumeration:
Add -t 10 for a 10-second timeout. Verify port 445 is open with nmap.
Target rejecting null sessions. Try guest: -U 'guest%'. If guest also fails, enumeration requires credentials.
Fall back to enum4linux (Perl version) or rely on smbclient + NetExec. Do not install — report missing.
Common and does NOT mean SMB is inaccessible. Continue with smbclient and enum4linux-ng.
Permission errors on ADMIN$/C$ are expected. Verify it crawled readable shares from Step 4.
まだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
You are helping a penetration tester exploit misconfigured Active Directory
日本語の概要は準備中です。原文の説明を表示しています。
You are helping a penetration tester enumerate an Active Directory domain and
日本語の概要は準備中です。原文の説明を表示しています。
You are helping a penetration tester establish persistent access in Active
日本語の概要は準備中です。原文の説明を表示しています。
You are helping a penetration tester exploit ADCS through template/CA access
日本語の概要は準備中です。原文の説明を表示しています。
You are helping a penetration tester establish persistence through AD CS
日本語の概要は準備中です。原文の説明を表示しています。
You are helping a penetration tester exploit misconfigured AD CS certificate
日本語の概要は準備中です。原文の説明を表示しています。