


















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



















1.1 Describe common shells - Correct Answer-- Bash: default shell for most linux distributions; sh-compatible; unlimited command history
-- = posix mode makes bash emulate sh, this will disable the operation sudo = auto to root 2.1 Where is command history saved to in bash? - Correct Answer-- command history is saved to ~./.bash_history, accessible by pressing the up arrow key
2.3 Piping - Correct Answer-used to put output of a process into another process [process 1] | [process2] named pipes: info remains in the named pipe until system is shut down mkfifo [pipeName] EX: ls -l text.txt | grep "Modify" 2.4 bash boolean logic - Correct Answer-! logical negation || OR && AND -o logical OR -a logical AND All values are either True or False / 0 or 1 XOR 2.5 methods of gaining more information about commands - Correct Answer-man [command] use to find info about a command apropos -r [description]
search man pages for a command whatis [command] returns a one line description [command] --help displays a quick help info [command] you cannot find what you need in man 3.1 Describe file system hierarchy (important directories) - Correct Answer-Everything stems from root / /bin essential command binaries /boot boot loader files /dev device files /etc host specific config files /home home directories /lib libraries for the binaries /media mounts removable media /mnt temporarily mounted fs
ls -l = this tell you information about the file 3.3 Describe the file system permissions - Correct Answer-ls -l [fileName]
v version A no atime record D changes writing to disk E file using extent format I indexed directory S contents written synchronously T top of directory hierarchy X raw contents of compressed file Z indicates a compressed dirty file commands for searching file system - Correct Answer-$find [path] - [options] [expression] Use grep to add search for content: find [path] -[options] | grep "somestring" -B before the expression -A after the expression Awk is used to find/replace text or perform a specific action on the text -F specify the field separator how to create regular expressions - Correct Answer-. single character
UEFI uses GPT so you can have unlimited paritions and is filesystem aware what is a partition - Correct Answer-logically divides a hard disk; standard is 4 components of the boot configuration file - Correct Answer-/boot/ boot.0300 backup mbr boot.b basic boot sector chain.b for non linux os config-[kernel-version] installed kernel configuration os2_d.b boot the OS/ system.map location of the kernel vmlinux symbolic link to the kernel initrd.img temporary file system grub GRUB config files device.map maps devices in /dev to those used by grub grub.conf GRUB conf file messages welcome message splash/xpm.gz boot-up background image efi uefi bootloader
unattended-upgrades x11-common PIDs for common processes - Correct Answer-Userspace processes must have PID > 1000 (threads can have < 1000); init has pid=1 (All orphans have PPID=1) Bash commands to enumerate processes - Correct Answer-ps -aux for whole system ps for shell ps -ef for system services ps -o "%[column]" for specific column pwdx gets current working directory of processes explain the functionality of daemons - Correct Answer-Program that run in the background waiting to be activated by an event/condition that is instantiated as a process. PPID is 1 (init). Usually they are created by forking and killing the parent. orphaned processes - Correct Answer-- child process whose parent exits with the child still running
defunct/zombie processes - Correct Answer-- child process waiting on parent to read its exit status;
string manipulation - Correct Answer-column column -ts [separator] [file] awk awk [command] [$value] convert tabs expand [option] [file] merge lines q [option] [file] join lines join [option] [file1] [file2] length echo $(#var) substring $(string:position:length) substitution tr remove cut [option] [file] hashing - Correct Answer-- verifies integrity
last system boot dmesg usb devices lsusb cpu info lscpu hardware info lshw hostname hostname -f ip address ip addr show; ifconfig -a network interfaces cat /etc/network/interfaces acls iptables listening ports netstat -ano groups cat /etc/group installed packages dpkg -l local name resolution in Linux - Correct Answer-- stored in the /etc/hostname filename
analyze network connections from command line - Correct Answer-ss | less ss -[t| u] ss -ltn ss -s system logs - Correct Answer-system log files contain events logged by operating system components such as device changes, system errors, startup messages, abnormal shutdowns linux application logs - Correct Answer-apps create logs in /var/log audit and authorization logs - Correct Answer-authentication logs: when someone logs in/out /var/log/auth.log contains logins and authentication methods used /var/log/wtmp contains current login info authorization: when someone tries to access an object/resource /var/log/audit contains logs stored by auditd daemon what to look for in Linux logs for security incidents - Correct Answer-"authentication failure";"failed password"
"password changed"; "new user" "failed su" "deny inbound"; "access-list...denied" "user priv level changed"; "user...locked out" define permanent presence - Correct Answer-maintains a persistent foothold in the system types of rootkits - Correct Answer-- application level: change/replace standard apps with rootkit operations