CEH Lecture 1

By | February 7, 2022

OSCP offensive Security Certified Professional

cyberwing.pk sir website

CEH 80% mind makup

canable, ettercap, wireshark a tool used for picket sniffing

prerequisites:

Basic Networking
Basic Windows Concept like cmd/active directory domain services(ads)
cloud
Scripting
linux
__________________Kali Linux____________________________________

Linux Installation
Basic Commands
Tools
Basic User/permission
Network
Software
Services and Ports
Basic Server=> DNS/DHCP Web Server

Linux:

Win=>NTFS Linux => root ext2/3/4/ xfs zfs btrf

SWAP = For Ram Also called virtual memory in windows.


Virtual=>

Virtual Box

Kali Machine
Windows 10
Windows 7
Centos


Centos

                                    Unix=> 1969 developed for CIA by NSA

Redhat => linux RHEL-8 (Red had enterprise os) Community Version is ( CentOS ) Red hat own version is Fidora another is Fedora-Sec for security.

IBM = AIX
HP = Hp-UX

Sun/Oracle => Solaris
Debian Os Name = Debian – Ubuntu/k/education ubuntu Mint , For Hacking/Penetration is kali, black arch, kodachi

Science linux, Voice linux (specific for voice), humaira linux used for media

.iso image of an os
.ova image of installed os only double click to run it.

kali.org

version 2021.4

username: kali
password: kali

Directory Structure:

/root

File System

bin:
boot:
dev:
etc:
home
lib
lib32
lib64

/etc All types of Configurational files are stored in etc.

/usr All softwares are installed in usr in linux. /usr and /etc are interelated becuase problem in one of then cannot work.
/var logs are stored in /var file. logs(all your activity related files). Splunk Certification ( certification to become in reading logs).
/bin All users bin commands are stored in /bin
/sbin
/proc details information is stored in proc
/home users profile (old documents and settings) /home/kali/downloads
/boot kernal – Vmlinuz is located in /boot folder
kernal is a communicator between hardware and kernal is managing your process ques
kernal is a communicator between software and software

    It is a core part of operating System(king of os).

Windows Kernal name is os – kernal and its extension is .dll

windows code (kernal is loaded in registery).

You can customize( change anything according to your choice) linux kernel.

kali.org

username,machine name – [Current path]

(kalikali)-[~/Desktop]

if $ then normal user
if / then you are admin/root

sudo passwd root

This command will change the root user passowrd

When user are in his profile then telda sign comes here.

login with root

detiails
snapshop
take current snapshot
and rename it anything

commands

in linux every directory start from root(/)

like: /disk means that this directory is present in root

cd cd Desktop cd is working like cursor change the current working directory

through cd you can change the path

like we are moving to root then

we will write cd root

ls list current directory

list all the folders

ls /etc it means that open the files of /etc folder.

in blue color folders appears
while in white color files appears.

cd ..

One step back

mkdir create direcotry

mkdir /linux /ceh abc /lahore
to create two directories

mkdir dir1 dir2

to create 500 folders

mkdir {1..500}

to create folder within folder

mkdir {1..500}{1..500}

this will make four directores one 3 direcototires in root and one directory in usr

touch

Touch is used for file creation

for example: touch filename.text

touch oracle hp data

this will create 3 files

cp

CP command is used for copy paste

For example:

If there is a file named oracle which is present in /lahore directory

and you are present in /usr directory

to copy /oracle file from /lahore direcoty to other directory like in root paste it in /linux directory

e.g cp /lahore/oracle /linux

cp source destination

This will copy a oracle file located in root lahore and then paste it in /linux folder which is located in root.

tab key is used for autocomplete and also used for spelling mistakes.

mv

This command is used for cut and paste or move

mv source distination

mv /lahore/data /linux

this will move the data file from root and lahore to root linux directory

rm — Remove a direcotory

to remove a direcotory in /linux/oracle

this will remove oracle directory

rm direcory name

Syntax:

command -option(switch or button) argument

option or switch are used to customize any command

to create a user

useradd Umer

this will create a user with a default properties

man command is used to read the manual page of a particular command

useradd -e 2025-06-01 waseem

the new added user will expire on this date

-e stands for expiry

this will add new user waseem with expiry date of this profile

to remove folder

rm -r /lahor/dir1

rm -r folderName or path

more:
cat
head
tail
less
more
nl
view

These commands are used to read the file

more /etc/passwd

in this passwd folders users exist

the id of root is 0

passwd userName

retype pass:

this will change the mention user password

this password will be stored in linux in the below folder and will be encrypted

/etc/shadow

to read file

more etc/shadow

In this folder windows password is stored

windows: c:\windows\System32\config\SAM

permission command in linux:

chmod + x

>

>
| pipe
|| double pipe

&& and
; simicolon

permissions:

permissions are only applied on rooot

permission is applied on file or folder

r w x read,write,execute

r read permission

w write permission write permission in linux is normally off (to edit/create/delete)

x execute x permission on folder means to open a folder

rm /etc/protocols

write protected

x permission on folder means to open a folder:

x permission for file:

to execute code in a file.

by defualt x(execute ) permission is off in linux

.bat cmd script or .sh (power shell script) .ruby .go .bat .ps

by defualt file color is white when x permission is applied then the file color is green

touch myfile

chmod +x myfile

then the myfile color will change to green

rwx read,write, execute

— no permission

r-x only read permission read only permission for folder
r– read

chmod a+rwx a means permission for all users

chmod a+rwx /disk

chmod a -rwx /disk

remove all pemissions from disk

to make changes in file then w permission must be given

to execute any file then +x permission is necessary

to open any folder +x permission is necessary
to make changes


Basic Network Setting:


ifconfig Interface configeration

devices
network
network setting
from nat change into bridedAdapter

and select lan if connected with ehternet
or select wireless network if connected with wireless

ifconfig eth0 down

to disconnect ethernet

ifconfig eth0 up

to connect internet now

Software installation:

in windows the executable file is .exe

in linux the installation file is .rpm

in kali linux the executable file is .db

in mac the execuble file is .dmg

apt-get

in sentos

yum/dnf command is used instead of apt-get

repo group of softwares provided by a link

repository of redhat
redhat.com

// of kali

kali.org

60k softwares are present here

android uses google repsitory
mac uses

apt list/remove/install/update/upgrade… sotware name

apt list

this will install list command

apt install zzuf

this will install zzuf

cat/etc/os-realse

to see the version about kali

apt update

this will sync all the present softwares with the repositary

if you want to change the

apt upgrade

apt install *

this will install all the dependency

Piping:

; | > >> || &&

; command separator

these command is used when two or more commands are used simultenously

e.g mkdir abc ; ls

this command separator break the relation between two commands
above command will

cd /disk; mkdir a b c ; ls

cp /usb/500GBdata /location; poweroff

these are the two commands at a time

script: When

shell provide login environment

It is a betwwen layer between user and operating system

popular shell in linux is called bash

zsh ksh tsh sh bash

popular shel shell is called bash

.bat or cmd in windows

powershell .ps

default shell in kali is zsh

ps

to show which version of shell is using

all linux version are using bash shell while linux is using zsh.

raw cluster

| Command Concatenator

output | input

ps -aux //this command will show all the processes of machine

ps -aux | more

1st command ke output more ke input hoge

matlab is ke result more ke input hoge.

ifconfig | more

this will also show single page in windows

space will show more

more command is used to read file page by page

services and ports
service apache2 start

apt list

wc Word count

this command is used to count lines

wc -l(line Count) -w(word Count) -c(

apt list | wc -l

this will count number of lines

apt list | grep wireshark

this will search wireshar software in the list

Output redirector

ls -R | wc -l

ls -R > /OS

list all the files and save in a os file

ps -aux shows all the processess of a machine

ps -aux | wc -l

This will count all the processess

ps -aux > /process

this will save all the processess in a file

|| Or Gate

&& And Gate

all users executable

03036595587 amjad ceh

netcraft.com

Website for cybersecurity information

to500.org

contain information about super computers of the world.

summit — super computer of CIA

Red hat enterprise linux — Operating System

Leave a Reply

Your email address will not be published.