turbot/tailpipe-mod-apache-access-log-detections

Query: sql_injection_union_based

Usage

powerpipe query apache_access_log_detections.query.sql_injection_union_based

Tailpipe Tables

SQL

select
tp_timestamp as timestamp,
request_method as operation,
request_uri as resource,
status,
http_user_agent as actor,
tp_source_ip as source_ip,
tp_id as source_id,
-- Create new aliases to preserve original row data
status as status_src,
timestamp as timestamp_src,
* exclude (status, timestamp)
from
apache_access_log
where
request_uri is not null
and (
-- UNION-based patterns
request_uri ilike '%union%select%' -- Evasion techniques specific to UNION
or request_uri ilike '%uni%on%sel%ect%'
or request_uri ilike '%uni*/*/on/**/sel/**/ect%'
or request_uri ilike '%un?on+sel?ct%'
)
order by
tp_timestamp desc;

Detections

The query is being used by the following detections: