Identifier / Programs / Linux and Unix
readelf
Display information about ELF files. tldr-pages
GTFOBins file-read 1 documented command
How readelf is abused
file-read
-aEquivalent to -AdhlnSs toyboxEach abuse is GTFOBins's category and the options and words it uses; the full write-up is on GTFOBins's page for readelf.
1 documented command
file-read unprivileged, with sudo, as SUID
Each line is corrupted by a prefix string and wrapped inside single quotes. Also consider that lines are actually parsed as readelf options thus some file contents may lead to unexpected results.
readelf -a @/path/to/input-fileIdentifyThe command the identifier reads trips no Sigma process-creation rule. This command is, with GTFOBins’ notes, 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 readelf. The identifier reads the line that runs readelf.
Everyday use
Display all information about the ELF file
readelf --all path/to/binaryIdentifyDisplay all the headers present in the ELF file
readelf --headers path/to/binaryIdentifyDisplay the entries in symbol table section of the ELF file, if it has one
readelf --symbols path/to/binaryIdentifyNone of the 3 examples the identifier reads matches GTFOBins abuse or trips a Sigma process-creation rule.
Options
Show every option of readelf
-AShow architecture-specific info-aEquivalent to -AdhlnSs-dShow dynamic section-eHeaders (equivalent to -hlS)-hShow ELF header-lShow program headers-nShow notes-p SDump strings found in named/numbered section-SShow section headers-sShow symbol tables (.dynsym and .symtab)-x SHex dump of named/numbered section--dyn-symsShow just .dynsym symbol table