Overview
scan4all supports custom POC development through two primary methods:Go POCs
Native Go code for complex detection logic and maximum performance
YAML POCs
Declarative YAML templates for simpler web vulnerability detection
Creating Go POCs
Step 1: Add Fingerprint
First, ensure the target technology has a fingerprint inpkg/fingerprint/localFingerData.go:
Step 2: Create POC File
Create a new directory and Go file inpocs_go/:
Step 3: Write POC Function
Step 4: Register POC
Add detection logic topocs_go/go_poc_check.go:
Step 5: Import Package
Add import at the top ofgo_poc_check.go:
Creating YAML POCs
Step 1: Verify Fingerprint
Ensure fingerprint exists inpkg/fingerprint/localFingerData.go.
Step 2: Create YAML File
Create a YAML file inpocs_yml/ymlFiles/ following the naming convention:
Naming: {fingerprint}-{cve/vulnerability-id}-{description}.yml
Example: yourapp-cve-2024-12345-rce.yml
Step 3: Write YAML POC
YAML POC Components
Metadata Fields
Metadata Fields
Request Configuration
Request Configuration
Expression Language
Expression Language
Response Checks:String Functions:Encoding:Random Generation:
Reverse Platform
Reverse Platform
For SSRF/RCE detection with DNS callbacks:Requires configuration:
Utility Functions
HTTP Request Helpers
Response Handling
Logging Functions
Testing POCs
Local Testing
Unit Testing
Create test fileyourapp/CVE_2024_12345_test.go:
Best Practices
Precise Detection
Use specific vulnerability indicators to minimize false positives
Error Handling
Always handle network errors and edge cases gracefully
Performance
Keep POCs fast - they execute on every matching target
Documentation
Document POC purpose, affected versions, and references
Security Considerations
Code Quality
Clear Naming
Clear Naming
Validation
Validation
Comments
Comments
Examples from Codebase
Simple Detection
Complex Detection
Troubleshooting
POC Not Executing
POC Not Executing
Possible causes:
- Fingerprint not detected
- Case mismatch in switch statement
- POC not registered in
go_poc_check.go - Package not imported
False Positives
False Positives
Solutions:
- Add more specific detection criteria
- Verify multiple indicators
- Test against patched versions
- Check for edge cases
Build Errors
Build Errors
Common issues:
Related Resources
Go POCs
Explore existing Go POC implementations
Xray POCs
Learn about YAML POC structure
Fingerprinting
Understand fingerprint detection system
Development
Learn about scan4all architecture