Exfiltration (TA0010)(external, opens in a new tab or window)
text code block:from logs-github.audit-* metadata _id, _index, _version | where data_stream.dataset == "github.audit" and event.type == "change" and event.action == "git.clone" | stats Esql.event_count = COUNT(*), Esql.github_org_values = values(github.org), Esql.github_repo_values = values(github.repo), Esql.github_repository_public_values = values(github.repository_public), Esql.github_token_id_values = values(github.token_id), Esql.github_user_agent_values = values(github.user_agent), Esql.user_name_values = values(user.name), Esql.agent_id_values = values(agent.id), Esql.event_dataset_values = values(event.dataset), Esql.data_stream_namespace_values = values(data_stream.namespace) by user.name | keep Esql.* | where Esql.event_count >= 25
Install detection rules in Elastic Security
Detect GitHub Exfiltration via High Number of Repository Clones by User 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).