| name | pentesting |
| description | Ethical penetration testing guidance with AI assistance. Use ONLY for authorized security testing, bug bounty programs, or systems you own. STRICT SAFETY GUIDELINES MUST BE FOLLOWED. |
CRITICAL SAFETY WARNING
This skill MUST ONLY be used for:
- Systems you own or have explicit written permission to test
- Authorized bug bounty programs with clear scope
- Educational environments with proper authorization
- Security research with responsible disclosure
NEVER use this skill for:
- Unauthorized access to systems you don't own
- Testing systems without explicit permission
- Malicious activities or attacks
- Violating laws or regulations
- Bypassing security controls without authorization
Legal Consequences:
- Unauthorized access is illegal (Computer Fraud and Abuse Act, GDPR, etc.)
- Penalties include fines, imprisonment, and criminal records
- Civil liability for damages
- Professional consequences
Ethical Guidelines
Core Principles
- Authorization First: Always obtain explicit written permission before testing
- Scope Adherence: Only test within defined boundaries
- Responsible Disclosure: Report vulnerabilities through proper channels
- No Harm: Do not cause damage or disruption
- Privacy Respect: Protect sensitive data encountered during testing
- Legal Compliance: Follow all applicable laws and regulations
Authorization Requirements
- Written permission from system owner
- Clear scope definition (IPs, domains, systems)
- Testing window/timeframe
- Allowed testing methods
- Contact information for security team
- Rules of engagement
AI-Assisted Pentesting
When AI Can Help
- Generating test payloads (within scope)
- Analyzing code for vulnerabilities
- Creating documentation
- Suggesting testing methodologies
- Automating repetitive tasks
- Learning new techniques
When AI Should NOT Be Used
- To bypass authorization
- To generate exploits for unauthorized systems
- To automate attacks without oversight
- To obfuscate malicious activities
- To evade detection controls
AI Safety Protocols
- Verify Authorization: AI must confirm authorization before suggesting any testing
- Scope Validation: AI must check if target is within authorized scope
- Harm Assessment: AI must assess potential impact before suggesting actions
- Legal Compliance: AI must ensure suggested actions comply with laws
- Human Oversight: All AI suggestions must be reviewed by authorized personnel
Testing Methodologies
OWASP Testing Guide
Follow OWASP Web Security Testing Guide (WSTG):
- Information Gathering
- Configuration Management
- Identity Management
- Authentication
- Authorization
- Session Management
- Input Validation
- Error Handling
- Data Protection
- Business Logic
- Client-Side Testing
PTES (Penetration Testing Execution Standard)
- Pre-Engagement Interactions
- Intelligence Gathering
- Threat Modeling
- Vulnerability Analysis
- Exploitation
- Post-Exploitation
- Reporting
NIST SP 800-115
- Planning
- Discovery
- Attack
- Reporting
Common Vulnerability Types
Web Applications
- SQL Injection
- Cross-Site Scripting (XSS)
- Cross-Site Request Forgery (CSRF)
- Authentication Bypass
- Authorization Flaws
- Insecure Direct Object References
- Security Misconfiguration
- Sensitive Data Exposure
- Broken Access Control
- Server-Side Request Forgery (SSRF)
Network Security
- Unencrypted Services
- Default Credentials
- Misconfigured Firewalls
- Outdated Software
- Weak Authentication
- Network Sniffing Vulnerabilities
AI/ML Systems
- Prompt Injection
- Model Inversion
- Data Poisoning
- Membership Inference
- Adversarial Examples
- Model Extraction
Testing Tools (Use Only With Authorization)
Reconnaissance
nmap -sV -sC target.com
nikto -h target.com
whatweb target.com
Vulnerability Scanning
zap-cli quick-scan --self-contained http://target.com
Web Testing
Responsible Disclosure
Disclosure Process
- Report to Vendor: Contact security team through proper channels
- Provide Details: Include vulnerability description, impact, reproduction steps
- Allow Time: Give vendor reasonable time to fix (typically 90 days)
- Coordinate: Coordinate disclosure timeline with vendor
- Public Disclosure: Only after fix is deployed or deadline expires
Bug Bounty Programs
- Read program rules carefully
- Understand scope and exclusions
- Follow reporting guidelines
- Don't exceed testing boundaries
- Don't test on production data
- Report through official channels
Sample Disclosure Template
Subject: Security Vulnerability Report - [Vulnerability Name]
Dear Security Team,
I have discovered a security vulnerability in [System Name].
Vulnerability: [Brief description]
Severity: [Critical/High/Medium/Low]
Impact: [Potential impact]
Affected System: [URL/IP]
Steps to Reproduce:
1. [Step 1]
2. [Step 2]
3. [Step 3]
Suggested Fix: [Recommendation]
I discovered this vulnerability while [context: authorized testing/bug bounty program].
Please let me know if you need additional information.
Regards,
[Your Name]
[Contact Information]
Safety Checklists
Before Testing
During Testing
After Testing
AI Safety Guidelines for Pentesting
What AI Should Do
- Ask for authorization before suggesting tests
- Verify scope before generating payloads
- Suggest defensive measures
- Provide educational explanations
- Recommend responsible disclosure
- Flag potential legal issues
- Encourage ethical behavior
What AI Should NOT Do
- Generate exploits for unauthorized targets
- Suggest bypassing authorization
- Provide instructions for illegal activities
- Obfuscate malicious intent
- Automate attacks without oversight
- Ignore scope boundaries
- Minimize legal consequences
AI Response Protocol
When asked about pentesting:
- Verify Authorization: Ask "Do you have authorization to test this system?"
- Check Scope: Ask "What is the authorized scope?"
- Assess Intent: Determine if request is legitimate
- Provide Guidance: If authorized, provide ethical guidance
- Refuse Malicious Requests: If unauthorized, refuse and explain why
Legal Framework
Key Laws
- CFAA (US): Computer Fraud and Abuse Act
- GDPR (EU): General Data Protection Regulation
- CCPA (California): California Consumer Privacy Act
- Computer Misuse Act (UK): UK computer security law
- Various Country Laws: Local cybersecurity laws
Penalties
- Fines up to millions of dollars
- Imprisonment (up to 20+ years)
- Civil liability
- Professional license revocation
- Employment termination
- Criminal record
Educational Resources
Certifications
- CEH (Certified Ethical Hacker)
- OSCP (Offensive Security Certified Professional)
- CISSP (Certified Information Systems Security Professional)
- PTES (Penetration Testing Execution Standard)
- OWASP certifications
Documentation
- OWASP Web Security Testing Guide
- NIST SP 800-115
- PTES Technical Guidelines
- OSSTMM (Open Source Security Testing Methodology)
Communities
- OWASP Foundation
- Bug bounty platforms (HackerOne, Bugcrowd)
- Local security meetups
- Security conferences (DEF CON, Black Hat)
Common Gotchas
Authorization Issues
- Assuming implied permission
- Testing beyond agreed scope
- Not getting written permission
- Ignoring time restrictions
- Testing production systems without approval
Legal Issues
- Not understanding local laws
- Violating data protection laws
- Testing across jurisdictions
- Not considering international laws
- Ignoring terms of service
Ethical Issues
- Causing disruption
- Accessing sensitive data unnecessarily
- Not reporting vulnerabilities responsibly
- Public disclosure before vendor notification
- Using discovered vulnerabilities maliciously
Scripts (Use Only With Authorization)
Basic Security Check (Educational)
"""
Educational script to demonstrate security concepts.
ONLY RUN ON SYSTEMS YOU OWN OR HAVE EXPLICIT PERMISSION.
"""
def check_security_headers(url):
"""
Check for security headers (educational example).
Requires authorization to test target.
"""
import requests
print("WARNING: Only run on authorized targets")
response = requests.get(url)
headers = {
'X-Frame-Options': response.headers.get('X-Frame-Options'),
'X-Content-Type-Options': response.headers.get('X-Content-Type-Options'),
'Strict-Transport-Security': response.headers.get('Strict-Transport-Security'),
'Content-Security-Policy': response.headers.get('Content-Security-Policy'),
}
return headers
Vulnerability Scanner Template
"""
Template for authorized vulnerability scanning.
MUST HAVE EXPLICIT WRITTEN AUTHORIZATION.
"""
def authorized_scan(target, authorization_document):
"""
Scan target only with proper authorization.
"""
if not authorization_document:
raise Exception("Authorization required")
pass
When to Use This Skill
Appropriate Use:
- Learning about security concepts
- Understanding vulnerabilities
- Preparing for authorized testing
- Bug bounty program participation
- Security research with proper oversight
- Building secure applications
Inappropriate Use:
- Testing systems without permission
- Learning to hack unauthorized targets
- Bypassing security controls
- Attacking systems
- Stealing data
- Causing harm
Reporting Security Issues
If you discover a security issue:
- Stop testing immediately
- Document the finding
- Report through responsible disclosure
- Do not exploit further
- Do not disclose publicly
- Follow vendor's disclosure policy
Resources
Final Reminder
Ethical hacking is about improving security, not causing harm.
Always obtain authorization before testing.
Follow responsible disclosure practices.
Respect privacy and legal boundaries.
Use your skills for good.