Courseiva

CCNA Spl Search Proficiency Questions

39 questions · Spl Search Proficiency topic · All types, answers revealed

1
MCQhard

A threat hunter wants to enrich firewall events with asset ownership data stored in a CSV lookup named asset_owners.csv, which maps dest_ip to owner and department. The lookup is already defined in transforms.conf. The hunter needs the owner and department fields added to each event. Which SPL search accomplishes this?

A.index=firewall | lookup asset_owners.csv dest_ip OUTPUT owner, department
B.index=firewall | append [| inputlookup asset_owners.csv] | stats values(owner) by dest_ip
C.index=firewall | eval owner = asset_owners(dest_ip) | eval department = asset_owners(dest_ip)
D.index=firewall | inputlookup asset_owners.csv | join dest_ip
AnswerA

The lookup command matches the dest_ip field in the events against the lookup table's key field and outputs the owner and department fields. Because the lookup is defined in transforms.conf, the filename reference works and the OUTPUT clause specifies exactly which fields to add. This is the correct way to enrich events with the asset ownership data.

Why this answer

Field enrichment from a lookup table is performed with the lookup command, which matches a key field in the events to the lookup's key and adds specified output fields. Referencing the CSV filename works when the lookup is defined in transforms.conf, and the OUTPUT clause limits the added fields to owner and department. This is the standard, efficient method for enriching events with asset ownership data.

Exam trap

The trap here is using inputlookup or append to bring lookup data into the search, which reads the table as events instead of enriching the existing events with the lookup command.

2
MCQeasy

What is the purpose of the 'head' command?

A.Return the last N results.
B.Sort the results.
C.Count the results.
D.Return the first N results.
AnswerD

The `head` command returns the first N results from a search, satisfying the requirement to limit output to the earliest events in the result set. Unlike `tail`, which returns the last N results, `head` preserves the original sort order and truncates from the beginning, making it the precise tool for previewing initial results.

Why this answer

The 'head' command in Splunk returns the first N results from a search, where N is specified as an argument (default 10). It is commonly used to limit the number of results for quick inspection or to reduce processing in a pipeline.

Exam trap

SPLK-5001 often tests the distinction between 'head' and 'tail', and candidates may confuse 'head' with sorting or counting commands due to similar-sounding functionality.

How to eliminate wrong answers

Option A is wrong because returning the last N results is the purpose of the 'tail' command, not 'head'. Option B is wrong because sorting results is done by the 'sort' command, which orders events based on specified fields. Option C is wrong because counting results is performed by the 'stats count' or 'eventcount' commands, not 'head'.

3
MCQhard

A security analyst needs to create a search that identifies users who have logged in from more than three distinct countries within the last 24 hours, which could indicate compromised credentials. The authentication logs contain 'user' and 'src_country' fields. Which SPL search correctly identifies these users?

A.index=auth earliest=-24h | stats dc(src_country) as country_count by user | where country_count>3
B.index=auth earliest=-24h | transaction user | where mvcount(src_country)>3
C.index=auth | stats dc(src_country) as country_count by user | where country_count>3
D.index=auth earliest=-24h | stats values(src_country) as countries by user | where mvcount(countries)>3
AnswerA

This search applies a time filter with earliest=-24h to restrict events to the last 24 hours. It then uses stats with dc(src_country) to count distinct countries per user and filters for users with more than three distinct countries. This directly meets the requirement and is efficient.

Why this answer

The correct search uses a time filter to limit events to the last 24 hours and then employs stats with dc(src_country) to count distinct countries per user. The where clause filters for counts greater than three. This approach is efficient and directly addresses the requirement, avoiding the pitfalls of including historical data or counting duplicate country entries.

Exam trap

The trap here is forgetting to restrict the time range, which would include all historical data and flag users incorrectly; also, using values instead of dc can count duplicates if not careful.

4
Multi-Selectmedium

Which TWO of the following commands are used for data transformation or enrichment?

Select 2 answers
A.search
B.index
C.head
D.lookup
E.eval
AnswersD, E

The lookup command enriches events by matching fields against an external lookup table or KV Store collection, appending additional columns. This satisfies the enrichment criterion because it adds context from outside the raw event stream during search-time processing.

Why this answer

Option D, lookup, is correct because it enriches events by joining fields from an external lookup table (e.g., CSV or KV Store) into the search results, adding context such as user names or asset owners. Option E, eval, is correct because it calculates and transforms field values using expressions and functions, creating new fields or modifying existing ones for analysis. Option A, search, is not a transformation or enrichment command; it retrieves and filters events matching a query.

Option B, index, is an ingestion/administration command that writes data into an index rather than transforming it. Option C, head, only returns the first N results and does not transform or enrich data.

Exam trap

SPLK-5001 often tests the distinction between commands that retrieve data (search, head) and those that modify or add data (eval, lookup), so candidates may mistakenly select 'search' as a transformation command.

5
MCQhard

A defense analyst wants to correlate proxy logs and firewall logs to find internal hosts that contacted a known-malicious domain. The proxy logs store the field dest_host and the firewall logs store the field fqdn, and both indexes contain a common field src_ip. The analyst wants a single result set showing src_ip values present in both data sources for the same domain. Which SPL approach returns only hosts seen in both logs for matching domains?

A.index=proxy OR index=firewall | transaction src_ip | search dest_host=* fqdn=*
B.index=proxy OR index=firewall | eval domain=coalesce(dest_host, fqdn) | stats values(index) AS sources BY src_ip domain | where mvcount(sources)>1
C.index=proxy OR index=firewall | stats values(dest_host) AS d values(fqdn) AS f BY src_ip | where isnotnull(d) AND isnotnull(f)
D.index=proxy OR index=firewall | eval domain=dest_host . fqdn | stats count BY src_ip domain | where count>1
AnswerB

coalesce merges dest_host and fqdn into one domain field regardless of which index supplied it, and stats groups by src_ip and domain while collecting the distinct indexes. Filtering with where mvcount(sources)>1 keeps only combinations observed in both proxy and firewall data, precisely the intersection the analyst needs.

Why this answer

Correlating two sources with differently named domain fields requires normalizing them first. coalesce unifies dest_host and fqdn into one domain field, then stats BY src_ip domain collects which indexes contributed. Keeping only groups where more than one distinct index appears yields the strict intersection of hosts and domains seen in both proxy and firewall logs.

Exam trap

The trap here is concatenating or separately counting the two differently named fields instead of normalizing them into one field before correlating.

6
MCQeasy

A security analyst wants to extract the domain from a URL field in proxy logs to identify the most frequently accessed domains. The URL field contains values like 'https://www.example.com/path/page.html'. Which SPL command and function should the analyst use to extract just the domain?

A.eval domain=split(url, "/")
B.extract field=url "^https?://([^/]+)"
C.regex field=url "^https?://([^/]+)"
D.rex field=url "^https?://([^/]+)"
AnswerD

The rex command extracts fields using regular expressions. The pattern '^https?://([^/]+)' captures the domain part of the URL (everything after the protocol and before the first slash). This effectively isolates the domain, such as 'www.example.com', which can then be used for frequency analysis.

Why this answer

The rex command is designed to extract fields from raw text or existing fields using regular expressions. By applying a pattern that captures the domain portion of the URL, the analyst can create a new field containing only the domain. This new field can then be used with stats or top to identify the most frequently accessed domains.

Exam trap

The trap here is confusing the regex command, which filters events, with rex, which extracts fields; only rex creates a new field from a capture group.

7
MCQeasy

An analyst is triaging a suspected brute-force attack and needs to view raw event text alongside a computed field showing how many seconds elapsed between consecutive failed logins from the same source IP. The events must remain individually visible, in time order, with the delta shown per event. Which SPL search best meets this need?

A.index=auth action=failed | delta _time AS delta BY src_ip
B.index=auth action=failed | transaction src_ip | eval delta=duration
C.index=auth action=failed | stats range(_time) AS delta BY src_ip
D.index=auth action=failed | sort 0 + _time | streamstats window=1 current=f global=f last(_time) AS prev_time BY src_ip | eval delta=_time-prev_time
AnswerD

streamstats with window=1 and current=f computes a running statistic over preceding events, so last(_time) captures the prior event's timestamp within each src_ip group. Subtracting it with eval yields the per-event gap while raw events remain visible, and sorting by _time ensures correct chronological order.

Why this answer

To keep events individual while computing a gap against the previous event in the same group, streamstats with window=1 and current=f is the right tool. It references the prior event's _time per src_ip, and eval subtracts to produce the delta. Sorting by _time first guarantees the running calculation follows true chronological order.

Exam trap

The trap here is reaching for stats or transaction, which collapse events into summary rows and destroy the per-event visibility the scenario requires.

8
MCQhard

You are using a subsearch to find 'dest_ip' values that appeared in a 'failed_login' search. What is a common limitation of subsearches that you must consider?

A.Subsearches are limited by the 'maxout' configuration and execution time.
B.Subsearches only return the first 10 results.
C.Subsearches cannot use the 'stats' command.
D.Subsearches cannot reference fields from the outer search.
E.Subsearches always run after the outer search completes.
AnswerA

Subsearches run first and their results are injected into the outer search, so they are bounded by the maxout setting (default 50,000 results) and the subsearch execution time limit. Exceeding either silently truncates results, which is the constraint to consider here.

Why this answer

Subsearches in Splunk are constrained by the 'maxout' setting (default 50,000 results) which caps how many results the subsearch can return to the outer search, and by subsearch execution time limits (default 60 seconds via 'maxtime'). Exceeding either causes the subsearch to be truncated or aborted, silently dropping results and producing incomplete correlation.

Exam trap

The trap is assuming subsearches have a small fixed result cap (like 10) or cannot use transforming commands — candidates who never tuned limits.conf pick the wrong numeric limit or wrongly exclude stats.

How to eliminate wrong answers

Option B is wrong because there is no hard-coded 10-result limit — the limit is maxout, which defaults to 50,000 and is configurable in limits.conf. Option C is wrong because subsearches absolutely can use 'stats' (e.g., 'stats count by dest_ip' inside a subsearch is a common pattern). Option D is wrong because subsearches can reference fields from the outer search via the 'search' command with field substitution, though the reverse (outer referencing subsearch fields) requires format/return.

Option E is wrong because subsearches execute first, before the outer search, so their results can be used as filter criteria.

9
MCQhard

You have a field 'raw_data' containing JSON. How do you extract fields from it within your SPL search?

A.eval json_parse(raw_data)
B.spath input=raw_data
C.json raw_data
D.extract json raw_data
AnswerB

spath parses structured data such as JSON and XML, extracting nested fields into searchable fields. Specifying input=raw_data tells Splunk to read that field's JSON content and expose each key as a field for use in the SPL pipeline.

Why this answer

The spath command is Splunk's dedicated SPL command for extracting fields from structured data formats like JSON and XML. Using 'spath input=raw_data' parses the JSON stored in the raw_data field and extracts its keys as Splunk fields, which can then be used in subsequent commands. This is the canonical way to extract JSON fields in SPL.

Exam trap

SPLK-5001 often tests whether candidates know the correct SPL command for JSON extraction — the trap is confusing spath (the real command) with non-existent commands like 'json' or invalid eval functions like json_parse.

How to eliminate wrong answers

Option A is wrong because 'eval json_parse(raw_data)' is not valid SPL — json_parse is not an eval function in Splunk (there is no such function; JSON extraction is done via spath or the json_extract eval function with a JSON path). Option C is wrong because 'json raw_data' is not a valid SPL command; there is no bare 'json' command for extraction. Option D is wrong because 'extract json raw_data' is not valid syntax — the extract command is used for field extraction via regex/delimiters, not JSON parsing, and does not take 'json' as a keyword.

10
MCQhard

What is the purpose of the 'map' command in complex searches?

A.Maps IP addresses to locations.
B.Runs a subsearch for each event in the results.
C.Maps fields to a dashboard.
D.Creates a map visualization.
AnswerB

The 'map' command executes a subsearch once per input result, substituting each event's field values into the subsearch via tokens such as $field$. This per-event iteration satisfies the stem's requirement for complex searches, letting you enrich or correlate each result individually rather than running one aggregate subsearch across the whole set.

Why this answer

The map command in Splunk is a streaming subsearch command that iterates over each result row and runs a specified subsearch once per row, injecting the current row's field values into the subsearch. It is used to enrich or correlate events by executing a nested search for every event returned by the outer search. This makes it fundamentally a per-event subsearch executor, not a geolocation or visualization tool.

Exam trap

SPLK-5001 often tests the confusion between the map command (per-event subsearch) and the geom/iplocation commands (geographic visualization), since the word 'map' intuitively suggests geography.

How to eliminate wrong answers

Option A is wrong because mapping IP addresses to geographic locations is done with the iplocation command (or geostats/geom for visualization), not map. Option C is wrong because mapping fields to a dashboard is a dashboard/panel configuration task, not a search command — no Splunk command called 'map' performs dashboard field binding. Option D is wrong because creating a map visualization is done via the choropleth map visualization type or the geom command, not the map command.

11
MCQeasy

Which command is used to visualize data in a time-series chart?

A.graph count _time
B.stats count over time
C.timechart count by sourcetype
D.chart count by _time
AnswerC

The timechart command aggregates events into time buckets and plots them as a time-series chart, with the split-by clause producing one series per sourcetype. This directly produces the visualisation requested, unlike stats or table which return tabular output.

Why this answer

The timechart command is purpose-built for time-series visualization in Splunk. It bins events by _time automatically and produces a table where each row is a time bucket and each column is a series (here, split by sourcetype), which the Splunk UI renders as a line/area chart. Because it aggregates over time by default, it is the canonical command for trend visualization.

Exam trap

SPLK-5001 often tests the distinction between timechart (auto time-binning, time-series output) and chart (categorical pivot requiring explicit over/by clauses) — candidates confuse the two because both aggregate, but only timechart produces the time-series visualization the question asks for.

How to eliminate wrong answers

Option A is wrong because 'graph' is not a valid Splunk SPL command — there is no such command in the search language. Option B is wrong because 'stats count over time' is invalid syntax; 'over' is not a stats clause, and stats does not auto-bin by _time the way timechart does. Option D is wrong because 'chart count by _time' requires a proper by-clause structure (chart count over X by _time) and does not produce the time-bucketed series output that timechart does; chart is for categorical pivots, not time-series trends.

12
MCQhard

A security analyst wants to correlate login and logout events for each user to calculate session durations. The events have fields 'user', 'action' (login or logout), and '_time'. Which SPL command sequence is most efficient to pair each login with the subsequent logout for the same user?

A.index=auth action=login OR action=logout | transaction user startswith=action="login" endswith=action="logout" | eval duration = duration
B.index=auth action=login OR action=logout | join user [search index=auth action=login | rename _time as login_time] | where action="logout" | eval duration = _time - login_time
C.index=auth action=login OR action=logout | sort 0 user _time | streamstats current=f last(_time) as login_time by user | where action="logout" | eval duration = _time - login_time
D.index=auth action=login OR action=logout | stats earliest(_time) as login_time latest(_time) as logout_time by user | eval duration = logout_time - login_time
AnswerC

This search sorts events by user and time, then uses streamstats to capture the previous event's time for each user, which corresponds to the login time when the current event is a logout. Filtering for logout events and calculating the difference yields the session duration efficiently.

Why this answer

To pair sequential login and logout events per user, sorting by user and time, then using streamstats to carry forward the previous event's time, allows calculation of duration when a logout occurs. This method is efficient and scales better than transaction or join.

Exam trap

The trap here is assuming that transaction or join is the only way to correlate events, when streamstats can efficiently track state across events.

13
Multi-Selecthard

A security analyst is building a search to identify brute force attacks. They want to use the 'stats' command to calculate the count of failed login attempts per source IP, and then filter for IPs with more than 10 failures. They also want to include the earliest and latest timestamps of these failures. Which two SPL commands or functions should be used to achieve this? (Choose two.)

Select 2 answers
A.eval failures = count > 10
B.stats count as failures, min(_time) as earliest, max(_time) as latest by src_ip
C.where failures > 10
D.search failures > 10
E.stats count by src_ip, failures
AnswersB, C

This stats command correctly calculates the count of failed logins per source IP and also captures the earliest and latest timestamps using min(_time) and max(_time). The 'by src_ip' clause groups the results by source IP. This directly provides the required aggregation and time range information, making it a correct component of the solution for identifying brute force attacks.

Why this answer

To identify brute force attacks, the analyst needs to aggregate failed login attempts per source IP and then filter for those exceeding a threshold. The stats command with count, min(_time), and max(_time) by src_ip provides the necessary aggregation. The where command then filters the aggregated results for failures greater than 10.

Together, these commands produce the required output. The other options either filter incorrectly, create unnecessary fields, or fail to aggregate properly.

Exam trap

The trap here is using search instead of where to filter aggregated results, or using eval to create a boolean instead of filtering.

14
MCQhard

You want to dynamically update a lookup table with new indicators of compromise (IOCs) found during your search. Which command is used for this?

A.saveas lookup ioc_list.csv
B.outputlookup ioc_list.csv
C.write ioc_list.csv
D.inputlookup ioc_list.csv --append
AnswerB

outputlookup writes search results back to a lookup file, overwriting or appending to the named CSV. This lets newly discovered IOCs from the current search persist into ioc_list.csv for enrichment in later searches, satisfying the dynamic update requirement.

Why this answer

The outputlookup command is used to write search results to a lookup table file, such as a CSV. It takes the results of the current search and outputs them to the specified lookup file, dynamically updating it with new IOCs. This is the standard method for updating lookup tables from search results.

Exam trap

SPLK-5001 often tests the distinction between inputlookup and outputlookup, and candidates may incorrectly choose inputlookup or invent non-existent commands like saveas lookup.

How to eliminate wrong answers

Option A is wrong because 'saveas lookup' is not a valid SPL command; saveas is used to save a search, not a lookup. Option C is wrong because 'write' is not a valid SPL command for lookup files. Option D is wrong because inputlookup is used to read from a lookup table, not write to it, and the '--append' flag is not valid syntax for inputlookup.

15
MCQmedium

What is the result of using 'bin _time span=1d'?

A.Counts events per day.
B.Deletes events older than 1 day.
C.Groups events into 24-hour buckets.
D.Changes the display format of the timestamp.
AnswerC

Using `bin _time span=1d` rounds each event's timestamp down to the nearest 24-hour boundary, producing discrete daily buckets rather than rolling windows. This satisfies the stem's requirement by collapsing raw timestamps into fixed one-day groups, enabling per-day aggregation such as counts or averages across each calendar day.

Why this answer

The 'bin _time span=1d' command groups events into 24-hour buckets based on the _time field, effectively discretizing timestamps into daily intervals. It does not count events by itself; it creates a binned _time field that can then be used with stats, timechart, or other aggregations. The result is that events are assigned to day-long buckets for grouping.

Exam trap

SPLK-5001 often tests whether candidates confuse 'bin' (grouping/discretizing) with aggregation commands like 'stats count' or destructive commands, leading them to pick 'counts events per day' instead of 'groups events into 24-hour buckets'.

How to eliminate wrong answers

Option A is wrong because 'bin' alone does not count events — counting requires a subsequent 'stats count by _time' or similar aggregation; bin only creates the buckets. Option B is wrong because 'bin' never deletes events; it is a non-destructive command that only modifies the _time field for grouping purposes. Option D is wrong because 'bin' does not change the display format of timestamps; it changes the value of _time to the start of the bucket, but formatting is controlled by field formatting or the 'convert' command.

16
MCQmedium

You are using 'lookup' to add user info. What happens if the common field doesn't exist in the lookup file?

A.The lookup file is renamed.
B.The events without a match are deleted.
C.The entire search fails.
D.The events without a match are left with null values in the lookup fields.
AnswerD

A lookup returns fields only for events whose key value matches an entry in the lookup table. Events lacking a match keep null values in the enriched fields rather than being dropped or erroring, satisfying the scenario where the common field is absent from the lookup file.

Why this answer

The lookup command enriches events by matching a field in the event stream against a field in a lookup table. When no match is found for a given event, that event is retained in the results but the fields brought in from the lookup are populated with null values. This preserves the full event set while adding enrichment where possible, which is essential for accurate reporting and downstream analysis.

Exam trap

SPLK-5001 often tests the misconception that lookup behaves like an inner join and drops non-matching events — candidates forget it's a left join that preserves all events with null enrichment fields.

How to eliminate wrong answers

Option A is wrong because lookup never renames or modifies the lookup file itself — it only reads from it. Option B is wrong because lookup does not drop or delete non-matching events; all events pass through, only enrichment fields are null. Option C is wrong because a missing match does not cause search failure; lookup gracefully handles non-matches by leaving fields null rather than erroring out.

17
Multi-Selecthard

Which THREE of the following are valid uses of the 'eval' command?

Select 3 answers
A.eval is_error = if(status>400, 1, 0)
B.eval new_field = field1 + field2
C.eval count by host
D.eval filter status=200
E.eval full_name = first + " " + last
AnswersA, B, E

The `if()` function evaluates the condition `status>400` and returns 1 when true, 0 otherwise, assigning the result to the new field `is_error`. This satisfies the stem's requirement for a valid `eval` use, since `eval` creates or overwrites fields using expressions, and `if()` is a supported evaluation function.

Why this answer

Option A is correct because eval can create a new field using a conditional expression, and if(status>400, 1, 0) is a valid eval function that returns 1 when status exceeds 400 and 0 otherwise. Option B is correct because eval supports arithmetic expressions, so eval new_field = field1 + field2 computes the sum of two existing numeric fields and stores it in new_field. Option E is correct because eval can concatenate string values with the + operator, so eval full_name = first + " " + last builds a full name by joining first, a space, and last.

Option C is not a valid eval use because 'by host' is a splitting/aggregation clause used with commands like stats, chart, or timechart, not eval. Option D is not a valid eval use because 'filter status=200' is a filtering operation, typically done with search or where, and eval does not filter events.

Exam trap

SPLK-5001 often tests the distinction between eval and stats/where, so candidates may mistakenly think eval can group (by) or filter events, when it only computes fields per event.

18
MCQmedium

You want to calculate the standard deviation of 'response_time' per 'server'. Which command is correct?

A.stats variance(response_time) as std_dev by server
B.stats stdev(response_time) as std_dev by server
C.stats sigma(response_time) by server
D.stats dev(response_time) by server
AnswerB

The stats command's stdev function computes the sample standard deviation of response_time, and the by clause splits results per server. This satisfies the per-server grouping constraint, producing one std_dev value for each distinct server in the result set.

Why this answer

The stats command supports stdev() as the statistical function for standard deviation. The syntax 'stats stdev(response_time) as std_dev by server' correctly computes the standard deviation of response_time grouped by server. variance() computes variance (the square of standard deviation), and sigma() and dev() are not valid SPL statistical functions.

Exam trap

SPLK-5001 often tests whether candidates confuse variance with standard deviation, or invent plausible-sounding function names like sigma() and dev() that do not exist in SPL.

How to eliminate wrong answers

Option A (variance) is wrong because variance() returns the squared deviation, not the standard deviation — a common statistical confusion. Option C (sigma) is wrong because 'sigma' is not a recognized SPL stats function, even though sigma is the Greek symbol for standard deviation. Option D (dev) is wrong because 'dev' is not a valid SPL stats function.

19
MCQmedium

A security analyst wants to identify which users have logged in from more than one distinct country in the last 24 hours, a possible sign of credential compromise. The events contain user and src_country fields. Which SPL search best identifies these users?

A.index=auth action=success earliest=-24h | stats dc(src_country) as country_count by user | where country_count > 1
B.index=auth action=success earliest=-24h | dedup user, src_country | stats count by user | where count > 1
C.index=auth action=success earliest=-24h | transaction user | where mvcount(src_country) > 1
D.index=auth action=success earliest=-24h | stats count by user, src_country | where count > 1
AnswerA

This search filters successful logins in the last 24 hours, then uses stats with the distinct count function dc on src_country grouped by user. The where clause keeps only users whose distinct country count exceeds one. This directly surfaces users who authenticated from multiple countries, matching the analyst's requirement.

Why this answer

To find users logging in from multiple countries, the analyst must count distinct values of src_country per user. The stats command with the dc function computes exactly that distinct count, and the where clause filters to users with more than one. This approach is efficient, deterministic, and directly expresses the detection logic.

Exam trap

The trap here is confusing a count of events with a distinct count of a field, so a user with many logins from one country can be misidentified as logging in from multiple countries.

20
Multi-Selecthard

Which THREE of the following are valid search operators?

Select 3 answers
A.WITH
B.OR
C.AND
D.BUT
E.NOT
AnswersB, C, E

OR is a valid Splunk search operator, combining results from two search terms so that events matching either term are returned. It satisfies the stem's requirement for a genuine search operator, unlike comparison symbols or wildcards used within terms. OR works across the main search, subsearches and eval expressions.

Why this answer

The three valid search operators here are OR (B), AND (C), and NOT (E). OR (B) is a Boolean operator that broadens a query by returning results matching either term, e.g., 'cat OR dog'. AND (C) is a Boolean operator that narrows a query by requiring both terms to be present, e.g., 'cat AND dog'.

NOT (E) is a Boolean operator that excludes a term from results, e.g., 'cat NOT dog'. The remaining options are not search operators: WITH (A) is not a standard Boolean search operator, and BUT (D) is an ordinary English conjunction with no defined role in search query syntax.

Exam trap

SPLK-5001 often tests whether candidates confuse natural-language conjunctions (WITH, BUT) with actual SPL boolean operators, or forget that NOT is the negation operator rather than a word like BUT.

21
MCQhard

A security analyst is investigating a potential data exfiltration event. They need to calculate the rate of outbound data transfer per source IP over the last 30 minutes, but the raw logs only contain cumulative byte counts per connection. Which SPL command sequence correctly computes the per-second rate of change for each src_ip?

A.sort 0 _time | delta bytes as byte_delta by src_ip | eval rate = byte_delta / (_time - prev_time)
B.stats sum(bytes) as total_bytes by src_ip | eval rate = total_bytes / 1800
C.streamstats current=f window=2 sum(bytes) as total by src_ip | eval rate = (total - bytes) / (_time - prev_time)
D.sort 0 _time | streamstats current=f window=2 last(bytes) as prev_bytes last(_time) as prev_time by src_ip | eval rate = (bytes - prev_bytes) / (_time - prev_time)
AnswerD

This sequence sorts events chronologically, then uses streamstats to capture the previous bytes and previous timestamp for each src_ip. The eval calculates the per-second rate of change between consecutive events, correctly handling cumulative byte counts and providing the rate needed to spot exfiltration spikes.

Why this answer

To compute a per-second rate from cumulative counters, you need the difference in bytes and the difference in time between consecutive events. Sorting by time and using streamstats to fetch the previous values enables that calculation. The other options either compute a static average, reference non-existent fields, or omit the necessary time delta.

Exam trap

The trap here is assuming that a simple delta or average calculation is sufficient, when you must also derive the elapsed time between events to get a true rate.

22
Multi-Selecthard

Which THREE of the following represent valid ways to use the 'lookup' command?

Select 3 answers
A.lookup file.csv field1
B.lookup file.csv --all
C.lookup file.csv field1 AS field_a OUTPUT field2 AS field_b
D.lookup file.csv field1 OUTPUT field2
E.lookup file.csv --join
AnswersA, C, D

Supplying only a lookup file and a single field is valid syntax: Splunk matches that field against the lookup's first column and, absent an OUTPUT clause, returns all remaining lookup fields automatically. This satisfies the basic lookup invocation form.

Why this answer

Option A is correct because the basic syntax of the lookup command is `lookup <lookup-table-name> <lookup-field>`, so `lookup file.csv field1` is a valid minimal invocation that matches field1 in the CSV against the event field of the same name. Option C is correct because the lookup command supports renaming the input field with `AS` and specifying output fields with `OUTPUT ... AS ...`, so `lookup file.csv field1 AS field_a OUTPUT field2 AS field_b` is valid syntax.

Option D is correct because `lookup file.csv field1 OUTPUT field2` is the standard form for matching field1 and returning only field2 from the lookup table. Option B is not valid because `--all` is not a recognized lookup command flag; there is no such option to return all fields. Option E is not valid because `--join` is not a lookup command parameter; lookup does not use a join flag (joins are performed with the `join` command).

Exam trap

SPLK-5001 often tests whether candidates confuse lookup syntax with join or SQL-style flags, so invented options like `--all` and `--join` look plausible to anyone who hasn't memorized the exact SPL grammar.

23
MCQeasy

A security analyst needs to quickly identify which users have logged in from more than three distinct source IP addresses in the last 24 hours. Which SPL command correctly calculates the number of distinct source IPs per user?

A.stats values(src_ip) as ip_list by user | eval ip_count = mvcount(ip_list)
B.dedup src_ip | stats count by user
C.stats dc(src_ip) as ip_count by user
D.stats count(src_ip) as ip_count by user
AnswerC

The stats command with dc(src_ip) calculates the distinct count of source IP addresses for each user. This directly provides the number of unique IPs per user. The by user clause groups the results by user, enabling identification of users with more than three distinct IPs. This is the correct and efficient way to achieve the requirement.

Why this answer

The dc function in the stats command calculates the distinct count of a field. Using dc(src_ip) by user directly returns the number of unique source IPs for each user, which is exactly what is needed to find users with more than three distinct IPs. It is efficient and avoids the pitfalls of counting total events or using dedup incorrectly.

Exam trap

The trap here is using count(src_ip) instead of dc(src_ip), which counts events rather than unique IP addresses, leading to incorrect results.

24
Multi-Selecthard

Which THREE commands can be used to handle or create statistical summaries?

Select 3 answers
A.stats
B.fields
C.streamstats
D.eventstats
E.sort
AnswersA, C, D

The `stats` command calculates aggregations such as count, sum, average and distinct counts across events, directly producing the statistical summaries the question requires. It satisfies the constraint of handling or creating summaries by grouping results with `by` clauses and applying functions like `avg()` or `dc()` to raw search results.

Why this answer

Option A, `stats`, is correct because it is the primary Splunk search command for calculating aggregate statistical summaries such as count, sum, avg, min, max, and dc over result sets. Option C, `streamstats`, is correct because it computes running (cumulative) statistics as events stream through the pipeline, producing statistical summaries like running totals and moving averages. Option D, `eventstats`, is correct because it enriches each event with aggregated statistics (for example, adding an avg or count field to every event) while preserving the original events, making it a statistical summary command.

Option B, `fields`, is not correct because it only includes or excludes fields from results and does not compute any statistics. Option E, `sort`, is not correct because it merely orders results by specified fields and performs no statistical aggregation.

Exam trap

SPLK-5001 often tests the distinction between transforming commands (stats) and non-transforming statistical commands (eventstats, streamstats) — candidates mistakenly include filtering commands like fields or sort.

25
MCQeasy

Which command is used to rename a field in the results table for better readability?

A.table src_ip as "Source Address"
B.fields src_ip:"Source Address"
C.eval "Source Address" = src_ip
D.rename src_ip as "Source Address"
AnswerD

The `rename` command changes a field's name in the results table without altering its values, satisfying the readability requirement. Using `as` with a quoted alias, `rename src_ip as "Source Address"` relabels the column header, unlike `eval`, which creates a new field while leaving the original intact.

Why this answer

The rename command is specifically designed to rename fields in search results, and the syntax 'rename src_ip as "Source Address"' correctly renames the field src_ip to "Source Address" for display purposes. This is the standard SPL way to improve readability of field names in tables.

Exam trap

SPLK-5001 often tests the syntax of common SPL commands, and candidates may confuse rename with table or eval for renaming fields.

How to eliminate wrong answers

Option A is wrong because the table command does not support renaming fields with 'as'; it only selects fields for display, and using 'as' there is invalid syntax. Option B is wrong because the fields command does not support renaming with a colon syntax; it only includes or excludes fields. Option C is wrong because eval is used to create or modify fields, but 'eval "Source Address" = src_ip' would create a new field with a space in its name, which is not the intended renaming and is not standard practice for display.

26
MCQmedium

A security analyst needs to correlate two event types for the same user within a 10-minute window: a 'login' event and a subsequent 'privilege_escalation' event. The events share a common field 'user'. Which SPL command should be used to join these events based on the user and time proximity?

A.join user [search privilege_escalation]
B.transaction user maxspan=10m
C.stats values(action) as actions by user
D.append [search privilege_escalation] | selfjoin user
AnswerB

The transaction command groups events that share a common field (user) and occur within a specified time span (maxspan=10m). It creates a single transaction event containing both the login and privilege escalation, preserving the order and ensuring they are within 10 minutes of each other. This directly satisfies the requirement to correlate related events by user and time proximity.

Why this answer

The transaction command is designed to group related events that share a common field and occur within a specified time span. By using maxspan=10m, it ensures that only login and privilege escalation events for the same user that happen within 10 minutes are combined into a single transaction. This provides the necessary temporal correlation, unlike join or stats which do not enforce time windows.

Exam trap

The trap here is assuming that the join command can enforce a time window between events, when it only matches on field values and ignores event timing.

27
MCQeasy

What does the 'OR' operator do in a search?

A.Matches either condition.
B.Excludes the specified condition.
C.Matches both conditions.
D.Matches only the first condition.
AnswerA

The OR operator performs a Boolean union, returning events where either the left or right condition evaluates true. This satisfies the stem by matching either condition, unlike AND, which requires both to be true simultaneously.

Why this answer

In Splunk Search Processing Language, the OR operator is a Boolean operator that returns events matching either of the two conditions it connects. For example, `status=200 OR status=404` returns events where status equals 200 or status equals 404 (or both). It is the inclusive disjunction, not exclusive, so events satisfying both conditions are also returned.

Exam trap

The trap here is confusing OR with AND or with NOT — candidates who skim often pick 'matches both conditions' because they conflate inclusive OR with the everyday phrase 'and/or'.

How to eliminate wrong answers

Option B is wrong because exclusion is performed by the NOT operator (or `!=`), not OR; OR never removes events. Option C is wrong because matching both conditions is the behaviour of the AND operator, which requires both sides to be true. Option D is wrong because OR does not prioritize or restrict to the first condition — it evaluates both sides and returns the union of matches.

28
Multi-Selectmedium

A security analyst is writing SPL searches to detect suspicious activity and wants to understand which commands can be used to filter or transform search results. Which TWO of the following statements about SPL commands are accurate? (Choose two.)

Select 2 answers
A.The rex command can only extract fields from indexed fields, not from the raw event text.
B.The table command permanently removes all fields not listed from the search results, affecting subsequent commands.
C.The search command can only be used as the first command in a search pipeline.
D.The stats command can calculate aggregate statistics such as count, sum, and average, grouped by one or more fields.
E.The where command filters results using eval expressions and can reference calculated fields created earlier in the search pipeline.
AnswersD, E

The stats command is the primary aggregation command in SPL. It supports functions like count, sum, avg, min, max, and dc, and the by clause groups results by specified fields. This allows analysts to summarize large volumes of events into meaningful metrics for detection and reporting.

Why this answer

The where command filters using eval expressions and can reference computed fields, while the stats command aggregates metrics grouped by fields. Both are fundamental SPL commands for filtering and transforming results. The other statements misrepresent search placement, the non-destructive nature of table, and the raw-text extraction capability of rex.

Exam trap

The trap here is assuming that table permanently removes fields and that rex only works on indexed fields, when table is display-only and rex extracts from raw text.

29
MCQhard

An analyst needs to review firewall traffic but only for events where the action field is explicitly 'blocked' and the bytes_out field is greater than 5000. Some events are missing the action field entirely. Which SPL search returns only events that satisfy both conditions?

A.index=firewall action=blocked OR bytes_out>5000
B.index=firewall action=blocked NOT bytes_out>5000
C.index=firewall action=blocked bytes_out>5000
D.index=firewall action=blocked bytes_out<5000
AnswerC

This is correct because base search terms using field=value and field>value are evaluated as Boolean AND conditions, so only events where action equals blocked and bytes_out exceeds 5000 are returned. Events missing the action field are automatically excluded because the term action=blocked cannot match them, satisfying the requirement to filter out incomplete events.

Why this answer

In SPL, multiple search terms typed into the base search are implicitly combined with AND logic. Writing action=blocked bytes_out>5000 therefore requires both field conditions to be true for an event to be returned. Because events missing the action field cannot satisfy action=blocked, they are silently dropped, which matches the requirement to review only complete, explicitly blocked high-volume traffic.

Exam trap

The trap here is assuming that multiple search terms are combined with OR or that missing fields are treated as matching the filter rather than being excluded.

30
Multi-Selectmedium

Which TWO commands are helpful for identifying specific patterns in data?

Select 2 answers
A.rename
B.sort
C.head
D.transaction
E.cluster
AnswersD, E

The transaction command groups related events sharing common field values into single transactions, revealing multi-event patterns such as sequences of actions. This satisfies the pattern-identification criterion because it exposes relationships across events that individual searches would miss.

Why this answer

The transaction command (D) is correct because it groups events that share a common value (such as a session ID or transaction ID) into a single event, letting you identify patterns across related events rather than viewing them in isolation. The cluster command (E) is correct because it uses pattern recognition to group together similar events that share common text or field values, which directly surfaces recurring patterns in the data. The rename command (A) only changes the name of a field and does not reveal patterns, while sort (B) merely orders results and head (C) only limits output to the first N results, so neither performs pattern identification.

Exam trap

SPLK-5001 often tests whether candidates pick sort or head as pattern-identification commands, when those only order or truncate results — pattern grouping requires transaction or cluster.

31
Multi-Selecthard

Which THREE commands are used to manipulate multi-value fields?

Select 3 answers
A.rename
B.mvcombine
C.table
D.mvexpand
E.mvfilter
AnswersB, D, E

`mvcombine` merges values from multiple events into a single multi-value field, satisfying the requirement to manipulate multi-value fields. It groups values sharing a common field, combining them into one delimited list per group. This directly transforms event-level values into a consolidated multi-value field, which is the manipulation the question demands.

Why this answer

In Splunk's Search Processing Language (SPL), multi-value fields are handled by commands that specifically operate on fields containing multiple values per event. Option B, mvcombine, is correct because it takes a single-value field and merges the values across events into a multi-value field, effectively creating or manipulating multi-value data. Option D, mvexpand, is correct because it expands each value of a multi-value field into a separate event, directly manipulating the multi-value field's structure.

Option E, mvfilter, is correct because it filters the values within a multi-value field using an expression, thereby manipulating the contents of that multi-value field. Option A, rename, is incorrect because it simply renames a field and does not specifically handle multi-value semantics. Option C, table, is incorrect because it only formats results into a tabular output and does not manipulate multi-value fields.

Exam trap

SPLK-5001 often tests whether candidates can distinguish MV-specific commands from general field manipulation commands — rename and table feel like they 'manipulate fields' but don't touch multi-value semantics.

32
Multi-Selecthard

Which THREE of the following are valid ways to filter events based on time?

Select 3 answers
A.stats _time
B.earliest=, latest=
C.bin _time
D.index=logs earliest=-1h latest=now
E.where _time > relative_time(now(), "-24h")
AnswersB, D, E

The `earliest=` and `latest=` search command arguments restrict results to a specified time window, satisfying the requirement to filter events by time. They accept absolute timestamps or relative modifiers such as `-24h`, applying the constraint at search time rather than relying on indexed fields.

Why this answer

Option B (earliest=, latest=) is correct because these are the standard time-range arguments accepted by the search command to constrain events to a specific time window. Option D (index=logs earliest=-1h latest=now) is correct because it applies those earliest/latest time modifiers directly in a search, filtering events to the last hour up to the current time. Option E (where _time > relative_time(now(), "-24h")) is correct because the where command evaluates a boolean expression on the _time field, using relative_time to compute a 24-hour-ago timestamp and filtering events newer than it.

Option A (stats _time) is not a filtering method; stats is an aggregation command and _time alone does not restrict events by time. Option C (bin _time) is also not a filter; bin buckets timestamps into discrete intervals for grouping or charting rather than excluding events outside a time range.

Exam trap

SPLK-5001 often tests the confusion between commands that transform _time (bin, stats) and those that actually filter events by time (earliest/latest, where with relative_time), tricking candidates into selecting aggregation commands as valid filters.

33
MCQmedium

A security analyst needs to identify all Windows event codes where the count of events exceeds 100 in the last 24 hours, and then display the results sorted by count in descending order. The base search returns events with the field 'EventCode'. Which SPL search accomplishes this?

A.index=windows EventCode=* | top limit=100 EventCode | sort - count
B.index=windows EventCode=* | stats count by EventCode | where count > 100 | sort - count
C.index=windows EventCode=* | stats count by EventCode | sort - count | where count > 100
D.index=windows EventCode=* | where count > 100 | stats count by EventCode | sort - count
AnswerB

This search filters all events with any EventCode, then uses stats to count events per EventCode, filters with where count > 100, and sorts descending by count. It correctly applies the threshold after aggregation and sorts the results as required.

Why this answer

The search must count events per EventCode, filter for counts greater than 100, and sort descending. The stats command aggregates counts, where filters after aggregation, and sort orders the final results. Placing where after stats is correct because count is only available after aggregation.

Exam trap

The trap here is assuming that the where command can reference the count field before the stats command has created it.

34
MCQhard

When using 'stats', how can you include the values of a field as columns in your output?

A.stats count by host, sourcetype
B.stats count by host | transpose
C.stats count by host, sourcetype | xyseries host, sourcetype, count
D.stats pivot host sourcetype
AnswerC

xyseries pivots the count field so that host values become rows and sourcetype values become columns, satisfying the requirement to display field values as columns. The preceding stats count by host, sourcetype supplies the aggregated values that xyseries then reshapes into a tabular, column-oriented layout.

Why this answer

The xyseries command converts the results of a stats aggregation into a matrix (pivot) format, using one field for rows, another for column headers, and a numeric field for cell values. In this case, 'stats count by host, sourcetype' produces rows of (host, sourcetype, count), and 'xyseries host, sourcetype, count' pivots sourcetype values into distinct columns with counts as cell values. This is the canonical SPL way to turn grouped stats output into a wide table with field values as column headers.

Exam trap

SPLK-5001 often tests whether candidates confuse 'transpose' (row/column swap) with 'xyseries' (true pivot of field values into columns) — many pick transpose thinking it produces named columns.

How to eliminate wrong answers

Option A is wrong because 'stats count by host, sourcetype' produces a long-format table with one row per host/sourcetype combination, not separate columns for each sourcetype value. Option B is wrong because 'transpose' simply swaps rows and columns of the existing result set — it does not pivot a specific field's values into named columns and typically produces a generic 'row 1, row 2' header structure. Option D is wrong because 'stats pivot' is not a valid SPL command; pivoting is done via the pivot command (data model based) or xyseries, not as a stats function.

35
MCQeasy

A security analyst is investigating a potential insider threat and needs to see the number of events per hour for a specific user over the past 48 hours. The events are in the 'index=insider' with a field 'user'. Which SPL search will produce a time chart showing hourly event counts for that user?

A.index=insider user=john.doe | timechart span=1h count
B.index=insider user=john.doe | stats count by date_hour
C.index=insider user=john.doe | chart count over _time by user
D.index=insider user=john.doe | bucket _time span=1h | stats count by _time
AnswerA

The timechart command with span=1h automatically buckets events into hourly intervals and counts them, producing a time-series chart. Filtering by user=john.doe focuses on the specific user, and the result is a chart of event counts per hour.

Why this answer

The timechart command is specifically designed to create time-series charts, and with span=1h it buckets events into hourly intervals. Filtering by the user ensures only that user's events are counted, resulting in the desired hourly event count chart.

Exam trap

The trap here is using bucket or date_hour instead of timechart, which may produce counts but not the intended time-series visualization.

36
MCQmedium

A security analyst needs to identify the percentage of total authentication events that each user account generated over the past week. The search must return the user, the count of events for that user, and the percentage each user represents of all authentication events, sorted so the largest share appears first. Which SPL search accomplishes this?

A.index=auth action=* | stats count BY user | eval pct=(count/sum(count))*100 | sort - pct
B.index=auth action=* | stats count BY user | addtotals | eval pct=(count/Total)*100 | sort - pct
C.index=auth action=* | top user | eval pct=(count/total)*100 | sort - pct
D.index=auth action=* | stats count BY user | eventstats sum(count) AS total | eval pct=round((count/total)*100,2) | sort - pct
AnswerD

This search aggregates events per user with stats, then uses eventstats to append the sum of all user counts as a running total field across every row, and eval calculates each user's percentage of that total. Sorting descending by pct places the largest share first, which is exactly the requested output.

Why this answer

The requirement is a per-row percentage against a grand total. stats collapses events into one row per user with a count, and eventstats sum(count) broadcasts the overall total onto every row so eval can divide each user's count by it. Sorting on the computed percentage descending satisfies the ordering requirement.

Exam trap

The trap here is assuming eval can call aggregate functions like sum(count) to get a grand total, when aggregation must come from stats or eventstats first.

37
MCQeasy

Which command is used to append results from one search to another?

A.add [search index=other]
B.join [search index=other]
C.append [search index=other]
D.combine [search index=other]
AnswerC

append runs a subsearch and adds its results to the current result set, which is exactly the concatenation the stem describes. It differs from join, which correlates fields, and union, which merges datasets rather than appending.

Why this answer

The append command is correct because it takes the results of the current search and adds the results of a subsearch to the end of the result set, effectively combining two result sets vertically. The syntax append [search index=other] runs the subsearch and appends its output to the main pipeline. This is the standard Splunk command for concatenating results from separate searches without joining on a common field.

Exam trap

SPLK-5001 often tests the distinction between append (vertical row addition) and join (horizontal field-based combination), tricking candidates into choosing join because they think 'combine results' means joining on a field.

How to eliminate wrong answers

Option A (add) is wrong because there is no Splunk command named 'add' for appending search results; 'add' is not a valid SPL command in this context. Option B (join) is wrong because join combines results horizontally based on a common field, not by appending rows, and it has performance limitations. Option D (combine) is wrong because 'combine' is not a valid Splunk command for appending results; it does not exist in SPL for this purpose.

38
MCQhard

When dealing with multi-value fields, which command allows you to break them into individual events?

A.expand field_name
B.mvexpand field_name
C.mv_to_events field_name
D.split field_name
AnswerB

`mvexpand` takes each value within a multi-value field and creates a separate event for it, directly satisfying the requirement to split values into individual events. Unlike `mvcombine`, which merges values, or `nomv`, which flattens a field into a single string, `mvexpand` preserves each value as its own event.

Why this answer

The mvexpand command takes a multi-value field and expands each value into its own separate event, duplicating the other fields for each value. This is the standard SPL command for breaking multi-value fields into individual events, and it is commonly used before further aggregation or correlation.

Exam trap

SPLK-5001 often tests the difference between commands that create multi-value fields (split, makemv) and commands that expand them (mvexpand) — candidates pick split because it sounds like it separates values, but it does the opposite.

How to eliminate wrong answers

Option A (expand field_name) is wrong because there is no 'expand' command in SPL; the correct command is mvexpand. Option C (mv_to_events field_name) is wrong because no such command exists in Splunk — it is a fabricated name that sounds plausible. Option D (split field_name) is wrong because split is an eval function that splits a single string into a multi-value field, which is the opposite of what the question asks (it creates multi-value fields rather than expanding them into events).

39
MCQmedium

Which command is used to remove duplicate events based on a field?

A.remove_duplicates event_id
B.distinct event_id
C.unique event_id
D.dedup event_id
AnswerD

`dedup event_id` removes duplicate events by comparing values in the specified field, retaining only the first occurrence of each unique event_id. This directly satisfies the requirement to eliminate duplicates based on a field, unlike commands that merely group or count events without discarding the redundant copies.

Why this answer

The dedup command removes duplicate events based on the specified field(s), keeping only the first occurrence (or a specified number with the keepevents/sortby options). 'dedup event_id' is the correct syntax to deduplicate events sharing the same event_id value. This is a core SPL command for reducing redundant results.

Exam trap

SPLK-5001 often tests whether candidates know the exact SPL command name — the trap is picking plausible-sounding but non-existent commands like 'unique', 'distinct', or 'remove_duplicates' instead of the real 'dedup'.

How to eliminate wrong answers

Option A is wrong because 'remove_duplicates' is not a valid SPL command — no such command exists in Splunk. Option B is wrong because 'distinct' is not a valid SPL command; the closest concept is 'dedup' or using 'stats dc()' for counting distinct values. Option C is wrong because 'unique' is not a valid SPL command either — Splunk uses dedup, not unique, for this purpose.

Ready to test yourself?

Try a timed practice session using only Spl Search Proficiency questions.