Running Commands
Beacon’s shell command will task a Beacon to execute a command via cmd.exe on the compromised host. When the command completes, Beacon will present the output to you.
Use the run command to execute a command without cmd.exe. The run command will post output to you. The execute command runs a program in the background and does not capture output.
Use the powershell command to execute a command with PowerShell on the compromised host. Use the powerpick command to execute PowerShell cmdlets without powershell.exe. This command relies on the Unmanaged PowerShell technique developed by Lee Christensen. The powershell and powerpick commands will use your current token.
The psinject command will inject Unmanaged PowerShell into a specific process and run your cmdlet from that location.
The powershell-import command will import a PowerShell script into Beacon. Future uses of the powershell, powerpick, and psinject commands will have cmdlets from the imported script available to them. Beacon will only hold one PowerShell script at a time. Import an empty file to clear the imported script from Beacon.
The execute-assembly command will run a local .NET executable as a Beacon post-exploitation job. You may pass arguments to this assembly as if it were run from a Windows command-line interface. This command will also inherit your current token.
If you want Beacon to execute commands from a specific directory, use the cd command in the Beacon console to switch the working directory of the Beacon’s process. The pwd command will tell you which directory you’re currently working from.
The setenv command will set an environment variable.
Beacon can execute Beacon Object Files without creating a new process. Beacon Object Files are compiled C programs, written to a specific convention, that run within a Beacon session. Use inline-execute [args] to execute a Beacon Object File with the specified arguments. See Beacon Object Files for more information.
Beacon Console Commands
The following commands are built into Beacon and exist to configure Beacon or perform housekeeping actions. For more information on their equivalents on the Cobalt Strike REST API, see the REST API documentation.
| Command | Type | Summary | Description | Equivalent REST API Endpoints | |||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ! | Housekeeping commands | Runs a command from the command history |
Runs a command from the command history. You can view history via the history command. !! runs the most recent command from the command history. Equivalent to running !-1 or ! -1. ![number] or ! [number] runs a specific command from the command history:
![string] or ! [string] finds the most recent command in the history that starts with the string and run it. !?[string] or ! ?[string] finds the most recent command in the command history that contains the string and runs it. |
Out of Scope: GUI specific command | |||||||||||||||||||||||||||||||
| argue | Housekeeping commands | Spoofs arguments for matching processes |
Spoofs [fake arguments] for [command] processes launched by Beacon. This option does not affect runu/spawnu, runas/spawnas, or post-ex jobs. Use argue [command] to disable this feature for the specified command. Use argue by itself to list programs with defined spoofed arguments. |
/api/v1/beacons/{bid}/state/spoofedArguments | |||||||||||||||||||||||||||||||
| beacon_config | Housekeeping commands | Functions for managing beacon configuration |
Functions for managing beacon configuration. Use beacon_config to view and update beacon status and configuration. The beacon_config commands are:
Use help beacon_config [command] for more information. |
||||||||||||||||||||||||||||||||
| beacon_gate | Housekeeping commands | Functions for managing BeaconGate |
Change the use of beacon_gate at runtime to disable/enable the functionality. |
|
|||||||||||||||||||||||||||||||
| blockdlls | Housekeeping commands | Blocks non-Microsoft DLLs in child processes |
Launches child processes with a binary signature policy that blocks non-Microsoft DLLs from loading into the child process. Use blockdlls stop to disable this behavior. This feature requires Windows 10 or later, or Windows Server 2012 or later. |
|
|||||||||||||||||||||||||||||||
| cancel | Housekeeping commands | Cancels a download that's in-progress |
Cancels a download that is currently in progress. Wildcards are OK. |
/api/v1/beacons/{bid}/execute/cancelFileDownload | |||||||||||||||||||||||||||||||
| checkin | Housekeeping commands | Calls home and post data |
Forces DNS Beacon to connect to you. During a checkin, Beacon posts its host metadata and dumps logged keystrokes. |
/api/v1/beacons/{bid}/execute/checkIn | |||||||||||||||||||||||||||||||
| clear | Housekeeping commands | Clears beacon queue |
Clears beacon queue. |
/api/v1/beacons/{bid}/clearCommandQueue | |||||||||||||||||||||||||||||||
| data-store | Housekeeping commands | Stores post-ex items to Beacon |
Use data-store load to load post-ex items to Beacon. If the name is omitted, then the file name is used. The data store supports Beacon Object Files (bof) and .NET assemblies (dotnet). It is also possible to add arbitrary files to the data store (file). This provides a mechanism to upload data and then query it via BOFs using APIs such as BeaconStoreGetItem(). Use data-store unload to remove a specific post-ex item from the store. Use data-store list to print the post-ex items currently available in the data store. |
Out of Scope: Will be added in GA | |||||||||||||||||||||||||||||||
| downloads | Housekeeping commands | Lists file downloads in progress |
Lists any file downloads that are currently in progress. |
/api/v1/beacons/{bid}/activeDownloads | |||||||||||||||||||||||||||||||
| file_browser | Housekeeping commands | Opens the file browser tab for this beacon |
Opens the file browser tab for this beacon. Starts in the current directory. |
Out of Scope: GUI specific command | |||||||||||||||||||||||||||||||
| help | Housekeeping commands | Displays the Help menu |
Use help to display a list of commands with short descriptions. The default layout (#list or #groups) is set in preferences. Use help [command] to display the long-form description of a specified command. Additional options:
group-id values:
Example: Show help using the "groups" layout for "native" group filtering to list commands that contain the text "spawn": help #groups -spawn @native |
|
|||||||||||||||||||||||||||||||
| history | Housekeeping commands | Shows the command history |
Shows the command history. Use history with the [number] argument to only show that number of most recent commands. Use history without the [number] argument to list all the commands in the history. Use history without the all argument to list all the commands in the history. |
Out of scope: Superseded by Task mechanism | |||||||||||||||||||||||||||||||
| jobs | Housekeeping commands | Lists long-running post-exploitation tasks |
Lists long-running post-exploitation tasks. |
/api/v1/beacons/{bid}/state/jobs | |||||||||||||||||||||||||||||||
| mode | Housekeeping commands | Sets the DNS Beacon mode [dns|dns6|dns-txt] (DNS beacon only) |
Sets Beacon's mode to exchange data with the end-user. This only has an effect on a DNS beacon.
|
/api/v1/beacons/{bid}/state/dnsMode | |||||||||||||||||||||||||||||||
| note | Housekeeping commands | Assigns a note to this Beacon |
Assigns a note to this Beacon. |
/api/v1/beacons/{bid}/note | |||||||||||||||||||||||||||||||
| powershell-import | Housekeeping commands | Imports a PowerShell script |
Imports a PowerShell script which is combined with future calls to the PowerShell command. You can only use one imported script at a time. |
/api/v1/beacons/{bid}/execute/powershell/import | |||||||||||||||||||||||||||||||
| ppid | Housekeeping commands | Sets parent PID for spawned post-ex jobs |
Uses the specified PID as a parent for processes Beacon launches. The runas command is not affected, but most other commands are. Type ppid by itself to reset to default behavior. WARNING: Do not specify a parent PID in another desktop session. This can
break several of Beacon's features and workflows. Use runu to run
a command under a parent in another desktop session.
|
/api/v1/beacons/{bid}/state/ppid | |||||||||||||||||||||||||||||||
| process_browser | Housekeeping commands | Opens the process browser tab for this beacon |
Opens the process browser tab for this beacon. |
Out of Scope: GUI specific command | |||||||||||||||||||||||||||||||
| sleep | Housekeeping commands | Sets Beacon sleep time |
Changes how often the beacon calls home. Use sleep 0 to force Beacon to call home many times each second. Specify a jitter value (0-99) to force Beacon to randomly modify its sleep time. When setting long sleep periods, use the sleep <number of days>d <number of hours>h <number of minutes>m <number of seconds>s <jitter>j format. Example: Sets a sleep period of 2 hours and 30 minutes with a jitter value of 15%. This can be achieved using: sleep 9000 15 or sleep 2h 30m 15j Both commands set the same sleep period of 9000 seconds with a jitter value of 15%. The sleep 2h 30m 15j option allows you to set the sleep period without requiring mathematics to convert the period into seconds. |
/api/v1/beacons/{bid}/state/sleepTime | |||||||||||||||||||||||||||||||
| spawnto | Housekeeping commands | Sets the executable to spawn processes into |
Sets the executable that Beacon spawns x86 and x64 shellcode into. You must specify a full-path. Environment variables are OK (e.g., %windir%\sysnative\rundll32.exe) Do not reference %windir%\system32\ directly. This path is different depending on whether or not Beacon is x86 or x64. Use %windir%\sysnative\ and %windir%\syswow64\ instead. Beacon will map %windir%\syswow64\ to system32 when WOW64 is not present. |
/api/v1/beacons/{bid}/state/spawnto | |||||||||||||||||||||||||||||||
| syscall-method | Housekeeping commands | Changes or queries the syscall method |
Changes the syscall method at runtime. Valid method types are: None, Direct, and Indirect. syscall-method without any arguments will query the current syscall method. |
/api/v1/beacons/{bid}/state/syscallMethod | |||||||||||||||||||||||||||||||
| variables | Housekeeping commands | Displays the available command line variables |
Lists the available command line variables. Command line variables will be replaced with the appropriate values when commands run. |
Out of Scope: GUI specific command | |||||||||||||||||||||||||||||||
| windows_error_code | Housekeeping commands | Shows the Windows error code for a Windows error code number |
Show the Windows error code for a Windows error code number. |
Out of Scope: GUI specific command | |||||||||||||||||||||||||||||||
| cd | Native commands - WinAPI only | Changes the directory on the host |
Changes the directory on the host. |
/api/v1/beacons/{bid}/execute/cd | |||||||||||||||||||||||||||||||
| connect | Native commands - WinAPI only | Connects to a Beacon peer over TCP |
Connects to a TCP Beacon and re-establishes control of it. All requests for the connected Beacon will go through this Beacon. Use unlink to disconnect from a TCP Beacon. |
/api/v1/beacons/{bid}/execute/link/tcp | |||||||||||||||||||||||||||||||
| cp | Native commands - WinAPI only | Copies a file |
Copies a source file to the specified destination. |
/api/v1/beacons/{bid}/execute/cp | |||||||||||||||||||||||||||||||
| dllinject | Native commands - WinAPI only | Injects a Reflective DLL into a process |
Opens the process and injects a Reflective DLL. |
/api/v1/beacons/{bid}/inject/dll | |||||||||||||||||||||||||||||||
| download | Native commands - WinAPI only | Downloads a file |
Downloads a file. To see the file, go to View -> Downloads. |
/api/v1/beacons/{bid}/execute/download | |||||||||||||||||||||||||||||||
| drives | Native commands - WinAPI only | Lists drives on target |
Lists drives on the current system. |
/api/v1/beacons/{bid}/execute/drives | |||||||||||||||||||||||||||||||
| execute | Native commands - WinAPI only | Executes a program on target (no output) |
Executes the program. Does not block or return output. |
/api/v1/beacons/{bid}/spawn/command/runNoOutput | |||||||||||||||||||||||||||||||
| execute-assembly | Native commands - WinAPI only | Executes a local .NET program in-memory on target |
Executes a local .NET process assembly on target. This command loads the CLR in a temporary process and loads the assembly into it. If the assembly is in the data store, this command will use the loaded item automatically. For more information (help data-store). The optional PATCHES: argument can modify functions in memory for the process. Up to four patch-rule rules can be specified (space delimited). "patch-rule" syntax (comma delimited): [library],[function],[offset],[hex-patch-value]
|
/api/v1/beacons/{bid}/spawn/dotnetAssembly | |||||||||||||||||||||||||||||||
| exit | Native commands - WinAPI only | Terminates the beacon session |
Terminates the beacon session. |
/api/v1/beacons/{bid}/execute/exit | |||||||||||||||||||||||||||||||
| getprivs | Native commands - WinAPI only | Enables system privileges on current token |
Enables as many system privileges as possible on current token. |
/api/v1/beacons/{bid}/execute/getPrivs | |||||||||||||||||||||||||||||||
| getuid | Native commands - WinAPI only | Gets the User ID |
Gets the User ID associated with the current token. |
/api/v1/beacons/{bid}/execute/getUid | |||||||||||||||||||||||||||||||
| inject | Native commands - WinAPI only | Spawns a session in a specific process |
Opens the process and injects shellcode for the listener. |
/api/v1/beacons/{bid}/inject/beacon | |||||||||||||||||||||||||||||||
| inline-execute | Native commands - WinAPI only | Runs a Beacon Object File in this session |
Runs a Beacon Object File in this Beacon session. A Beacon Object File is a C program, compiled as an object file, written to use conventions specified in the Cobalt Strike documentation. If the Beacon Object File is in the data store, this command will use the loaded item automatically. For more information, use help data-store. |
|
|||||||||||||||||||||||||||||||
| jobkill | Native commands - WinAPI only | Kills a long-running post-exploitation task |
Stops a long-running post-exploitation task. |
/api/v1/beacons/{bid}/execute/jobStop | |||||||||||||||||||||||||||||||
| kill | Native commands - WinAPI only | Kills a process |
Kills the specified process. |
/api/v1/beacons/{bid}/execute/killProcess | |||||||||||||||||||||||||||||||
| link | Native commands - WinAPI only | Connects to a Beacon peer over a named pipe |
Connects to an SMB Beacon and re-establishes control of it. All requests for the connected Beacon will go through this Beacon. Specify an explicit [pipe] to link to that pipename. The default pipe from the current profile is used otherwise. |
/api/v1/beacons/{bid}/execute/link/smb | |||||||||||||||||||||||||||||||
| ls | Native commands - WinAPI only | Lists files |
Lists all files in a folder. |
/api/v1/beacons/{bid}/execute/ls | |||||||||||||||||||||||||||||||
| make_token | Native commands - WinAPI only | Creates a token to pass credentials |
Clones the current access token and sets it up to pass the specified username and password when you interact with network resources. This command does not validate the credentials you provide and it has no effect on local actions. |
|
|||||||||||||||||||||||||||||||
| mkdir | Native commands - WinAPI only | Makes a directory |
Makes a directory. |
/api/v1/beacons/{bid}/execute/mkdir | |||||||||||||||||||||||||||||||
| mv | Native commands - WinAPI only | Moves a file |
Moves the source file to the specified destination. |
/api/v1/beacons/{bid}/execute/mv | |||||||||||||||||||||||||||||||
| powershell | Native commands - WinAPI only | Executes a command via powershell.exe |
Executes the command using PowerShell. Any cmdlets from the last use of powershell-import are available here too. |
/api/v1/beacons/{bid}/spawn/powershell | |||||||||||||||||||||||||||||||
| ps | Native commands - WinAPI only | Shows process list |
Shows a list of processes. |
/api/v1/beacons/{bid}/execute/ps | |||||||||||||||||||||||||||||||
| pwd | Native commands - WinAPI only | Displays the current directory |
Displays the current working directory of this Beacon. |
/api/v1/beacons/{bid}/execute/pwd | |||||||||||||||||||||||||||||||
| rev2self | Native commands - WinAPI only | Reverts to the original token |
Reverts to your original access token |
/api/v1/beacons/{bid}/execute/rev2self | |||||||||||||||||||||||||||||||
| rm | Native commands - WinAPI only | Removes a file or folder |
Removes a file or folder. |
/api/v1/beacons/{bid}/execute/rm | |||||||||||||||||||||||||||||||
| rportfwd | Native commands - WinAPI only | Sets up a reverse port forward |
Binds the specified port on the target host. When a connection comes in, Cobalt Strike will make a connection to the forwarded host/port and use Beacon to relay traffic between the two connections. |
|
|||||||||||||||||||||||||||||||
| rportfwd_local | Native commands - WinAPI only | Sets up a reverse port forward via Cobalt Strike client |
Binds the specified port on the target host. When a connection comes in, Cobalt Strike will make a connection to the forwarded host/port, via your Cobalt Strike client, and use Beacon to relay traffic between the two connections. |
Out of scope: Equivalent to rportfwd | |||||||||||||||||||||||||||||||
| run | Native commands - WinAPI only | Executes a program on target (returns output) |
Executes a program on the target (returns output). |
/api/v1/beacons/{bid}/spawn/command/run | |||||||||||||||||||||||||||||||
| runas | Native commands - WinAPI only | Executes a program as another user |
Attempts to execute a program as another user. If you do not specify DOMAIN, Beacon will try to authenticate as a local user. This command will usually fail if you are in a SYSTEM context. |
/api/v1/beacons/{bid}/spawn/command/runAs | |||||||||||||||||||||||||||||||
| runu | Native commands - WinAPI only | Executes a program under another PID |
Attempts to execute a program with the specified PID as its parent. This program will run with the identity of the specified PID. |
/api/v1/beacons/{bid}/spawn/command/runUnder | |||||||||||||||||||||||||||||||
| setenv | Native commands - WinAPI only | Sets an environment variable |
Sets an environment variable. |
/api/v1/beacons/{bid}/execute/setenv | |||||||||||||||||||||||||||||||
| shell | Native commands - WinAPI only | Executes a command via cmd.exe |
Executes the command using cmd.exe. |
/api/v1/beacons/{bid}/spawn/command/shell | |||||||||||||||||||||||||||||||
| shinject | Native commands - WinAPI only | Injects shellcode into a process |
Opens the process and injects shellcode into it. |
/api/v1/beacons/{bid}/inject/shellcode | |||||||||||||||||||||||||||||||
| shspawn | Native commands - WinAPI only | Spawns a process and injects shellcode into it |
Spawns a process and injects shellcode into it. |
/api/v1/beacons/{bid}/spawn/shellcode | |||||||||||||||||||||||||||||||
| socks | Native commands - WinAPI only | Starts/stops a SOCKS4a/SOCKS5 server to relay traffic |
Starts a SOCKS4a (default) or SOCKS5 server on the specified port. This server will relay connections through this Beacon. SOCKS5 servers can be configured with NoAuth authentication (default), User/Password authentication, and some additional logging. SOCKS5 Servers currently do not support GSSAPI authentication, UDP Association, and IPV6. Use socks stop to stop the SOCKS servers and terminate existing connections. Traffic will not relay while Beacon is asleep. Change the sleep time with the sleep command to reduce latency. |
|
|||||||||||||||||||||||||||||||
| spawn | Native commands - WinAPI only | Spawns a session |
Spawns an x86 or x64 process and inject shellcode for the listener. |
|
|||||||||||||||||||||||||||||||
| spawnas | Native commands - WinAPI only | Spawns a session as another user |
Attempts to spawn a payload as another user. If you do not specify DOMAIN, Beacon will try to authenticate as a local user. This command will usually fail if you are in a SYSTEM context. Use make_token to create a token to pass the desired credentials instead. |
/api/v1/beacons/{bid}/spawn/beacon/asUser | |||||||||||||||||||||||||||||||
| spawnu | Native commands - WinAPI only | Spawns a session under another process |
Attempts to spawn a session with the specified PID as its parent. This session will run with the identity of the specified PID. |
/api/v1/beacons/{bid}/spawn/beacon/under | |||||||||||||||||||||||||||||||
| spunnel | Native commands - WinAPI only | Spawns and tunnels an agent via rportfwd |
This is the spawn-and-tunnel command, which spawns an agent and creates a reverse port-forward tunnel to its controller. |
Out of scope: Discarded in the REST API because it is equivalent to rportfwd + spawn |
|||||||||||||||||||||||||||||||
| spunnel_local | Native commands - WinAPI only | Spawns and tunnels an agent via Cobalt Strike client rportfwd |
This is the spawn-and-tunnel command, which spawns an agent and creates a reverse port-forward tunnel through your Cobalt Strike client to its controller. |
Out of scope: Discarded in the REST API because it is equivalent to rportfwd + spawn |
|||||||||||||||||||||||||||||||
| steal_token | Native commands - WinAPI only | Steals an access token from a process |
Steals an access token from a process. OpenProcessToken access mask suggested values:
Access mask values:
For more information, see Trust Relationships. |
/api/v1/beacons/{bid}/execute/stealToken | |||||||||||||||||||||||||||||||
| token-store | Native commands - WinAPI only | Hot-swappable access tokens |
Use token-store steal to steal an access token and store it in the token store. Use token-store steal-and-use to steal an access token, store it, and then immediately apply it to the current beacon. Use token-store use to use an access token from the token store. Use token-store show to print the access tokens currently available in the token store. Use token-store remove to remove specific access tokens from the store. Use token-store remove-all to remove all access tokens from the store. OpenProcessToken access mask suggested values:
Access mask values:
For more information, see Trust Relationships. |
||||||||||||||||||||||||||||||||
| unlink | Native commands - WinAPI only | Disconnects from parent Beacon |
Disconnects from a named pipe or TCP Beacon. Specify an IP address or an IP address and session PID to disconnect a specific Beacon. |
/api/v1/beacons/{bid}/execute/unlink | |||||||||||||||||||||||||||||||
| upload | Native commands - WinAPI only | Uploads a file |
Uploads a file to host. |
/api/v1/beacons/{bid}/execute/upload | |||||||||||||||||||||||||||||||
| browserpivot | Postex DLL | Sets up a browser pivot session |
Sets up a Browser Pivot into the specified process. To hijack authenticated web sessions, make sure the process is an Internet Explorer tab. These processes have iexplore.exe as their parent process. Use browserpivot stop to tear down the browser pivoting sessions associated with this Beacon. |
|
|||||||||||||||||||||||||||||||
| chromedump | Postex DLL | Recovers credentials from Google Chrome |
Injects into the specified process to recover credential material from Google Chrome. Use chromedump with no [pid] and [arch] arguments to spawn a temporary process to recover credential material from Google Chrome. This command will use mimikatz to recover the credential material and should be run under a user context. |
|
|||||||||||||||||||||||||||||||
| covertvpn | Postex DLL | Deploys a Covert VPN client |
Deploys a Covert VPN to the target's system. You must have administrator privileges for the client to work. Setup an [interface] through Cobalt Strike -> VPN Interfaces. The [ip address] is the IP address of the target interface you want to deploy the VPN client to. |
Out of scope | |||||||||||||||||||||||||||||||
| dcsync | Postex DLL | Extracts a password hash from a DC |
Injects into the specified process to extract the NTLM password hashes. Use dcsync with no [pid] and [arch] arguments to spawn a temporary process to extract the NTLM password hashes. This command uses mimikatz to extract the NTLM password hash for domain users from the domain controller. Specify a user to get their hash only. This command requires a domain administrator trust relationship. |
|
|||||||||||||||||||||||||||||||
| desktop | Postex DLL | Views and interacts with target's desktop |
Injects a VNC server onto the target and connects to it. You may specify whether the session is high- or low-quality. |
Out of Scope: GUI specific command | |||||||||||||||||||||||||||||||
| execute-assembly | Postex DLL | Executes a local .NET program in-memory on target |
Executes a local .NET process assembly on target. This command loads the CLR in a temporary process and loads the assembly into it. If the assembly is in the data store, this command will use the loaded item automatically. For more information, run help data-store. The optional PATCHES: argument can modify functions in memory for the process. Up to four patch-rule rules can be specified (space-delimited). "patch-rule" syntax (comma delimited): [library],[function],[offset],[hex-patch-value]
|
/api/v1/beacons/{bid}/spawn/dotnetAssembly | |||||||||||||||||||||||||||||||
| hashdump | Postex DLL | Dumps password hashes |
Injects the hashdump tool into the specified process. Use hashdump with no arguments to spawn a temporary process and inject the hashdump tool into it. The hashdump tool will dump password hashes (warning: Injects into LSASS). This command requires administrator privileges. If injecting into a pid that process requires administrator privileges. |
|
|||||||||||||||||||||||||||||||
| keylogger | Postex DLL | Starts a keystroke logger |
Injects a keystroke logger into the specified process. Use keylogger with no arguments to spawn a temporary process and inject the keystroke logger into it. To terminate this task, use jobs to find the job ID and then use jobkill to kill the job. |
|
|||||||||||||||||||||||||||||||
| logonpasswords | Postex DLL | Dumps credentials and hashes with mimikatz |
Injects into the specified process to dump plaintext credentials and NTLM hashes. Use logonpasswords with no [pid] and [arch] arguments to spawn a temporary process to dump plaintext credentials and NTLM hashes. This command uses mimikatz and requires administrator privileges. |
|
|||||||||||||||||||||||||||||||
| mimikatz | Postex DLL | Runs a mimikatz command |
Injects into the specified process to run a mimikatz command. Use mimikatz with no [pid] and [arch] arguments to spawn a temporary process to run a mimikatz command. Use ! to make mimikatz elevate to SYSTEM before it runs your command. Some commands require this. Use @ to make mimikatz impersonate Beacon's thread token before it runs your command. This is helpful for mimikatz commands that interact with remote systems (e.g., lsadump::dcsync) Use ; to separate multiple mimikatz commands. The maximum length of the commands is 511 characters.
|
|
|||||||||||||||||||||||||||||||
| net | Postex DLL | Network and host enumeration tool |
Injects the network and host enumeration tool into the specified process. Use net with no [pid] and [arch] arguments to spawn a temporary process and inject the network and host enumeration tool into it. Beacon's network and host enumeration tool. The built-in net commands are:
Use help net [command] for more information. |
|
|||||||||||||||||||||||||||||||
| portscan | Postex DLL | Scans a network for open services |
Injects into the specified process to run a port scan against the specified hosts. Use portscan with no [pid] and [arch] arguments to spawn a temporary process to run a port scan against the specified hosts. [targets] is a comma separated list of hosts to scan. You may also specify IPv4 address ranges (e.g., 192.168.1.128-192.168.2.240, 192.168.1.0/24). [ports] is a comma separated list or ports to scan. You may specify port ranges as well (e.g., 1-65535). The [arp|icmp|none] options dictate how the port scanning tool will determine if a host is alive. The ARP option uses ARP to see if a system responds to the specified address. The ICMP option sends an ICMP echo request. The none option tells the portscan tool to assume all hosts are alive. The [max connections] option limits how many connections the port scan tool will attempt at any one time. The portscan tool uses asynchronous I/O and can handle a large number of connections at once. A higher value will make the portscan go much faster (default is 1024). |
|
|||||||||||||||||||||||||||||||
| powerpick | Postex DLL | Executes a command via Unmanaged PowerShell |
Executes the command using Unmanaged PowerShell. Any cmdlets from the last use of powershell-import are available here, too. The optional PATCHES: argument can modify functions in memory for the process. Up to four patch-rule rules can be specified (space-delimited). "patch-rule" syntax (comma delimited): [library],[function],[offset],[hex-patch-value]
|
/api/v1/beacons/{bid}/spawn/powershell/unmanaged | |||||||||||||||||||||||||||||||
| printscreen | Postex DLL | Takes a single screenshot via PrintScr method |
Injects a screenshot tool into the specified process. Use printscreen with no arguments to spawn a temporary process and inject the screenshot tool into it. printscreen forces a PrintScr keypress, grabs the screenshot from the clipboard, and then exits. This command will clear the clipboard contents after its done. No long-running variant of this exists because destroying the clipboard periodically is not a good OPSEC practice. |
|
|||||||||||||||||||||||||||||||
| psinject | Postex DLL | Executes a PowerShell command in a specific process |
Injects Unmanaged PowerShell into a specific process and executes the specified command. Any cmdlets from the last use of powershell-import are available here too. |
/api/v1/beacons/{bid}/inject/powershell/unmanaged | |||||||||||||||||||||||||||||||
| pth | Postex DLL | Pass-the-hash using mimikatz |
Injects into the specified process to generate and impersonate a token. Use pth with no [pid] and [arch] arguments to spawn a temporary process to generate and impersonate a token. This command uses mimikatz to generate and impersonate a token that uses the specified DOMAIN, user, and NTLM hash as single sign-on credentials. Beacon will pass this hash when you interact with network resources. |
|
|||||||||||||||||||||||||||||||
| screenshot | Postex DLL | Takes a single screenshot |
Injects a screenshot tool into the specified process. Use screenshot with no arguments to spawn a temporary process and injects the screenshot tool into it. screenshot takes a picture of the visible desktop and exits. |
|
|||||||||||||||||||||||||||||||
| screenwatch | Postex DLL | Takes periodic screenshots of desktop |
Injects a screen watcher tool into the specified process. Use screenwatch with no arguments to spawn a temporary process and inject the screen watch tool into it. screenwatch sends a screenshot of the user's desktop (one per Beacon check-in) until terminated. If the user is idle, the screen watch tool will take a new screenshot every three minutes. To terminate this task, use jobs to find the job ID and then use jobkill to kill the job. |
|
|||||||||||||||||||||||||||||||
| ssh | Postex DLL | Uses SSH to spawn an SSH session on a host |
Injects into the specified process to run an SSH client and attempts to log in to the specified target. Use ssh with no [pid] and [arch] arguments to spawn a temporary process to run an SSH client and attempt to log in to the specified target. |
|
|||||||||||||||||||||||||||||||
| ssh-key | Postex DLL | Uses SSH to spawn an SSH session on a host |
Injects into the specified process to run an SSH client and attempts to log in to the specified target. Use ssh-key with no [pid] and [arch] arguments to spawn a temporary process to run an SSH client and attempt to login to the specified target. The key file needs to be in the PEM format. If the file is not in the PEM format, make a copy of the file and then convert the copy with the following command: /usr/bin/ssh-keygen -f [/path/to/copy] -e -m pem -p |
|
|||||||||||||||||||||||||||||||
| beacon_info | Beacon Object File (BOF) | Prints beacon's in-memory location |
Prints detailed information about the beacon's runtime state such as its base address, allocated memory regions, allocated section details, heap records, and sleep mask information. Useful for inspecting the current memory layout of Beacon. |
/api/v1/beacons/{bid}/execute/beaconInfo | |||||||||||||||||||||||||||||||
| clipboard | Beacon Object File (BOF) | Attempts to get the text clipboard contents |
Attempts to get the text clipboard contents. |
/api/v1/beacons/{bid}/execute/clipboard | |||||||||||||||||||||||||||||||
| dllload | Beacon Object File (BOF) | Loads a DLL into a process with LoadLibrary() |
Loads a DLL into the specified remote process via LoadLibrary(). The DLL must exist on the target. |
/api/v1/beacons/{bid}/inject/loadDll | |||||||||||||||||||||||||||||||
| elevate | Beacon Object File (BOF) | Spawns a session in an elevated context |
Attempts to spawn an elevated session with the specified exploit. Type elevate by itself to see a list of available local exploits. |
/api/v1/beacons/{bid}/elevate/beacon | |||||||||||||||||||||||||||||||
| getsystem | Beacon Object File (BOF) | Attempts to get SYSTEM |
Attempts to get SYSTEM. |
/api/v1/beacons/{bid}/execute/getSystem | |||||||||||||||||||||||||||||||
| jump | Beacon Object File (BOF) | Spawns a session on a remote host |
Attempts to spawn a session on a remote target with the specified exploit. Type jump by itself to see a list of available remote exploits. |
/api/v1/beacons/{bid}/remoteExec/beacon | |||||||||||||||||||||||||||||||
| kerberos_ccache_use | Beacon Object File (BOF) | Applies a Kerberos ticket from cache to this session |
Applies a Kerberos ticket to this session from a ccache file. |
Out of scope | |||||||||||||||||||||||||||||||
| kerberos_ticket_purge | Beacon Object File (BOF) | Purges Kerberos tickets from this session |
Purges Kerberos tickets from this session. |
/api/v1/beacons/{bid}/execute/kerberos/ticket/purge | |||||||||||||||||||||||||||||||
| kerberos_ticket_use | Beacon Object File (BOF) | Applies a Kerberos ticket to this session |
Applies a Kerberos ticket to this session. |
/api/v1/beacons/{bid}/execute/kerberos/ticket/use | |||||||||||||||||||||||||||||||
| reg | Beacon Object File (BOF) | Queries the registry |
Use query to query a key within the registry. Lists all subkeys and values. Use queryv to query a subkey within the registry. Lists only the subkey and its value. Use HKLM, HKCR, HKCC, HKCU, or HKU for the root Specify x86|x64 to force a specific view of the registry. |
|
|||||||||||||||||||||||||||||||
| remote-exec | Beacon Object File (BOF) | Runs a command on a remote host |
Runs a [command] on [target] via [method]. Type remote-exec by itself to see a list of methods. |
/api/v1/beacons/{bid}/remoteExec/command | |||||||||||||||||||||||||||||||
| runasadmin | Beacon Object File (BOF) | Executes a program in an elevated context |
Attempts to run the specified command in an elevated context. Type runasadmin by itself to see a list of available local exploits. |
/api/v1/beacons/{bid}/elevate/command | |||||||||||||||||||||||||||||||
| timestomp | Beacon Object File (BOF) | Applies timestamps from one file to another |
Updates the Modified, Access, and Created times of fileA to match those of fileB. |
/api/v1/beacons/{bid}/execute/timestomp |