pasax-secure-monitorHost & Kernel Defense·5 min baca
VHost & SSL Reconnaissance
Deteksi otomatis virtual host Nginx/Apache, konfigurasi root direktori, dan pelacak kedaluwarsa SSL.
Chapter 06: VHost & SSL Reconnaissance#
1. Overview#
The VHost discovery engine (internal/vhost/discovery.go) maps all active domains, upstream targets, and SSL certificates running on the host without requiring manual configuration.
2. Discovery Mechanics#
- Nginx Reconnaissance:
- Scans
/etc/nginx/sites-enabled/and/etc/nginx/conf.d/. - Extracts
server_namedirectives. - Resolves
fastcgi_passorproxy_passupstream targets (e.g.unix:/run/php/php8.2-fpm.sockor127.0.0.1:9000). - Reads
ssl_certificatepaths.
- Scans
- Apache2 Reconnaissance:
- Executes
apache2ctl -S(or inspects/etc/apache2/sites-enabled/). - Extracts
ServerName,ServerAlias, andSSLCertificateFile.
- Executes
3. Cryptographic X.509 Certificate Inspection#
For every discovered SSL certificate file:
- Reads the PEM block and parses
x509.Certificate. - Validates
NotBeforeandNotAftertimestamps. - Evaluates SSL status:
valid: More than 14 days remaining.expiring_soon: Between 0 and 14 days remaining.expired: Current timestamp is pastNotAfter.
- Transmits discovered metadata in the next telemetry payload so Pasax Cloud can alert administrators before certificates expire.