FILE COMMANDS
nano - command line text editor tee - writes to standard output file w/o opening echo - used to read/write strings to filesgrep - filters strings within a file within a directorywhereis - locates binary fileswhich - find path variable for binaryfind - '/ -type f -name apache' - will look through '/root' directory for files with apache in the name
wildcard - 'find /etc -type f --name apache2.*' will search for any file name with apache2 with any extension preceding within '/etc' folder
cat >> - will append a 'string' to an already existing file
touch - displays file modification date & can also create files
head & tail - view first 10 (optional) or last 10 (optional) lines of text from a file
nl - will display a file with number lines
sed - 'stream editor' and will replace a string in a file with a new string mysql -> MySQL globally or specifically
less - find specific string within file
ln - creates a hardlink to a file
diff - difference of strings between two files
SYS ADMIN
at - schedule process(es) to run at specific time history - displays history of .bash_history env - will show environment variables for current usernice + renice - goes based off of -20 to +19. going lower means more priority of the chosen program
ps - 'ps aux' will display all processes running on systempiping - 'ps aux | grep apache2' - will search for all running processes for apache2 PATH=$PATH:/root/newhackingtool - change $PATH so you can call w/o working directoryexport - will save variables and other changes to the shell instance and make them persistumask- shows permissions of files/dirsdmesg - will show boot info from kernel
top - view cpu usage by PID / -p specific processlsof - display open files by users // specific dir's strace - to find system calls - maybe a system call can be exploited from vuln program??
ltrace - for shared librariesfree - view total free memorylsb_release -a - to view information about OSdpkg -l - show version of software packagefile - will show info about executable. elf-32bit etctime - will show you processing time statschmod - choose what permissions over fileslinks -- text mode WWW browser useradd - to create users
usermod - add/change user groups visudo - access sudoers file passwd -l/-u - to lock/unlock a user - also to change password stat -c %a - view numerical permission #s lastlog - shows last login of users
systemctl --type=service --state=running - view running services systemctl is-enabled service - view if specific service is running HDD MANAGEMENT / FORENSICS
gzip - gunzip to compress files // archives together || uncompress themfdisk - to view mounted partitions // flash driveslsblk - will show block devices (harddrives) in /devdf - disk free and will display info on mounted devicesfsck - filesystem check will check an UNMOUNTED device for errors(bad sectors)sync - will force kernel to write changes to HDD while filesytem is mountedshred - delete a file and overwrite it a # of timez you choose (useful for deleting logs // sensitive data)dd - capability to copy deleted files and entire harddrivemkfs.ext2 - /dev/sda1 - to make partition ext2 filesystem mkswap - /dev/sda2 - to make partition swapswapon - /dev/sda2 - to turn swap onmount - /dev/sda3 /mnt/gentoo - to mount the root partition
NETWORK COMMANDZ
ifconfig - check network interfaces and change ip address (broadcast) to change broadcasteddhclient eth0 - to get assigned a new ip address by the dhcp client on eth0 interfacecurl - relay to http servers
No comments:
Post a Comment