Bash
Related
find
Writable files
sudo
List commands, current user can run as root
-> GTFOBins Run the command as a user other than the default target user (usually root).
-> Useful in scenarios like this:
Asks the system to start a new login session for the specified user. The system will require the password for the user "username" (even if its the same as the current user).
file
Get information about file
wc
Count chars
Count lines
rlwrap
A 'readline wrapper', a small utility that uses the GNU readline library to allow the editing of keyboard input for any command.
Permissions
Define permissions new files get on creation, opposite (mask) to chmod permissions
authbind
bind sockets to privileged ports (<1024) without being root
base64
Linux
File
Encode base64 -w 0 <file> > <base64file>
Decode base64 -d <base64file> > <file>
String
Encode echo -n <string> | base64
Decode echo <base64string> | base64 -d
Windows
File
Encode certutil -encode <file> tmp.b64 && findstr /v /c:- tmp.b64 > <base64file>
Decode certutil -decode <base64file> <file>
grep
Print x-lines Before match Print x-lines After match Ignore-case
Recursive
watch
Run command every second
sed
Trim whitespaces
Remove newlines
cut
Split string by delimiter, extract field 2
Split file by colon
cron
List user's crontab
sort unique
File size
ascii table
ltrace / strace
Trace library calls of a given program.
Alternative
gcc
Use -m32
or -m64
to make the architecture explicit
Compile for old 32bit kernel (2.6.9)
Specific files
.tar.gz
Create archive
Extract archive
.7z
Extract
.vhd
.scf
https://1337red.wordpress.com/using-a-scf-file-to-gather-hashes/ Place scf file in windows share to gather hashes
Images with hidden content
binwalk
Tool for searching binary images for embedded files and executable code
Last updated