Formally-Based Black-Box Monitoring of Security Protocols