mitre / sandcat

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

Sandcat fails to start when whoami is not found #417

Open alexanderkent opened 2 years ago

alexanderkent commented 2 years ago

Describe the bug Sandcat agent fails on startup when whoami command is not found on the platform. https://github.com/mitre/sandcat/blob/e903198c4e0a197e8df1e04bbf8c3324107afe6f/gocat/agent/agent_util.go#L15

To Reproduce Steps to reproduce the behavior:

  1. Temp remove whoami e.g. rename, alter path etc
  2. Launch sandcat agent -v
./sandcat-arm64 -v
Starting sandcat in verbose mode.
[-] Error when initializing agent: exec: "whoami": executable file not found in $PATH
[-] Exiting.

Expected behavior Not all platforms have whoami -- soft-fail instead of a terminal error?

Desktop (please complete the following information):