Identifier / Programs / Linux and Unix
agetty
Alternative getty: Open a tty port, prompt for a login name, and invoke the /bin/login command. It is normally invoked by init. tldr-pages
GTFOBins shell 1 ATT&CK technique 1 documented command
How agetty is abused
Each abuse is GTFOBins's category and the options and words it uses; the full write-up is on GTFOBins's page for agetty.
1 documented command
shell as SUID
agetty -l /bin/sh -o -p -a root ttyIdentifyThe command the identifier reads trips no Sigma process-creation rule. This command is from GTFOBins, at commit acd524623f9c of 2026-05-27, under the GPL-3.0, with no warranty. Changed: Markdown is shown formatted. The source is in lolbas-gtfobins-commands.json.gz, and the full entry is on GTFOBins’s page for agetty. The identifier reads the line that runs agetty.
What detects it
Everyday use
Connect stdin to a port (relative to /dev) and optionally specify a baud rate (defaults to 9600)
agetty tty 115200IdentifyAssume stdin is already connected to a tty and set a timeout for the login
agetty --timeout timeout_in_seconds -IdentifyAssume the tty is 8-bit, overriding the $TERM environment variable set by init
agetty --8bits - term_varIdentifyNone of the 3 examples the identifier reads matches GTFOBins abuse or trips a Sigma process-creation rule.