Table of contents |
|
Multiple Choice Questions (MCQs) |
|
Fill in the Blanks |
|
True/False |
|
HOTS |
|
Hands-on Coding Questions |
|
Q1: Which command is used in Kali Linux to scan a network for live hosts?
(a) ping
(b) nmap
(c) netstat
(d) ifconfig
Ans: (b) nmap
Q2: What is the default port used by SSH in Kali Linux?
(a) 22
(b) 80
(c) 443
(d) 21
Ans: (a) 22
Q3: Which tool is used to capture packets in Kali Linux?
(a) Wireshark
(b) Aircrack-ng
(c) Hydra
(d) Metasploit
Ans: (a) Wireshark
Q4: What does the hydra tool in Kali Linux do?
(a) Network scanning
(b) Brute-force attacks
(c) Packet capturing
(d) Encryption
Ans: (b) Brute-force attacks
Q5: How can you list all open ports on a target machine using nmap?
(a) nmap -sS target_ip
(b) nmap -sV target_ip
(c) nmap -A target_ip
(d) nmap -p- target_ip
Ans: (d) nmap -p- target_ip
Q6: What command is used to check the system’s active network connections?
(a) netstat -an
(b) ls -l
(c) cat /etc/passwd
(d) echo $HOME
Ans: (a) netstat -an
Q7: Which Metasploit command is used to launch an exploit?
(a) run
(b) exploit
(c) launch
(d) fire
Ans: (b) exploit
Q8: What is the primary use of the John the Ripper tool?
(a) Web scraping
(b) Password cracking
(c) Network scanning
(d) Firewall testing
Ans: (b) Password cracking
Q9: How can you display all active network interfaces in Kali Linux?
(a) ifconfig
(b) iwconfig
(c) netstat
(d) tcpdump
Ans: (a) ifconfig
Q10: What does the airmon-ng tool do?
(a) Enables monitor mode on a wireless interface
(b) Scans for open ports
(c) Encrypts network traffic
(d) Creates a VPN
Ans: (a) Enables monitor mode on a wireless interface
Q1: The command ________ is used to scan for open ports on a system.
Ans: nmap
Q2: The tool used to crack Wi-Fi passwords in Kali Linux is ________.
Ans: aircrack-ng
Q3: To list all listening services, use the command ________.
Ans: netstat -tulnp
Q4: The ________ tool is used for brute-force attacks on passwords.
Ans: hydra
Q5: The command ________ is used to display detailed system information.
Ans: uname -a
1. The airmon-ng tool is used to scan open ports.
Ans: False
2. Wireshark is a tool used for password cracking.
Ans: False
3. The nmap tool can perform OS detection.
Ans: True
4. Metasploit is a framework for penetration testing.
Ans: True
5. The ifconfig command is used to configure network interfaces.
Ans: True
![]() |
Download the notes
Assignment: An Overview of Ethical Hacking
|
Download as PDF |
Q1: You are conducting a penetration test on a company’s internal network. You need to find out which devices are active. What tool and command would you use?
Ans: Use nmap with nmap -sn target_network
Q2: A client suspects that someone is capturing their network traffic. What tool would you use to detect suspicious network activity and how?
Ans: Use Wireshark and apply filters to detect anomalies, e.g., ip.src == suspicious_ip
Q3: A system administrator wants to check if weak passwords are being used in their organization. What tool can they use, and what command should they run?
Ans: Use John the Ripper with john /etc/shadow
Q4: You need to test a server for open ports that could be vulnerable to attacks. What is the best way to scan all ports and detect potential vulnerabilities?
Ans: Use nmap -p- -A target_ip
Q5: An attacker has set up a fake access point to steal credentials. How can you detect and prevent such an attack using Kali Linux?
Ans: Use airmon-ng start wlan0 to enable monitor mode and airodump-ng wlan0mon to scan for rogue access points.
Q1: Write a Python script to perform a simple port scan on a target system.
Ans:
import socket
target = "192.168.1.1"
for port in range(1, 100):
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.settimeout(1)
result = s.connect_ex((target, port))
if result == 0:
print(f"Port {port} is open")
s.close()
Q2: Create a Bash script that pings a list of IPs from a file and outputs live hosts.
Ans:
#!/bin/bash
while read ip; do
ping -c 1 $ip &>/dev/null
if [ $? -eq 0 ]; then
echo "$ip is alive"
fi
done < ip_list.txt
115 videos|1 docs
|
1. What is ethical hacking and why is it important? | ![]() |
2. What skills are necessary for a career in ethical hacking? | ![]() |
3. How does ethical hacking differ from malicious hacking? | ![]() |
4. What are some common tools used in ethical hacking? | ![]() |
5. What are the legal implications of ethical hacking? | ![]() |