Dear viewer, these subtitles were generated by a machine via the service YouTube and therefore are (very) buggy. If you are capable, please help us to create good quality subtitles: https://c3subtitles.de/talk/2703 Thanks!
[Music]
we have a fantastic story it uh comes
from and I'm using their Nick nicknames
oxer kushin and B you will pronounce
this later
H and they do it one at a time so uh
actually there operation is a fantastic
story and it's uh mainly mainly one of
the most sophisticated attacks chains
actually and spy were ever discovered by
kasperski so give an Applause
please uh so hello everyone my name is
Boris Len today I'm here with two of my
colleagues uh they very young and very
researchers they still study in the
university and the that's their first
time uh doing presentation for such
large crowd and uh today we going to
talk about the attack that was probably
the one of the most sophisticated that
we ever seen just imagine that you
discovered a zero click attack on
iPhones of your own colleagues and you
managed to capture all the stages of
this attack this is exactly what
happened with us
so we call these attacks operation
triangulation it were attacks on iOS
devices it were targeted attacks and
they were discovered by kasperski at
kasperski and against kasperski and
today so we're going to tell you the
story of this sophisticated attack we're
going to tell you how we managed to
capture all the stages of this attack
and also we will give you a review of
the whole attack chain we will give you
details of the remote code EX ution
vulnerability a PK bypass a crazy kernel
vulnerability and just insane Hardware
vulnerability and we also will give you
a review of the actual spyware that was
used in this attack and without further
Ado I give a word to lenit who will tell
you how we found
it thank you Boris so the question that
you might um want to ask how we manag to
retrieve and analyze all chain links of
this attack and the answer is while
attackers behind operation triangulation
were were quite experienced they made
numerous mistakes and we in turn did our
best to Ben benefit from their mistakes
thus fully analyze this uh malicious
campaign uh the story of This research
starts with suspicious activity we
detected in our Network we have a
corporate Wi-Fi network dedicated for
mobile devices and one day while
monitoring it traffic with our CM
solution we found suspicious activity uh
incoming from several iOS based devices
and uh at the time we had only bunch of
suspicious totally not suspicious
domains uh with um some interesting
facts we tized about them uh the first
one they are similar in name style so
two words andc they always were used in
s so uh as a turn out the first one used
during the exploitation process uh it
usually was a backup rabbit.com and the
second one was used for comment and
control server also we observed High
outbound traffic to these domains and
finally the set of domains were
registered with name chip and protected
with Cloud fair by observing the traffic
um incoming from uh infected devices we
were able find a pattern that would help
alert us about new
infections uh first device connected
with iCloud server downloading iMessage
attachment then it performed few
requests to the first level exploitation
framework server as I already said it
was backup rabbit.com in most cases and
then it went off making regular
connections with a second level uh
comment and control
server uh after we assumed that our
employees devices had been hacked we had
to get more information about the attack
in addition to malicious network
activity uh to do that we uh decided to
just running around the office and
collected and collect these devices for
forensic procedures and of course at the
time we couldn't know what functions uh
uh in this malare uh implements in this
malware so we had to carefully inform
device owners about the infection and
then make a backup of this device for
further
analysis um when we checking this uh
when we was checking these backups we
identified that while attackers um
during the exploitation did clean some
artifacts and tracers uh and traces but
they failed to remove all of them and uh
that's uh uh as result we uh were able
to shed a light on what was happening
during uh
infection uh in this campaign the
attackers were really cared about steals
they uh uh Delete deleted all
attachments with exploits but what the
fair was that they forgot to delete the
folder where this IMS attachment was
stored and by checking clogs created
with mobile verification toolkit we can
see SMS attachment folder is modified
but uh contains no file
files uh apart from deleting iMessage
attachment they removed a lot of
evidence from different data bases for
example SMS DB and others but again they
forgot about one of the most important
database for iOS forensics is a data
usage this database contains uh a lot of
information about tracking applications
and also um network uh Pro Network usage
upon examination this database we
identified one strange process called
backup agent and it was making network
connections uh at the same time we
discovered accessing to suspicious
domain in our Network um backup agent is
a legitimate binary uh present in iOS
but it's deprecated since iOS 4 so uh
thus uh it shouldn't be uh making any
network connection uh for this process
and it was the first our solid indicator
of compromise in operation triangulation
it is data usage by process backup
agent uh at this step of Investigation
we could determine that uh the specific
device uh if the specific device is
infected or not but we were not able to
um retrieve any payloads and we decided
decided to set a trap uh to perform a
man in the- Middle attack and they
didn't detect
it to do that we uh prepared a server
with wire guard and meum proxy uh
installed uh root certificates on the
targeted devices and just roted all
traffic to the server as a result we uh
got opportunity to decrypt and read all
the traffic and for Effective realtime
monitoring we also developed a telegram
bot notified us about new infections but
what was the most important thing that
with metum proxy we uh were able to uh
modify all packets on the F this
actually gave us unlimited
power uh first without any patching we
got our first payload it was an HTML
page with ausc JavaScript code this code
performs various checks and also it
performs uh canvas fingerprinting uh it
renders yellow triangle and then
calculates its hash value by the way
it's that's why we called this attack
operation
triangulation but then we had to crack
uh various layers of asymmetric
cryptography uh in order to retrieve
each next stage the idea was to patch
the stage on the fly to move uh logic
from it to our mum proxy addon and we
did it with uh simply um Regular
expressions and we did it one by one
stage by stage decrypting uh next
stages and uh finally we implemented a m
mum proxy Adon uh that was 400 lines
long and uh it helped us to uh retrieve
and equpped a lot
of fantastic stuff including validators
exploits uh spyware implant and also
additional modules and finally you can
congratulate us we get them
all uh and uh my my colleagues Boris and
gorgi will tell you more about what we
exactly managed to
get so this attack check check
this attack it started with a malicious
attachment this attachment it was a PDF
file but the real exploit was inside it
was a p it was a true type font exploit
so probably most of you heard about true
type it's the most common format for
font in the world it was developed by
Apple in 1991 Apple shared the quote to
Microsoft it was included into Windows
3.1 and after that Windows had a lot of
vulnerabilities related to True type so
I think it's possible to say thanks to
Apple
and this exploit It Was Written in
through type Assembly Language so I read
the documentation started to develop ID
pro model so I can reverse engineer it
with Quite Comfort and I also noted that
there were a lot of details missing from
the documentation and I've decided to
check the actual code on Theos side that
processes these true type
fonts and almost instantly I found
something strange in um on a your site
there was one undocumented instruction
that was not mentioned anywh anywhere I
tried to look different documentations
on Apple and Microsoft websites tried to
Google it on GitHub and everything
nothing and like the only place where I
was able to find one mentioning of it
was the action anci through S of Windows
and it's the only mention so it says
that it's an Apple only not supported
instruction and it's a quote from the
early '90s
so we have one undocumented Apple only
instruction can you get where there C
vulnerability
is so this instruction has such code
that does some adjustments in two
directions and you can see that this
quot it's almost the same it's possible
to assume that the developer just uh
brought one block of cod and then just
copy pasted it but so the only
difference uh in these two blocks but by
doing so developer made a mistake
because here it should be N Point minus
one otherwise it points outside of the
working points buffer and there is
another buffer that contains offsets to
other arrays and if one of these assets
gets corrupted attackers able to corrupt
more things in the memory and this way
get code
execution and um the code of this type V
par is from the '90s and it's exploited
like most of theability from the '90s
web abilities with The Interpreter and
everything so I will not be going into
detail about its exploitation but what
is interesting and what I want to
discuss is the way how Apple fixed this
the line of the fix because this
instruction it was there since the early
'90s and then it was silently removed in
the January
2023 and we know that by that time
attackers already been exploiting this
reability I don't know what actually
happened there I believe that suddenly
Apple started to receive a large number
of Crash locks and they suspected that
something bad is happening because most
like this instruction was not used since
the '90s
and um they decided to remove it it's
good that they fixed this but it's bad
they didn't warn anyone about
exploitation and to exploit new iPhones
attackers need additional vulnerability
a point ratification called bypass so on
on new iPhones uh there is there's
special instructions that used to sign
in check pointers and um how it looks
there is a virtual is located in the
lowest part of the pointer and the High
bits of the pointer have a cryptographic
signature and attackers need to sign
their pointers with a pack easy
instruction which is basically like sign
with default mode and attackers use use
these weaknesses to bypass this so
firstly there is too many different
pointers signed by this default mode and
also these pointers could be easily
discovered in memory so first you pass
DD cash you get the address lowest part
of the address or function that you want
to execute and then try to find it in
memory and see if there is something in
the Apper builds if there is some data
and the lower parts of the address much
then you found what you were looking for
so here's the vulnerability and how it
was exploited so first they find the
assigned poter for function dlcm which
can be used to get sign pointers for any
other function by its name they get the
sign pointer for protect function they
built a fake majua with one expert and
this expert points to the usually not
exported function sign pointer of the LD
library and then they built a loader
object for this macher and injected into
list of loaded images and with that they
able to call thecam for this fake maer
and get the sign poter for sign pointer
function and sign any pointer with any K
in modifier and completely bypass p
and attackers use this to execute a
rchain and a number of Expressions so on
in Objective C there is special query
language that called NS expressions and
NS predicates and they basically look
like this and it's possible to do
whatever you want with this language um
I believe it's possible to write a
script that will convert your objective
type c code into this format so you can
call any functions you do can do type
conversion and everything and most
likely it's also possible to do this
conversion fully
automatically and attackers execute
binary property list which is basically
used as container for more expressions
and all these expressions are used to
execute an next stage a cural exploit
written in
JavaScript so on iOS apps can run
JavaScript but without just in time
compilation and exploit makes the most
of it to get the maximum uh of
capabilities attackers modify the memory
of JavaScript code Library they make it
to have a very large amount of memory
they disable the garbage collection and
finally they enable special debugging
feature that is called dollar VM with
this debugging feature it it provides
special functions that can be used from
the inside of the script and these
functions can be used to get the
addresses of of the objects and also get
read and write
primitive and this JavaScript exploit is
the most complex exploit that I've ever
seen in my life especially if we talking
about JavaScript JavaScript exploits it
was ausc to make it unreadable and to
minimize its size but still it had
11,000 lines of quote at just simply
reformatting
it and in this exploit attackers are
able to execute any API API functions
directly from the JavaScript uh it's a
technique that also popular among
PlayStation 4 PlayStation V exploits
because there there is also no just in
time compilation exactly like in this
case and to get this capability
attackers build a fake just SCB object
and use it together with a chine of
gadgets that allows them to execute any
functions with any number of
arguments and right now I want to talk
about kernal vulnerability it's
extremely simple and Powerful one it
relies on multiple integer flows in the
EXN memory mapping
Su and it for exploitation it doesn't
require any memory
corruption so it's extremely easy to
exploit and it's extremely reliable so
we have such C call it's called mat make
memory entry it's used to create a
memory entry without mapping it so you
can provide some specific offset and
size and it creates memory entry for it
so it's a Memory mapping CS a critical
component of the operation
system that's why it's available in many
uh different box prct access and this is
called it has this check for offset and
size so offset and size here are input
parameters what means that it could be
easily
bypassed and uh it allows attackers to
create we entry is of enormous size that
is much larger than the size of original
object and it basically covers all the
other space that available here on
device and then we have a V map CIS
which is used to map uh some specific
origional of memory and this is called
Head this check which will be also
bypassed for such entry with such large
size so this uh gives attackers to
ability to map the memory outside of the
parent memory object and if it's if we
combine this uh vulnerability with
special parent memory object it gives a
capability to map all the physical space
of the device so here's a physical
memory map of the iPhone we have some
region with memory mapped input output
registers there is also Dam video RAM
volatile storage and so on just example
and in the ram we have a special memory
mapped object there it's called Purple
Graphics M which is basically a frame
buffer and it could be used together V
this ability it can be used can be map
to user level so with this attackers get
the ability to map read and write all
the physical memory of the device from
an two user
level and the whole exploitation after
it it's just the region of the memory so
reading in Person of the memory so
attackers create a malicious M entry for
for the purple Graphics M then they get
its base because it may vary between
different devices in VAR versions and
they need it so they can trans the real
physical addresses to primitive
addresses and use it then they find
something that is called iBot hand off
it's some special object that is located
in the memory after I boot and it has a
memory map and attackers get a DRM base
from it they also able to get the
physical addresses of the kernel and its
size from special registers it's
possible to do not only for new iPhones
but also for older ones so find the C
data structures for each CPU in the RAM
and also find the page array and after
that they spam a number of threats and
get the kernel address of one of them
from the T active thread field for T
data structure and they after that able
to convert kernal address of the thread
to its physical address and because they
have this physical mapping primitive
they able to manipulate it and get the
kernel read via thread get State and
what about kernel right attackers for
each iOS version they use different
techniques but it's also all about
parsing the
memory and I think that the first V
ability was nice the Cal vulnerability
was crazy but this one is just
insane so you see in my opinion the life
of an iOS attacker is quite miserable
because you need to have a remote code
execution you need you need a p bypass
you need aural vulnerability and on
other platforms on that moment it will
be already game over you can do whatever
you want with the system but here you
need to fight a Final Bosses uh Hardware
based memory protections so it's either
PPL that protects critical regions of
the kernel memory it also prevents
attackers from injecting malicious quot
into user level processes KR which
protects the executable kernel code and
P kernel P so but what if I tell you
that attackers actually are able to
bypass all these very phisticated
Advanced C based memory
protections and it makes life of
attackers very happy and all this is
done with another hardw feature that is
present in the T of Apple
devices so there is exist hard feature
in new Apple devices in the system on
chips chips and it allows to bypass the
hardware based kernel memory protection
completely by pass it and for it to work
you just need to write the destination
address write the data and write the
hash of the data to Unown memory mapped
Hardware registers that are not used by
fimware so apple cstem on chip it's not
just a CPU but also a lot of different
periperal devices that are put together
into one chip they just only a small
number of them and Z works with them
with special memory mapped Hardware
registers so basically it's registers of
these Hardware devices that are located
specific addresses in
memory and these addresses they have
stored in special device 3 file here
provide an example how it looks like in
this
uh in this
file so exploit uses six unknown
registers that are I was not able to
find anywhere I check different device
trees for different devices for
different firmwares and found nothing I
checked ex quotes the kernel images
kernel extensions I boot FW co-process
FW in search for any direct reference to
these addresses and also found nothing
finally I was able to find that Apple M1
and apple M2 chips also have this
Hardware feature and uh it mapped
exactly to these addresses so I I I I
tried and um it's there and I used many
uh special tools that can be used to
like Trace all the accesses to specific
regions of memory and it also didn't
report any
usage so like how attackers are able to
use some unknown never before
mentioned anywhere hard registers that
just unused by
F and what perial devices are used for
exploitation so I got idea to check
what are regions of memory map registers
located close to these unused ones and
quite soon I found match uh we have a
gpus processor and it has two regions of
memory ma registers and located quite
close to this that used by attackers so
it looks quite like this we have two
known registers of Jer regions of for
memory M registers of jooker processor
and then one region that is used by
exploit located between them and another
block also located close to the first
know region of GP processor so it's
quite likely that all this unknown
functionality abute by attackers is
related to the gpus
processor and I actually was able to
prove it after
that so let's take a look on how these
registers are used by by exploit so this
one it's kind of different from all the
others you can see that it's located in
a SE Block it's torched only during
initilization and finalization stage of
exploit and uh based on my experience I
knew that it either enables or disables
this feature used by exploit or just
used for controlling the interrupts and
I decided to move with this second the
and quite soon I was able to recognize
this
quote so on the right you can see the
quote that works with the corite debu
registers of the M CPU M CPU has
multiple Cor
and um the addresses for these Hardware
registers are actually present in the
device three for this and um uh so what
is coreside it's special uh hard block
that was developed by arm and it's also
present in apple processors processors
it has one special block that is called
UT in exos squads Apple says that it's
their own propriatary stuff but it's put
into course side block just for
convenience
and this way I was able to recognize
that um the code on the left actually
works with the coreside registers for
gpus processor so this way I solved like
half of the
mystery but up to this day I still don't
know what exactly located in this second
block that is used
Bylo so uh we know this one register is
used to hold and run the gpus processor
what about the others these two are used
for enabling and disabling this
feature then this one is used only for
Apple a15 a16 devices and it set to
one and uh these two are the most
interesting ones this one is used for
setting the flags and the lower half of
destination
address and this one is used for setting
the data and also the hash of the data
that is put together with upper builds
of destination address and also so
something that looks like a
command and this is how it all looks
together you can see that the data needs
to be WR in the Align blocks of 64 bytes
and um all these data should be written
sequentially to this uh register and
also you need to write the hash and
upper build of the address also to this
address so what can be done with that
it's possible to PCH the page table
entries and modify the code in in inject
malicious quote to the user
level it's possible to P protected data
in PL PL data segment so it's basically
these two first it's what is protected
by PL data Hardware
mitigation and it's even possible to PCH
an executable code of the kernel so
basically it bypasses all Hardware based
kernel memory
protections but it's not possible to use
this feature unless you know how to
calculate a secret hash and it's not a
CRC so if I not tell you this hash you
will not be able to refy any from what I
just said to
you so here it
is you can see that it's custom hash it
uses a predefined sbox
table and it's quite simple one it
occupies just 10 bits it Cate device
so in total it 20 bits but still if you
don't know this algorithm you will not
be able to use this feature and also if
you don't know how to write at in what
order what values to some specific unn
memory addresses you also will be not
able to use this feature so it's
protected like in B description for how
it protected it's security through
obscurity like as long as no one knows
about it you're safe to have it in your
TPU
So currently we don't know how attackers
found out about this feature what its
original purpose and was it developed or
by Apple or it's some sort party company
like arms corite maybe Apple didn't even
know that such thing exists in their
processor and actually this reability
also is very similar to the one that
I've discussed during previous CCC in
2019 so back then I gave a presentation
about hacking Sony PlayStation Blu-ray
drives using memory mapped DM registers
so back then I was able to get a code
execution because um Sony was using the
these registers for all accesses for for
Dram and they were doing it in all thees
but then they stopped to do that and
because they just started to access the
dam directly by their absolute addresses
because theam was fully mapped into T
address space but I knew how to use this
functionality
I saw it in ear VAR so I just took
advantage of it because nobody was also
using it in by the
SP and um the question could have
something like this happen in this case
to be honest I don't know maybe uh there
was some mistake maybe Apple made some
exos S release and accident accidentally
published something about that and then
they removed all information about it
maybe something like that happened but I
don't know and that's where I need the
help from other iOS security
researchers so together we can probably
solve this
mystery and I was really looking forward
to learn how Apple fixed this runability
so I found how they mitigated this so
they have a
special table that um located in the
device tree and it actually contains the
regions of the memory that are prevented
from from the mapping and they have such
format you can see there is starting
address the size of this protected
region flex and also tag name which
explains like what kind of the memories
exist there and all the entries that
exist in this table they quite
descriptive so you can see the what gets
protected epci then there is also device
address resolution table that could be
Al also used for bypassing these
protections device address filter CST
memory management unit and so
on so to fix this V ability to mitigate
it because it still will be present in
the processors for forever because Apple
removes it from New revisions Apple
added two new entries and they look like
this so Z Tag names not really
descriptive and it's actually quite
different from all the other stuff that
is located
there so quite crazy attack chain and
with that attackers can do whatever they
want with this system like spawn
processes inject malware patch anything
in the memory and so on but attackers
do something
different so they spawn two processes
imagined in Safari they inject the P
there the p in in imagined just wipes
the artifacts and P that is injected to
Safari does one simple thing it just
makes Safari to go to the provided web
link and that's where comes uh Data Page
it's like what Leo showed you in the
beginning what we found in the first
place it verifies the victim gets its
fingerprint and it's if it's the right
victim it provides it another stage
which is a safari exploit and it was
also zero
day after that it executes a sh code and
another K exploit that completely
different from the first one only some
parts of it are the same
but most of it got different it all was
massive in size it had a lot of
functionality some of its functionality
was even not used because uh attackers
forgot to strip unused functions but
yeah it was totally different and after
that attackers will dat the victim once
again to make sure that it's the exact
victim they want to infect and only
after all of that they provide the
actual malware so all these extra
sophistication was completely
unnecessary but attackers did it to make
sure that nobody ever knows what kind of
malware comes at the last stage so all
of this just to protect this malw so
nobody will ever find out what comes at
the last inch and now my colleague yorgi
will tell you all about
[Music]
it so the malware which was deployed by
this scel exploit is truly fascinating
and for instance let's take a look at
this well data component right
here if you start reverse engineering it
you will immediately find out that it
runs several actions and curiously the
developers left the names of those
actions in the code and thanks to that
it is very simple to figure out what
they do if you look at this list right
here you will immediately recognize that
this vile data removes various logs and
artifacts as get as well as retrieves
several information like a list of
network interfaces and installed
applications so as for log Del the Val
data removes crash locks from specific
processes these processes can produce
crash loocks over the course of
exploitation and those processes belong
to components such as iMessage the web
browser and the mware itself this is
done in order to make sure that no
forensic researcher can obtain those
crash loocks and guess how the exploit
Works apart from removing crash locks
they also clean up traces of the
malicious iMessage that was used to send
the H exploit chain and uh to do that
they get a list of all received
iMessages
and for every iMessage they get the
Apple ID of its sender then they take an
md5 hash of this Apple ID and they check
it against a list of 40 md5 hashes if
there is a match this means that message
has been sent by the attacker and thus
should be removed and they do it in
order to make it impossible to obtain
the exploit attachment through backup
analysis
now from an attacker perspective it was
not very smart to include those 40
hashes into the validators code because
provided you have enough time you can
crack those hashes and thus get a list
of Apple IDs that are used by the
attackers that's exactly what we did we
managed to recover a vast majority of
those email addresses and we ended up
thus doxing the attackers
of course we reported those emails to
Apple so that they can investigate the
activity in these
accounts now after performing LW
cleaning the Val data starts collecting
information about the infected device it
checks whether the device is jailbroken
its code is able to D detect all the
popular jailbreaks like Pango uncover
check rain and many others and in
addition to that it's also able to
detect software which is commonly
installed on jailbroken devices like
cyia or
Freda and by the way during the
infection process it also checks whether
the exploits are Rong on celum so in
case you didn't know celium is a
platform that allows you to run iPhones
in the cloud it's commonly used for
security research
so if it gets discovered that the
exploits are launched inside cilum then
they will not work and plus the Strat
actor will get notified about
that and if you have been looking at the
slides attentively you may have noticed
that apart from checking whether the
device is
jailbroken well there is also another
action which is unused in the code and
it's called PSP detect so since it's
unused we need to find out what this
name PSP detect means now whenever we
think of the acronym PSP what perhaps
first comes to mind is PlayStation
Portable a gaming console which has been
popular over the last decade but why
would we need to check for a PSP on iOS
whether attack is checking whether a
victim is a video game
lover however if we look at the term PSP
in the context of cyber security well
it's used to designate personal security
product which is a fancy way of saying
antivirus however there are no antivirus
Solutions on iOS still there are
security products that work on Macos and
thus this action which is not used on
iOS can be used to detect Security
Solutions installed on maos and so
operation triangulation May also Target
Mac OS computers this makes sense
because iOS and Mac OS share the same
exal Kel and if you have an exploit
which runs on iOS it's not very
difficult to adapt it to work on
Mac now after all those checks the jail
the Val dator also collects a myriad of
information about the infected device
such as the user's name the Apple ID the
serial number and a lot of other things
all this information gets sent to the C2
server and it is used to assess whether
the victim the infected victim is the
correct one and if all the checks are
complete if the victim is indeed
intended then attackers deploy the final
payload a sophisticated AP platform
called Tri angle
DB and when we looked at the code of
this platform we found out that it can
be run on versions of iOS that are more
than 10 years old and this number should
give you an idea of how long this code
has been in
use and this platform it is of course
used for cyber Espanish it collects data
through plugins that it downloads from
the C2 server and it is designed to
steal almost every piece of information
from your phone it can access the
microphone and the camera the password
storting the keychain and the address
book the files you have on the system as
well as geolocation data apart from that
it requests permissions from the
operating system to access a list of
devices which are located in proximity
to the infected phone and we also
observe triangle DB to steal data from
Messengers such as WhatsApp Telegram and
iMessage the code of those plugins
themselves is also very interesting take
for instance the plugin that records the
microphone it writes output data in a
custom format that uses both the encoded
audio as well as it includes information
about events that occurred during the
recording process and this module this
plug-in it records all Audio Only When
the victim screen is off and this makes
it very difficult to detect it with a
naked eye in addition to this it sets a
trap for forensic researches in case it
discovers that somebody is reading event
logs from the system then it shuts down
and inform attackers that the cover
might have been
blown and I hope that by telling you all
this information well that you I've
manag to convince you that attackers
collect a lot of information from
infected phones but here's a question
what say collect this information how do
they analyze it they must be dealing
with gigabytes if not terabytes of data
for example when we travel at events
such as the CCC we take a lot of photos
like hundreds of photos a day so for
example in the case of photos how do the
attackers find out which photos are
useful for them and which are not and
the answer to this question is actually
machine learning so we stumbled on a
plugin that extracts metadata from saved
photos using Apple's neural network
engine so let me show you how this works
so whenever you save a picture in the
gallery Apple's machine learning module
starts analyzing it for example for this
photo that you see right here well the
this engine managed to find out that it
contains coconuts Beach water and straws
in addition to this this engine can
perform optical character recognition it
can detect text on photos for example in
this picture it managed to detect a
Small World Beach which is engraved on
the
Coconuts so in addition to that it's
also able to detect animals in pictures
as well as recognize if there are
documents stored in the gallery and what
the attackers do they take all those
tags and they send them to the C2 server
for further analysis and in my opinion
this is very impressive because it's
actually the first time we see threat
actors use machine learning to analyze
Exel
[Applause]
[Music]
data so what we have to say for the end
uh please collect and also check the
logs Network logs at home it's really
easy to do actually if you just Google
how to do that and you should do that at
home and all you of course you also
should do that at work and um the
security through OB security doesn't
work like because everything secret at
the end becomes known and if you man if
you develop such Advanced uh Hardware
based memory protections that make
exploitation really hard of course you
shouldn't have the easy ways to BU
completely bypass them and also uh we
expect like how the adaption grows for
the machine learning Technologies and AI
Technologies like when all our all of
our devices will be supporting these
Technologies the malware also will take
a US usage for of these Technologies and
with that they will get an really easy
way to get all information about you
with the help of machine learning they
will just have to ask like what the
machine learning on your device knows
about you and of course we should
prepare for that and uh come up with
solutions for that so thank you
[Applause]
everyone
yes yes here I am thank you hey guys so
this is uh what you get when you attack
iPhones from researchers thank you Boris
laen your microphone I have a couple of
questions sorry for the microphone where
is
it oh it's not working yeah now it's
working okay C this is what happens when
you hack these iPhones from these
researchers we have a couple of
questions couple of time left couple of
minutes I go to number two is that okay
yes please for the thank you for the
great talk so what do you recommend for
private owners of Apple devices how to
check quickly if one is victim of such
an attack ah yeah uh so we developed a
special utility that anyone can check
the device for indicators compromise so
actually actually we were not the only
target for this attack we know about all
about a couple of victims all around the
world and also here in Europe so please
go to secure list we have a special tool
it's called triangle check just download
it get your backup and use this python
script to check your backup yes uh it's
open sourced and you can just make a
backup yourself check the Pyon code run
it and check the
device thank you very much
good uh signal Angel
yes yes so the um the internet is like
burning for your talk huge huge thanks
um one question here is of course about
the attribution so what are your
theories about this and what can you
share um uh we never speculate about
attribution if we don't have very strong
evidences unfortunately in this case we
don't have such evidences so we do not
do any speculation like it's our motto
we never do any speculation we when we
don't know for
sure number one next
question uh thank you very much for the
amazing talk CU it was also really
interesting to observe how you do it and
you shared it and this is really nice
thanks a lot and I have a short question
which is kind of related to the first
one but for a user who let's say cannot
run scripts so doesn't know like about
programing I mean are there any ways
that they can just visually detect that
their phone is behaving strange from
your experience uh and kind of know that
something is wrong like if someone one
is not technical for example I think um
thank you for the question I think all
evidence is hidden so
the how to say the only one option to do
a backup and try to find the indicators
we already talk about it we so visibly
it's not yeah um so with iOS devices
unfortunately because it's closed system
there is no easy way to find out if your
device was compromised with a very
sophisticated attacker if you use it
your device it doesn't show any signs
that it's compromised so malware just
runs here in the background and it feels
very good so the only way to find such
sophisticated attack is just use either
Network locks or get back up and try to
see maybe something looks
suspicious okay we have a question here
at number two uh I have a question
regarding the mitigation of the magic mm
registers so is that enforced by
Hardware or by PPL microl for example if
you have a PPL bypass and can map
arbitrary physical memory can you still
write to these registers and then patch
the
kernel so the idea what Apple did is
that they have special code in the
kernel so it's like pmap I I believe
it's pmap function so basically it just
checks if it's allowed to map something
from these lockly regions so the M idea
is that uh it attackers should not use
something in these regions to bypass PPL
but if attackers already have PPL
probably they can take a usage of it and
use it for KTR bypass maybe I believe
the that's some areas that deserves more
closer inspection thank you okay number
one uh first of all very great talk uh I
wanted to ask uh if this is still
applicable on A7 or not like is it
patched uh all vulnerabilities that we
talked about today were patched in um uh
the lastability was patched in iOS 16.6
so we waited a half of year to make sure
that all the devices like are safe so
half years for everyone to update so if
everyone updated you totally safe from
all what we talked about today but if
you for example want to jailbreak your
phone something I believe as researchers
will be able to use something from this
to create jailbreaks no I was
specifically uh asking about the um the
mm registers if they are completely gone
or not they complet no this mitigation
was least in iOS 16.6 it was before iOS
17 okay okay number
two uh thanks for thanks for the
presentation how long did it take you
for the entire research from detecting
the moments you've seen it to the moment
that you've contacted Apple about
everything so how long I think it was a
half a year and more than half a year
yeah half a year okay thank you uh
number four there in the back sorry that
I missed you thank you for the great
talk I have a quick question your API
showed that there was a possibility to
turn on at tracking again did you find
any um suspicious traffic for Ed
tracking that the iPhone did so about ad
tracking we are not sure why they do it
well we have some weird theories like
maybe they will deliver uh some other
exploits through this at tracking stuff
but uh there are no evidence of it and
we do not know why they would need this
information why would they need to
enable that tracking that's a mystery I
actually think that's like why they have
like these uh two chains that actually
looks like two different things that put
together is that like their system is
actually like it's mostly focused on
infection of victims through web
exploits but they at some point needed
this zero click capability so it was
easy to them to just put two these two
systems together then to spend spend
time on developing or making a little
adjustment to it so I believe that like
the Mind focus is to infect the devices
through web maybe with the help of this
tracking thank you okay there is some
question from out the world yes signal
yes um you hinted at that you saw kind
of like the the way forwards to um me
exploits here so have you have seen any
evidence about this well about Mac
exploits apart from this PSP stuff there
are like more signs that it's uh uh also
available on Mac OS like in the back
door there is a string like populate
config with strings Mac only so there
are a lot of strings that hint at the
presence of Macos but we haven't seen an
exploit on Macos well but there are a
lot of EV there is a lot of evidence in
code which suggest toward it yeah I also
add that in the code of exploits I also
have I I saw some things that point to
that um they have some separate build
for M exploits so like the same Vil is
all of that but
for good follow up um how how much um
distance would you need to kind of like
bridge between the iOS and the Mac OS
exploit a theoretical one uh if we are
talking about um um apple apple silicon
based uh m
devices um basically exploitation is the
same like but um I iPhones are more
secure because uh PPL this Hardware
based memory protection are not
implemented for Mar
devices de design it's possible to
inject malicious Cod to other
processors we have a little bit more
time left number two uh first of all
great talk uh I wanted to ask how does
uh exploit can be used
persistent so is it maybe possible to
install this exploit persistently so
even if you reset your iPhone restore
backup it's still persisting yes yes a
good question yes um because of the iOS
system uh there is no way to persist on
the system and this exploits also uh did
uh didn't use stuff so after the
rebooting the uh attackers um need to um
again infect the device okay thank you
uh number
one hi thanks for the talk um my
question is uh a recent iOS versions
introduced a security feature which is
lockdown mode uh so I was wondering if
uh any parts of the xlo chain are
mitigated by lockdown mode and if so
which which
ones actually there something that I'm
not sure about because uh
I it's something that worth a deeper
look I know that
lockdown block some specific like
functions but I believe that like these
calls because they like core system Su
calls used by all the processes and
everything it's possible to execute them
from the um web container from s saari
and so on I believe most likely lockdown
doesn't block this kind of attack but in
case we are talking about uh malicious
attachment it might be help with
blocking the download but yeah that's
something didn't check for sure yeah we
didn't check something to
instigate thank you I take one last
question from number two here yes sorry
hi guys thank you for the talk so I just
want to ask is there any other trigger
for the uninstall for the AP beside the
event log reading be your question oh
well you can get it uninstalled in many
ways like you can uh you can like run
the expo from another phone and uh the
attackers will suspect something and
they will unall it then you can run it
from a jail prank phone which is also
suspicious like you do a suspicious
thing and you immediately can uh get no
infection at all that's what happens
with APS I mean more particular ones
beside the classical environment scan
yeah without uh uh uh the trigger which
we
only have seen it was uh stopping during
the system walks event walks recordings
I think yeah
yeah thanks okay this is what happens
when you hack these iPhones from these
gentlemen um thank you uh Bor Leon bisko
Boris Len and Gori kin for this
fantastic
[Applause]
[Music]
story
[Music]
la