CHFI Application, Email and Cloud Forensics Practice Question
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?
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 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.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Path Traversal
Why it's wrong here
Path Traversal manipulates file paths using sequences like ../ to escape the web root and read arbitrary files. This request instead injects a UNION SELECT statement into a SQL query parameter, indicating SQL injection. Path traversal would be the answer if the payload contained directory traversal sequences targeting the filesystem.
- ✓
SQL Injection
Why this is correct
The URL-encoded payload `1' UNION SELECT 1,2,3--` in the query string is the defining signature: the apostrophe closes the string literal, UNION SELECT appends attacker-controlled columns, and `--` comments out the remainder. This satisfies the stem's request to identify the attack from the log entry, confirming SQL injection rather than XSS or traversal.
- ✗
Cross-Site Scripting (XSS)
Why it's wrong here
Cross-Site Scripting (XSS) is incorrect because the payload `1%27%20UNION%20SELECT%201,2,3--` comprises SQL syntax designed to manipulate a server-side database query, not client-side script intended for browser execution. This option is tempting as both XSS and SQL Injection often utilise URL parameters for payload delivery. However, XSS would be indicated by the presence of client-side script elements, such as `<script>` tags, aimed at executing within a user's web browser, rather than database commands.
- ✗
Remote File Inclusion
Why it's wrong here
Remote File Inclusion exploits a parameter that loads an external URL into the script, typically showing a path or URL in the request. Here the payload is a SQL UNION SELECT injection in the q parameter, so the mechanism is database query manipulation, not file inclusion. RFI would be correct for a vulnerable include parameter.
About these practice questions
Courseiva writes every CHFI question from scratch — 745 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
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.