A comprehensive collection of Nuclei templates designed to detect exposed Aadhar and PAN card numbers during security assessments.
- Nuclei (latest version recommended)
- Target website / Scope
- Go (for running Nuclei)
- Aadhar with spaces:
XXXX XXXX XXXX - Aadhar without spaces:
XXXXXXXXXXXX - PAN cards:
ABCDE1234F
- Web pages (home, login, profile)
- API endpoints (REST, JSON responses)
- File storage (uploads, downloads)
- Debug/Error pages
- Contextual detection (looks for keywords like "aadhar", "pan" near numbers)
- False positive reduction (ignores "example", "sample", "dummy" data)
- Multiple extractors (separates Aadhar vs PAN findings)
- Context extraction (shows surrounding text for analysis)
| Approach | Templates Count | Recommendation |
|---|---|---|
| Individual Templates | 8 separate files | For specialized testing |
| All-in-One Template | 1 comprehensive file | β Recommended for most users |
| Template | Purpose | Recommendation |
|---|---|---|
| Template 1 | Aadhar with spaces only | β Redundant |
| Template 2 | Aadhar without spaces only | β Redundant |
| Template 3 | PAN cards only | β Redundant |
| Template 4 | Combined basic detector | |
| Template 5 | Advanced with contextual keywords | β Most comprehensive |
| Template 6 | JSON/API focused | π§ Specialized use case |
| Template 7 | File endpoints focused | π§ Specialized use case |
| Template 8 | Error pages focused | π§ Specialized use case |
- Templates 1-3: Basic individual detectors (Aadhar with spaces, without spaces, PAN) - Redundant
- Template 4: Combined basic detector - Good starting point
- Template 5: Advanced with contextual keywords - Most comprehensive
- Template 6: JSON/API focused - Specialized use case
- Template 7: File endpoints focused - Specialized use case
- Template 8: Error pages focused - Specialized use case
Use Template 5 (Advanced Detection) as your main template
Why Template 5 is the best:
- Detects ALL formats (Aadhar with/without spaces + PAN)
- Uses contextual keywords to reduce false positives
- Covers the most common endpoints
- Single scan covers everything
- Most comprehensive coverage
Optional: Add Template 6 if you're specifically testing APIs
When to use the specialized ones (6-8):
- Template 6: Only if you're specifically targeting REST APIs and JSON responses
- Template 7: Only if you're testing file upload/storage systems
- Template 8: Only if you're doing error-based testing
The comprehensive single template that combines the best features of all 8 individual templates.
Why This One Template is Better:
- Single scan = faster execution
- Comprehensive coverage = nothing missed
- Smart filtering = fewer false positives
- Better reporting = organized extracted data
- Maintenance = only one file to update
This replaces all 8 previous templates with one efficient, comprehensive solution perfect for bug hunting!
# Save as: all-in-one.yaml
nuclei -t all-in-one.yaml -u https://target.com
# Bulk scanning:
nuclei -t all-in-one.yaml -l targets.txt
# With output:
nuclei -t all-in-one.yaml -u target.com -o results.txt
# Verbose mode with extracted data:
nuclei -t all-in-one.yaml -u target.com -v# Rate limiting for production testing:
nuclei -t all-in-one.yaml -l targets.txt -rl 10
# With custom headers:
nuclei -t all-in-one.yaml -u target.com -H "Authorization: Bearer token"
# Silent mode (only show findings):
nuclei -t all-in-one.yaml -u target.com -silent
# JSON output for automation:
nuclei -t all-in-one.yaml -u target.com -json -o results.json# Using specific templates:
nuclei -t template-1.yaml -u target.com
nuclei -t template-3.yaml -u target.com
nuclei -t template-5.yaml -u target.com
# Using multiple templates:
nuclei -t /path/to/templates/ -u target.com| Feature | Individual Templates | All-in-One Template |
|---|---|---|
| Coverage | Requires multiple scans | Single comprehensive scan |
| Speed | Slower (8 separate requests) | Faster (1 optimized scan) |
| Maintenance | 8 files to update | 1 file to maintain |
| False Positives | Variable across templates | Optimized filtering |
| Customization | High granular control | Balanced comprehensive approach |
| Recommended for | Specific use cases | General bug hunting |
The templates include negative matchers to avoid flagging:
- Example/dummy data
- Test datasets
- Placeholder values
- Documentation samples
Use the All-in-One Template - It's optimized, comprehensive, and efficient.
- API Testing: Use All-in-One + consider the JSON-focused individual template
- File Upload Testing: All-in-One covers this, but individual Template 7 offers more file-specific paths
- Error-based Testing: All-in-One includes error detection
- Start with All-in-One for general assessments
- Add individual templates only for specific deep-dive testing
- Use rate limiting (
-rl 10) for production testing - Review extracted data manually to confirm findings
- Report responsibly - these are sensitive PII exposures
Edit the path section to include application-specific endpoints:
path:
- "{{BaseURL}}/your-custom-endpoint"
- "{{BaseURL}}/app-specific-path"Modify the negative matchers to reduce false positives for your specific environment:
negative:
- type: word
words:
- "your-test-keyword"
- "staging-data"Caution
It might give too many false positives , so you need to validate allπβ οΈ to get true positives.
- Too many false positives: Adjust the
negativematchers - Missing detections: Check if target uses different URL patterns
- Rate limiting: Add
-rlparameter to slow down requests - No output: Ensure target is responsive and accessible
This project was inspired by a Telegram channel where someone shared Nuclei templates designed to detect similar types of PII credentials ( for scanning credit & debit cards )
-
@GeeksForGeeks for article about Aadhar & PAN Regexes
-
Fortinet for same
1 hr 21 min - LOL XD π, All templates created by Sonnet 4 model of Anthropic! which took 17 min. The rest of the time, 1 hour and 5 minutes , was spent writing the README and editing the templates.
# Enable debug output:
nuclei -t template.yaml -u target.com -debug
# Verbose mode:
nuclei -t template.yaml -u target.com -vπ§ Email: pookielinuxuser@tutamail.com
For Nuclei-specific issues, refer to:
Licensed under Affero GNU General Public License 3.0
August 18, 2025