Skip to content

Instantly share code, notes, and snippets.

@Flangvik
Created February 3, 2022 13:17
Show Gist options
  • Save Flangvik/c31b26129743be699133dc9dab9c02c5 to your computer and use it in GitHub Desktop.
Save Flangvik/c31b26129743be699133dc9dab9c02c5 to your computer and use it in GitHub Desktop.
NewIpAlert.cna
on heartbeat_15m {
foreach $beacon (beacons()) {
println("[VPN] Running command on id: " . $beacon['id'] . ", hostname:" . binfo($beacon['id'], "computer") . "\n");
$id = $beacon['id'];
bipconfig($id,{
print("[VPN] Captured network interfaces from " . binfo($1, "computer") . ", looking for a new IPs to alert on\n");
exec("python3.7 /<fullpath>/AlertOnNewIp.py --data " . transform($2, "powershell-base64") . " --user " . binfo($1, "user") . " --computer " . binfo($1, "computer"));
});
}
}
@Flangvik
Copy link
Author

Flangvik commented Feb 3, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment