mantis lab redteam command execute
mantis lab redteam command execute
Description
This command is used to execute a command (powershell or bash) or send a file to a compromised machine. The C2 server is used to transmit the command to the beacon on the target machine. The command can be run interactively or by passing parameters at runtime.
Usage
$ mantis lab LAB_ID redteam command executeOptions
Optional Arguments
--background
Execute command in background or not (Invoke-WmiMethod on Windows and & on Linux.)
--timeout
Maximum time (seconds) to wait result command before timeout
--identifier
Attack session identifier
Example
Execute « ls » on compromised target with interactive actions.
$ mantis lab LAB_ID redteam command execute
  Choose one attack session in list:
   [+] 0 : ATTACK_ID, USERNAME (privilege user/root) on HOSTNAME (IP)
  Select attack session index: 0
  Command to execute (one line) : ls .
  Command need to be executed in background, y or n ? (n by default) n
  Max waiting time for command result in seconds ? (60 by default) n
      Répertoire : C:\Users\USERNAME\Downloads
   Mode                LastWriteTime         Length Name
   ----                -------------         ------ ----
   -a----       26/07/2024     14:29          10240 fichier.exeExecute « ls » on compromised target with parameters actions.
$ mantis lab LAB_ID redteam command execute --identifier ATTACK_SESSION_ID --timeout 60 --background False
  Command to execute (one line) : ls .
      Répertoire : C:\Users\USERNAME\Downloads
   Mode                LastWriteTime         Length Name
   ----                -------------         ------ ----
   -a----       26/07/2024     14:29          10240 fichier.exe
