Lecture 06

IIT Kanpur July 201
20 followers
Aug 3, 2024
[Music]
hello everyone uh so we started in the
last uh lecture about uh miter at and CK
and we discussed about uh what it is and
uh where we are going with this uh
module 3 so and then we talked about uh
why Defenders need to know attackers uh
ttps or Tech uh tactics techniques and
procedures and uh uh I explained that uh
uh ATN C is actually a knowledge base uh
framework uh using which you can wrap
your head around uh what the attack do
uh normally especially the AP
attak and uh we said that un like CC
which is a linear sequence of activities
that the attackers usually uh do here we
are actually uh not giving a sequence we
are saying that there these are the
tactics or sub goals that they try to
achieve in order for achieving the final
goal and we gave examples of how stocks
net can be looked at as uh a set of uh
tactics that were applied against the uh
uh Iranian nuclear uh enrichment plant
and uh so and each tactic is actually
implemented using techniques now the
first thing that I want to uh talk about
in this lecture is uh something that you
should remember if you are in cyber
security space uh as a career option uh
this is called the Pyramid of pain so
pyramid of pain is a is a basically uh a
way of looking at what kind of threat
intelligence that is intelligence about
the
adversary uh that helps Defenders right
so for example uh so uh many times we
say that uh this I want to detect um
whether a particular adversary is
attacking me by looking at whether the
malware they normally use uh is uh being
uh used in my system or if there is any
sign of that malware in my system and uh
the way to recognize a malware which has
been seen before is to actually uh take
the hash value hash function uh is
applied on the entire binary of the
malware that has been found in another
system another attacked system uh uh
people actually make that as a uh kind
of a indicator of compromise that is if
you find a binary with the same hash
value then it is the that same malware
that is uh in my system how however it
is not very difficult for an attacker
when when he when he realizes that the V
uh the targets are aware of the hash
value of the malware they're using they
can easily uh change some uh values
inside the uh uh inside their source
code and then recompile it and the hash
value will be different so if you have
stored the hash value as a Defender to
actually uh waiting for that particular
hash value to appear uh in in any new uh
file that you downloaded uh it don't
work because uh so so what what this
trivial means in the bottom of this
pyramid is that uh it's trivial for
attackers or adversaries to actually
change the hash value and therefore
depending on hash value to uh detect a
particular adversary is not a very uh
effective uh approach the other thing
that uh we often detect uh uh while
analyzing an attack or while uh
detecting an attack uh um in the while
is IP addresses so the IP address from
which the initial uh email schem uh
fishing email schem or IP address which
was trying to scan my system or an IP
address that is uh being contacted by a
malware inside my uh in uh which has
been already put into my system uh I can
try to Blacklist those IP addresses uh
in my firewall and thereby and not uh uh
getting contacted by those IP addresses
but uh attackers are very clever so they
continue to move the IP addresses so the
IP addresses from which they try to uh
scan your system or IP addresses that
they use for sending uh fishing emails
or IP addresses from which uh uh control
and command communication happens they
can be easily changed so because you can
easily get new IP addresses so therefore
depending on on the IP addresses to
detect presence of an adversary is also
very unlikely to be very effective and
it's actually that's why easy here means
that the adversary for the adversary
it's very easy to change the IP
addresses similar uh uh is domain names
so domain names from which attacks are
seen uh or domain names that are used in
command and control server uh
communication those also can be easily
changed and we talked about this before
that uh there is a domain flux there is
uh that that people use to continuously
move the domain name and register a new
domain name very quickly uh and uh
therefore uh the domain names is also
very simple for the attacker to change
not as easy as changing IP addresses or
not as easy as changing the hash value
but it is quite
easy uh then uh the network and host
artifacts uh if if uh sometimes we
actually uh see some artifacts related
to uh network uh the uh for example uh
Mac addresses it could be uh um you know
certain uh Fingerprints of uh uh hosts
that we can actually use as a way of
detecting some uh activity of an
adversary in my system but even that can
be changed by the adversary
uh although acquiring a new host uh or
acquiring a new U uh network connection
Etc is slightly more challenging for the
adversary because he he has to then
subscribe to a different uh uh Cloud
maybe uh different Cloud uh service and
and things like that so it's kind of
annoying for the adversary but it's not
that
difficult now the tools that they use
for uh you know doing the attack um like
for example in solar wind they use this
uh um one particular malware um or one
particular uh um code uh that they
inserted or in case of stock net or in
case of uh the stock net they use the
stock stock net worm that is one of the
that is a tool for them uh or the uh uh
the uh the use of uh um the uh energy uh
the black energy malware in case of
Ukrainian Power Attack in 2015 those
tools are you know expensive to build
and so therefore if you are just uh
going by the tool not by the hash value
of the malware but going by by the tools
uh like what exactly the functionality
of the adversary's uh uh unwanted uh uh
you know uh program that that has been
inserted into your system if you go by
that to recognize the adversary you may
be more effective and for the adversary
to suddenly go and develop new tools
they do but over time not necessarily
like very quickly uh so it's kind of
challenging for the
adversary now if you recognize adversary
by their tactics techniques and and
procedures that they're
using uh then adversary for the
adversary to hide that or to change that
completely is lot more work right
because it takes them a long time to
study a Target in uh figure figuring out
all the different sub goals that needs
to actually succeed in order for the
final goal uh has to succeed uh if you
if you if they use those tactics
techniques and procedures they're likely
to use it in other similar uh targets uh
same tactics technique techniques and
procedures because it takes time to
actually uh plan and uh build that
capability so for the adversary that is
the toughest uh challenge to um uh you
know do a mutation of their ttps very
quickly adversaries do change their ttps
over time but at uh at a very close
proximity in time they really uh it's
tougher for them to change and that's
why this is in the top of the pyramid so
this is called the Pyramid of pain and
this pain is with respect to the
adversary's uh pain right not NE not the
defender Spain so going from bottom to
top uh it uh what we what we are looking
at on the on the on the pyramid we see
the the various uh artifacts or various
uh evidences that we use for recognizing
an adversary and on the right hand side
what we see is that uh the uh the
gradual difficulty level for the
adversary to uh change that quickly so
that it it cannot be discovered so so
that's why ttps are very important and
and as miter has come up with this ttp's
uh this own entire framework uh now
everybody uses that and many tools
actually will tell you like when they
analyze a malware they can tell you what
ttps uh the this malware is trying to um
apply uh or if they say analyze an
attack uh they can tell you that what
ttps actually are being used in that
particular attack so this is something
uh is a vocabulary that uh we normally
use when we talk to uh other cyber
security uh experts so that we have a
common language to describe what a
particular adversary uh normally uh does
so at at and CK metrics this metric is
basically a way of organizing the
various tactics techniques and
procedures so what you are seeing here
is the um 12 tactics that normally we
see actually uh it's less than 12 here
so initial access execution persistence
privilege escalation so four defens
evation credential access Discovery
lateral movement 48 and then 3 11 so
there are 11 tactics that are are uh put
in in this metrics on the the top and uh
below each of the tactic is a list of
techniques uh that are uh that are
usually used to uh uh uh to apply that
tactic right now what you are seeing
here for example for under initial
access you are seeing uh 1 2 3 4 5 6 7 8
9 10 10 TCT uh techniques but actually
if you if you drill down then there are
sub techniques in each of these so the
number of techniques may look uh not so
U not so many like uh probably 11 time
uh 13 or so uh or 11 time uh 15 or so
but actually there are more because uh
if you actually look at like drive by
compromise you will see there are sub
techniques within each of these so
therefore um uh whenever uh uh we look
at an attacker uh how he or she uh work
on our system we'll always find that
they have to get an initial access right
so so initial uh access uh uh would be
through uh maybe drive by compromise
that is uh when uh you have
a an user in your system which who goes
to a website and while um in that
website uh the something gets downloaded
onto his system so that's a drive by
compromise U there may be uh uh various
ways to actually um attract the user to
that specific malware ladin uh website
by by for example by uh uh What uh you
know Watering Hole uh attack where uh
you uh the attacker sends uh very
attractive emails saying that if you go
to this site then you will get some
money or you'll get some health related
advice or things like that and then when
they go there they get um compromised
right so uh then the other way to do
initial access is exploiting a public
facing application you have a um for
example a web application which has a
command injection vulnerability and
attackers can use it uh it may be may
have a um xss vulnerability that the
attacker may use or you may have a you
know uh server uh service running at a
certain port uh where the service has
certain vulnerabilities that the users
uh the attackers come to know uh and
then they can actually uh use that uh
you can also do Hardware
addition so this Hardware addition is a
very interesting one because uh recently
actually it happened in up in one of the
Cooperative Banks uh some uh Mis creant
actually uh uh took a um laptop and they
they came to the bank and at some some
Corner uh there are uh ethernet ports on
the on the wall and so they connected
their laptop on the ethernet port uh uh
and and this is an area that was not
like uh well lit um and uh usually uh
people don't uh come to that area so
they put that laptop they uh and the
banks uh network was not well protected
so uh it was giving it was assigning a
DHCP IP address address to that uh uh
device any device that connects to its
ethernet so there is no uh
authentication uh that was required to
connect to the network so now the
attacker's uh computer is now on the
bank's Network and then the attacker
goes home and he turns on RDP or remote
desktop on this machine attacker goes
home and starts using RDP to connect to
that machine and that machine being on
the same network then it tries to it
does very kinds of uh finds other kinds
of uh vulnerabilities and then moves
from that laptop to uh important servers
and eventually manages to siphon of uh
funds from the core banking so so this
was uh this was very interesting case of
a hardware addition so similarly you
know you can if you're not careful about
the how you protect your ethernet ports
uh uh your uh you know local land uh um
uh you know through a proper
authentication mechanism you might get a
hardware added to your system and then
uh that Hardware can be controlled by
somebody else so that's that's one way
to get in into this another case was
that the uh uh the ethernet that was
connected to the uh to the uh door
uh uh you know connected to the door uh
of a bank um there was there was some
kind of a device that uh was used used
to control access to the bank and that
device was connected to the ethernet so
some hackers actually went and used that
ethernet connection uh and connected
their own device and uh that way they
could hack into the bank so so this kind
of thing can happen similarly
replication through remov removable
media this is the case of stocket where
the USB uh device was removable media
USB uh it was used uh spear fishing
attachments you can actually know who
your targets are inside the organization
send an uh malware uh uh send a malware
uh you know fill uh uh file like a PDF
file or or a um JPEG file or whatever
the word file which uh can
exploit um you know unpatched uh uh
Acrobat Reader or unpatched uh Windows
Office Etc Microsoft Office Etc
similarly you can send a spear fishing
link uh by which you actually do the
eventually the drive bike compromise
like the user goes to the to the URL uh
it has to be the email is made uh
looking attractive and with chat GPT Etc
make earlier we used to know that this
is a fishing email when we when we used
to see many different you know many uh
mistakes grammatical mistakes spelling
mistakes and and and so on and
inconsistency in the writing style and
so on but now with chat GPT Etc it's
very easy for the attackers to actually
craft emails that are very very
believable so so users have to be
trained very very carefully uh into
recognizing this uh kind of things uh
spear fishing uh via service so you can
actually do the uh provide a service
that the uh attacker uses um so then the
attacker um the that particular service
can be
compromised uh supply chain compromise
as we have seen in case of solar wind
that uh the uh the solar wind company
was created a created an update of the
solar wind uh uh the software uh this
update server was uh uh uh the the uh
development servers were compromised and
this develop uh the they added the
adversary in this case probably pt28 the
Russians they added additional 100 lines
of code and this code was actually um
basically malicious code and then uh the
engineers uh they did not probably had
already done the code review before so
they did not do an again code review and
they did not notice this additional 100
lines of code and when that um code was
compiled into the uh update and the
update was uh pushed to various users
the users got uh compromise so this is a
supply chain compromise various cases
when you download a free software from
uh GitHub or or various other places uh
it has been the case that many times the
various GitHub accounts which are not
properly protected uh the code that is
being being uh supplied to users
actually has been contaminated with
malicious Cod so that's another case of
supply and compromise trusted
relationship so when you actually have a
relationship with the vendor or
something so you actually use the vendor
as the carrier to of your malware uh and
because of trusted relationship people
might actually uh do not uh assume that
uh there might be a a danger in uh using
their uh you know software or their USB
into their uh trusted machines and that
could be a problem and then uh sometimes
you can actually do enough reconition to
actually get the uh uh password Etc of a
user and thereby you first get into a
user's account and then you start
downloading um payloads into the users
account and from there you do all the
other compromises so so all I'm uh by by
telling you all these 10 different
techniques for initial access and if you
go to miter website and and and open
these uh you will find lot more
information not more lot more different
procedures to actually uh you know do
you know realize these techniques and
also there are sub techniques within
each of these so similarly execution
like once you have the initial access
you have somehow put the payload into
one machine at least in that system in
that Network then you have to do
execution you can do uh various kinds of
script based execution command line
executions uh you know all all kinds of
stuff then then you have to create a
persistence so you can uh write
something on the on the shell uh the uh
login shell or or shell uh um login
login script or uh shell script uh or
you can do various put inject the uh
inject the malicious code into uh welln
dlls all kinds of stuff browser
extension and so on similarly once you
have done persistence but you are still
running under the uh same privilege as
the user you actually used as your
initial access so you may have to do a
privilege ation there are multiple
different techniques to do privilege
escalation now defens evation you have
to hide yourself from uh from for
example inpoint security agents or from
antivirus agents and so on so there are
various techniques by which you can uh
do that uh to evade
defense you can even change some of the
um binaries you can turn off the U
antivirus um very common thing is to
turn off the antivirus and so on because
if you if you get escalated your
privilege you can do that then you can
also do credential access credential
access means that there are there may be
a shadow file or there may be a database
of credentials uh which you can use and
send it back to your command and control
so that more uh access can be uh
achieved into the system you can do
discovery of various things um including
uh policies and including files and uh
databases and and so on so forth uh then
you may also have to do lateral movement
because your actual Target like in case
of this um stocks net the actual Target
was the Windows system Windows 7 system
which actually had a had the PLC uh
loading capability and they actually
exploited zero day vulnerabilities in
Windows 7 as well as U as well as the
simmens uh PLC program so so so all that
stuff can be uh used to do a movement
inside the network then you can if your
uh final uh thing goal is to do
exfiltration of uh personally
identifiable data for example in that
case you would actually uh uh collect
various uh things and and uh and this uh
for this and then do the exfiltration so
exfiltration is is next and then uh you
also have command and control and then
there is one that is not show shown here
is the impact so that's where the 12 one
the impact is the act what we called the
what in the in the CKC we had the last
one uh that is uh to actually do the uh
harm to the uh Target and that's what is
called impact impact tactics here so so
we'll we'll see a lot of these many
times over um you know during uh this uh
module as well as uh uh later on but uh
you see here is that even though I
describ them in a kind of a sequence you
could see that one could actually do
this in different sequence for example
as I uh as I was describing that
privilege escalation and persistence can
be in different order right so similarly
uh defensiv can be done in the very
beginning or if if you are getting into
a uh you know administrative access
account first uh you may not do
credential access because you already
are inside you may not want but in case
of the Ukraine attack if you remember
there was a credential access for VPN
credentials uh for uh which then was
used to get into the uh uh the actual
Network Target Network so you can do
credential access but you may not you
may not need to do any Discovery because
you already have
done a lot of research on the uh on the
structure uh of this uh system like or
if you are actually uh launching your
Mal Ware into a system which is not
connected to the internet so you have no
command and control uh visibility into
that Network so Discovery will also not
be useful because whatever you discover
you cannot tell your command and control
because you your your system the network
that you are in is uh disconnected from
the internet so so all these different
tactics may not be used or uh some
tactics may be used in different order
or some tactics may be used twice like
for example if you do credential access
then you might do further weaponization
and further uh initial access uh into
other parts of the system uh you may do
lateral movement much earlier you can
you may not do collection if
exfiltration is not your goal uh command
and control in in some cases command and
control is not required like or or the
system is not internet denied that you
cannot do command and control so all
these different tactics are not
necessary
used uh in every attack or by every
adversary and that is where the uh way
of recognizing or attributing who the
attacker is uh comes from because uh uh
every uh attacker has uh you know
different sets of tactics techniques uh
and procedures that they use uh
sometimes they may two attack two
adversary groups may have very similar
ones because they might have branched
out from the same uh sometimes they
actually another thing is the
adversaries very very Advanced
adversaries do is that they do false
flag operations so they would look like
it is coming from another group but
actually it is uh the group that is
already known in that case they actually
have changed their TTP very fast so so
even though in pyramid of pain we say
that the ttps are very difficult to
actually change but some very Advanced
attackers can actually very quickly also
change HTTP so in that case uh we have
to do uh further investigation to
realize that such false flag operation
has happened so these metrics you will
see a lot more so we'll uh uh we'll just
uh uh show you how you can know more
about this uh techniques and so tactics
are only like 12 + 2 that is not shown
here which is reconnaissance and and the
uh and the weaponization so they don't
call it weaponization they call it uh um
they call it uh you know uh I guess uh
preparation or something uh so so there
are basically 14 tactics here right so
14 tactics is not difficult to remember
the tactics names are good enough uh uh
in neonics for understanding what
roughly these tactics are for but each
tactic has this uh number of techniques
sub techniques and so on and actually uh
in order to uh uh Sometimes some
techniques may be used by two tactics
like some some techniques may actually
be apply to uh a like execution as well
as can can also apply to uh for example
persistence so so those are also there
but what you will see in the uh in all
this is that uh you have to drill down
to the techniques and procedures to
actually understand what the attacker
actually does and uh so here we are what
you are seeing here is basically from
the uh attack. miter.org
webbsite where you can go to this so
these are Enterprise uh Enterprise um
ttps uh in this there is
fishing uh as as as a category and then
there are sub uh subcategories or sub
techniques like Spar fishing attachment
Spar fishing link or Spar fishing via
service so this uh as I said that this
is a knowledge base so you have all
these uh different uh things you can
actually figure uh learn more about for
each of the techniques if you become a
Defender you know as a carer option then
you probably would have to know all
these techniques very well uh in order
to also recognize them as as you see
them now miter also has a very uh good
like a uh nomenclature and identi
identifier for each of these so each
tactic and technique and procedure they
have a number so so in this case this is
t566 is a uh is the number for uh
identifier for fishing and then sub
because of sub techniques you will see
0123 for different sub techniques so you
see these are all sub techniques of T1
1566 you can find also this information
like spear fishing Link in this case is
sub technique number two of
1566 it will tell you like what kind of
platforms it works on uh what kind of
data sources can be uh used to detect
this uh this there is also a CAPIC ID so
this is uh uh we'll we'll talk about
CAPIC uh later and this shows who are
the uh contributor of this particular
write up and and and uh nomenclature Etc
and so this is a version from 2020 there
is also a new version uh but the numbers
are have not changed in the new version
so it uh for this one at least it
doesn't
matter now here is a
procedure uh procedure is is basically
how a sub technique is actually done
right so so it's a it's a detailed
description of uh how the sub technique
is actually done and so here you see
that uh this is the uh this is part of
the reconnaissance tactic right the
spear fishing could be part of um
reconnaissance tactic it could be also
part of the initial access T
tactic uh and then here you see that uh
application logs or network traffic
these are the places where you may be
able to find uh that spear fishing link
is being sent and uh the in the
procedure examples so they say that okay
this is the procedure ID
G50 it has been observed this is an
example like other others might have
also used it but
ap32 has used malicious links to direct
users to web pages designed to harvest
credential so and there is a there is a
link to the ual story from which this
has been
curated so so it will show you the
procedure example so procedures are too
many so they have they don't have a
exhaustive list of procedures but they
have example procedures uh that uh and
and uh an example a description of who
might have which thread group might have
used that
procedure so you see that
here you have all this you know tactics
this is a this is basically a tactic
tactic is numbered by ta uh um some
number then you have the techniques and
then within techniques there are there
are sub techniques and then there are
procedures so these are these are some
of the procedures this is like a um you
don't see what is else is in the table
it basically has examples of how AP1 use
this procedure or what what this G 00007
procedure is like and where ap28 used it
but doesn't mean that only ap28 used it
it's just an example and then you can
find also uh information about so far
known AP groups so AP groups like I
discussed about AP 28 in the past so
it's a thread group uh that is from the
Gru and it has this attribution is
pretty certain so uh uh the and here are
some examples where they actually have
done attacks like Hillary Clinton's
campaign Democratic National Committee
uh you know
servers uh also uh and us actually uh
attributed uh and indicted five officers
of Gru for this
operations and so so the here you will
find in the in the same website when you
go to the groups um Tab and then you go
to a particular group you'll find all
these details you will see the group
group ID and you will see Associated
groups now remember I already uh
discussed that uh this AP nomenclature
comes from the fire eye or mandiant uh
they actually call this once they see a
lot of attacks then they based on the
similarity of the attacks they cluster
them then they say okay this attack here
and that this attack there looks like
from the same uh adversary and because I
see a common malware or I see a common
uh
C2 uh the command and control uh
infrastructure or I see the common uh um
you know geopolitical uh um geopolitical
reason why such a attack happened or I
see a common time when they actually do
are most active uh or I may see that
their command and control systems are um
you know located in such and such
location or I have seen in another
attack this same was used so they
basically clustered them when you
cluster them that doesn't give you the
attribution it only gives you an ability
to tell that this attack here that this
attack there and this attack there they
are all from the same adversary with
very high probability right as I said
that there could be false flag
operations and so on so you may go uh
wrong but uh when you get become a
threat intelligence expert and there are
few uh famous St intelligence experts
around the around the world especially
in the US they are very good at actually
looking at this and looking at various
attacks and and figuring out that there
from the same adversary so they
clustered them when they clustered them
after the cluster becomes good enough
big they actually start giving it a name
so a mandiant or fire ey has has a
tendency to give them give them names
with numbers so so say AP1 ap2 ap3 Etc
now when another threat intelligence
company they work uh they are also
looking at multiple different attacks
maybe some other attacks that these guys
didn't see and clustered them they might
call it something else because they
don't know in the meantime these guys
have made called it APD 28 so uh in this
case for example the uh fancy bear is
one of the common name for
ap28 or strong yum uh there are some
other names as well iron Twilight and so
on so uh so many times uh we we do not
necessarily say that fancy bear and APD
28 are this one and the only one and the
same but we say that they seem to share
common infrastructure
common malware or style of doing things
ttps are very common and so on so in
that case you may say well fancy bear is
a p28 more or less sure or maybe it's
slight branched out of APD 28 so we do
not no so they call it Associated groups
but when they call it Associated groups
it's probably likely that they are the
same or they're somehow related uh in
some uh some form so that and so you can
find this kind of information like which
are the other uh what are the other
names given to similar cluster by other
threat intelligence agencies also for uh
each of the uh techniques there are
mitigations that are described in the
dis knowledge base so it's being a base
it tend to be pretty comprehensive so it
will say okay so you must do audit to
ensure access to data and resources are
limited based upon necessity and
principle of least privilege uh and so
on so restrict web based content or uh
do the right uh software configuration
like email configurations um but this is
not your email configuration as much as
the uh the email uh uh email um uh that
the attars are using
spoofing uh their configuration also is
important here uh It also says how to
detect you know if that technique is
being applied so where the uh data
source would be where you should look
look into to get know that this
technique is being applied what would be
the component data component and what it
does it detect right so so this is the
mitigation and detection advice deves
are also in the same knowledge base
right okay so before we go into use
cases I want to uh summarize so attack.
miter.org is a is a treasure Trove of
information about how to recognize uh
adversary behaviors in terms of uh a
framework that is the ATN CK framework
so that when you uh analyze an
adversaries activity in your system very
clearly then you actually can see that
to achieve their final goal and you you
may not know their final goal if you
have if you have already stopped it in
the middle of achieving that goal uh but
in in some cases uh it has it usually
achieves the goal like in case of a
solar wind attack for example so in such
cases what you would see is that uh you
will uh with with with a with the
knowledge of attck tactics techniques
and procedures you will start seeing
that I can describe what they did over
let's say 10 days or 10 months whatever
into achieving that that they actually
went went on by achieving sub goals and
so those are the tactics then you'll see
how did the did achieve that sub goal so
you look at the techniques and that way
you can actually discover the ttps of of
this not only that this knowledge base
also gives you a very good uh um
curation of uh which uh uh adversary
groups use which kind of tech techniques
and procedures uh so that you can also
try to not only recognize what tactics
and procedures have been used but you
may also try to guess at least if not uh
you know finalize that which attack
group might be doing this and also uh
the same knowledge base also tells you
what are the mitigations and detection
process for each of the techniques so
that you can if you see that that
technique is not being detected in your
system your s so or Security operation
Center did not detect that some
technique is being used uh next time you
have to look at a different data source
probably uh continuously in real time so
that you can quickly and early detect
that a particular technique is being
used and mitigation tells you like how
to even avoid it right so one is to
mitigate that is you stop it or or you
can also uh see how it can be detected
um you know from the logs and and and
you know uh Network packets streams and
all these places how I can detect that
some technique is being applied so
that's this this knowledge base is about
now uh uh just to quickly go through the
various use cases of this framework
right
so what you see here is basically a a
script of uh uh or or query in Splunk
right Splunk is a is a tool that often
is used as a security incident security
and Incident Management uh tool so what
what this plunk is does is that it
collects logs it collects the network
traces it collects various uh you know
information that is sent by the endpoint
uh endpoint agents or uh network
monitoring agents it may collect the
firewall rules and so on firewall logs
Etc and then it tries to put them in a
database so that you can run queries on
this to do whatever you want to do like
you may want to visualize the the trend
of uh you know uh various things like
how often you get a uh get a uh
uh spam email or or or how often how
often you are getting scanned all this
kind of information you can visualize
but you may also can query this database
with the the specific query language to
know uh various things right now what
splank itself cannot tell you what
queries to make right so it is your idea
of threat intelligence that will make
you decide whether you know what where
you will make for example here there is
uh basically uh they're trying to detect
if there is a process which is writing
on the registry and who whose parent
process is a command uh like command
line right so and it is trying to then
get that information that the uh about
this child and parent process right so
this is a this is a query uh that can
give you information about whether uh
some process is writing onto the
registry right so so this is uh you may
want to know um it is a little more
complex than what I just described but
uh this is the uh uh query that will uh
that can be automatically fired so you
can write these queries uh and then
automatically fired uh so that every
time this uh uh query gets a hit it will
show you on the on the screen or may
generate alerts and so on but the uh the
idea here is that how do you know what
queries to make right so if you
understand the tactics and techniques
that the attackers use then in order to
detect those you can formulate your
queries to
see whether a particular uh technique is
being used and so on so knowing the uh
tactics and and remember the knowledge
base also tells you that for a
particular technique what are the data
sources that you should look at uh that
would give you that will indicate
that will have a some indication that
this particular technique is being used
or you can actually uh it also tells you
uh you know what is the detection uh
process so so using that you can create
this kind of a uh query uh so so data is
only as good as you make use of it right
so so uh if you do not know what to look
for in the this huge amount of data that
you collect on real time if from your uh
network from your endpoints and from
various logs that are being generated
then your that data is useless right so
to make use of the data understanding
ATN CK can actually help uh quite a bit
you can also do what is called a
comparison of two thread groups so this
is actually we'll come to that later
this is a tool called uh attc can
Navigator in this tool actually you can
uh say uh you can actually uh select the
various techniques that are particular
case used like so you you analyze you do
forensics afterwards and in after an
incident you then use uh this tool to
click and uh select which techniques you
saw in that particular attack then you
say then you see another attack and this
is the the the uh the blue one uh so you
can color the ones that you have
selected so you colored the first one
with red you color the second one with
blue and then anything that is common
for both we'll see you'll see the color
will be mix of the two colors so blue
and and red this became green now why is
it this why is why is this useful
because I I told you about clustering
right so I I see attack here I see
another attack there another attack
there I want to know if if there ttps
match right so if I captured the ttps in
this tool and colored them with
different colors and then put them
together uh then I will see like for
example this one here and this uh red
one here clearly are not the same ttps
right I mean only one place they match
right so therefore it's not like the
same thread group so so this is uh what
the use of this TTP is to know whether
at least TTP wise two particular attacks
are
similar or
same you can also do Gap analysis and
Engineering defense so like we discussed
in case of CKC like when an attack
actually happens then you want to uh use
the uh you want to know uh you know
which stages where uh the attacker was
able to compromise or or use and then
you see how you could have stopped those
uh stages to be successful so here is
the same thing for every
tactic uh you you don't want that tactic
to be uh uh successful in your
organizational Network right so that's
your goal and to do that you have to
basically exhaustively look at all the
techniques that is known that are known
for that particular tactic and you have
to check whether uh you have adequate
measures to stop all of them right now
when you do that you will see that oh
there are certain things for which I
have no check I I'm not doing any check
I'm not doing any blacklisting or or I
not doing any blocking or I'm not doing
any way to detect it then you have to go
back and do those things do uh the
mitigations do the detection techniques
Implement them and then re R discuss
this again there and then again look at
all the techniques and tactics and and
see whether uh your uh uh enhanced
defense actually can take care of all of
them once you have done that you have a
good uh posture right doesn't mean that
you won't get attacked because this list
is not necessarily all the techniques as
I said that this list of techniques that
they list here in the knowledge base is
a growing list right so if you if an
attacker finds a new way of doing things
that may not be stoppable with by having
the ability to stop all the techniques
that are here and also there are ways to
actually circumvent uh if it is the
adversary is too clever so therefore uh
it's not 100% guarantee that if you do
all this Gap analysis and do the redo
the defense mechanisms you will actually
get uh um you know fully secure because
there is nothing fully secure so but but
at least you you are doing your due
diligence and you are uh getting better
and then adversary emulation so this is
actually uh you know by by looking at
this uh uh this
um atck uh Navigator you can actually
point out that this is what the user did
uh this is what the uh how the the
persistence happened and this is how the
the uh they got the reconnaissance
information so you can actually uh uh
draw this on this metrix to actually uh
figure out what an adversary did and
then red teamers can actually use this
so see see the let's say I have a
organizational Network I want to know
whether I am safe against ap28
so what there is some method called uh
attack uh Bridge simulation so in attack
Bridge simulation you want to know that
with how what are the techniques and
tactics the adversary uses like in this
case ep28 and then actually make those
tries try to uh you know red teers
basically try to break your system red
teers are your people but they try to
break your system uh exactly following
the path that ap28 usually does if they
are successful then that means you are
not safe against ap28 if they are not
successful or partially successful then
you have to see where your defense
failed that is the blue team's job so
there is a red team blue team you know
Duality here red team is decide red team
is uh asked to emulate an attack and the
uh the blue team's job is to actually I
if not stop detect the attack if they if
they cannot even detect the attack while
the r is doing it then you know that
there is a problem with your detection
also see if not only you cannot prevent
you cannot even detect so that is
something that also this atck framework
allows you to uh you know kind of uh
frame the attack simulation for various
groups in the form of these techniques
right so so that gives you a good way of
otherwise you know if you tell the team
just try to break my system system right
so they will try our various things but
it's not it will not be very systematic
so but if you ask them to actually
emulate a particular adversary they will
go through this attch simulate okay so
uh I think I'm done for this lecture so
next time we'll go into looking at how
to use this uh atck metrics uh to
analyze uh past attacks and and come up
with the TT p s that were used so this
is very important because every uh
remember we discussed that uh that when
an incident happens uh either to you or
to another uh organization similar to
you then it is highly likely that same
attack will happen to you as well so
therefore you have to analyze either the
attack that happened to you or or your
um similar organization in and figure
out what ttps were used and then use
those ttps to do Gap analysis to see
whether you are ready to stop or at
least detect those things so we'll we'll
go into that in the next uh lecture
[Music]
[Music]
[Music]
