1accesscontroli Nuni X: UNI T2 (UNI X)
1accesscontroli Nuni X: UNI T2 (UNI X)
T2(
UNI
X)
2.
1ACCESSCONTROLI
NUNI
X
Ques:whati
sAccesscont
rol
inunix,
vari
ouscat
egori
esofusers,
dif
fer
ent
accesscont
rol
pol
ici
esandpreser
vati
onofconf
ident
ial
i
tyusi
ngaccess
contr
ol:
Accesscontr
olisasecuri
tyt
echniquethatregul
ateswhoorwhatcanv i
ew
oruseresourcesi
nacomput i
ngenv i
ronment .I
tisafundament
alconcept
i
nsecuri
tythatmini
mizesri
sktothebusinessororgani
zati
on.
Access cont r
ol sy stems per for
m i dent
if
icat
ion
aut hent
icat
ion
and
authorizati
on ofusersandent iti
esbyev aluati
ngrequir
edl ogincredent
ial
s
that can i nclude passwor ds, per sonal i denti
fi
cation number s
(PINs),
biometri
c scans, secur i
ty t okens or ot her aut
henti
cati
on
factors.
Multi
factor aut henticati
on, whi ch r equi
res t wo or mor e
authent i
cati
onf actors,isof t
enani mpor tantpartoflayer eddefenseto
protectaccesscont rolsy st
ems.
Thesesecur it
ycontrolsworkbyi dent
if
yingani ndivi
dualorentit
y,veri
fyi
ng
thatthe per son orappl i
cation is who orwhati tclaims to be,and
authori
zi
ng t he access leveland setofact ions associat
ed wi ththe
usernameorI Paddr ess.Directoryservicesandpr ot
ocols,i
ncludingthe
LocalDirectoryAccessProtocol( LDAP)andt he Securi
tyAsserti
onMar kup
Language (SAML) , provi
de access cont r
ols f or authent
icati
ng and
author
izi
ngusersandentit
iesandenabli
ngthem t
oconnectt
ocomput
er
resour
ces,suchasdi
str
ibut
edappli
cat
ionsandwebser
vers.
Organi
zat
ionsusedi f
ferentaccesscont
rolmodel
sdependi
ng on thei
r
compli
ancerequi
rementsandthesecur
it
ylevel
sofi
nfor
mat
iontechnol
ogy
theyar
etryi
ngtoprot
ect.
2.
2TYPESOFACCESSCONTROLPOLI
CIES:
Themai
nty
pesofaccesscont
rol
are:
2.
3USEOFACCESSCONTROL
Thegoalofaccesscont r
olist omi ni
mizether i
skofunauthorizedaccess
to phy si
caland l ogicalsy stems.Access cont r
oli saf undamental
component of secur i
ty compl iance programs that ensures secur i
ty
technol ogyandaccesscont rolpoli
ciesareinplacetoprotectconf i
denti
al
i
nf ormat ion, such as cust omer dat a. Most or ganizations hav e
i
nf rastructur
eand pr ocedurest hatl i
mitaccesst o net
wor ks,comput er
syst ems,appl i
cat
ions,f i
les and sensi t
ive data,such as per sonal
ly
i
dent i
fi
abl ei
nformati
onandi ntell
ectualpr
operty.
Accesscontr
olsystemsar ecomplexandcanbechal l
engi
ngt omanagein
dynamicIT envi
ronmentst hatinvolveon-premisessystemsand cloud
servi
ces.Aft
ersome hi gh-
profi
le breaches,technol
ogy vendor
s have
shif
tedawayfrom singl
esign-on
systemst ounifi
edaccessmanagement,
whichoff
ersaccesscontrol
sforon-premisesandcloudenvir
onments.
2.
4VARI
OUSCATEGORI
ESOFUSERSONAUNI
XSYSTEM
1.ROOTACCOUNT
Thisisalsocall
ed superuser
andwoul
dhavecompl et
eandunf et
ter
ed
contr
olofthesystem.Asuperusercanr unanycommandswi t
houtany
rest
ri
cti
on.Thi
susershouldbeassumedasasy st
em admini
str
ator.
2.SYSTEM ACCOUNTS
System account
sar et
hoseneededfortheoper ati
onofsy stem-speci
fi
c
component sforexamplemailaccount
sandt he sshd
accounts.These
account
sar eusuall
yneededforsomespecifi
cf uncti
onony oursy st
em,
andanymodi fi
cat
ionst
othem coul
dadversel
yaffectthesyst
em.
3.USERACCOUNTS
Useraccountsprovi
dei nter
acti
veaccesst othesyst
em f
orusersand
groupsofusers.Generalusersaret
ypical
l
yassignedtot
heseaccount
s
andusual
lyhaveli
mitedaccesstocri
ti
calsyst
em fi
l
esanddi
rect
ori
es.
Unix suppor
ts a conceptof Gr
oup Account
whi
ch l
ogi
cal
ly gr
oups a
numberofaccount s.Everyaccountwouldbeapar tofanot
hergroup
account.AUnixgrouppl ay
simpor t
antr
oleinhandl
i
ngfil
epermissi
ons
andprocessmanagement .
3.I
NTRUSI
ONDETECTI
ONSYSTEM (
IDS)
An I
ntrusion Det ection Sy stem ( I
DS) isasy stem t hatmoni t
ors networ k
traff
ic
f orsuspi cious act i
vity and issues al erts when such act i
vityi s
discover ed.Itisasof twareappl i
cati
ont hatscansanet wor korasy stem
forhar mf ulactivityorpol icybr eaching.Anymal iciousv entureorv i
olation
i
snor mal l
yrepor tedei thertoanadmi nistrat
ororcol l
ectedcent ral
lyusi nga
secur i
tyi nformat ion and ev entmanagement( SIEM)sy stem.A SI EM
sy st
em i ntegratesout putsf rom mul tiplesourcesandusesal armf il
tering
techniquest odi fferentiatemal i
ciousact i
vityfr
om f al
seal ar
ms.
Although i ntr
usi on det ection sy stems moni tornet wor ks forpot entiall
y
mal i
cious act i
vity,t hey ar e al so di sposed t of al
se al arms.Hence,
organizat i
onsneedt of i
ne-tunet hei
rI DSpr oduct swhent heyf i
rstinst al
l
them.I tmeanspr oper l
yset ti
ngupt hei ntr
usiondet ectionsy stemst o
recogni zewhatnor malt r
af f
icont henet workl ooksl ikeascompar edt o
mal i
ciousact ivi
ty .
Int
rusi
onpreventi
onsy st
emsalsomoni t
ornetwor
kpacket
sinboundthe
system t
ocheckt hemalici
ousact
ivi
ti
esinv
olv
edinitandatoncesends
thewarni
ngnotif
icat
ions.
1 CLASSI
3. FICATI
ONOFI
NTRUSI
ONDETECTI
ONSYSTEM:
I
DSar
ebasi
cal
l
ycl
assi
fi
edi
nto2t
ypes:
1.Net
wor
kInt
rusi
onDet
ect
ionSy
stem (
NIDS)
:
Networki nt
rusiondetecti
onsy stems( NIDS)aresetupatapl anned
pointwithinthenet worktoexami netraffi
cfrom alldevi
cesont he
network.Itperformsanobser vati
onofpassi ngt r
affi
cont heentir
e
subnetandmat chesthet r
af f
ict hatispassedont hesubnetstothe
coll
ect
ionofknownat tacks.Onceanat tackisidenti
fi
edorabnormal
behavi
ori sobser v
ed,theal ertcanbesentt ot headmini
strat
or.An
exampleofanNI DSi sinstall
ingi tonthesubnetwher efi
rewall
sare
l
ocatedinor dertoseeifsomeonei st
ryi
ngcr ackthefir
ewal
l.
2.HostI
ntr
usi
onDet
ect
ionSy
stem (
HIDS)
:
3.
2DETECTI
ONMETHODOFI
DS:
1.Si
gnat
ure-
basedMet
hod:
Anomal y-
basedIDSwasi ntr
oducedt odetecttheunknownmal ware
attacksasnewmal warearedevelopedrapi
dly.I
nanomal y-
basedIDS
thereisuseofmachinelear
ningtocreat
eat rust
fulact
ivi
tymodeland
any t
hing comi
ng i
scompar ed withthatmodeland i tisdecl
ared
suspici
ousifi
tisnotf oundi
nmodel.Machinelear
ningbasedmet hod
hasabet t
ergeneral
izedproper
tyincomparisontosignatur
e-based
IDSast hesemodelscanbet rai
nedaccor
dingtotheappli
cati
onsand
hardwareconfi
gurati
ons.
3.
3COMPARI
SONOFI
DSWI
THFI
REWALLS:
IDSandf i
rewallbot
har erelatedt othenet worksecuri
tybutanIDSdi ff
ers
from afir
ewallasafirewalllooksout war dlyfori
ntrusi
onsinordertost op
them from happening.Firewal l
sr est r
ictaccess bet ween net
wor ks to
preventi
ntrusi
onandifanat tackisfrom i nsi
dethenet wor
kitdon’tsignal
.
AnI DSdescr i
besasuspect edi nt
rusiononcei thashappenedandt hen
signal
sanal ar
m.
4.ROOTKI
TS
Ar ootki
tissoft
wareusedbya hacker
togainconstantadminist
rat
or-l
evel
accesst oacomput erornetwork.Arootki
tistypi
call
yinstal
ledthrougha
stolen passwor
d orbyexpl oi
ti
ng a syst
em v ul
nerabi
li
ti
es withoutthe
vi
ctim'sconsentorknowledge.
Rootkit
spr i
maril
yaim atuser-
mode appli
cati
ons,buttheyalsof ocusona
comput er
’s hypervi
sor,the kernel
,or ev en firmwar e. Rootkits can
completelydeacti
vateordestr
oytheant i
-mal
waresof t
war einstal
ledinan
i
nfected computer,thusmaki ng a root
kitatt
ackdi f
ficul
tt ot rackand
el
iminate.Whendonewel l,t
heintr
usioncanbecar eful
l
yconceal edsot hat
evensystem administ
rat
orsareunawar eofi
t.
4.
1HOW ROOTKI
TSWORK?
Ar ootkitismal waret hatisinstal
ledonacomput erbyani ntr
uderforthe
purposeofgai ningcontrolofthecomput erwhileavoidi
ngdetecti
on.Unli
ke
othermal ware,rootki
tarecapabl eofav oi
dingt heoperat
ingsystem scan
and ot herr elated anti
vir
us/anti-
spywar e programs byhi di
ng fil
es and
conceal i
ng r unning pr ocesses f rom t he comput er'
s oper ati
ng
system.
Root kit
s ar
e basically Troj
an hor se mal warethati s used in
conjunction wi th other mal i
cious pr ograms i n an effor
tt or emain
undetect edbyt hecomput eruserort heant i
vi
russcansy st
em.
4.
2TYPESOFROOTKI
TS
Ther
ear esever
aldi
ff
erenttypesof
Root
kit
s whi
char
eUserMode,Ker
nal
Mode,andFir
mwareRootkit
s.
5.HONEYPOT
5.
1 WHATI
SHONEYPOT?
Ahoneypot i
sa comput ersecuri
ty
mechanism sett odetect,deflect,or,i
n
somemanner ,counteractat t
empt satunaut horized useof
informat i
on
systems.Generall
y,ahoneypotconsi stsof
data (
forexample, i
nanet work
sit
e)thatappearstobeal egi
ti
mat epartofthesite,butisactuall
yi solat
ed
andmoni tor
ed,andt hatseemst ocont ai
ni nfor
mat i
onorar esour ceof
valuetoatt
ackers,whoar ethenblocked.
5.
2 TYPESOFHONEYPOTS
Honeypot
scanbeclassi
fi
edbasedont hei
rdepl
oyment(
use/act
ion)and
basedont
hei
rlev
elofi
nvolv
ement.Basedondepl
oyment,
honeypotsmay
becl
assi
fi
edas
pr
oduct
ionhoneypot
s
r
esear
chhoneypot
s
Productionhoneypot s
areeasyt ouse,captureonlyl i
mitedi nformation,
andar eusedpr imari
lybycorporati
ons.Producti
onhoneypot sar eplaced
i
nside t he pr
oduction net
work wi th otherproduct
ion ser vers by an
organizati
ontoimprovethei
rov eral
lstat
eofsecurit
y.Nor mally
, product
ion
honeypot sarelow-i
nter
acti
onhoneypot s,whichareeasiertodepl oy.They
gi
v elessinfor
mat i
onaboutt heat t
acksorattacker
st hanr esearchhoney
pots.
Researchhoneypot s arerunt ogat herinformationaboutt hemot i
vesand
tact
icsoft he blackhat
communi t
yt arget i
ng dif
ferentnetwor ks.These
honeypot sdonotadddi r
ectv aluetoaspeci fi
corganizat
ion;instead,they
areusedt oresearcht hethreat sthator ganizati
onsfaceandt olearnhowt o
bett
erprotectagai nstthoset hreats.Resear chhoneypot sar ecompl ext o
deployandmai ntain,captur eext ensiveinformation,andareusedpr imaril
y
byresearch,mili
tary,orgov ernmentor ganizati
ons.
Basedondesi
gncr
it
eri
a,honeypot
scanbecl
assi
fi
edas:
pur
ehoneypot
s
hi
gh-
int
eract
ionhoneypot
s
l
ow-
int
eract
ionhoneypot
s
Purehoneypot s
arefull
-f
ledgedproducti
onsy st
ems.Theact i
vit
iesoft he
att
ackeraremoni tor
edbyusi ngabugt apthathasbeeni nst
all
edont he
honeypot '
sli
nkt othenet work.Noothersoftwareneedst obei nst
all
ed.
Even though a pure honeypoti s useful
,stealt
hiness ofthe def ense
mechanismscanbeensur edbyamor econtrol
ledmechanism.
High-i
nteractionhoneypots i
mitatetheactivit
iesoftheproductionsy stems
thathostav ari
etyofservi
cesand, ther
efore,anat t
ackermaybeal loweda
l
otofser vicest owastetheirti
me.Byempl oy i
ng v
irt
ualmachines,mul ti
ple
honeypot scanbehost edonasi nglephysicalmachine.Therefore,eveni f
thehoneypoti scompr omised,itcanber estoredmor equickl
y .I
ngener al
,
high-
inter
action honeypot spr ovidemor esecur itybybei ng diff
icultt o
detect,butt heyar eexpensivet omai ntai
n.I fvirt
ualmachi nesar enot
avail
able,onephy si
calcomputermustbemai nt
ainedforeachhoneypot ,
whi
chcanbeexor
bit
ant
lyexpensi
ve.Exampl
e:
Honeynet
.
Low-i
nteracti
onhoneypot s simulat
eonlyt heserv
icesf requentlyrequested
byatt
acker s.Sincetheyconsumer el
ati
velyfewr esources,mul ti
plev i
rt
ual
machinescaneasi lybehost edononephy si
calsystem, thevir
tualsy st
ems
have a shortr esponse t
ime,and l ess code isr equired,reducing the
complexi
tyoft hevirt
ualsystem'ssecuri
ty.Example: Honey d.
6.STACKFRAME
The st
ackfr
ame, al
soknownas act
ivat
ionr
ecor
d i
sthecol
l
ect
ionofal
l
dataonthestackassoci
atedwi
thonesubprogr
am cal
l
.
Thest
ackf
ramegener
all
yincl
udest
hef
oll
owi
ngcomponent
s:
Theretur
naddr ess
Argumentv ari
abl
espassedonthest
ack
Localvar
iables(i
nHLLs)
Savedcopiesofanyregist
ersmodi
fi
edbyt
hesubpr
ogr
am t
hatneed
toberestored(e.
g.$s0-$s8inMAL).
7.LI
NUXPROCESSES–MEMORYLAYOUT
Let
sexpl
aineachcomponentoft
heabov
elay
outonebyone:
Thecommandl i
near gument sandt heenv i
ronmentv ari
ablesar estored
atthetopoft hepr ocessmemor yl ayoutatt hehi gheraddr esses.
Thencomest hest acksegment .Thi sist hememor yar eawhi chisused
byt he process t o storet he l ocalv ariables off uncti
on and ot her
i
nformationt hati ssav edev er
yt imeaf unct i
oni scal led.Thi sot her
i
nformationi ncludest her eturnaddr essi.e.t headdr essf rom wher ethe
functi
onwascal led,somei nformat ionont hecal lersenv ironmentl i
ke
i
tsmachi ner egisterset car est oredonst ack.Al sowor thment i
oning
hereisthateacht imear ecursivef unct i
oni scal l
edanewst ackf r
ame
i
sgener atedsot hattheeachsetofl ocalv ari
ablesdoesnoti nterf
ere
withtheanyot herset.
Heapsegmenti st heonewhi chi susedf ordy namicmemor yallocati
on.
Thissegmenti snotl imi tedt oasi nglepr ocess;i nsteadi tisshar ed
amongal lthepr ocessesr unningi nt hesy st
em.Anypr ocesscoul d
dynamicallyal l
ocat ememor yf r
om t hissegment .Si ncethi ssegmenti s
sharedacr osst hepr ocessessomemor yf r
om t hissegmentshoul dbe
usedcaut i
ousl yandshoul dbedeal l
ocatedassoonast hepr ocessi s
doneusi ngt hatmemor y.
Asseemsf rom t hef i
gureabov e,thest ackgr owsdownwar dswhi l
et he
heapgr owsupwar ds.
Theent iregl obalv ari
ablewhi chisnoti niti
ali
zedi nt hepr ogram ar e
storedint heBSSsegment .Uponexecut i
on,al ltheuniniti
ali
zedgl obal
vari
ablesar ei ni
tializedwi t
ht hev aluezer o.Not ethatBSSst andsf or
‘
BlockSt artedbySy mbol ’
.
Alltheinit
ializedgl obal vari
ablesar estoredint hedat asegment .
Finall
y,thet extsegmenti sthememor yareat hatcont ainsthemachi ne
i
nst r
uctionst hatCPUexecut es.Usual l
y,thissegmenti sshar edacr oss
diff
erentinst ancesoft hesamepr ogram bei ngexecut ed.Sincet hereis
nopoi ntofchangi ngt heCPUi nstructi
onssot hissegmenthasr ead-
onlyprivil
eges.
8.STACKGUARD
StackGuar d i
sacompi l
erextensionthatenhancestheexecutabl
ecode
producedbyt hecompil
ersot hatitdetect
sandt hwart
sbuffer-
overf
low
attacksagainstthest
ack.Theeffecti
stranspar
enttothenormalfuncti
on
ofpr ogr
am.
Canar
yBi
t/Wor
d:A
canar
ywor
d i
sasequenceofbi
tspl
acedatt
he
boundar
ybet
weenabuf f
er(suchasast
ack)andcont
rol
dat
ainapr
ogr
am,
asawayofdetect
ingandreact
ingt
obuf
ferover
fl
ows.
ROLEOFCANARYBI
T:
Canaries or
canarywor ds
areknownvaluesthatareplacedbet weena
buff
erandcont r
ol dataonthestacktomoni t
orbufferoverfl
ows.Whenthe
buff
erov erf
lows,thef i
rstdatatobecorrupt
edwi l
lusuall
ybet hecanar
y,
andaf ail
edv eri
fi
cationofthecanarydatawillt
hereforeal
ertofan
over
flow, whichcant henbehandled,forexample,byinval
idati
ngthe
corr
upt eddata.
Ther
ear
ethr
eet
ypesofcanar
iesi
nuse:
TERMI
NATOR,
RANDOM,
AND
RANDOM
XOR
TERMI
NATORCANARI
ES
Ter
minat
orcanar
ies
uset
heobser
vat
iont
hatmostbuf
ferov
erf
lowat
tacks
arebasedoncer tainst ringoper ati
onswhi chendatst r
ingterminat ors.The
reacti
on t o t his obser vation i s t hat t he canar ies ar e bui l
t
of nul
l
terminators,
CR, LF, and- 1.Asar esult,t
heattackermustwr i
teanull
characterbeforewr i
ti
ngt her eturnaddr esst oav oidalteri
ngt hecanar y
.
Thispr eventsattacksusi ng strcpy ()
andot hermet hodst hatret urnupon
copy i
nganul lchar acter,whi let heundesi rableresultisthatthecanar yis
known.Ev enwitht hepr ot ection, anat t
ackercoul dpotenti
allyoverwritethe
canarywi thit
sknownv alueand cont r
oli nf
ormationwi thmi smat ched
values,thuspassi ngt hecanar ycheckcode, whichisexecut edsoonbef ore
thespeci f
icprocessor 'sr eturn-from- cal
linstr
uction.
RANDOM CANARI
ES
Random canar i
es are randomly gener at
ed,usual lyf rom an ent
ropy-
gather
ing
daemon, i
nor dert
oprev entanattackerfrom knowi
ngtheirv
alue.
Usuall
y,itisnotl ogical
lypossibleorpl ausibletor ead t
hecanaryf or
exploi
ti
ng;thecanaryisasecur ev alueknownonl ybyt hosewhoneedt o
knowit—thebufferoverfl
owprotectioncodeint hi
scase.
Normally
,a random canar yisgenerated atpr ogram init
ial
izati
on,and
stor
edinagl obalv ar
iabl
e.Thisvari
ableisusual l
ypaddedbyunmapped
pages,sothatattemptingtoreaditusinganyki ndsoft r
ickst hatexpl
oit
bugstoreadoffRAM causesegment ati
onf aul
t,t
erminati
ngt heprogram.It
mayst i
l
lbepossibletoreadthecanary,i
ftheattackerknowswher eiti
s,or
cangettheprogr
am t oreadfr
om thestack.
RANDOM XORCANARI
ES
Random XORcanar i
es arerandom canari
est hatareXOR- scrambledusi ng
allorpartoft hecont roldata.Int hi
sway ,oncet hecanar yorthecont rol
dataisclobber ed,thecanar yv al
ueiswrong.Random XORcanar ieshav e
thesamev ul
nerabil
it
iesasr andom canaries,exceptthatt he"readf rom
stack"methodofget t
ingthecanar yisabitmor ecompl i
cated.Theat tacker
mustgett hecanar y,theal gorit
hm,andt hecont r
oldatai nordert or e-
generat
et heoriginalcanaryneededt ospooft heprotect
ion.
Inaddition,random XORcanar i
escanpr otectagai nstacer t
ainty
peof
att
acki nvolv
ingoverfl
owingabufferi
nast r
uctureintoapoi nt
ertochange
thepointertopointatapieceofcontr
oldat
a.Becauseoft heXORencoding,
thecanar ywi l
lbewr ongi ft
hecont r
oldataorr eturnv al
ueischanged.
Becauseoft hepointer,t
hecontroldataorretur
nv aluecanbechanged
withoutov er
fl
owingov ert
hecanary.
Al
thought
hesecanar
iespr
otectt
hecont
roldat
afr
om bei
ngal
ter
edby
clobber
edpoi nters,theydonotpr ot
ectanyotherdataort hepoi
nter
s
themselves.Functionpoint
ersespecial
lyareaprobl
em here,ast
heycan
beov er
fl
owedi ntoandcanexecute shell
code
whencall
ed.