✍️
OSCP Prep
  • Welcome Aboard
  • Linux Basics
    • Command Line Fundamentals
  • Writeups
    • HackTheBox
      • Windows
        • Granny
        • Devel
        • Blue
        • Legacy
      • Linux
        • shocker
    • OSPG
    • TryHackMe
    • Vulnhub
      • Kioptrix Level1
  • Scanning and Enumeration
    • Index
    • Wordpress
      • wpscan
    • NMAP
    • DNS
    • NFS
    • DB
      • Oracle DB 1521
      • MySQL
    • SMB
      • msfconsole
      • crackmapexec
      • smbmap
      • smbclient
      • enum4linux
      • Mount smb share locally
    • SSH
    • HTTP
      • PUT Method
      • Untitled
  • Tools and Techniques
    • File Transfer
    • CMD-Fu
    • Cross Platform Exploit Compilation
    • Bash-Fu
    • Sniffing
      • tcpdump
      • Wireshark
    • Brute Force
      • Untitled
      • Hydra
    • Msfvenom
    • Password Cracking
      • John
      • Hashcat
  • Gaining Access and Exploitation
  • SQL Injection
    • sqlmap
    • mysql syntax
    • ms sql syntax
  • File Upload
  • LFI
  • Privilege Escalation
    • Windows
      • references links
      • Manual
        • SeTokenImpersonate
      • Scripts
    • Linux
      • Manual
        • Know your Enemy
      • Scripts
  • Mislu Tips
    • Troubleshooting
  • Buffer OverFlow under 30 min.
    • point n shoot
    • fuzzer.py
    • Addons reading material
  • Active Directory
    • Untitled
Powered by GitBook
On this page

Was this helpful?

  1. Linux Basics

Command Line Fundamentals

can not survive without knowing these basic commands

print working directory ; where am I ?

pwd

which user i am currently logged in with

whoami

change directory

cd

go up one directory / go back one directory

cd .. 

jump to home dir

cd ~ 

go to last directory

cd - 

[ concept of absolute path and relative path ]

ls 
ls /etc/
ls kali/shark

security

mkdir 

security

rmdir 

to delete recursively

rm -r shark

ls  -la

create a file named as hi.txt and put contents inside quotes inside it

echo "hello" > hi.txt 
cp srcfile dstfile
mv src dst

mv used to rename files as well

mv 

is c opy paste

cp

is cut paste

mv 

shark.txt looks / search eerywhere for specific file name

locate 

updatedb

to change password by default of logged in users

passwd 

passwd shark tochange passwrd of shark nameduser account

to read file contents ; cat means to concat

cat file1.txt 

Linux file permissions

rwx rwx rwx

r ->4 w-> 2 x->1

chmod +r file1.txt
chmod 777 file1.txt 

to add new user named shark

adduser shark

Import files :

does not stores password ; only stores users n account information

/etc/passwd 

stores password in hasehd format look into details of both files

/etc/shadow 
PreviousWelcome AboardNextHackTheBox

Last updated 3 years ago

Was this helpful?