- A
Cross-site scripting (XSS)
Why wrong: XSS typically involves script tags in the request, not SQL keywords.
- B
SQL injection
The UNION SELECT clause is a classic SQL injection technique to retrieve data from other tables.
- C
Path traversal
Why wrong: Path traversal uses '../' sequences to access files outside the web root.
- D
Webshell upload
Why wrong: Webshell upload would show a file upload request, not a SQL query.
Quick Answer
The correct answer is SQL injection, as indicated by the UNION SELECT statement embedded in the URI parameter. This entry shows an attacker manipulating the `id` parameter in the GET request to append a UNION-based SQL query, attempting to extract `username` and `password` fields from the database—a classic SQL injection technique. On the CHFI exam, this scenario tests your ability to identify attack patterns in web server logs, a critical skill for forensic analysts examining Apache or IIS logs for evidence of data exfiltration. A common trap is mistaking this for a cross-site scripting (XSS) attack, but the presence of SQL syntax like `UNION SELECT` and the `--` comment delimiter clearly points to database manipulation rather than client-side script injection. Remember the mnemonic: “UNION in the URL means SQL in the wild.”
CHFI Application, Email and Cloud Forensics Practice Question
This CHFI practice question tests your understanding of application, email and cloud forensics. Read the scenario carefully and evaluate each option against the stated constraints before committing to an answer. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.
A security analyst reviews an Apache access log and finds the entry: '192.168.1.10 - - [10/Mar/2025:08:12:34 +0000] "GET /index.php?id=1 UNION SELECT username,password FROM users-- HTTP/1.1" 200 2345 "-" "Mozilla/5.0"'. Which attack is indicated?
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
SQL injection
The UNION SELECT statement in the URI indicates a SQL injection attack. The attacker is trying to extract data from the database.
Key principle: NAT direction and interface roles matter as much as the IP address mapping. Inside/outside designation controls which traffic is translated.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Cross-site scripting (XSS)
Why it's wrong here
XSS typically involves script tags in the request, not SQL keywords.
- ✓
SQL injection
Why this is correct
The UNION SELECT clause is a classic SQL injection technique to retrieve data from other tables.
Related concept
Static NAT maps one inside address to one outside address.
- ✗
Path traversal
Why it's wrong here
Path traversal uses '../' sequences to access files outside the web root.
- ✗
Webshell upload
Why it's wrong here
Webshell upload would show a file upload request, not a SQL query.
Common exam traps
Common exam trap: NAT rules depend on direction and matching traffic
NAT is not only about the public address. The inside/outside interface roles and the ACL or rule that matches traffic are just as important.
Trap categories for this question
Keyword trap
XSS typically involves script tags in the request, not SQL keywords.
Command / output trap
Webshell upload would show a file upload request, not a SQL query.
Detailed technical explanation
How to think about this question
NAT questions usually test address translation, overload/PAT behaviour, static mappings and whether the right traffic is being translated. Read the interface direction and address terms carefully.
KKey Concepts to Remember
- Static NAT maps one inside address to one outside address.
- PAT allows many inside hosts to share one public address using ports.
- Inside local and inside global describe the private and translated addresses.
- NAT ACLs identify traffic for translation, not always security filtering.
TExam Day Tips
- Identify inside and outside interfaces first.
- Check whether the scenario needs static NAT, dynamic NAT or PAT.
- Do not confuse NAT matching ACLs with normal packet-filtering intent.
Key takeaway
NAT direction and interface roles matter as much as the IP address mapping. Inside/outside designation controls which traffic is translated.
Real-world example
How this comes up in practice
A small business has 20 workstations on the 192.168.1.0/24 network and one public IP from its ISP. The router uses PAT (NAT overload) so all 20 devices share one public address using different source ports. NAT questions test whether you understand the four address terms and which direction each translation applies.
What to study next
Got this wrong? Here's your next step.
Review the four NAT address types (inside local, inside global, outside local, outside global), PAT port overload, and static vs dynamic NAT use cases. Then practise related CHFI NAT questions on configuration and troubleshooting.
- →
Application, Email and Cloud Forensics — study guide chapter
Learn the concepts, then practise the questions
- →
Application, Email and Cloud Forensics practice questions
Targeted practice on this topic area only
- →
All CHFI questions
1,000 questions across all exam domains
- →
Computer Hacking Forensic Investigator CHFI study guide
Full concept coverage aligned to exam objectives
- →
CHFI practice test guide
How to use practice tests most effectively before exam day
Related practice questions
Related CHFI practice-question pages
Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.
Computer Forensics Investigation Process practice questions
Practise CHFI questions linked to Computer Forensics Investigation Process.
Computer Forensics Fundamentals and Process practice questions
Practise CHFI questions linked to Computer Forensics Fundamentals and Process.
Storage Forensics and File System Analysis practice questions
Practise CHFI questions linked to Storage Forensics and File System Analysis.
Incident Response and First Responder Skills practice questions
Practise CHFI questions linked to Incident Response and First Responder Skills.
Computer Forensics Lab practice questions
Practise CHFI questions linked to Computer Forensics Lab.
Evidence Acquisition and Duplication practice questions
Practise CHFI questions linked to Evidence Acquisition and Duplication.
OS and Network Forensics practice questions
Practise CHFI questions linked to OS and Network Forensics.
OS and File System Forensics practice questions
Practise CHFI questions linked to OS and File System Forensics.
Application, Email and Cloud Forensics practice questions
Practise CHFI questions linked to Application, Email and Cloud Forensics.
Mobile and Malware Forensics practice questions
Practise CHFI questions linked to Mobile and Malware Forensics.
Network and Cloud Forensics practice questions
Practise CHFI questions linked to Network and Cloud Forensics.
Database and Application Forensics practice questions
Practise CHFI questions linked to Database and Application Forensics.
Practice this exam
Start a free CHFI practice session
Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.
FAQ
Questions learners often ask
What does this CHFI question test?
Application, Email and Cloud Forensics — This question tests Application, Email and Cloud Forensics — Static NAT maps one inside address to one outside address..
What is the correct answer to this question?
The correct answer is: SQL injection — The UNION SELECT statement in the URI indicates a SQL injection attack. The attacker is trying to extract data from the database.
What should I do if I get this CHFI question wrong?
Review the four NAT address types (inside local, inside global, outside local, outside global), PAT port overload, and static vs dynamic NAT use cases. Then practise related CHFI NAT questions on configuration and troubleshooting.
What is the key concept behind this question?
Static NAT maps one inside address to one outside address.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Same concept, more angles
4 more ways this is tested on CHFI
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. An analyst examines the following Apache access log entry: 192.168.1.10 - - [10/Jan/2023:13:45:22 +0000] "GET /search.php?q=1%27%20UNION%20SELECT%201,2,3-- HTTP/1.1" 200 1234 "-" "Mozilla/5.0". Which attack is MOST likely indicated?
easy- A.Path Traversal
- ✓ B.SQL Injection
- C.Cross-Site Scripting (XSS)
- D.Remote File Inclusion
Why B: The log shows a UNION SELECT statement in the query parameter, indicating a SQL injection attempt. The URL-encoded single quote (') and comment (--) are classic SQLi payloads.
Variation 2. An analyst reviews an Apache access log entry: '192.168.1.10 - - [10/Oct/2023:13:55:36 +0000] "GET /index.php?id=1%27%20OR%20%271%27%3D%271 HTTP/1.1" 200 1234 "-" "Mozilla/5.0"'. Which attack does this log entry most likely indicate?
medium- ✓ A.SQL injection (SQLi) attack
- B.Cross-site scripting (XSS) attack
- C.Path traversal attack
- D.Remote file inclusion (RFI) attack
Why A: The URL-encoded payload contains SQL injection syntax (%27 is a single quote), attempting to inject an OR condition. This is indicative of a SQL injection attempt.
Variation 3. A security analyst reviews an Apache access log entry: 192.168.1.5 - - [10/Jan/2024:08:12:35 +0000] "GET /index.php?id=1 UNION SELECT username,password FROM users-- HTTP/1.1" 200 4321 "-" "Mozilla/5.0". What type of attack is MOST likely indicated?
easy- A.Cross-site scripting (XSS)
- B.Path traversal
- C.Remote file inclusion
- ✓ D.SQL injection
Why D: The log entry shows a UNION SELECT statement appended to the id parameter, which is a classic SQL injection attempt.
Variation 4. A security analyst reviews the following Apache access log entry: 192.168.1.10 - - [15/May/2025:10:15:23 +0000] "GET /search.php?q=1'%20OR%20'1'='1 HTTP/1.1" 200 5321 "-" "Mozilla/5.0". Which type of attack is most likely indicated?
medium- A.Cross-site scripting (XSS)
- B.Path traversal
- C.Remote file inclusion
- ✓ D.SQL injection (SQLi)
Why D: The log shows a GET request with a SQL injection payload (1' OR '1'='1) in the 'q' parameter. The HTTP 200 response indicates the server processed the request, suggesting a successful or attempted SQL injection.
Last reviewed: Jun 21, 2026
This CHFI practice question is part of Courseiva's free EC-Council certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CHFI exam.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.