Offensive Security Skill
Purpose: Authorized security testing methodologies and techniques for identifying vulnerabilities.
Atomic Operations
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β SKILL OPERATIONS β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β βββββββββββββββ βββββββββββββββ βββββββββββββββββββββββ β
β βscan_vuln β βtest_inject β βenumerate_services β β
β β β β β β β β
β β Input: β β Input: β β Input: β β
β β - target β β - endpoint β β - host β β
β β - type β β - type β β - port_range β β
β β - depth β β - payloads β β β β
β β β β β β Output: β β
β β Output: β β Output: β β - services[] β β
β β - vulns[] β β - vuln β β - os_detect β β
β β - time β β - evidence β β β β
β βββββββββββββββ βββββββββββββββ βββββββββββββββββββββββ β
β β
β βββββββββββββββββββββββββββββββββββββββββββ β
β β test_authentication β β
β β β β
β β Input: target, test_type β β
β β Output: findings[], weak_creds[] β β
β βββββββββββββββββββββββββββββββββββββββββββ β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Testing Methodology
OWASP Top 10 Coverage
| Vulnerability |
Test Operation |
Detection Method |
| A01 Broken Access Control |
test_authentication |
IDOR, privilege tests |
| A02 Cryptographic Failures |
scan_vulnerability |
TLS/cert analysis |
| A03 Injection |
test_injection |
SQLi, XSS, Command |
| A04 Insecure Design |
manual |
Architecture review |
| A05 Security Misconfig |
enumerate_services |
Header/config scan |
| A06 Vulnerable Components |
scan_vulnerability |
CVE database check |
| A07 Auth Failures |
test_authentication |
Session/token tests |
| A08 Data Integrity |
scan_vulnerability |
Deserialization checks |
| A09 Logging Failures |
manual |
Log analysis |
| A10 SSRF |
test_injection |
SSRF payload tests |
Troubleshooting
Debug Decision Tree
Scan Failed
β
βββΊ E_NETWORK_TIMEOUT
β βββ Check: ping/traceroute target
β βββ Action: Increase timeout, use retry
β βββ Escalate: If persistent, check firewall
β
βββΊ E_RATE_LIMITED
β βββ Check: Response headers for rate info
β βββ Action: Apply exponential backoff
β βββ Escalate: Reduce concurrency
β
βββΊ E_WAF_BLOCKED
β βββ Check: Response body for WAF signature
β βββ Action: Modify payloads, encoding
β βββ Escalate: Document WAF presence
β
βββΊ E_NO_AUTHORIZATION
βββ STOP: Cannot proceed without authorization
Common Issues
| Issue |
Symptom |
Solution |
| False positives |
High vuln count |
Verify manually, adjust sensitivity |
| Slow scans |
Timeout errors |
Reduce depth, batch targets |
| Missing vulns |
Clean scan |
Check scope, increase depth |
| WAF evasion |
Blocked requests |
Use encoding, timing techniques |
Unit Test Template
# tests/test_offensive_skill.py
import pytest
from skills.offensive import OffensiveSecurity
class TestVulnerabilityScan:
def test_valid_web_target(self):
skill = OffensiveSecurity()
result = skill.scan_vulnerability(
target="http://testsite.local",
scan_type="web",
depth="quick"
)
assert result.status == "success"
assert isinstance(result.vulnerabilities, list)
def test_invalid_target_format(self):
skill = OffensiveSecurity()
with pytest.raises(ValidationError) as exc:
skill.scan_vulnerability(target="invalid!!!")
assert exc.value.code == "E_INVALID_TARGET"
def test_authorization_required(self):
skill = OffensiveSecurity(authorization=None)
with pytest.raises(AuthorizationError) as exc:
skill.scan_vulnerability(target="http://target.com")
assert exc.value.code == "E_NO_AUTHORIZATION"
Version History
| Version |
Date |
Changes |
| 2.0.0 |
2025-01-01 |
Production-grade with atomic operations |
| 1.0.0 |
2024-12-29 |
Initial release |