11.07.2015 Views

Advanced Mac OS X Rootkits [PDF - Black Hat

Advanced Mac OS X Rootkits [PDF - Black Hat

Advanced Mac OS X Rootkits [PDF - Black Hat

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

6 DINO A. DAI ZOVI DDZ@THETA44.ORGint remove_subsystem ( const struct mig_subsystem * mig ){mach_msg_id_t h, i;// Remove each routine exhaustively from the// mig_buckets tablefor (i = mig -> start ; i < mig -> end ; i ++) {for (h = 0; h < MAX_MIG_ENTRIES ; h ++) {if ( mig_buckets [h]. num == i) {bzero (& mig_buckets [h], sizeof ( mig_buckets [h ]));}}}}return 0;Listing 2. Removing a subsystem from the kernelserver hash tableBootstrap Server only holds ports for servers running on the local hostand provides no functionality analagous to the NetMessage Server.The high level of abstraction and control provided by <strong>Mac</strong>h IPCmakes it an ideal facility for remote control of a <strong>Mac</strong>h-based system.The author’s proof-of-concept rootkit, <strong>Mac</strong>hiavelli, does just this by implementinga facility similar in functionality to the NetMessage Server,however with the spirit and goals of a covert rootkit. <strong>Mac</strong>h IPC messagesare also programming language and byte ordering neutral. Whilethe current implementation uses the native MiG RPC client stub routinesto marshal IPC messages, an alternate implementation could marshallIPC messages by hand in any programming language.<strong>Mac</strong>hiavelli consists of a <strong>Mac</strong>h proxy server on the local controllinghost and a number of remote agent servers that run on remote compromisedhosts. On the controlling host, rootkit management utilitiesobtain a proxy <strong>Mac</strong>h port from the proxy server and use it just as anormal application would use a local <strong>Mac</strong>h port. For example, MiGgeneratedRPC client routines may be used with the proxy port inorder to execute the RPC request on the remote compromised host insteadof the local host. The <strong>Mac</strong>hiavelli proxy server receives the <strong>Mac</strong>hIPC message and transmits it over the network to the remote agent foractual processing by the destination RPC server.5.1. <strong>Mac</strong>hiavelli API. From the client software’s perspective, there islittle difference in performing <strong>Mac</strong>h RPC with local or remote servers.Normally, an application would obtain send rights to the local host,

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!