Bourne-again shell (Bash) is a command line language interpreter for the GNU OS.
Linux is GUI with optional command line while Unix is only command line
-
strings
: see the text inside a binary/data file-n <length>
: specify the length of strings we want, default 4 -
open
: open an image in preview -
exiftool
: working with metadata on command line -
binwalk
: searches a binary image for embedded files and executable code -
chmod
: change mod is used to change permissions for a file eg: chmod +x is adding execute permissions (- is remove, = is assign, etc) -
ls -ld
: lists permissions (10 digit) first digit represents 'd' for directory and '-' for file next 9 are split into three 3's, owner, group and world eg: drwxr-xr-x, so here we have read write and execute permissions as owner -
curl
/wget
: client URL / www get - allows you to exchange data between server and cli -
man
: manual for a command, eg: man binwalk -
grep
: global regular expression print, to search matching patterns in a file -
2>/dev/null
: redirect the stderr (>) to and don't print on terminal (/dev/null supressing the output, null) -
2?&1
: redirect stderr to stdout, & tells shell that 1 is not a filename but file descriptor (file descriptor 1 is stdout, 2 is stderr) -
--
: is used to denote end of flags. eg: you want to mkdir -q (-q is the name of the directory), thenmkdir -- -q
-
s
is for scrolling down (macOS) (j
for parrotOS) andk
for scrolling up insideman
, use/<search>
for searching your flag -
cat <file_name(s)>
reads and prints contents of a file -
nc
: 'NetCat' is like a cat command over a network. It is a networking communication tool used to read and write data to network connections (ports) using TCP/UDP -
Pager program: helps the user get the output, on the terminal, one page at a time. Popular pagers in Unix are
more
andless
-
objdump
: program for displaying information about object files in Unix, eg: used as a disassembler to view executable in assembly form -
file
command gives information about the file you pass -
ltrace
intercepts and records dynamic library calls, similarstrace
traces system calls called by a process