🎁 Get the FREE AI Skills Starter Guide β€” Subscribe β†’
BytesAgainBytesAgain
πŸ¦€ ClawHub

Web Security Penetration Test

by @liubo2025code

Automates web security penetration testing by performing reconnaissance, vulnerability scanning, exploitation, and generating detailed compliance reports.

πŸ’‘ Examples

Example 1: Full Penetration Test

from scripts.web_pentest import WebPentest

Initialize scanner

scanner = WebPentest(target="https://example.com")

Run reconnaissance

scanner.reconnaissance()

Run vulnerability scan

scanner.vulnerability_scan()

Test for specific vulnerabilities

scanner.test_sql_injection() scanner.test_xss() scanner.test_command_injection()

Generate report

scanner.generate_report(format="html", output="report.html")

Example 2: API Security Testing

from scripts.api_security_tester import APISecurityTester

Initialize API tester

tester = APISecurityTester(api_url="https://api.example.com")

Test authentication

tester.test_authentication()

Test authorization

tester.test_authorization()

Test input validation

tester.test_input_validation()

Test rate limiting

tester.test_rate_limiting()

Generate API security report

tester.generate_api_report()

Example 3: Custom Payload Testing

from scripts.payload_tester import PayloadTester

Initialize payload tester

tester = PayloadTester(target_url="https://example.com/search")

Test SQL injection payloads

sql_payloads = [ "' OR '1'='1", "'; DROP TABLE users; --", "1' AND SLEEP(5) --" ] tester.test_sql_payloads(sql_payloads)

Test XSS payloads

xss_payloads = [ "", "", "" ] tester.test_xss_payloads(xss_payloads)

Test command injection payloads

cmd_payloads = [ "; ls -la", "| cat /etc/passwd", "id" ] tester.test_command_payloads(cmd_payloads)

βš™οΈ Configuration

Configuration File (config.yaml)

# Scanning configuration
scanning:
  threads: 10
  timeout: 30
  user_agent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36"

Vulnerability detection

vulnerabilities: sql_injection: true xss: true command_injection: true directory_traversal: true file_inclusion: true

Reporting

reporting: format: html include_poc: true risk_level: medium compliance: [pci_dss, gdpr]

Target scope

scope: include_subdomains: true max_depth: 3 excluded_paths: [/logout, /admin/delete]

πŸ“‹ Tips & Best Practices

Scanning Best Practices

1. Get Authorization - Always obtain written permission before testing 2. Define Scope - Clearly define what is in scope and out of scope 3. Use Test Environment - Test in staging/development environments first 4. Schedule Tests - Schedule tests during maintenance windows 5. Monitor Impact - Monitor system performance during tests

Reporting Best Practices

1. Clear Findings - Clearly describe each finding 2. Provide Evidence - Include screenshots and proof of concept 3. Risk Assessment - Assess business impact and risk level 4. Remediation Steps - Provide clear remediation steps 5. Follow-up - Schedule follow-up verification

Ethical Considerations

1. Confidentiality - Keep findings confidential 2. Responsible Disclosure - Follow responsible disclosure practices 3. Data Protection - Do not access or exfiltrate sensitive data 4. Legal Compliance - Comply with all applicable laws and regulations

View on ClawHub
TERMINAL
clawhub install web-security-pentest-skill-complete

πŸ§ͺ Use this skill with your agent

Most visitors already have an agent. Pick your environment, install or copy the workflow, then run the smoke-test prompt above.

πŸ” Can't find the right skill?

Search 60,000+ AI agent skills β€” free, no login needed.

Search Skills β†’