text code block:any where data_stream.dataset == "network_traffic.pgsql" and ( network_traffic.pgsql.query like~ "*copy*from*program*" or network_traffic.pgsql.query like~ "*copy*to*program*" )
Install detection rules in Elastic Security
Detect PostgreSQL COPY PROGRAM Command Execution in the Elastic Security detection engine by installing this rule into your Elastic Stack.
To setup this rule, check out the installation guide for Prebuilt Security Detection Rules(external, opens in a new tab or window).