unit 2 ethical-1
unit 2 ethical-1
Penetration testing (also known as pen testing or ethical hacking) is a simulated cyberattack on a
computer system, network, or web application to identify security vulnerabilities that could be
exploited by malicious actors. The goal is to assess the security posture of the system and provide
actionable recommendations for risk mitigation.
Diagram Description:
1. Reconnaissance: The information gathering phase involves collecting data about the target
system using tools like Nmap, WHOIS, and OSINT (Open Source Intelligence).
4. Post-Exploitation: Assessing the impact of the exploit, such as data exfiltration or privilege
escalation.
5. Maintaining Access: Testing if the attacker can maintain persistent access to the system.
1. Planning and Scoping: Define the scope and objectives of the test, including systems to be
tested and methodologies to be used.
2. Reconnaissance: Perform active and passive information gathering to understand the target
environment.
5. Reporting: Prepare detailed reports outlining vulnerabilities, risks, and remediation steps.
6. Collaboration: Work with IT and security teams to implement security patches and improve
defenses.
7. Continuous Learning: Stay updated on the latest cyber threats, attack vectors, and security
tools.
1. Identifies Vulnerabilities: Discovers security gaps before they are exploited by attackers.
3. Compliance: Helps meet regulatory requirements such as PCI-DSS, GDPR, and HIPAA.
4. Risk Mitigation: Reduces the likelihood of data breaches and financial losses.
5. Ethical Concerns: Requires careful handling to avoid unintended damage or data exposure.
Example:
A financial institution hires a penetration tester to assess the security of its online banking
platform. The tester:
5. The institution implements the recommended fixes, preventing a potential data breach.
Phases of Penetration Testing
Penetration testing is a structured process divided into key phases to systematically identify, exploit,
and report security vulnerabilities in a target system. These phases ensure a comprehensive
assessment of the system's security posture and provide actionable insights for risk mitigation.
• Definition: The first phase involves gathering as much information as possible about the
target system, including IP addresses, domain details, network topology, and employee
information.
• Tools Used: Nmap, WHOIS, Google Dorks, OSINT (Open Source Intelligence).
• Objective: To understand the target environment and identify potential entry points.
• Definition: This phase involves actively probing the target system to identify open
ports, services, operating systems, and vulnerabilities.
• Objective: To create a detailed map of the target system and identify weaknesses.
• Definition: In this phase, the penetration tester attempts to exploit the identified
vulnerabilities to gain unauthorized access to the system.
4. Maintaining Access
• Definition: This phase tests whether the attacker can maintain persistent access to the
system, even after the initial exploit.
5. Covering Tracks
• Definition: The attacker removes evidence of their activities to avoid detection by security
systems or administrators.
• Tools Used: Log cleaners, file deleters, and other anti-forensic tools.
• Objective: To simulate a real-world attack where the attacker avoids being caught.
• Tools Used: Report generation tools like Dradis, Microsoft Word, or LaTeX.
1. Malware Attacks:
Advantages (Attacker): Can automate attacks, potentially gain significant control, and steal valuable
data.
Disadvantages (Attacker): Malware can be detected, and the attacker's identity might be traced.
Developing sophisticated malware requires skill.
Example: A ransomware attack encrypts the victim's files and demands payment for decryption.
Spyware can secretly monitor user activity and steal information
Phishing Attacks:
• Diagram Description: The attacker crafts a convincing phishing email or website, tricking the
victim into revealing their credentials.
• Advantages (Attacker): Relatively easy to execute, can target a large number of victims, and
exploit human trust.
• Disadvantages (Attacker): Phishing campaigns can be detected and blocked. Users are
becoming more aware of phishing tactics.
• Example: An email claiming to be from a bank asks the user to update their account details
by clicking on a link that leads to a fake website.
Brute-Force Attacks:
•
• Diagram Description: The attacker uses automated tools to try various password
combinations until the correct one is found.
• Example: An attacker uses a password cracking tool to try different combinations until they
guess the correct password for a user account.
SQL Injection:
• Definition: Exploiting vulnerabilities in web applications that use SQL databases to inject
malicious SQL code. This can allow the attacker to access, modify, or delete data in the
database.
• Diagram:
•
• Diagram Description: The attacker injects malicious SQL code into a web application,
manipulating the database queries and potentially gaining unauthorized access to data.
• Advantages (Attacker): Can gain access to sensitive data and potentially take control of the
entire database.
• Example: An attacker injects SQL code into a web form to bypass authentication and access
user data.
Network Attacks (5 Types)
o Diagram:
o Diagram Description: The attacker positions themselves between the user and the
server, intercepting and potentially modifying the communication.
o Example: An attacker intercepts a user's login credentials while they are connecting
to a website over an unsecured Wi-Fi network.
2. Eavesdropping:
o Diagram:
3. IP Spoofing:
o Diagram:
o Diagram Description: The attacker sends packets with a forged IP address, making it
appear as if the packets are coming from a different source.
o Advantages (Attacker): Can bypass security measures and launch attacks from a
seemingly untraceable source.
o Definition: A type of DoS attack that floods the target system with ICMP (ping)
requests, overwhelming it and making it unavailable.
o Diagram:
o Diagram Description: The attacker sends a large number of ping requests to the
target system, consuming its resources and causing a denial of service.
5. Port Scanning:
o Definition: Scanning a target system's ports to identify open ports and services
running on them. This information can be used to identify vulnerabilities.
o Diagram:
o
o Diagram Description: The attacker uses port scanning tools to determine which
ports are open on the target system.
o Example: An attacker scans a server to identify open ports and services, looking for