Advanced vulnerability scanner for Ragnar server mode. Provides enterprise-grade vulnerability scanning using: - Nuclei for template-based scanning - Nikto for web server assessment - SQLMap for SQL injection testing - OWASP ZAP for web application security testing - En
| 162 | 'delegated_to': self.delegated_to, |
| 163 | 'egress_iface': self.egress_iface, |
| 164 | 'egress_tunneled': self.egress_tunneled, |
| 165 | 'duration_seconds': ( |
| 166 | (self.completed_at or datetime.now()) - self.started_at |
| 167 | ).total_seconds() if self.started_at else 0 |
| 168 | } |
| 169 | |
| 170 | |
| 171 | class AdvancedVulnScanner: |
| 172 | """ |
| 173 | Advanced vulnerability scanner for Ragnar server mode. |
| 174 | |
| 175 | Provides enterprise-grade vulnerability scanning using: |
| 176 | - Nuclei for template-based scanning |
| 177 | - Nikto for web server assessment |
| 178 | - SQLMap for SQL injection testing |
| 179 | - OWASP ZAP for web application security testing |
| 180 | - Enhanced nmap vuln scripts |
| 181 | """ |
| 182 | |
| 183 | # Nuclei severity mapping |
| 184 | NUCLEI_SEVERITY_MAP = { |
| 185 | 'info': VulnSeverity.INFO, |
| 186 | 'low': VulnSeverity.LOW, |
| 187 | 'medium': VulnSeverity.MEDIUM, |
| 188 | 'high': VulnSeverity.HIGH, |
| 189 | 'critical': VulnSeverity.CRITICAL, |
| 190 | } |
| 191 | |
| 192 | # ZAP severity/risk mapping (ZAP uses 0-3 risk levels) |
| 193 | ZAP_RISK_MAP = { |
| 194 | 0: VulnSeverity.INFO, # Informational |
| 195 | 1: VulnSeverity.LOW, # Low |
| 196 | 2: VulnSeverity.MEDIUM, # Medium |
| 197 | 3: VulnSeverity.HIGH, # High |
| 198 | } |
| 199 | ZAP_RISK_NAME_MAP = { |
| 200 | 'informational': VulnSeverity.INFO, |
| 201 | 'low': VulnSeverity.LOW, |
| 202 | 'medium': VulnSeverity.MEDIUM, |
| 203 | 'high': VulnSeverity.HIGH, |
| 204 | } |
| 205 | |
| 206 | # ZAP confidence levels |
| 207 | ZAP_CONFIDENCE_MAP = { |
| 208 | 0: 'False Positive', |
| 209 | 1: 'Low', |
| 210 | 2: 'Medium', |
| 211 | 3: 'High', |
| 212 | 4: 'Confirmed', |
| 213 | } |
| 214 | ZAP_CONFIDENCE_NAME_MAP = { |
| 215 | 'false positive': 'False Positive', |
| 216 | 'low': 'Low', |
| 217 | 'medium': 'Medium', |
| 218 | 'high': 'High', |
| 219 | 'confirmed': 'Confirmed', |
| 220 | } |
| 221 |
no outgoing calls
no test coverage detected