1. Enumeration
CommandDescription
pwdCurrent location
cat *file*Read contents of a file
lsList files in current directory
ls -laList files in current directory with hidden files
cd *dir*Change directory to *dir*
rm *file*Delete *file*
rm -r *dir*Delete directory *dir*
cp -r dir1 dir2Copy dir1 to dir2
Create dir2 if it doesn’t exist (recursive)
mv file1 file2Move file1 to file2
touch *file*Create *file* in current directory
more *file*Outputs the contents of *file*
head *file*Outputs the first 10 lines of *file*
tail *file*Outputs the last 10 lines of *file*

2. Packages

CommandDescription
dpkg -i xxx.deb Install a debian package
rpm -Uvh xxx.rpmInstall a RPM package

3. Network

CommandDescription
ip addr add *ip*/*subnet mask* dev eth1Assign static IP to eth1
route add default gw *ip*Assign Gateway
ping *ip*Ping host and output result

4. File Compression

CommandDescription
tar -cf file.tar *files*Create a tar named file.tar containing *files*
tar -xf file.tarExtract the files from file.tar
file *file*Find Compressed Method of *file*

5. Encode and Decode

CommandDescription
cat encode.txt | base64Encode a text file with base64
cat encode.txt | base64 –decodeDecode a text file with base64
cat encode.txt | base32Encode a text file with base32
cat encode.txt | base32 –decodeDecode a text file with base32

6. Search

CommandDescription
locate *file*Searches for *file*
locate *.nse | grep sshSearches for nmap scripts with the string ‘ssh’
grep -r pattern *dir*Searches recursively for pattern in *dir*
grep pattern *file*Searches for pattern in the *file* content

7. Process Management

CommandDescription
psDisplay your currently active processes
topDisplay all running processes
kill pidkill process by pid
killall prockill all process named proc

8. System Enumeration

CommandDescription
dateshows the date
hostnamedisplays hostname
whoamiShows who you are logged in as
finger *user*Displays info about *user*
uname -aDisplays kernal info
cat /proc/cpuinfoDisplays cpu information
cat /proc/meminfoDisplays memory information
dfshows disk usage
duShows directory space usage

Leave a comment

Welcome to my cozy corner featuring sharing of cybersecurity matters. I am an industry practictioner with several years of experiences in Offensive, GRC, Incident Response and Auditing. Join me on my journey!