Giter Site home page Giter Site logo

dl_kextsymboltool's Introduction

dl_kextsymboltool

A tool for proxy kernel extensions generation.

The tool is used to generate a proxy kext for Mac OS X to export kernel symbols/functions which are not available via Apple provided proxy drivers com.apple.kpi.bsd , com.apple.kpi.dsep , com.apple.kpi.iokit , com.apple.kpi.libkern , com.apple.kpi.mach , com.apple.kpi.private , com.apple.kpi.unsupported .

For example to get access to mac_proc_set_enforce , proc_iterate , proc_lock , proc_unlock run the following script. The generated binary file should be places in kext bundle's Contents/MacOS folder, you also need Contents/Info.plist as for any regular kernel extension( for example look at Info.plist in any of the Apple's proxy kernel extensions ). This kext bundle should be declared as a dependency in OSBundleLibraries for a kernel extension using the exported functions, if you use kextload/kextutil use -d flag to declare dependency on load.

 #!/bin/bash
 NAME=/work/MyProxyKernelExtension  
 # old MacOS X placed the kernel in the root directory
 # nm -gj /mach_kernel > allsymbols  
 # on the lates macOS the kernel can be found at /System/Library/Kernels
 nm -gj /System/Library/Kernels/kernel > allsymbols 
 echo "_mac_proc_set_enforce" > ${NAME}.exports  
 echo "_proc_iterate" >> ${NAME}.exports  
 echo "_proc_lock" >> ${NAME}.exports  
 echo "_proc_unlock" >> ${NAME}.exports  
 # include any more symbols needed    
 
 dl_kextsymboltool -arch i386 -import allsymbols  -export ${NAME}.exports -output ${NAME}_32  
 dl_kextsymboltool -arch x86_64 -import allsymbols -export ${NAME}.exports -output ${NAME}_64 
 
 # make a universal kext 
 lipo -create ${NAME}_32 ${NAME}_64 -output ${NAME} 

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.