netanelcyber / netanelcyber/AdPentestAI-Python
Performance: Parallel subnet scanning across /22, /23, /24 networks
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 5
- Forks
- 2
- Avg merge
- 22h 25m
- Merged PRs (30d)
- 7
Description
Description
Implement parallelized subnet scanning for DC discovery when targeting large network ranges (e.g., 10.0.0.0/22).
Current Behavior
- Sequential scanning of all hosts in /24 subnet
- Single-threaded port fingerprinting (88, 389, 636, etc.)
- Slow discovery on large networks (1000+ hosts)
Proposed Implementation
-
Adaptive subnet sizing
- /24 (256 hosts) → scan all
- /23 (512 hosts) → split into /24s, parallelize
- /22 (1024 hosts) → split into /24s, parallelize
- Larger ranges → use config-specified subnet size
-
Concurrent scanning
- ThreadPoolExecutor with 32 workers
- Parallel port scans across subnets
- Batch results by subnet
- Report live hosts as discovered (streaming)
-
Optimization
- ICMP ping before port scan (reduce attempts)
- Early termination if DC found
- DNS reverse lookup parallelization
- Cache ARP table for local networks
Requirements
- Minimum 10x speedup on /22 scans
- Memory usage < 200MB even with 256+ concurrent scans
- Support both local networks (ARP) and remote networks (ICMP/TCP)
- Respect per-host timeout configuration
Files to Update
adpentest/core.py-subnet_sweep()function- Add:
parallel_subnet_scan()function
Success Criteria
- /24 scan: < 10 seconds
- /23 scan: < 15 seconds
- /22 scan: < 30 seconds
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading subnet_sweep() in adpentest/core.py to understand the current sequential scan and its timeout behavior. Implement the requested parallel_subnet_scan() flow around the stated subnet sizes, worker limit, streaming results, and local versus remote network requirements. Done means the /24, /23, and /22 timing targets are met while staying under 200MB and respecting per-host timeouts.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- networking, performance, security
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100