## System Hacking: Privilege Escalation & Malware
System Hacking involves gaining deeper access to a compromised system and maintaining that access. A primary goal is Privilege Escalation, which is the act of gaining higher-level access than initially obtained. This can be achieved through various methods:
- Kernel Exploits: Exploiting vulnerabilities in the operating system's kernel to gain root or system-level privileges.
- Misconfigurations: Leveraging improperly configured services, applications, or file permissions. Examples include SUID/SGID binaries on Linux (allowing a user to run an executable with the permissions of the file owner/group) or weak permissions on Windows services.
- DLL Hijacking: Placing a malicious DLL in a directory where a legitimate application expects to load a system DLL, causing the application to load the malicious one instead.
- Path Environment Variable Exploitation: Manipulating the system's PATH variable to execute a malicious binary instead of a legitimate one when a command is run.
- Scheduled Tasks: Modifying or creating scheduled tasks to execute commands with elevated privileges.
Malware & Evasion
Malware (Malicious Software) is a significant component of system hacking. Key types include:
- Rootkits: Designed to hide the presence of malware and provide persistent backdoor access by modifying core OS components.
- Ransomware: Encrypts user data and demands a ransom for its release.
- Trojans: Disguised as legitimate software but perform malicious actions.
- Spyware: Gathers information about a user without their knowledge.
Malware Analysis can be Static (examining code without execution, e.g., disassemblers) or Dynamic (observing behavior in a controlled environment, e.g., sandboxes). Attackers use Anti-Malware Evasion techniques like polymorphism, metamorphism, and obfuscation to bypass detection.
Password Attacks & Covering Tracks
Password Cracking is crucial for gaining access to other systems or accounts. Techniques include:
- Brute-Force Attacks: Trying every possible combination.
- Dictionary Attacks: Using pre-compiled lists of common passwords.
- Rainbow Tables: Pre-computed tables of hash values to quickly reverse password hashes (e.g., NTLM for Windows).
- Hybrid Attacks: Combining dictionary and brute-force methods.
Covering Tracks is essential to avoid detection and maintain persistence. This involves:
- Clearing Logs: Erasing event logs, web server logs, or other system logs.
- Modifying Timestamps: Using tools like `touch` (Linux) or `Set-ItemProperty` (PowerShell) to change file access, modification, and creation times.
- Steganography: Hiding data, such as malicious payloads or exfiltrated information, within seemingly innocent files (images, audio).
- Alternate Data Streams (ADS): On NTFS file systems, this technique allows data to be hidden within existing files without affecting their apparent size or functionality.
What is the primary goal of Privilege Escalation?
To gain higher-level access (e.g., root, administrator) on a compromised system.
tap to reveal
What is the purpose of the SUID bit on a Linux executable?
It allows the executable to run with the permissions of the file owner, regardless of the user executing it.
tap to reveal
Which type of malware is specifically designed to hide its presence and maintain persistent access?
A Rootkit.
tap to reveal
What is Steganography?
The technique of hiding data within other seemingly innocuous data, such as images or audio files.
tap to reveal
What are Rainbow Tables used for in password cracking?
They are pre-computed tables of hash values used to quickly reverse password hashes without brute-forcing each time.
tap to reveal
On an NTFS file system, how can data be hidden without affecting the apparent size of a file?
Using Alternate Data Streams (ADS).
tap to reveal
What is the difference between static and dynamic malware analysis?
Static analysis examines code without execution, while dynamic analysis observes malware behavior in a controlled environment (e.g., sandbox).
tap to reveal