Identifier / Programs / Linux and Unix
zip
Package and compress (archive) files into a Zip archive. tldr-pages
GTFOBins shell 1 Sigma rule name it 1 ATT&CK technique 2 documented commands
How zip 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 zip.
2 documented commands
file-read unprivileged, with sudo, as SUID
zip /path/to/temp-file /path/to/input-file
unzip -p /path/to/temp-fileIdentifyshell unprivileged, with sudo, as SUID
zip /path/to/temp-file /etc/hosts -T -TT '/bin/sh #'IdentifyNone of the 2 commands the identifier reads trips a Sigma process-creation rule. These commands are 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 zip. The identifier reads the line of each that runs zip.
What detects it
Everyday use
Add files/directories to a specific archive
zip --recurse-paths path/to/compressed.zip path/to/file_or_directory1 path/to/file_or_directory2 ...IdentifyRemove files/directories from a specific archive
zip --delete path/to/compressed.zip path/to/file_or_directory1 path/to/file_or_directory2 ...IdentifyArchive files/directories excluding specified ones
zip --recurse-paths path/to/compressed.zip path/to/file_or_directory1 path/to/file_or_directory2 ... --exclude path/to/excluded_files_or_directoriesIdentifyNone of the 3 examples the identifier reads matches GTFOBins abuse or trips a Sigma process-creation rule.