13.)Threats and Vulnerability Analysis of Linux
13.)Threats and Vulnerability Analysis of Linux
Analysis in Linux
Faculty Instructor: Debjani Ghosh
Types of Vulnerabilities
1. Direct
2. Indirect
3. Veiled
4. Conditional
Direct Vulnerabilities
• Direct vulnerabilities are immediate flaws or weaknesses that
attackers can exploit without intermediaries.
• They often stem from poor configurations or weak access
controls.
• Example: A weak root password on a Linux system provides
direct access if someone tries a brute-force attack.
• Other Examples:
o Unpatched software: Known vulnerabilities in applications or services
(e.g., SSH, Apache).
o Exposed Ports: Open services (e.g., FTP on port 21) accessible to
everyone without restrictions.
Indirect Vulnerabilities
• Indirect vulnerabilities involve an attacker gaining access through
intermediaries or compromised third-party software.
• Example: An attacker compromises a Linux web server and uses
it to access internal network systems (e.g., databases or other
Linux servers).
• Other Examples:
o Man-in-the-Middle (MitM) Attacks: Intercepting traffic to gather
information or inject malicious code.
o Dependency Exploits: Vulnerabilities in packages or dependencies
installed on the Linux system (e.g., a bug in Python libraries).
Veiled Vulnerabilities
• Veiled vulnerabilities are hidden flaws that are difficult to detect and
usually embedded in malware.
• Example: A rootkit that modifies essential system commands (e.g., ps
or top) to hide its processes, making it difficult to detect.
• Note: A rootkit is a type of malware that allows cybercriminals to gain
access to a computer system and perform malicious activities without
being detected:
• Other Examples:
o Modified Kernel Modules: Attackers inject code into kernel modules to avoid
detection.
o Trojanized Programs: Attackers replace binaries (e.g., netstat) with malicious
versions that hide malicious network connections.
Practical Example
• Suppose you suspect your system might have been
compromised. You run the netstat command to check for
unusual connections:
How to Detect Trojanized Programs:
• Verify Checksums: Use tools like sha256sum or md5sum to compare
the checksums of binaries against known good versions.
o This command generates a new SSH key pair with specific parameters.
o ssh-keygen: This is the command-line tool for generating SSH keys. It creates both a
private key and a public key.
o -t rsa: This specifies the type of encryption algorithm to use. Here, rsa means it will
use the RSA algorithm (Rivest-Shamir-Adleman), which is widely used for secure data
transmission.
o -b 4096: This option defines the number of bits in the key. A key size of 4096 bits is
quite strong and more secure than the default 2048 bits. The larger the key size, the more
difficult it is to crack, but it also requires more processing power.
o -C "[email protected]": This is a comment or label for the key, often set to your
email or username to help identify the key. This comment is appended to the public key
file, making it easier to manage keys by associating them with specific users.
SSH Key Pair for Secure Authentication