
Detecting process hiding implemented by Rubilyn involves understanding its methods and leveraging appropriate tools to reveal the hidden processes. Rubilyn employs a technique known as Direct Kernel Object Manipulation (DKOM), specifically unlinking the 'p_list', which effectively removes the hidden process from the process list, making it invisible to standard process listing commands. This makes it incredibly difficult to detect without specialized tools or deep system knowledge.
Table of Contents
Process Hiding Through Unlinking p_list
The process structure in the Mac OS kernel has what is referred to as 'p_list,' a linked list that contains all processes. Rubilyn, in its advanced process hiding technique, directly modifies these kernel objects to unlink a particular process from this process list. Doing this effectively hides a process, making it undetectable by conventional means.
Active Monitor as a Detection Tool
One of the tools that can be used in detecting processes hidden by Rubilyn is Active Monitor. This tool monitors active processes running on the system. It can identify when a process is unlinked from the 'p_list', which clearly indicates an intrusion by tools such as Rubilyn. Despite this, the robustness of Rubilyn, which goes beyond unlinking 'p_list', makes it an onerous task to fully detect its activities using Active Monitor.
Volatility as a Detection Tool
Volatility is another powerful tool that is useful in detecting hidden processes. It is an advanced memory forensics framework designed to analyze RAM in 32-bit/64-bit systems. Its wide array of features allows it to delve deeper into the system to detect processes hidden through the DKOM approach potentially. However, even with a tool as powerful as volatility, Rubilyn can still evade detection.
Bypassing Volatility Through Unlinking p_list, p_hash, p_pglist, and Task
Rubilyn can bypass detection from volatility by unlinking 'p_list' and 'p_hash,' 'p_pglist,' and 'task.' With these additional measures, processes hidden by Rubilyn become even more challenging to detect. The complexity of the Rubilyn rootkit presents significant hurdles in detecting hidden processes, even with advanced tools.
Hiding and Detecting a Rootkit
The process of hiding and detecting a rootkit like Rubilyn is complex, involving challenges in bypassing detection methods. Maintaining the stability of the rootkit is crucial, while developers also have to ensure the accuracy of the process of dumping and parsing memory.
The Challenges of Bypassing Detection Methods
Rootkits like Rubilyn use sophisticated methods to evade detection, which can present enormous challenges. Besides unlinking the 'p_list' to hide a process, Rubilyn goes further to unlink 'p_hash,' 'p_pglist,' and 'task,' making detection even more complex. While beneficial in keeping the rootkit undetectable, these layers of security measures can pose significant difficulties for detection tools and methods aiming to uncover rootkit-infected processes.
Rootkit Stability as a Primary Concern
The stability of a rootkit is another primary concern in both its hiding and detection. A rootkit that causes system instability can be counterproductive as it can cause suspicion and prompt investigations, which might eventually lead to its detection. Therefore, Rubilyn aims to keep its presence unnoticeable, continuing to operate subtly without causing significant changes to the system's regular function to remain undetectable.
Dumping and Parsing Memory
The dumping and parsing of memory is a critical step in detecting rootkits. It involves carefully analyzing memory dumps to identify patterns or irregularities that might indicate the presence of a hidden process. Despite the complexity of this process and the advanced techniques used by Rubilyn to hide its processes, careful analysis of memory dumps can potentially expose its activities, thus leading to its detection.
The 'User Mode Magic'
In detecting hidden processes and the operation of a rootkit like Rubilyn, specific 'User Mode Magic' techniques can prove invaluable. This refers to a set of userland strategies that can assist in identifying earlier unknown aspects of rootkit hiding and processes. Key among these is the function and importance of launchd—a service management framework used by Mac OS—in detecting hidden processes and the ability to list all processes hidden in the kernel using a user mode tool.
Role of Launchd in Detecting Hidden Processes
In the ecosystem of the Mac OS, launchd plays an integral role in launching and supervising processes, jobs, and services. It is the first process to run on a Mac OS system once the kernel has been initialized, giving it an overarching view of all processes running on the system. Given this unique position, it becomes a helpful tool in detecting hidden processes launched by rootkits like Rubilyn. Its comprehensive oversight ability allows it to spot even those processes unlinked from the 'p_list' and hidden in the kernel.
Listing All Processes Hidden in Kernel Via a User Mode Tool
Another powerful technique in the 'User Mode Magic' arsenal is the ability to list all processes hidden in the kernel using a user mode tool. With proper understanding and interpretation, this method can help detect hidden processes through the advanced DKOM technique used by Rubilyn. Even with the added obfuscation introduced by unlinking from 'p_hash,' 'p_pglist,' and 'task,' the ability to list all processes with a user mode tool can allow for the detection of such hidden processes, thereby foiling the stealth objectives of the rootkit.
Modifying Data in Launchd
One approach Rubilyn took in hiding a process is manipulating data within launchd, the service management daemon in Mac OS. This strategy requires gaining root permission, locating the necessary job manager, and unlinking the targeted job to hide a process successfully.
The Necessity of Getting Root Permission
To modify data within launchd, it's imperative to gain root permission. Root permission, or superuser, administrator, or system administrator permission, provides full control over the system. This level of access allows for the modification of crucial system files and operation of launchd, enabling Rubilyn to implement its process hiding mechanism without restriction.
Finding root_jobmgr and Unlinking the Job
Having gained root permission, the subsequent step for Rubilyn would be identifying the root_jobmgr or root job manager and unlinking (removing) the intended job from it. As the name suggests, the root job manager manages all launchd jobs for the entire system. By unlinking the job, it gets removed from the job list, effectively making the associated process invisible to the operating system and, thus, hidden from view.
Making a Process Invisible via Modifying Data in Launchd
The practical demonstration of making a process invisible by modifying data within launchd involves executing the previous steps successfully. Once Rubilyn has gained root permission and identified root_jobmgr, it unlinks the targeted job. This causes the process associated with the job to be excluded from the list of active jobs, effectively disguising its activity and hiding it from monitoring mechanisms. The process becomes invisible on the system, thus demonstrating Rubilyn's advanced process-hiding capabilities.



