Created
February 3, 2022 13:17
-
-
Save Flangvik/c31b26129743be699133dc9dab9c02c5 to your computer and use it in GitHub Desktop.
NewIpAlert.cna
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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")); | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Python script: https://gist.github.com/Flangvik/5fb58dffa373a50f4d560a14adaa415b