Unit 5
Unit 5
• Mechanism:
• The attacker inject a script into a trusted website that doesn’t properly
validate user input. When other users visit the site, the injected script is
executed in their browser.
• This script can perform action on behalf of the victim, such as stealing session
cookies, or redirecting them to malicious website.
• In 2016, a popular airlines website was found vulnerable to XXS. This allowed
attackers to inject javascript into the website, which redirected user to
phishing site where their credit card were stolen.
• Defense
• Input Validation (Sanitize User Input):Remove potentially dangerous characters
like <, >, &, ', and " from user input.
• Content Security Policy: restrict the execution of unauthorized scripts.
• Regular scan and patch any web application vulnerabilities.
• DDoS (Distributed Denial of Service) Attack
• A DDoS attack is a cyberattack where a large number of compromised devices
(botnets) flood a targeted system, server, or network with overwhelming
traffic, making it unavailable to legitimate user.
• Mechanism:
• The attack use single source to flood a target with traffic. In a Ddos attack,
multiple compromised system are used to flood the target with traffic
simultaneously.
• The large volume of traffic exhausts system resource such as bandwidth,
memory, CPU rendering the service inaccessible to legitimate users.
Example: Nepal Airport, custom office.
• Defense:
• Web Application Firewall (WAF)
• Traffic filtering
• Load balancer
• Ddos protection service
Endpoint Detection & Response (EDR) Detect and block malicious payloads on devices.
Email Verification Tools (DMARC, SPF, DKIM) Ensure emails are from legitimate sources.
Zero Trust Security Model Verify every request before granting access.
• Ransomware
• Ransomware is malicious software that encrypts a victim's data, rendering it
inaccessible. The attacker then demands a ransom in exchange for the
decryption key. Failure to pay may result in permanent data loss or public
exposure of sensitive information.
• Mechanism
• Phishing emails with malicious attachments or links
• Exploit kits that target vulnerabilities
• Remote Desktop Protocol (RDP) attacks
• Malicious ads (malvertising)
• Defenses
• Backup Strategy
• Implement Multi-Factor Authentication (MFA)
• Endpoint Detection and Response (EDR)
• Email Security
• Network Segmentation
• Least Privilege Principle
• Disable RDP (Remote Desktop Protocol)
• Password Cracking
• Involves various methods to guess or decrypt password. Attacker use
techniques like brute force, dictionary attacks or exploiting weak hashing
algorithms to gain access to user account
• Mechanics
• Brute force: involves systematically trying every possible combination
characters unit the correct password is found
• Dictionary attack: use list of common password or phrases to guess password.
• Defense
• Complex password, account lockout, password manager
• Privilege Escalation
• Occurs when an attacker exploits a vulnerability to gain higher level access,
administration or root privileges allowing them to perform unauthorized action as
installing software, changing system configuration etc
• Mechanism
• Attackers exploit software bugs or vulnerabilities to gain elevated privileges.
• Improper file, directory, or registry permissions allow attackers to modify or execute
files with elevated privileges.
• Attackers steal privileged account credentials using phishing, keylogging, or token
theft.
• Defense
• Keep Systems and Software Updated Awareness
• Implement the Principle of Least Privilege EDR,Harden file and directory
permission
Secure Credentials and Authentication
• Types of Cyberattackers and Their Hats
• White Hat Hackers (Ethical Hackers): White Hat hackers are ethical security
professionals who use their skills to find and fix vulnerabilities in systems to
prevent cyberattacks
• Characteristics:
• Work with permission from system owners.
• Help secure systems and networks.
• Perform penetration testing and vulnerability assessments.
• Follow ethical guidelines.
• Often certified (e.g., CEH, OSCP).
• Black Hat Hackers (Criminal Hackers): Black Hat hackers are malicious
attackers who infiltrate systems for personal gain, financial profit, or
destruction. Their activities are illegal and harmful.
• Characteristics:
• Work without permission from system owners.
• Steal sensitive data (e.g., credit card information, personal data).
• Deploy malware, ransomware, or spyware.
• Sell data on the dark web.
• Focus on financial gain or disruption.
• Grey Hat Hackers (Hybrid Hackers): Grey Hat hackers operate between ethical
and unethical boundaries. They may exploit vulnerabilities without
permission, but they don’t have malicious intent and often inform the
organization afterward.
• characteristics:
• No clear permission to hack.
• Report vulnerabilities after exploiting them.
• May ask for rewards for their findings.
• Blue Hat Hackers (External Security Specialists): Blue Hat hackers are external
security experts hired by organizations to test the security of their systems.
• Usually hired by companies for specific tasks.
• Conduct penetration testing before system deployment.
• Focus on preventing zero-day attack
• Red Hat Hackers (Vigilante Hackers)
• Red Hat hackers are vigilantes who actively hunt down Black Hat hackers and
malware operators. They use aggressive tactics to take down criminal
systems.
• Characteristics:
• Attack Black Hats and their infrastructure.
• Use offensive hacking techniques (e.g., DDoS attacks).
• Destroy or take down malicious servers.
• Green Hat Hackers (Script Kiddies and Beginners): Green Hat hackers are
newcomers to hacking. They lack advanced knowledge but use ready-made
tools and scripts to launch attacks. They are often learning and may
eventually evolve into more skilled hackers.
• Characteristics:
• Inexperienced and learning.
• Use publicly available tools (e.g., Metasploit, LOIC).
• Often unaware of the consequences of their actions.
• Hacktivists (Activist Hackers):Hacktivists are ideologically motivated hackers
who carry out cyberattacks to promote a political, social, or religious agenda
• Driven by ideology (e.g., political, environmental, social justice).
• Use DDoS attacks, data leaks, and website defacements.
• Target governments, corporations, or individuals.