--- PostEx DLL --- executeSpawnPostExDll spawns a temporary process and injects postex DLL
(ctx context.Context, client *csclient.Client, beaconID string, action Action)
| 470 | |
| 471 | // executeSpawnPostExDll spawns a temporary process and injects postex DLL |
| 472 | func (e *Executor) executeSpawnPostExDll(ctx context.Context, client *csclient.Client, beaconID string, action Action) (string, error) { |
| 473 | dllPath, ok := action.Parameters["dll"].(string) |
| 474 | if !ok { |
| 475 | return "", fmt.Errorf("dll parameter required for spawn_postex_dll") |
| 476 | } |
| 477 | args, _ := action.Parameters["args"].(string) // optional |
| 478 | |
| 479 | resp, err := client.SpawnPostExDll(ctx, beaconID, dllPath, args) |
| 480 | if err != nil { |
| 481 | return "", err |
| 482 | } |
| 483 | return e.waitForOutput(ctx, client, resp.TaskID) |
| 484 | } |
| 485 | |
| 486 | // executeInjectPostExDll injects postex DLL into a process |
| 487 | func (e *Executor) executeInjectPostExDll(ctx context.Context, client *csclient.Client, beaconID string, action Action) (string, error) { |
no test coverage detected