WSSiP - Application for capturing, modifying and sending custom WebSocket data from client to server and vice versa
Short for "WebSocket/Socket.io Proxy", this tool, written in Node.js, provides a user interface to capture, intercept, send custom messages and view all WebSocket and Socket.IO communications between the client and server.
Upstream proxy support also means you can forward HTTP/HTTPS traffic to an intercepting proxy of your choice (e.g. Burp Suite or Pappy Proxy) but view WebSocket traffic in WSSiP. More information can be found on the blog post.
There is an outward bridge via HTTP to write a fuzzer in any language you choose to debug and fuzz for security vulnerabilities.
Installation
From Packaged Application
See Releases.
From npm/yarn (for CLI commands)
Run the following in your command line:
npm:
# Install Electron globally
npm i -g [email protected]
# Install wssip global for "wssip" command
npm i -g wssip
# Launch!
wssip
yarn global bin
is in your PATH
)yarn global add [email protected]
yarn global add wssip
wssip
npm install electron
(or yarn add electron
) inside the installed WSSiP directory if you do not want to install Electron globally, as the app packager requires Electron be added to developer dependencies.From Source
Using a command line:
# Clone repository locally
git clone https://github.com/nccgroup/wssip
# Change to the directory
cd wssip
# If you are developing for WSSiP:
# npm i
# If not... (as to minimize disk space):
npm i [email protected]
npm i --production
# Start application:
npm start
Usage
- Open the WSSiP application.
- WSSiP will start listening automatically. This will default to localhost on port 8080.
- Optionally, use Tools > Use Upstream Proxy to use another intercepting proxy to view web traffic.
- Configure the browser to point to http://localhost:8080/ as the HTTP Proxy.
- Navigate to a page using WebSockets. A good example is the WS Echo Demonstration.
- ???
- Potato.
Fuzzing
WSSiP provides an HTTP bridge via the man-in-the-middle proxy for custom applications to help fuzz a connection. These are accessed over the proxy server.
A few of the simple CA certificate downloads are:
- http://mitm/ca.pem / http://mitm/ca.der (Download CA Certificate)
- http://mitm/ca_pri.pem / http://mitm/ca_pri.der (Download Private Key)
- http://mitm/ca_pub.pem / http://mitm/ca_pub.der (Download Public Key)
Get WebSocket Connection Info
Returns whether the WebSocket id is connected to a web server, and if so, return information.
- URL
GET http://mitm/ws/:id
- URL Params
id=[integer]
- Success Response (Not Connected)
- Code: 200
Content:{connected: false}
- Code: 200
- Success Response (Connected)
- Code: 200
Content:{connected: true, url: 'ws://echo.websocket.org', bytesReceived: 0, extensions: {}, readyState: 3, protocol: '', protocolVersion: 13}
- Code: 200
Send WebSocket Data
Send WebSocket data.
- URL
POST http://mitm/ws/:id/:sender/:mode/:type?log=:log
- URL Params
Required:
id=[integer]
sender
one ofclient
orserver
mode
one ofmessage
,ping
orpong
type
one ofascii
orbinary
(text
is an alias ofascii
)
Optional:
log
eithertrue
ory
to log in the WSSiP application. Errors will be logged in the WSSiP application instead of being returned via the REST API.
- Data Params
Raw data in the POST field will be sent to the WebSocket server.
- Success Response:
- Code: 200
Content:{success: true}
- Code: 200
- Error Response:
- Code: 500
Content:{success: false, reason: 'Error message'}
- Code: 500
WSSiP - Application for capturing, modifying and sending custom WebSocket data from client to server and vice versa
Reviewed by Zion3R
on
11:30 AM
Rating: