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

Query: sql_injection_time_based

Usage

powerpipe query apache_access_log_detections.query.sql_injection_time_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 (
-- Time-based functions for various database types
request_uri ilike '%sleep%(%'
or request_uri ilike '%benchmark%(%'
or request_uri ilike '%pg_sleep%(%'
or request_uri ilike '%dbms_pipe.receive_message%(%'
or request_uri ilike '%waitfor%delay%'
or request_uri ilike '%GENERATE_SERIES%'
)
order by
tp_timestamp desc;

Detections

The query is being used by the following detections: