MCPcopy Create free account
hub / github.com/Xenov-X/csbot / executeSpawnBeacon

Method executeSpawnBeacon

workflow/executor_spawn.go:136–148  ·  view source on GitHub ↗

--- Beacon/Shellcode Spawn & Inject --- executeSpawnBeacon spawns a beacon process

(ctx context.Context, client *csclient.Client, beaconID string, action Action)

Source from the content-addressed store, hash-verified

134
135// executeSpawnBeacon spawns a beacon process
136func (e *Executor) executeSpawnBeacon(ctx context.Context, client *csclient.Client, beaconID string, action Action) (string, error) {
137 listener, ok := action.Parameters["listener"].(string)
138 if !ok {
139 return "", fmt.Errorf("listener parameter required for spawn_beacon")
140 }
141 arch, _ := action.Parameters["arch"].(string) // optional (x86 or x64)
142
143 resp, err := client.SpawnBeacon(ctx, beaconID, listener, arch)
144 if err != nil {
145 return "", err
146 }
147 return e.waitForOutput(ctx, client, resp.TaskID)
148}
149
150// executeSpawnBeaconAsUser spawns a beacon process as another user
151func (e *Executor) executeSpawnBeaconAsUser(ctx context.Context, client *csclient.Client, beaconID string, action Action) (string, error) {

Callers 1

executeActionMethod · 0.95

Calls 1

waitForOutputMethod · 0.95

Tested by

no test coverage detected