Question 1 : What is ethical hacking, and how does it differ from malicious hacking?
Answer:
Ethical hacking involves authorized attempts to gain unauthorized access to a computer system, application, or data. The purpose is to identify vulnerabilities and secure the system.
Malicious hacking, on the other hand, is unauthorized and intended to exploit weaknesses for personal or financial gain or to harm the system.
Question 2: What are the five stages of hacking?
Answer:
Reconnaissance – Gathering information about the target (passive and active methods).
Scanning – Identifying open ports, services, and vulnerabilities using tools like Nmap or Nessus.
Gaining Access – Exploiting vulnerabilities to enter the system.
Maintaining Access – Installing backdoors or creating user accounts to retain control.
Covering Tracks – Deleting logs and footprints to avoid detection.
Question 3: What is footprinting? Name some tools used for footprinting.
Answer:
Footprinting is the process of gathering as much information as possible about a target system or network.
Tools: WHOIS, Maltego, Shodan, Nmap, and Google Dorking.
Question 4: What is the difference between vulnerability assessment and penetration testing?
Answer:
Vulnerability Assessment: Identifies and reports security vulnerabilities without exploiting them.
Penetration Testing: Actively exploits vulnerabilities to assess their impact and demonstrate risks.
Question 5. What are some common types of malware?
Answer:
Viruses: Infect files and spread when executed.
Worms: Replicate themselves to spread without user interaction.
Trojans: Malicious software disguised as legitimate programs.
Ransomware: Encrypts data and demands payment to unlock it.
Spyware: Monitors user activity and collects sensitive information.
Adware: Displays unwanted advertisements.
Question 6. What is SQL Injection, and how can it be prevented?
Answer:
SQL Injection: A web attack that allows attackers to manipulate SQL queries by injecting malicious input.
Prevention:
[A]Use parameterized queries or prepared statements.
[B]Input validation and sanitization.
[C]Least privilege principle for database accounts.
[D]Employ web application firewalls (WAF).
Question 7. What is the difference between symmetric and asymmetric encryption?
Answer:
Symmetric Encryption: Uses the same key for encryption and decryption (e.g., AES, DES).
Asymmetric Encryption: Uses a pair of keys – public and private (e.g., RSA, ECC).
Question 8. What is Metasploit, and how is it used in ethical hacking?
Answer:
Metasploit is a penetration testing framework that helps ethical hackers find, exploit, and validate vulnerabilities in systems. It includes modules for payload generation, exploitation, and post-exploitation.
Question 9. What are honeypots, and why are they used?
Answer:
A honeypot is a decoy system designed to attract attackers and study their behavior.
It helps in:
[A] Understanding attack methods.
[B] Distracting attackers from real systems.
[C] Enhancing security measures based on observed threats.
Question 10. Explain the concept of a buffer overflow attack.
Answer:
A buffer overflow occurs when data exceeds the allocated memory buffer, overwriting adjacent memory locations. This can allow attackers to execute arbitrary code or crash the system.
Prevention: Input validation, using secure coding practices, and modern compilers with buffer overflow protections.
Question 11. What is ARP Spoofing, and how can it be mitigated?
Answer:
ARP Spoofing: An attacker sends forged ARP (Address Resolution Protocol) messages to link their MAC address to an IP address, intercepting traffic.
Mitigation:
[A] Use static ARP entries.
[B] Implement packet filtering.
[C] Enable port security on switches.
[D] Use IDS/IPS to detect spoofing attempts.
Question 12. What is steganography?
Answer:
Steganography is the practice of hiding data within non-secret files, such as images, videos, or audio. For example, embedding a text message within an image’s pixel values.
Question 13. What are some common tools used in ethical hacking?
Answer:
Nmap: Network scanning and reconnaissance.
Wireshark: Network protocol analyzer.
Metasploit: Exploitation framework.
Burp Suite: Web application security testing.
John the Ripper: Password cracking.
Nikto: Web server scanning.
Question 14. What is the difference between black-box, white-box, and gray-box testing?
Answer:
Black-Box Testing: Tester has no prior knowledge of the system.
White-Box Testing: Tester has full knowledge, including source code.
Gray-Box Testing: Tester has partial knowledge of the system.
Question 15. How do you secure a web application?
Answer:
Input validation and sanitization.
Use HTTPS for secure communication.
Implement Content Security Policy (CSP).
Regular vulnerability assessments.
Prevent common vulnerabilities like XSS, CSRF, and SQL injection.
Keep software and plugins updated.