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

Query: cross_site_scripting_angular_template

Usage

powerpipe query apache_access_log_detections.query.cross_site_scripting_angular_template

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 (
-- Common AngularJS injection patterns
request_uri ilike '%constructor.constructor%'
or request_uri ilike '%$eval%'
or request_uri ilike '%ng-init%'
or request_uri ilike '%ng-bind%'
or request_uri ilike '%ng-include%'
)
)
OR
(
http_user_agent is not null
and (
-- Common AngularJS injection patterns
http_user_agent ilike '%constructor.constructor%'
or http_user_agent ilike '%$eval%'
or http_user_agent ilike '%ng-init%'
or http_user_agent ilike '%ng-bind%'
or http_user_agent ilike '%ng-include%'
)
)
order by
tp_timestamp desc;

Detections

The query is being used by the following detections: