📃
Anggi's Notes
  • Tentang Penulis
  • Preambule
  • Tutorial Red Team Area (General)
    • Tutorial Setup VirtualBox
    • Tutorial Setup Kali Linux pada VirtualBox
    • Network Adapter Type pada Virtual Box
    • Tutorial Port Forwarding Pada Virtual Box
    • Mempercepat update/upgrade/install Kali Linux
    • Networking in a Nutshell
    • Linux in A Nutshell
    • Linux Command Intro
    • VA-PT Cheatsheet
    • Penetration Testing Guide & Checklist
    • Pentesting Web checklist
    • NMAP Cheatsheet
    • Bind vs Reverse Shell Concept
    • Reverse Shell Cheatsheet
    • Linux TTY Shell Cheat Sheet
    • Menaikkan Common Shell ke Meterpreter
    • Metasploit Cheatsheet
      • msfvenom
      • searchploit
    • Metasploitable-2
    • Metasploitable-3
    • Linux Privilege Escalation
      • Linux Privilege Escalation with Misconfigured /etc/passwd
      • Linux Privilege Escalation with SUID
      • Linux Privilege Escalation with Misconfigured Sudo
      • Linux Privilege Escalation with MSF
    • DVWA
      • Brute Force
        • Low
        • Medium
        • High
      • Command Injection
        • Low
        • Medium
        • High
      • Local File Inclusion
        • Low
        • Medium
        • High
      • File Upload Vulnerability
        • Low
        • Medium
        • High
      • Cross Site Scripting (XSS)
        • Reflected
          • Low
          • Medium
          • High
        • Stored
          • Low
          • Medium
          • High
        • DOM
          • Low
          • Medium
          • High
      • SQL Injection
        • Non Blind
          • Low
          • Medium
          • High
        • Blind
          • Low
          • Medium
          • High
      • CSRF
        • Low
        • Medium
        • High
    • Pentesting Report Sample
    • Tutorial Penggunaan ZAP
    • Windows VA/Audit
      • DetExploit
      • HardeningKitty
      • Tutorial Installasi OWASP ZAP pada Windows OS
    • Linux VA/Audit dengan Lynis
    • Mobile Security Framework (MobSF) Windows Docker
  • Tutorial Red Team Area (Teknik Windows Attack )
    • Reconnaissance Techniques
    • Windows Red Team Exploitation Techniques
    • Windows Red Team Defense Evasion Techniques
  • Tutorial Blue Team Area
    • Merancang SOC
    • IR Playbook
    • Blue Team Opensource Online Tools
    • Wireshark Query Cheatsheet
  • Temuan Celah Keamanan
    • LFI (Directory Traversal) di redacted.co.id
    • Kredensial Database dan Azure Leaks pada redacted.com
    • HTML Injection di Tokopedia
    • 🤪4300$ Bounty from Opensource automate recon tools, why not?
    • I hacked Mastercard 4 times? But How?
    • LFI dan RCE di aset redacted.com
    • FTPd DOS di aset redacted.co.id
    • Gitlab SSRF di redacted.com
    • Firebase Android database Takeover
    • RCE di 11 Subdomain Dell
    • SSRF di redacted.com
    • Reflected XSS di CelticPipes
    • Git Disclosure di redacted.co.id
    • Open Redirection+XSS pada Private Program Bugcrowd
    • Rails Debug Mode Enabled pada redacted.com
Powered by GitBook
On this page
  • whoami
  • pwd
  • mkdir
  • cd
  • ls
  • which
  • man
  • locate
  • wget
  • cat
  • head
  • tail
  • cp
  • mv
  • grep
  • wc
  • sort
  • tab completion
  • history
  • sudo
  • su
  • Piping & Redirection
  • cut
  • awk

Was this helpful?

  1. Tutorial Red Team Area (General)

Linux Command Intro

Cheatsheet perintah-perintah dasar Linux

PreviousLinux in A NutshellNextVA-PT Cheatsheet

Last updated 1 year ago

Was this helpful?

Catatan ini ditujukan untuk mempermudah pencarian perintah-perintah dasar Linux untuk keperluan Pentesting/VA.Cheatsheet ini disadur dari akun Github rekan saya.

whoami

Print active User ID

whoami

pwd

Print Working directory

pwd

mkdir

Make Directory

mkdir pentest/

cd

Change directory

cd pentest // Change directory to pentest (Inside Working Directory)
cd /var // change directory to var (Outside Working Directory)
cd //Back to home Directory
cd .. // Directory Up

ls

List files in working Directory

ls
ls -la // Print out all files including hidden files

which

Locate executable file full path

which nmap // Locate the full path of nmap  

man

Manual Page of a Command

man which // Manual page of which Command
man -K "change password" // Search for command to change password

locate

Find / Search for files

locate -i passwd // Find for passwd files with case-Insensitive

wget

Download a file

wget http://<IP>:<Port>/access_log.txt

cat

Concatenate / print contents of a files

cat access_log.txt

head

Cat only first 10 lines of a file

head access_log.txt

tail

Cat only last 10 lines of a file

less access_log.txt

cp

Copy file

cp access_log.txt access_log.txt.backup

mv

Rename or cut a file

mv access_log.txt exercise.txt

grep

Search for specific word in a file

grep admin exercise.txt

wc

Count lines, words, bytes, of a files

wc exercise.txt

sort

Sort files

sort -u exercise.txt // Sort unique lines on exercise.txt

tab completion

Automatically fill the command/files names we write

cat ex<TAB> // will show exercise.txt

history

Check history of command we input

history

sudo

Super User do!

cat /etc/shadow // It will prompt Access Denied
ls -la /etc/shadow // Check permission of /etc/shadow file
whoami
sudo -l // Check our sudo privilege
sudo /etc/shadow
cat /etc/shadow
sudo !! // Sudo above command

su

switch user

su kali // Switch to kali
sudo su // Switch to root

Piping & Redirection

Piping ( | ) is a command that let you use two or more commands such that output of one command serves as input to the next command.

cat exercise.txt // Will show all lines of exercises.txt
cat exercise.txt | grep admin // will only show line contain admin
cat exercise.txt | grep admin | wc -c // Count bytes of above output

Redirection is change the output of command to a files

cat exercise.txt | grep admin > admin_exercise.txt
echo "This will overwrite" > admin_exercise.txt | Overwrite exercise.txt with "This will overwrite", or make exercise.txt file if it is not exists
echo "This will not overwrite" >> admin_exercise.txt | write "This will not overwrite" to the last line of exercise.txt

cut

Cutting out some section of a file

cat user.txt | cut -d ":" -f 1 //Menampilkan hanya colomn 1

awk

More powerful than Cut

cat user.txt | awk -F ":" '{print $1 $2}'
cut user.txt | awk -F ":" '{print "Terdapat user bernama " $1}'
Satrya Mahardhika