Insecure Network Socket
Overview
Plain TCP sockets transmit data unencrypted. Any network observer can intercept credentials, session tokens, and sensitive data. Applications should use TLS-wrapped sockets for all sensitive communication.
Detection Strategy
socket.socket()in Python without ssl.wrap_socket()net.Socketin Node.js instead oftls.connect()net.Dial("tcp", ...)in Go instead oftls.Dial
Remediation
Wrap all sockets in TLS using the appropriate library:
- Python:
ssl.create_default_context()+context.wrap_socket() - Node.js:
tls.connect()orhttps - Go:
tls.Dial()orcrypto/tls