- A
SELECT * FROM messages WHERE key_remote_jid = '%1234%'
Why wrong: Using '=' instead of LIKE would require an exact match, not a pattern.
- B
SELECT * FROM messages WHERE key_remote_jid LIKE '%1234%'
'key_remote_jid' contains the recipient's JID; LIKE '%1234%' matches any JID ending in 1234.
- C
SELECT * FROM messages WHERE data LIKE '%1234%'
Why wrong: 'data' contains message content, not the recipient identifier.
- D
SELECT * FROM messages WHERE timestamp LIKE '%1234%'
Why wrong: 'timestamp' is a numeric value, not a string; using LIKE may not work as intended.
Quick Answer
The correct SQL query is `SELECT * FROM messages WHERE key_remote_jid LIKE '%1234%'`. This works because in Android WhatsApp forensics, the `key_remote_jid` column stores the full remote party identifier, typically a phone number including the country code, and the `LIKE` operator with the wildcard `%` at the start matches any string ending with '1234', effectively retrieving all messages sent to that specific contact. On the Computer Hacking Forensic Investigator CHFI exam, this question tests your understanding of SQLite database structure and pattern matching in forensic data extraction—a common scenario when analyzing the `msgstore.db` file. A frequent trap is choosing `WHERE key_remote_jid = '%1234'` or using `=` instead of `LIKE`, which would fail because the column contains the full number, not just the suffix. Remember the mnemonic: "LIKE loves wildcards; equals expects exact matches."
CHFI Mobile and Malware Forensics Practice Question
This CHFI practice question tests your understanding of mobile and malware 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.
In an Android forensic investigation, an examiner extracts the /data/data/com.whatsapp/databases/msgstore.db file. The database contains a table 'messages' with columns 'key_remote_jid', 'data', and 'timestamp'. Which SQL query would retrieve all messages sent to a specific contact with a phone number ending in '1234'?
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
SELECT * FROM messages WHERE key_remote_jid LIKE '%1234%'
Option B is correct because the `key_remote_jid` column stores the remote party's identifier (e.g., a phone number with country code), and the `LIKE '%1234%'` pattern matches any value containing '1234' anywhere in the string. This retrieves all messages where the contact's phone number ends with '1234', as required by the question.
Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
SELECT * FROM messages WHERE key_remote_jid = '%1234%'
Why it's wrong here
Using '=' instead of LIKE would require an exact match, not a pattern.
- ✓
SELECT * FROM messages WHERE key_remote_jid LIKE '%1234%'
Why this is correct
'key_remote_jid' contains the recipient's JID; LIKE '%1234%' matches any JID ending in 1234.
Related concept
Read the scenario before looking for a memorised answer.
- ✗
SELECT * FROM messages WHERE data LIKE '%1234%'
Why it's wrong here
'data' contains message content, not the recipient identifier.
- ✗
SELECT * FROM messages WHERE timestamp LIKE '%1234%'
Why it's wrong here
'timestamp' is a numeric value, not a string; using LIKE may not work as intended.
Common exam traps
Common exam trap: answer the scenario, not the keyword
The trap here is that candidates often confuse `=` with `LIKE` for pattern matching, or mistakenly filter on the `data` column (message content) instead of the contact identifier column `key_remote_jid`.
Detailed technical explanation
How to think about this question
In WhatsApp's `msgstore.db`, `key_remote_jid` stores the JID (Jabber ID) in the format `[countrycode][number]@s.whatsapp.net` for individual chats. The `LIKE` operator with `%` wildcards performs a pattern match on the entire string, so `'%1234%'` matches any JID containing '1234' — including numbers ending with '1234' regardless of country code. A more precise query would use `LIKE '%1234'` to match only endings, but the question's phrasing allows the broader match.
KKey Concepts to Remember
- Read the scenario before looking for a memorised answer.
- Find the constraint that changes the correct option.
- Eliminate answers that are true in general but not in this case.
TExam Day Tips
- Watch for words such as best, first, most likely and least administrative effort.
- Review why wrong options are wrong, not only why the correct option is correct.
Key takeaway
Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
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.
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
- →
Mobile and Malware Forensics — study guide chapter
Learn the concepts, then practise the questions
- →
Mobile and Malware 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?
Mobile and Malware Forensics — This question tests Mobile and Malware Forensics — Read the scenario before looking for a memorised answer..
What is the correct answer to this question?
The correct answer is: SELECT * FROM messages WHERE key_remote_jid LIKE '%1234%' — Option B is correct because the `key_remote_jid` column stores the remote party's identifier (e.g., a phone number with country code), and the `LIKE '%1234%'` pattern matches any value containing '1234' anywhere in the string. This retrieves all messages where the contact's phone number ends with '1234', as required by the question.
What should I do if I get this CHFI question wrong?
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
What is the key concept behind this question?
Read the scenario before looking for a memorised answer.
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 →
Last reviewed: Jun 24, 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.