-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathwin-notify.cna
More file actions
30 lines (28 loc) · 1.19 KB
/
win-notify.cna
File metadata and controls
30 lines (28 loc) · 1.19 KB
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
26
27
28
29
30
#### Notify Beacon
## Aggressor script to simplify run Windows desktop notification when you get a new beacon
### Author: Sabri (@KINGSABRI)
### Usage ###
# - the powershell is installed on Windows by default
### Output ###
# Get a beacon and you will get desktop notifications
on beacon_initial {
$beacon = binfo($1);
$user = $beacon['user'];
$host = $beacon['host'];
$computer = $beacon['computer'];
$pid = $beacon['pid'];
$title = "New Beacon!";
$message .= '[reflection.assembly]::loadwithpartialname("System.Windows.Forms");[reflection.assembly]::loadwithpartialname("System.Drawing");';
$message .= '$notify = new-object system.windows.forms.notifyicon;';
$message .= '$notify.icon = [System.Drawing.SystemIcons]::Information;';
$message .= '$notify.visible = $true;';
$message .= '$notify.showballoontip(20,';
$message .= '"' . $title . '"';
$message .= ',';
$message .= '"' . $user . '@' . $host . ' (' . $computer . ') | ' . $pid . '"';
$message .= ',';
$message .= '[system.windows.forms.tooltipicon]::None);';
$encoded = base64_encode(str_encode($message, "UTF-16LE"));
@notify = @('powershell.exe', '-enc', $encoded );
$exec = exec(@notify);
}