netanelcyber / netanelcyber/AdPentestAI-Python

SMB: Share permission analysis and enumeration

Open
#20 1 comment 0 reactions 1 assignee View on GitHub

@tenten48tenten is already working on this.

Since Sep 16, 2026.

help-wanted security-assessment smb-enumeration v1.1.0
Dominant language
Python
Stars
5
Forks
2
Avg merge
22h 25m
Merged PRs (30d)
7

Description

Description

Implement comprehensive SMB share permission analysis to identify permission misconfigurations and access control issues.

Features

  1. Share Discovery

    • List all shares via NetShareEnum
    • Filter built-in vs custom shares
    • Extract share properties (type, permissions)
    • Identify hidden shares (ending in $)
  2. Permission Analysis

    • NTFS ACL enumeration
    • Share-level permissions (SMB)
    • DACL analysis for each share
    • Effective permissions calculation
    • Identify overly permissive shares
  3. Access Validation

    • Test read/write access per user
    • Identify null session shares
    • Anonymous access detection
    • Guest account access
  4. Content Scanning (optional)

    • Enumerate files in shares
    • Search for sensitive files
    • Pattern matching for credentials
    • Metadata extraction

Permission Issues to Identify

  • Share-level Everyone:Full
  • Share-level Authenticated Users:Full
  • Share-level null session access
  • NTFS inheritance misconfigurations
  • Explicit denies on parent being inherited

Output Format

{
  \"shares\": [
    {
      \"name\": \"Documents\",
      \"path\": \"C:\\\\Users\\\\Public\\\\Documents\",
      \"share_permissions\": {
        \"Everyone\": [\"READ\"],
        \"Authenticated Users\": [\"READ\", \"WRITE\", \"DELETE\"]
      },
      \"ntfs_permissions\": [...],
      \"effective_access\": {...},
      \"findings\": [\"Overly permissive to Authenticated Users\"]
    }
  ]
}

Files to Create/Update

  • adpentest/core.py - Add share analysis functions
  • Enhance: enumerate_smb_shares()

Success Criteria

  • Enumerate all shares on target
  • Accurate permission analysis
  • Identify 95%+ of permission misconfigurations
  • < 5 minute analysis per host

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.