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

Method executeSpawnPth

workflow/executor_spawn.go:359–375  ·  view source on GitHub ↗

--- Pass-the-Hash --- executeSpawnPth spawns a process for pass-the-hash

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

Source from the content-addressed store, hash-verified

357
358// executeSpawnPth spawns a process for pass-the-hash
359func (e *Executor) executeSpawnPth(ctx context.Context, client *csclient.Client, beaconID string, action Action) (string, error) {
360 user, ok := action.Parameters["user"].(string)
361 if !ok {
362 return "", fmt.Errorf("user parameter required for spawn_pth")
363 }
364 ntlmHash, ok := action.Parameters["ntlm_hash"].(string)
365 if !ok {
366 return "", fmt.Errorf("ntlm_hash parameter required for spawn_pth")
367 }
368 domain, _ := action.Parameters["domain"].(string) // optional
369
370 resp, err := client.SpawnPth(ctx, beaconID, domain, user, ntlmHash)
371 if err != nil {
372 return "", err
373 }
374 return e.waitForOutput(ctx, client, resp.TaskID)
375}
376
377// executeInjectPth injects into a process for pass-the-hash
378func (e *Executor) executeInjectPth(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