mitre / sandcat

A CALDERA plugin
https://caldera.mitre.org/
Apache License 2.0
60 stars 36 forks source link

Virts 3623 #398

Closed uruwhy closed 2 years ago

uruwhy commented 2 years ago

Description

Adding background cmd execution capabilities for the proc executor. This can be done by prefixing the command with exec-background (e.g. exec-background notepad.exe). This will allow agents to run some background process and continue executing links without having to wait for it. Note that execution won't be responsible for collecting output or terminating the process - additional abilities would be required for that.

Also refactoring additional existing proc executor code for golang unit tests.

Type of change

How Has This Been Tested?

Created and ran golang unit tests. Also recompiled agents and tested them on Linux, Mac, and Windows - confirmed that running background processes like sh -c "sleep 200" and notepad.exe did not prevent the agent from continuing execution, and the processes were executed correctly in the background.

Checklist:

sonarcloud[bot] commented 2 years ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication