khanfarris
-
linux commands
- cat
cat - Concatenate and display filesUsage: Display file contents, combine filesCommon flags: -n (line numbers), -A (show all)Security: Read-only, safe to useWatch for: Sensitive data exposure when displaying files
- chmod
chmod - Change file permissionsUsage: Modify file access permissionsCommon flags: -R (recursive), +x (add execute)Security: Critical for security, affects file accessWatch for: 777 permissions, SUID/SGID misuse, world-writable files
- chown
chown - Change file ownershipUsage: Change file/directory owner and groupCommon flags: -R (recursive)Security: Requires root/sudo, affects access controlWatch for: Privilege escalation, unauthorized ownership changes
- curl
curl - Transfer data from/to serverUsage: HTTP requests, API testing, file downloadsCommon flags: -X (method), -H (header), -d (data), -o (output)Security: Test APIs, download payloads, exfiltrate dataWatch for: Data exfiltration, malware downloads, C2 communication
- find
find - Search for files and directoriesUsage: Locate files by name, type, permissionsCommon flags: -name, -type, -perm, -execSecurity: Useful for hunting SUID files, misconfigurationsWatch for: SUID binaries, world-writable files, sensitive data
- gcc
gcc - GNU C CompilerUsage: Compile C/C++ programsCommon flags: -o (output), -Wall (warnings), -g (debug)Security: Compile exploits, build binaries for privilege escalationWatch for: Suspicious compilations, exploit development, backdoor creation
- grep
grep - Search text patternsUsage: Search files for patterns, filter outputCommon flags: -i (case insensitive), -r (recursive), -v (invert)Security: Hunt for credentials, API keys, sensitive dataWatch for: Passwords in config files, hardcoded secrets
- ls
ls - List directory contentsUsage: View files and directoriesCommon flags: -la (all files, long format), -lh (human readable)Security: Enumerate system, check permissionsWatch for: Hidden files (.bashrc, .ssh), unusual permissions
- netcat
netcat (nc) - Network Swiss Army knifeUsage: Port scanning, file transfer, reverse shellsCommon flags: -l (listen), -v (verbose), -p (port), -e (execute)Security: Create reverse shells, port scanning, data transferWatch for: Reverse shells, backdoors, unauthorized connections, data exfiltration
- netstat
netstat - Network statisticsUsage: Display network connections, routing tables, portsCommon flags: -tulpn (TCP/UDP, listening, programs)Security: Identify open ports, active connectionsWatch for: Backdoors, unauthorized listeners, suspicious connections
- ps
ps - Process statusUsage: Display running processesCommon flags: aux (all users, detailed), -ef (full format)Security: Identify malicious processes, privilege escalationWatch for: Suspicious processes, root processes, hidden services
- ssh
ssh - Secure ShellUsage: Remote login, secure file transferCommon flags: -i (identity file), -p (port), -L (local forward)Security: Encrypted remote access, key-based authWatch for: Weak keys, authorized_keys tampering, tunneling abuse
- sudo
sudo - Execute command as superuserUsage: Run commands with elevated privilegesCommon flags: -u (user), -l (list allowed commands)Security: Critical for privilege managementWatch for: NOPASSWD entries, wildcards in sudoers, privilege escalation
- tail
tail - Display end of fileUsage: View last lines of files, monitor logsCommon flags: -f (follow), -n (number of lines)Security: Monitor log files in real-timeWatch for: Authentication failures, error patterns, intrusion attempts
- tcpdump
tcpdump - Network packet analyzerUsage: Capture and analyze network trafficCommon flags: -i (interface), -w (write to file), -n (no DNS)Security: Network forensics, packet captureWatch for: Unencrypted credentials, malicious traffic, C2 beacons
- top
top - Display system tasksUsage: Real-time process monitoring, resource usageCommon flags: -u (user), -p (PID)Security: Identify resource-heavy processes, cryptominersWatch for: High CPU/memory usage, suspicious processes
- uname
uname - System informationUsage: Display system/kernel informationCommon flags: -a (all info), -r (kernel release)Security: Identify kernel version for exploit researchWatch for: Outdated kernels, known vulnerable versions
- wget
wget - Download files from webUsage: Download files via HTTP/HTTPS/FTPCommon flags: -O (output file), -r (recursive)Security: Download tools, exfiltrate dataWatch for: Malware downloads, data exfiltration, unauthorized transfers
- which
which - Locate command executableUsage: Show full path of commandsCommon flags: -a (all occurrences)Security: Verify command locations, detect PATH hijackingWatch for: Modified PATH, malicious binaries in unexpected locations
- whoami
whoami - Display current userUsage: Show effective usernameCommon flags: NoneSecurity: Verify privilege level after escalationWatch for: Unexpected user context, privilege changes
- cat