<s>
OSX.Keydnap	B-Application
is	O
a	O
MacOS	B-Application
X	I-Application
based	O
Trojan	O
horse	O
that	O
steals	O
passwords	O
from	O
the	O
iCloud	O
Keychain	O
of	O
the	O
infected	O
machine	O
.	O
</s>
<s>
It	O
uses	O
a	O
dropper	O
to	O
establish	O
a	O
permanent	O
backdoor	O
while	O
exploiting	O
MacOS	B-Application
vulnerabilities	O
and	O
security	O
features	O
like	O
Gatekeeper	B-Operating_System
,	O
iCloud	O
Keychain	O
and	O
the	O
file	O
naming	O
system	O
.	O
</s>
<s>
OSX.Keydnap	B-Application
is	O
initially	O
downloaded	O
as	O
a	O
Zip	B-General_Concept
archive	I-General_Concept
.	O
</s>
<s>
This	O
archive	O
contains	O
a	O
single	O
Mach-O	B-Operating_System
file	O
and	O
a	O
Resource	B-Operating_System
fork	I-Operating_System
containing	O
an	O
icon	O
for	O
the	O
executable	O
file	O
,	O
which	O
is	O
typically	O
a	O
JPEG	O
or	O
text	O
file	O
image	O
.	O
</s>
<s>
Additionally	O
,	O
the	O
dropper	O
takes	O
advantage	O
of	O
how	O
OS	O
X	O
handles	O
file	O
extensions	O
by	O
putting	O
a	O
space	O
behind	O
the	O
extension	O
of	O
the	O
file	O
name	O
for	O
example	O
–	O
as	O
“	O
keydnap.jpg	O
”	O
instead	O
of	O
“	O
keydnap.jpg	O
”	O
.	O
</s>
<s>
When	O
the	O
file	O
is	O
opened	O
,	O
the	O
Mach-O	B-Operating_System
executable	O
runs	O
by	O
default	O
in	O
the	O
Terminal	O
instead	O
of	O
an	O
image	O
viewer	O
like	O
the	O
user	O
would	O
expect	O
.	O
</s>
<s>
Keychaindump	O
reads	O
securityd	O
’s	O
memory	O
and	O
searches	O
for	O
the	O
decryption	O
key	O
for	O
the	O
user	O
’s	O
keychain	O
as	O
described	O
in	O
“	O
Keychain	O
Analysis	O
with	O
Mac	B-Application
OS	I-Application
X	O
Memory	O
Forensics	O
”	O
by	O
K	O
.	O
Lee	O
and	O
H	O
.	O
Koo	O
.	O
</s>
<s>
Mac	B-Application
OS	I-Application
uses	O
Gatekeeper	B-Operating_System
to	O
verify	O
if	O
an	O
application	O
is	O
signed	O
with	O
a	O
valid	O
Apple	O
Developer	O
ID	O
certificate	O
preventing	O
OSX.Keydnap	B-Application
from	O
running	O
.	O
</s>
<s>
Further	O
,	O
even	O
if	O
the	O
user	O
does	O
have	O
Gatekeeper	B-Operating_System
turned	O
off	O
,	O
they	O
will	O
see	O
a	O
warning	O
that	O
the	O
file	O
is	O
an	O
application	O
downloaded	O
from	O
the	O
Internet	O
giving	O
the	O
user	O
an	O
option	O
to	O
not	O
execute	O
the	O
application	O
.	O
</s>
<s>
However	O
,	O
by	O
packing	O
OSX.Keydnap	B-Application
with	O
a	O
legitimate	O
signing	O
key	O
as	O
in	O
the	O
case	O
of	O
the	O
compromised	O
Transmission	O
app	O
,	O
it	O
successfully	O
bypasses	O
Gatekeeper	B-Operating_System
protection	O
.	O
</s>
<s>
Activating	O
Gatekeeper	B-Operating_System
is	O
an	O
easy	O
way	O
to	O
prevent	O
accidental	O
installation	O
of	O
OSX.Keydnap	B-Application
.	O
</s>
<s>
If	O
the	O
user	O
's	O
Mac	O
has	O
Gatekeeper	B-Operating_System
activated	O
,	O
the	O
malicious	O
file	O
will	O
not	O
be	O
executed	O
and	O
a	O
warning	O
will	O
be	O
displayed	O
to	O
the	O
user	O
.	O
</s>
<s>
This	O
is	O
because	O
the	O
malicious	O
Mach-O	B-Operating_System
file	O
is	O
unsigned	O
,	O
which	O
automatically	O
triggers	O
a	O
warning	O
in	O
Gatekeeper	B-Operating_System
.	O
</s>
