T09 · Insecure Skill Coding Practices
- Location
config/credentials.example.json:7- Finding
WinRM TLS Certificate Validation Is Disabled by Default
- Content
View full analysis
Vulnerability Details
File Location:
config/credentials.example.json:7-13
Related Usage:README.md:17-19
Vulnerability Type: Improper TLS certificate validation
Risk Level: HighVulnerable Code
json "winrm": { "host": "WINRM_HOST", "port": 5986, "transport": "https", "auth": "ntlm", "username": "WINDOWS_USER", "password": "USE_SECURE_STORAGE_INSTEAD", "serverCertValidation": "ignore" }The documented setup instructs users to copy this example into the active configuration:
bash # Or edit config/credentials.json (do not commit it to version control!) cp config/credentials.example.json config/credentials.json # Then edit config/credentials.json and enter the actual credentialsTechnical Analysis
Although WinRM is configured to use HTTPS, setting
serverCertValidationtoignoreprevents the client from authenticating the remote server's certificate. Encryption without endpoint authentication does not adequately protect against an active man-in-the-middle attacker.The documented configuration workflow tells users to copy the example file and replace its credential placeholders. Unless users independently change the certificate-validation option, the resulting operational configuration retains the insecure setting. This also conflicts with the project's general recommendation to use WinRM over HTTPS securely.
An attacker with the ability to intercept, redirect, or spoof network traffic between the Agent server and the Windows host could present an arbitrary certificate without causing validation to fail. The exact ability to capture or relay NTLM authentication depends on the WinRM client and authentication settings, but disabling certificate verification makes endpoint impersonation and traffic manipulation materially easier.
Attack Path
- A user copies
config/credentials.example.jsontoconfig/credentials.jsonas instructed. - The user supplies a real WinRM host, username, and pas ...[truncated 1326 chars]
- A user copies
- Remediation
View remediation
Remediation Suggestions
- Replace the insecure default with strict certificate validation:
json "serverCertValidation": "validate"- Configure the Agent server to trust the CA that issued the Windows host's WinRM certificate.
- For self-signed certificates, import the expected certificate into a dedicated trust store or implement explicit certificate/thumbprint pinning instead of globally disabling validation.
- Fail closed on expired, mismatched, revoked, or untrusted certificates.
- Update the setup documentation so copying the example produces a secure configuration without requiring additional undocumented changes.
- Add startup validation that rejects
serverCertValidation: "ignore"outside an explicitly designated local test environment. - If an exceptional test-only bypass is retained, require an explicit opt-in warning and prohibit its use with production credentials.
- Use a dedicated least-privileged WinRM account and restrict network access to the expected Agent server as defense in depth.
