Show Menu
Cheatography

Offensive Penetration Testing [OSCP] cert prep Cheat Sheet (DRAFT) by

a range of techniques and tools necessary for pentesting and preparing for certifications like the OSCP exam.

This is a draft cheat sheet. It is a work in progress and is not finished yet.

file/d­ire­ctory paths in linux

Root directory (/)
Home directory (/home)
System configuration files directory (/etc)
System binaries directories (/bin, /sbin)
User binaries directory (/usr/bin)
Logs directory (/var/logs)
Apache server files directory (/var/www/html)
Device drivers directory (/dev)
Shared libraries directory (/lib)
Boot filesystem directory (/boot)
Mount points directory (/mount)
Processes directory (/proc)
Temporary files directory (/tmp)
SSH keys directory (~/.ssh)

the command line

sudo apt update: Updates the package lists for upgrades and new package installations. This ensures you have the latest information about package versions and dependencies from the repositories.

sudo apt install Chromium: Installs the Chromium web browser on the system.

sudo su: Switches to the root user, giving you administrative privileges for the duration of the session.

passwd root: Changes the password for the root user. This command is used after switching to the root user.

apt install beef-xss: Installs the BeEF (Browser Exploitation Framework) XSS tool.

ls -la: Lists all files and directories in the current directory, including hidden files, along with detailed information like permissions, number of links, owner, group, size, and timestamp.

cd /user/share/beef-xss/: Changes the current directory to /user/share/beef-xss/, the typical location for the BeEF framework files.

gedit config.yaml: Opens the config.yaml file in the gedit text editor for viewing or editing.

man [command]: Displays the manual page for a specified command, providing detailed information about its usage (e.g., man ls for the list command).

nmap -h: Displays help information for the Nmap command, including its options and usage.

ls la: This command is likely a typo. It should be ls -la, which, as mentioned, lists all files and directories with detailed information.

cd ~/: Changes the current directory to the home directory of the current user.

cd .: Keeps the current directory unchanged (. refers to the current directory).

cd ..: Changes the current directory to the parent directory of the current directory.

touch [filename]: Creates a new, empty file with the specified filename. If the file already exists, it updates the file's last modified timestamp.

mkdir [directory name]: Creates a new directory with the specified name.

cat [filename]: Displays the contents of the specified file.

rm [filename]: Deletes the specified file.

rmdir [directory name]: Deletes the specified directory, which must be empty.

cp [source] [destination]: Copies the file or directory from the source path to the destination path.

mv [source] [destination]: Moves or renames a file or directory from the source path to the destination path.