SlideShare a Scribd company logo
1 of 54
Download to read offline
Windows systems & code signing
protection
Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA
Windows systems & code signing protection | About me
2
 Paul Rascagnères
 Member of the CERT SEKOIA
 Malware analysis
 Incident Response
 Security researcher
 Yo-yo player
 Offices in Luxembourg & Paris
 Located in Luxembourg
Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA
Windows systems & code signing protection | About me
3
 Due to questions yesterday:
Geography slide about Luxembourg
Area: 998 sq mi - 2,586 km2
Population: 576,249
Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA
Authenticode
4
Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA
Windows systems & code signing protection | Authenticode
5
 The code signing mechanism provided by
Microsoft is named Authenticode
 Based on certificate
 Support expiration date and Microsoft
manages a revocation list (for example if a
certificate is compromised)
Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA
Windows systems & code signing protection | Authenticode
6
 For the kernel mode, the driver signature is
mandatory since Windows 7 – 64 bits
 For the user mode, the binary signature is not
mandatory. “As a software publisher, there are
two reasons to sign your code: to prove its
Integrity and to develop its Reputation”1
.
1. https://blogs.msdn.microsoft.com/ieinternals/2011/03/22/everything-you-need-to-know-about-authenticode-code-signing/
Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA
Windows systems & code signing protection | Authenticode
7
Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA
Kernel space implications
8
Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA
Windows systems & code signing protection | Kernel
9
 For the kernel mode, the driver signature is
mandatory since Windows 7 – 64 bits
 Is it the end of rootkit?
Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA
Windows systems & code signing protection | Kernel
10
 For the kernel space, the driver signature is
mandatory since Windows 7 – 64 bits
 Is it the end of rootkit?
Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA
Windows systems & code signing protection | Kernel
11
 I identified 2 ways used by rootkit developers
to bypass this protection:
 a “low cost” approach
 a “high end” approach
Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA
Windows systems & code signing protection | Kernel
12
 “low cost”
 For developing reason, Microsoft provides a
test mode on Windows systems. A reboot is
required to enable this mode
 bcdedit.exe -set TESTSIGNING ON
Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA
Windows systems & code signing protection | Kernel
13
 “low cost”
 For developing reason, Microsoft provides a
test mode on Windows systems. A reboot is
required to enable this mode
 bcdedit.exe -set TESTSIGNING ON
 The message is shown by winlogon.exe
(and attackers patch it, 1 test to alter)
Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA
Windows systems & code signing protection | Kernel
14
 “high end”: Uroburos technique
 The malware developers used a vulnerability
to disable the driver signature
 CVE-2008-3431:
http://www.coresecurity.com/content/virtualb
ox-privilege-escalation-vulnerability
 Vulnerability in VBoxDrv.sys that allows to
switch an arbitrary kernel memory address to
0.
Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA
Windows systems & code signing protection | Kernel
15
 “high end”: Uroburos technique
 The overwritten address was g_CiEnabled
(Ci is for Code Integrity)
 Before: kd> dq nt!g_cienabled ->
fffff800`02e45eb8 00000001
 After: kd> dq nt!g_cienabled ->
fffff800`02e45eb8 00000000
Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA
Windows systems & code signing protection | Kernel
16
 “high end”: Uroburos technique
 The effect is to “switch” to test mode without
rebooting, without the message on the
desktop… but with the ability to use the
bcdedit.exe command to identify that the
machine is in test mode ;)
Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA
Windows systems & code signing protection | Kernel
17
 “high end”: Uroburos technique
 the malware opens the VBoxDrv symlink;
 it loads ntoskrnl.exe;
 it locates g_CiEnabled;
 it uses DeviceIoControl() to switch
arbitrary address to 0
DeviceIoControl(VBoxDrv, SUP_IOCTL_FAST_DO_NOP,
g_CiEnabledAddr, 0, g_CiEnabledAddr, 0, &cb, NULL)
 Complete implementation there;
http://www.kernelmode.info/forum/viewtopic.php?t=3322&f=11
Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA
Windows systems & code signing protection | Kernel
18
 “high end”: Derusbi technique
 The malware developers used a vulnerability
to disable the driver signature
 CVE-2013-3956:
https://www.novell.com/support/kb/doc.php?i
d=7012497
 Vulnerability in NICM.SYS that allows code
execution in kernel space.
Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA
Windows systems & code signing protection | Kernel
19
 “high end”: Derusbi technique
 Analysis of the shellcode used during the
exploitation
0:001> g
[...]
String(24,24) at 0000000002c9d230: DeviceNicm
00000000`02c9d250 00000140
Breakpoint 6 hit
kernel32!DeviceIoControl:
00000000`76e067b4 ff25ce6e0800 jmp qword ptr [kernel32!_imp_DeviceIoControl
(00000000`76e8d688)] ds:00000000`76e8d688={KERNELBASE!DeviceIoControl
(000007fe`fda8a1e0)}
0:001> db @r8
00000000`0d0d0000 28 00 0d 0d 00 00 00 00-ff eb 45 00 ff ff ff ff (.........E.....
00000000`0d0d0010 08 20 ef 16 f9 33 8e 06-e5 44 0d 0e c2 72 0a 5e . ...3...D...r.^
00000000`0d0d0020 2c 02 44 0d 33 49 ae 72-30 00 0d 0d 00 00 00 00 ,.D.3I.r0.......
00000000`0d0d0030 9a 3f 2f 19 0f 36 81 62-25 14 bf 59 13 3b 9f 7b .?/..6.b%..Y.;.{
00000000`0d0d0040 8d 5b 7f 29 29 3f 98 65-86 bc a2 02 00 f8 ff ff .[.))?.e........
00000000`0d0d0050 48 b8 30 0e e8 00 80 f8-ff ff 8b 18 80 cb 08 89 H.0.............
00000000`0d0d0060 18 c3 cc cc cc cc cc cc-cc cc cc cc cc cc cc cc ................
00000000`0d0d0070 cc cc cc cc cc cc cc cc-cc cc cc cc cc cc cc cc ................
Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA
Windows systems & code signing protection | Kernel
20
 “high end”: Derusbi technique
 Analysis of the shellcode used during the
exploitation
$rasm2 -k windows -b 64 -a x86.udis -D "48b8300ee80080f8ffff8b1880cb088918c3"
0x00000000 10 48b8300ee80080f8ffff mov rax, 0xfffff88000e80e30
0x0000000a 2 8b18 mov ebx, [rax]
0x0000000c 3 80cb08 or bl, 0x8
0x0000000f 2 8918 mov [rax], ebx
0x00000011 1 c3 ret
kd> !address 0xfffff88000e80e30
[…]
Usage: Module
Base Address: fffff880`00e7b000
End Address: fffff880`00f3b000
Region Size: 00000000`000c0000
VA Type: SystemPTEs
Module name: CI.dll
Module path: [SystemRootsystem32CI.dll]
Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA
Windows systems & code signing protection | Kernel
21
 “high end”: Derusbi technique
 Analysis of the shellcode used during the
exploitation
 Before: kd> dd 0xfffff88000e80e30 L1
fffff880`00e80e30 00000006
 After: kd> dd 0xfffff88000e80e30 L1
fffff880`00e80e30 0000000e
Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA
Windows systems & code signing protection | Kernel
22
 “high end”: Derusbi technique
 Analysis of the shellcode used during the
exploitation
 Why this value?
 Let’s check CI.dll
Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA
Windows systems & code signing protection | Kernel
23
 “high end”: Derusbi technique
 Mateusz ‘j00ru’ Jurczyk post2
01. VOID SepInitializeCodeIntegrity()
02. {
03. DWORD CiOptions;
04. g_CiEnabled = FALSE;
05. if(!InitIsWinPEMode)
06. g_CiEnabled = TRUE;
07.
08. memset(g_CiCallbacks,0,3*sizeof(SIZE_T));
09. CiOptions = 4|2; //0x6 by default
10.
11. if(KeLoaderBlock)
12. {
13. if(*(DWORD*)(KeLoaderBlock+84))
14. {
15. if(SepIsOptionPresent((KeLoaderBlock+84),L"DISABLE_INTEGRITY_CHECKS"))
16. CiOptions = 0;
17. if(SepIsOptionPresent((KeLoaderBlock+84),L"TESTSIGNING"))
18. CiOptions |= 8; //4 or 2 or 8 == 0xe
19. }
20. CiInitialize(CiOptions,(KeLoaderBlock+32),&g_CiCallbacks);
21. }
22. }
2. https://blogs.msdn.microsoft.com/ieinternals/2011/03/22/everything-you-need-to-know-about-authenticode-code-signing/
Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA
Windows systems & code signing protection | Kernel
24
 “high end”: Derusbi technique
 Let’s check CI.dll
 0xfffff88000e80e30 == dword_7FF404C5E30
 This variable contains the CiOptions flags
Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA
Windows systems & code signing protection | Kernel
25
 “high end”: Derusbi technique
 The effect is to “switch” to test mode without
rebooting, without the message on the
desktop and the bcdedit.exe command
shows that the machine is not in test mode
because the global flag was not modified…
Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA
Windows systems & code signing protection | Kernel
26
 “high end”: GrayFish (Equation Group)
technique
 Sadly I don’t have the samples :’(
 Kaspersky report:
https://securelist.com/files/2015/02/Equation
_group_questions_and_answers.pdf
 “To bypass modern OS security mechanisms that block the
execution of untrusted code in kernel mode, GrayFish
exploits several legitimate drivers, including one from the
CloneCD program. This driver ( ElbyCDIO.sys ) contains a
vulnerability which GrayFish exploits to achieve kernel-level
code execution”
Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA
Windows systems & code signing protection | Kernel
27
 “high end”: GrayFish (Equation Group)
technique
 CVE-2009-0824
 Code execution in ElbyCDIO.sys
(CloneCD)
 But no samples hashes in the publication :’(
 So I asked & Kaspersky accepted to share
the samples with me…
Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA
Windows systems & code signing protection | Kernel
28
 “high end”: GrayFish (Equation Group)
technique
 CVE-2009-0824
 Code execution in ElbyCDIO.sys
(CloneCD)
 But no samples hashes in the publication :’(
 So I asked & Kaspersky accepted to share
the samples with me…
BUT
Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA
Windows systems & code signing protection | Kernel
29
 “high end”: GrayFish (Equation Group)
technique
 Kaspersky promised to provide me the
sample in March…
Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA
Windows systems & code signing protection | Kernel
30
 “high end”: GrayFish (Equation Group)
technique
 Kaspersky promised to provide me the
sample in March… in April
Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA
Windows systems & code signing protection | Kernel
31
 “high end”: GrayFish (Equation Group)
technique
 Kaspersky promised to provide me the
sample in March… in April… in May
Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA
Windows systems & code signing protection | Kernel
32
 “high end”: GrayFish (Equation Group)
technique
 Kaspersky promised to provide me the
sample in March… in April… in May …
in June
Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA
Windows systems & code signing protection | Kernel
33
 “high end”: GrayFish (Equation Group)
technique
 Kaspersky promised to provide me the
sample in March… in April… in May …
in June … and in July…
Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA
Windows systems & code signing protection | Kernel
34
 “high end”: GrayFish (Equation Group)
technique
 Kaspersky promised to provide me the
sample in March… in April… in May …
in June … and in July…
 I’m still waiting :’(
Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA
Windows systems & code signing protection | Kernel
35
 “high end”: HIDEDRV (APT28/Fancy
Bear/Sednit/…) technique
 I only have the 64 bits .sys file…
 No dropper :’(
 So I don’t know how the attacker bypass the
authenticode :’(
 If someone in the room have this dropper, do
not hesitate to contact me!!!
Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA
Windows systems & code signing protection | Kernel
36
 “high end”: the same approach
 The malware developers use the same
approach with different implementation:
vulnerability exploitation on legitimate driver.
Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA
Windows systems & code signing protection | Kernel
37
 “high end”: the same approach
 What about the expiration date?
 In kernel space, we can perfectly load an
driver signed by an expired certificate…
Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA
Windows systems & code signing protection | Kernel
38
 “high end”: the same approach
 What about the revocation of certificate?
 Who really cares of CRL?
 The certificate of the vulnerable drivers
mentioned today are not yet revoked…
 It seems to be complicated to
systematically revoke certificates once a
vulnerability is found. (huge side effects)
 I’m not even sure that CRL works for
Kernel space…
Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA
Windows systems & code signing protection | Kernel
39
 Extra trick
 The Atheros private certificate leak
 https://duo.com/assets/pdf/Dude,_You_Got_
Dell_d.pdf
Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA
Windows systems & code signing protection | Kernel
40
 Extra trick
Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA
Windows systems & code signing protection | Kernel
41
 Extra trick
 The Atheros private certificate can be used
to sign a driver - even if the cert is expired -
 On a fresh default Windows install, the driver
can perfectly be loaded - even if the cert is
expired -
Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA
Windows systems & code signing protection | Kernel
42
 The future?
“Microsoft announced that Windows 10 would not allow installation of
drivers unless the driver was signed via the SysDev portal (that is, signed
by Microsoft, thought this will not require the driver to pass the HLK tests.”
source “The NT Insider May-June 2016”
Not implemented for Windows 10 RS2 Preview…
Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA
User space (new) implications
in Windows 10 TH2
43
Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA
Windows systems & code signing protection | User Space
44
 The protected processes
 Microsoft implemented a Signing Level in
Windows 8.
 Alex Ionescu perfectly documented this code
signing feature: http://www.alex-
ionescu.com/?p=146
Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA
Windows systems & code signing protection | User Space
45
 The protected processes
Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA
Windows systems & code signing protection | User Space
46
 The protected processes
 No more PROCESS_ALL_ACCESS, PROCESS_CREATE_PROCESS,
PROCESS_CREATE_THREAD, PROCESS_DUP_HANDLE,
PROCESS_QUERY_INFORMATION, PROCESS_SET_INFORMATION,
PROCESS_SET_QUOTA, PROCESS_VM_OPERATION, PROCESS_VM_READ,
PROCESS_VM_WRITE
 Welcome PROCESS_QUERY_LIMITED_INFORMATION
 Only available for Microsoft binaries… you
cannot create your own protected process :’(
Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA
Windows systems & code signing protection | User Space
47
 “Protecting Microsoft Edge against binary
injection”
 Communication by Microsoft:
https://blogs.windows.com/msedgedev/2015/
11/17/microsoft-edge-module-code-integrity/
 “The latest Windows 10 updates strengthen
Microsoft Edge with industry-leading
enforcement against loading unauthorized
DLLs into Microsoft Edge content
processes.” (latest == TH2)
Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA
Windows systems & code signing protection | User Space
48
 “Protecting Microsoft Edge against binary
injection”
 Documented
VS
Undocumented
Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA
Windows systems & code signing protection | User Space
49
 “Protecting Microsoft Edge against binary
injection”
 Mitigation Policy
typedef enum _PROCESS_MITIGATION_POLICY {
ProcessDEPPolicy,
ProcessASLRPolicy,
ProcessDynamicCodePolicy,
ProcessStrictHandleCheckPolicy,
ProcessSystemCallDisablePolicy,
ProcessMitigationOptionsMask,
ProcessExtensionPointDisablePolicy,
ProcessControlFlowGuardPolicy,
ProcessSignaturePolicy,
ProcessFontDisablePolicy,
ProcessImageLoadPolicy,
MaxProcessMitigationPolicy
} PROCESS_MITIGATION_POLICY, *PPROCESS_MITIGATION_POLICY;
Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA
Windows systems & code signing protection | User Space
50
 “Protecting Microsoft Edge against binary
injection”
 Mitigation Policy
typedef struct _PROCESS_MITIGATION_BINARY_SIGNATURE_POLICY {
union {
DWORD Flags;
struct {
DWORD MicrosoftSignedOnly : 1;
DWORD StoreSignedOnly : 1;
DWORD MitigationOptIn : 1;
DWORD ReservedFlags : 29;
} DUMMYSTRUCTNAME;
} DUMMYUNIONNAME;
} PROCESS_MITIGATION_BINARY_SIGNATURE_POLICY,
*PPROCESS_MITIGATION_BINARY_SIGNATURE_POLICY;
Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA
Windows systems & code signing protection | User Space
51
 “Protecting Microsoft Edge against binary
injection”
 How does it work?
 During a LoadLibrary() API call
-> the kernel calls NtCreateSection();
-> MiCreateSection() is called;
-> MiValidateSectionCreate() is called;
-> ci.dll (Code Integrity) is used in
order to check signatures
Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA
Windows systems & code signing protection | User Space
52
 “Protecting Microsoft Edge against binary
injection”
 Is it bulletproof?
Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA
Windows systems & code signing protection | User Space
53
 “Protecting Microsoft Edge against binary
injection”
 Does it bulletproof?
 For proper .dll injection via
LoadLibrary(): YES
 For dirty injection (shellcode injection, in
memory patching, …): NO
Code test:
https://github.com/SekoiaLab/BinaryInjectionMitigation/
Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA
Questions?
or awkward silence?
or applause to wake up your neighbour?
54

More Related Content

What's hot

Reverse Engineering the TomTom Runner pt. 1
Reverse Engineering the TomTom Runner pt. 1 Reverse Engineering the TomTom Runner pt. 1
Reverse Engineering the TomTom Runner pt. 1 Luis Grangeia
 
Csw2016 chen grassi-he-apple_graphics_is_compromised
Csw2016 chen grassi-he-apple_graphics_is_compromisedCsw2016 chen grassi-he-apple_graphics_is_compromised
Csw2016 chen grassi-he-apple_graphics_is_compromisedCanSecWest
 
Csw2016 economou nissim-getting_physical
Csw2016 economou nissim-getting_physicalCsw2016 economou nissim-getting_physical
Csw2016 economou nissim-getting_physicalCanSecWest
 
Indicators of compromise: From malware analysis to eradication
Indicators of compromise: From malware analysis to eradicationIndicators of compromise: From malware analysis to eradication
Indicators of compromise: From malware analysis to eradicationMichael Boman
 
CSW2017 Enrico branca What if encrypted communications are not as secure as w...
CSW2017 Enrico branca What if encrypted communications are not as secure as w...CSW2017 Enrico branca What if encrypted communications are not as secure as w...
CSW2017 Enrico branca What if encrypted communications are not as secure as w...CanSecWest
 
CSW2017 Yuhao song+Huimingliu cyber_wmd_vulnerable_IoT
CSW2017 Yuhao song+Huimingliu cyber_wmd_vulnerable_IoTCSW2017 Yuhao song+Huimingliu cyber_wmd_vulnerable_IoT
CSW2017 Yuhao song+Huimingliu cyber_wmd_vulnerable_IoTCanSecWest
 
CSW2017 Amanda rousseau cansecwest2017_net_hijacking_powershell
CSW2017 Amanda rousseau cansecwest2017_net_hijacking_powershellCSW2017 Amanda rousseau cansecwest2017_net_hijacking_powershell
CSW2017 Amanda rousseau cansecwest2017_net_hijacking_powershellCanSecWest
 
Reverse Engineering the TomTom Runner pt. 2
Reverse Engineering the TomTom Runner pt. 2Reverse Engineering the TomTom Runner pt. 2
Reverse Engineering the TomTom Runner pt. 2Luis Grangeia
 
ZeroNights - SmartTV
ZeroNights - SmartTV ZeroNights - SmartTV
ZeroNights - SmartTV Sergey Belov
 
Introduction of ShinoBOT (Black Hat USA 2013 Arsenal)
Introduction of ShinoBOT (Black Hat USA 2013 Arsenal)Introduction of ShinoBOT (Black Hat USA 2013 Arsenal)
Introduction of ShinoBOT (Black Hat USA 2013 Arsenal)Shota Shinogi
 
DEFCON 22: Bypass firewalls, application white lists, secure remote desktops ...
DEFCON 22: Bypass firewalls, application white lists, secure remote desktops ...DEFCON 22: Bypass firewalls, application white lists, secure remote desktops ...
DEFCON 22: Bypass firewalls, application white lists, secure remote desktops ...Zoltan Balazs
 
Sheila Ayelen Berta - The Art of Persistence: "Mr. Windows… I don’t wanna go ...
Sheila Ayelen Berta - The Art of Persistence: "Mr. Windows… I don’t wanna go ...Sheila Ayelen Berta - The Art of Persistence: "Mr. Windows… I don’t wanna go ...
Sheila Ayelen Berta - The Art of Persistence: "Mr. Windows… I don’t wanna go ...RootedCON
 
44CON London 2015 - Reverse engineering and exploiting font rasterizers: the ...
44CON London 2015 - Reverse engineering and exploiting font rasterizers: the ...44CON London 2015 - Reverse engineering and exploiting font rasterizers: the ...
44CON London 2015 - Reverse engineering and exploiting font rasterizers: the ...44CON
 
Sandbox kiev
Sandbox kievSandbox kiev
Sandbox kievuisgslide
 
syzbot and the tale of million kernel bugs
syzbot and the tale of million kernel bugssyzbot and the tale of million kernel bugs
syzbot and the tale of million kernel bugsDmitry Vyukov
 
Under the hood of modern HIPS-es and Windows access control mechanisms
Under the hood of modern HIPS-es and Windows access control mechanismsUnder the hood of modern HIPS-es and Windows access control mechanisms
Under the hood of modern HIPS-es and Windows access control mechanismsReCrypt
 
Crash Dump Analysis 101
Crash Dump Analysis 101Crash Dump Analysis 101
Crash Dump Analysis 101John Howard
 
Csw2016 macaulay eh_trace-rop_hooks
Csw2016 macaulay eh_trace-rop_hooksCsw2016 macaulay eh_trace-rop_hooks
Csw2016 macaulay eh_trace-rop_hooksCanSecWest
 

What's hot (20)

Reverse Engineering the TomTom Runner pt. 1
Reverse Engineering the TomTom Runner pt. 1 Reverse Engineering the TomTom Runner pt. 1
Reverse Engineering the TomTom Runner pt. 1
 
Csw2016 chen grassi-he-apple_graphics_is_compromised
Csw2016 chen grassi-he-apple_graphics_is_compromisedCsw2016 chen grassi-he-apple_graphics_is_compromised
Csw2016 chen grassi-he-apple_graphics_is_compromised
 
Csw2016 economou nissim-getting_physical
Csw2016 economou nissim-getting_physicalCsw2016 economou nissim-getting_physical
Csw2016 economou nissim-getting_physical
 
Indicators of compromise: From malware analysis to eradication
Indicators of compromise: From malware analysis to eradicationIndicators of compromise: From malware analysis to eradication
Indicators of compromise: From malware analysis to eradication
 
CSW2017 Enrico branca What if encrypted communications are not as secure as w...
CSW2017 Enrico branca What if encrypted communications are not as secure as w...CSW2017 Enrico branca What if encrypted communications are not as secure as w...
CSW2017 Enrico branca What if encrypted communications are not as secure as w...
 
CSW2017 Yuhao song+Huimingliu cyber_wmd_vulnerable_IoT
CSW2017 Yuhao song+Huimingliu cyber_wmd_vulnerable_IoTCSW2017 Yuhao song+Huimingliu cyber_wmd_vulnerable_IoT
CSW2017 Yuhao song+Huimingliu cyber_wmd_vulnerable_IoT
 
CSW2017 Amanda rousseau cansecwest2017_net_hijacking_powershell
CSW2017 Amanda rousseau cansecwest2017_net_hijacking_powershellCSW2017 Amanda rousseau cansecwest2017_net_hijacking_powershell
CSW2017 Amanda rousseau cansecwest2017_net_hijacking_powershell
 
Reverse Engineering the TomTom Runner pt. 2
Reverse Engineering the TomTom Runner pt. 2Reverse Engineering the TomTom Runner pt. 2
Reverse Engineering the TomTom Runner pt. 2
 
ZeroNights - SmartTV
ZeroNights - SmartTV ZeroNights - SmartTV
ZeroNights - SmartTV
 
Introduction of ShinoBOT (Black Hat USA 2013 Arsenal)
Introduction of ShinoBOT (Black Hat USA 2013 Arsenal)Introduction of ShinoBOT (Black Hat USA 2013 Arsenal)
Introduction of ShinoBOT (Black Hat USA 2013 Arsenal)
 
DEFCON 22: Bypass firewalls, application white lists, secure remote desktops ...
DEFCON 22: Bypass firewalls, application white lists, secure remote desktops ...DEFCON 22: Bypass firewalls, application white lists, secure remote desktops ...
DEFCON 22: Bypass firewalls, application white lists, secure remote desktops ...
 
Sheila Ayelen Berta - The Art of Persistence: "Mr. Windows… I don’t wanna go ...
Sheila Ayelen Berta - The Art of Persistence: "Mr. Windows… I don’t wanna go ...Sheila Ayelen Berta - The Art of Persistence: "Mr. Windows… I don’t wanna go ...
Sheila Ayelen Berta - The Art of Persistence: "Mr. Windows… I don’t wanna go ...
 
ShinoBOT Suite
ShinoBOT SuiteShinoBOT Suite
ShinoBOT Suite
 
44CON London 2015 - Reverse engineering and exploiting font rasterizers: the ...
44CON London 2015 - Reverse engineering and exploiting font rasterizers: the ...44CON London 2015 - Reverse engineering and exploiting font rasterizers: the ...
44CON London 2015 - Reverse engineering and exploiting font rasterizers: the ...
 
Sandbox kiev
Sandbox kievSandbox kiev
Sandbox kiev
 
Malware Detection With Multiple Features
Malware Detection With Multiple FeaturesMalware Detection With Multiple Features
Malware Detection With Multiple Features
 
syzbot and the tale of million kernel bugs
syzbot and the tale of million kernel bugssyzbot and the tale of million kernel bugs
syzbot and the tale of million kernel bugs
 
Under the hood of modern HIPS-es and Windows access control mechanisms
Under the hood of modern HIPS-es and Windows access control mechanismsUnder the hood of modern HIPS-es and Windows access control mechanisms
Under the hood of modern HIPS-es and Windows access control mechanisms
 
Crash Dump Analysis 101
Crash Dump Analysis 101Crash Dump Analysis 101
Crash Dump Analysis 101
 
Csw2016 macaulay eh_trace-rop_hooks
Csw2016 macaulay eh_trace-rop_hooksCsw2016 macaulay eh_trace-rop_hooks
Csw2016 macaulay eh_trace-rop_hooks
 

Viewers also liked

Microsoft Code Signing Certificate Best Practice - CodeSignCert.com
Microsoft Code Signing Certificate Best Practice - CodeSignCert.comMicrosoft Code Signing Certificate Best Practice - CodeSignCert.com
Microsoft Code Signing Certificate Best Practice - CodeSignCert.comKayra Obrain
 
Hunting Government Back Doors by Joseph Menn
Hunting Government Back Doors by Joseph MennHunting Government Back Doors by Joseph Menn
Hunting Government Back Doors by Joseph MennShakacon
 
Swift Reversing by Ryan Stortz
Swift Reversing by Ryan StortzSwift Reversing by Ryan Stortz
Swift Reversing by Ryan StortzShakacon
 
When Encryption is Not Enough...Sumanth Naropanth, Chandra Prakash Gopalaiah ...
When Encryption is Not Enough...Sumanth Naropanth, Chandra Prakash Gopalaiah ...When Encryption is Not Enough...Sumanth Naropanth, Chandra Prakash Gopalaiah ...
When Encryption is Not Enough...Sumanth Naropanth, Chandra Prakash Gopalaiah ...Shakacon
 
Anti-Reversing: A Cake Full of Onions by Richard Wartell
Anti-Reversing: A Cake Full of Onions by Richard WartellAnti-Reversing: A Cake Full of Onions by Richard Wartell
Anti-Reversing: A Cake Full of Onions by Richard WartellShakacon
 
Faux Disk Encryption....by Drew Suarez & Daniel Mayer
Faux Disk Encryption....by Drew Suarez & Daniel MayerFaux Disk Encryption....by Drew Suarez & Daniel Mayer
Faux Disk Encryption....by Drew Suarez & Daniel MayerShakacon
 
Fruit vs Zombies: Defeat Non-jailbroken iOS Malware by Claud Xiao
Fruit vs Zombies:  Defeat Non-jailbroken iOS Malware by Claud XiaoFruit vs Zombies:  Defeat Non-jailbroken iOS Malware by Claud Xiao
Fruit vs Zombies: Defeat Non-jailbroken iOS Malware by Claud XiaoShakacon
 
Let's Play Doctor....by Patrick Wardle
Let's Play Doctor....by Patrick WardleLet's Play Doctor....by Patrick Wardle
Let's Play Doctor....by Patrick WardleShakacon
 
The Search for the Perfect Door - Deviant Ollam
The Search for the Perfect Door - Deviant OllamThe Search for the Perfect Door - Deviant Ollam
The Search for the Perfect Door - Deviant OllamShakacon
 
Making a Scalable Automated Hacking System by Artem Dinaburg
Making a Scalable Automated Hacking System by Artem DinaburgMaking a Scalable Automated Hacking System by Artem Dinaburg
Making a Scalable Automated Hacking System by Artem DinaburgShakacon
 
Social Engineering the Windows Kernel by James Forshaw
Social Engineering the Windows Kernel by James ForshawSocial Engineering the Windows Kernel by James Forshaw
Social Engineering the Windows Kernel by James ForshawShakacon
 
La signature de code - Code signing
La signature de code - Code signingLa signature de code - Code signing
La signature de code - Code signingAlice and Bob
 

Viewers also liked (13)

Windows security
Windows securityWindows security
Windows security
 
Microsoft Code Signing Certificate Best Practice - CodeSignCert.com
Microsoft Code Signing Certificate Best Practice - CodeSignCert.comMicrosoft Code Signing Certificate Best Practice - CodeSignCert.com
Microsoft Code Signing Certificate Best Practice - CodeSignCert.com
 
Hunting Government Back Doors by Joseph Menn
Hunting Government Back Doors by Joseph MennHunting Government Back Doors by Joseph Menn
Hunting Government Back Doors by Joseph Menn
 
Swift Reversing by Ryan Stortz
Swift Reversing by Ryan StortzSwift Reversing by Ryan Stortz
Swift Reversing by Ryan Stortz
 
When Encryption is Not Enough...Sumanth Naropanth, Chandra Prakash Gopalaiah ...
When Encryption is Not Enough...Sumanth Naropanth, Chandra Prakash Gopalaiah ...When Encryption is Not Enough...Sumanth Naropanth, Chandra Prakash Gopalaiah ...
When Encryption is Not Enough...Sumanth Naropanth, Chandra Prakash Gopalaiah ...
 
Anti-Reversing: A Cake Full of Onions by Richard Wartell
Anti-Reversing: A Cake Full of Onions by Richard WartellAnti-Reversing: A Cake Full of Onions by Richard Wartell
Anti-Reversing: A Cake Full of Onions by Richard Wartell
 
Faux Disk Encryption....by Drew Suarez & Daniel Mayer
Faux Disk Encryption....by Drew Suarez & Daniel MayerFaux Disk Encryption....by Drew Suarez & Daniel Mayer
Faux Disk Encryption....by Drew Suarez & Daniel Mayer
 
Fruit vs Zombies: Defeat Non-jailbroken iOS Malware by Claud Xiao
Fruit vs Zombies:  Defeat Non-jailbroken iOS Malware by Claud XiaoFruit vs Zombies:  Defeat Non-jailbroken iOS Malware by Claud Xiao
Fruit vs Zombies: Defeat Non-jailbroken iOS Malware by Claud Xiao
 
Let's Play Doctor....by Patrick Wardle
Let's Play Doctor....by Patrick WardleLet's Play Doctor....by Patrick Wardle
Let's Play Doctor....by Patrick Wardle
 
The Search for the Perfect Door - Deviant Ollam
The Search for the Perfect Door - Deviant OllamThe Search for the Perfect Door - Deviant Ollam
The Search for the Perfect Door - Deviant Ollam
 
Making a Scalable Automated Hacking System by Artem Dinaburg
Making a Scalable Automated Hacking System by Artem DinaburgMaking a Scalable Automated Hacking System by Artem Dinaburg
Making a Scalable Automated Hacking System by Artem Dinaburg
 
Social Engineering the Windows Kernel by James Forshaw
Social Engineering the Windows Kernel by James ForshawSocial Engineering the Windows Kernel by James Forshaw
Social Engineering the Windows Kernel by James Forshaw
 
La signature de code - Code signing
La signature de code - Code signingLa signature de code - Code signing
La signature de code - Code signing
 

Similar to Windows Systems & Code Signing Protection by Paul Rascagneres

26.1.7 lab snort and firewall rules
26.1.7 lab   snort and firewall rules26.1.7 lab   snort and firewall rules
26.1.7 lab snort and firewall rulesFreddy Buenaño
 
[CB20] Vulnerabilities of Machine Learning Infrastructure by Sergey Gordeychik
[CB20] Vulnerabilities of Machine Learning Infrastructure by Sergey Gordeychik[CB20] Vulnerabilities of Machine Learning Infrastructure by Sergey Gordeychik
[CB20] Vulnerabilities of Machine Learning Infrastructure by Sergey GordeychikCODE BLUE
 
Hack.LU 2018 ARM IoT Firmware Emulation Workshop
Hack.LU 2018 ARM IoT Firmware Emulation WorkshopHack.LU 2018 ARM IoT Firmware Emulation Workshop
Hack.LU 2018 ARM IoT Firmware Emulation WorkshopSaumil Shah
 
OSCP Preparation Guide @ Infosectrain
OSCP Preparation Guide @ InfosectrainOSCP Preparation Guide @ Infosectrain
OSCP Preparation Guide @ InfosectrainInfosecTrain
 
My old security advisories on HMI/SCADA and industrial software released betw...
My old security advisories on HMI/SCADA and industrial software released betw...My old security advisories on HMI/SCADA and industrial software released betw...
My old security advisories on HMI/SCADA and industrial software released betw...Luigi Auriemma
 
REX CraftConf 2022 / Supply Chain Attack
REX CraftConf 2022 / Supply Chain AttackREX CraftConf 2022 / Supply Chain Attack
REX CraftConf 2022 / Supply Chain AttackYvan PHELIZOT
 
Continuous Security: From tins to containers - now what!
Continuous Security: From tins to containers - now what!Continuous Security: From tins to containers - now what!
Continuous Security: From tins to containers - now what!Michael Man
 
Ubuntu core on bubblegum 96
Ubuntu core on bubblegum 96Ubuntu core on bubblegum 96
Ubuntu core on bubblegum 96波 董
 
Ubuntu core on bubblegum 96
Ubuntu core on bubblegum 96Ubuntu core on bubblegum 96
Ubuntu core on bubblegum 96波 董
 
Evento formativo Spring 3 ottobre 2019
Evento formativo Spring 3 ottobre 2019Evento formativo Spring 3 ottobre 2019
Evento formativo Spring 3 ottobre 2019Giorgio Bernardi
 
Penetrating Windows 8 with syringe utility
Penetrating Windows 8 with syringe utilityPenetrating Windows 8 with syringe utility
Penetrating Windows 8 with syringe utilityIOSR Journals
 
From printed circuit boards to exploits
From printed circuit boards to exploitsFrom printed circuit boards to exploits
From printed circuit boards to exploitsvirtualabs
 
IoT with openHAB on pcDuino3B
IoT with openHAB on pcDuino3BIoT with openHAB on pcDuino3B
IoT with openHAB on pcDuino3BJingfeng Liu
 
Application of Radare2 Illustrated by Shylock and Snakso.A Analysis
Application of Radare2 Illustrated by Shylock and Snakso.A AnalysisApplication of Radare2 Illustrated by Shylock and Snakso.A Analysis
Application of Radare2 Illustrated by Shylock and Snakso.A AnalysisPositive Hack Days
 
Hunting Mac Malware with Memory Forensics
Hunting Mac Malware with Memory ForensicsHunting Mac Malware with Memory Forensics
Hunting Mac Malware with Memory ForensicsAndrew Case
 
Hunting Mac Malware with Memory Forensics
Hunting Mac Malware with Memory ForensicsHunting Mac Malware with Memory Forensics
Hunting Mac Malware with Memory ForensicsAndrew Case
 
You're Off the Hook: Blinding Security Software
You're Off the Hook: Blinding Security SoftwareYou're Off the Hook: Blinding Security Software
You're Off the Hook: Blinding Security SoftwareCylance
 
44 con slides
44 con slides44 con slides
44 con slidesgeeksec80
 

Similar to Windows Systems & Code Signing Protection by Paul Rascagneres (20)

26.1.7 lab snort and firewall rules
26.1.7 lab   snort and firewall rules26.1.7 lab   snort and firewall rules
26.1.7 lab snort and firewall rules
 
[CB20] Vulnerabilities of Machine Learning Infrastructure by Sergey Gordeychik
[CB20] Vulnerabilities of Machine Learning Infrastructure by Sergey Gordeychik[CB20] Vulnerabilities of Machine Learning Infrastructure by Sergey Gordeychik
[CB20] Vulnerabilities of Machine Learning Infrastructure by Sergey Gordeychik
 
Hack.LU 2018 ARM IoT Firmware Emulation Workshop
Hack.LU 2018 ARM IoT Firmware Emulation WorkshopHack.LU 2018 ARM IoT Firmware Emulation Workshop
Hack.LU 2018 ARM IoT Firmware Emulation Workshop
 
Symbian OS
Symbian  OS Symbian  OS
Symbian OS
 
OSCP Preparation Guide @ Infosectrain
OSCP Preparation Guide @ InfosectrainOSCP Preparation Guide @ Infosectrain
OSCP Preparation Guide @ Infosectrain
 
My old security advisories on HMI/SCADA and industrial software released betw...
My old security advisories on HMI/SCADA and industrial software released betw...My old security advisories on HMI/SCADA and industrial software released betw...
My old security advisories on HMI/SCADA and industrial software released betw...
 
REX CraftConf 2022 / Supply Chain Attack
REX CraftConf 2022 / Supply Chain AttackREX CraftConf 2022 / Supply Chain Attack
REX CraftConf 2022 / Supply Chain Attack
 
Continuous Security: From tins to containers - now what!
Continuous Security: From tins to containers - now what!Continuous Security: From tins to containers - now what!
Continuous Security: From tins to containers - now what!
 
Ubuntu core on bubblegum 96
Ubuntu core on bubblegum 96Ubuntu core on bubblegum 96
Ubuntu core on bubblegum 96
 
Ubuntu core on bubblegum 96
Ubuntu core on bubblegum 96Ubuntu core on bubblegum 96
Ubuntu core on bubblegum 96
 
Evento formativo Spring 3 ottobre 2019
Evento formativo Spring 3 ottobre 2019Evento formativo Spring 3 ottobre 2019
Evento formativo Spring 3 ottobre 2019
 
Penetrating Windows 8 with syringe utility
Penetrating Windows 8 with syringe utilityPenetrating Windows 8 with syringe utility
Penetrating Windows 8 with syringe utility
 
How to use shodan more powerful
How to use shodan more powerful How to use shodan more powerful
How to use shodan more powerful
 
From printed circuit boards to exploits
From printed circuit boards to exploitsFrom printed circuit boards to exploits
From printed circuit boards to exploits
 
IoT with openHAB on pcDuino3B
IoT with openHAB on pcDuino3BIoT with openHAB on pcDuino3B
IoT with openHAB on pcDuino3B
 
Application of Radare2 Illustrated by Shylock and Snakso.A Analysis
Application of Radare2 Illustrated by Shylock and Snakso.A AnalysisApplication of Radare2 Illustrated by Shylock and Snakso.A Analysis
Application of Radare2 Illustrated by Shylock and Snakso.A Analysis
 
Hunting Mac Malware with Memory Forensics
Hunting Mac Malware with Memory ForensicsHunting Mac Malware with Memory Forensics
Hunting Mac Malware with Memory Forensics
 
Hunting Mac Malware with Memory Forensics
Hunting Mac Malware with Memory ForensicsHunting Mac Malware with Memory Forensics
Hunting Mac Malware with Memory Forensics
 
You're Off the Hook: Blinding Security Software
You're Off the Hook: Blinding Security SoftwareYou're Off the Hook: Blinding Security Software
You're Off the Hook: Blinding Security Software
 
44 con slides
44 con slides44 con slides
44 con slides
 

More from Shakacon

Web (dis)assembly
Web (dis)assemblyWeb (dis)assembly
Web (dis)assemblyShakacon
 
I can be apple and so can you
I can be apple and so can youI can be apple and so can you
I can be apple and so can youShakacon
 
Cloud forensics putting the bits back together
Cloud forensics putting the bits back togetherCloud forensics putting the bits back together
Cloud forensics putting the bits back togetherShakacon
 
Pwned in Translation - from Subtitles to RCE
Pwned in Translation - from Subtitles to RCEPwned in Translation - from Subtitles to RCE
Pwned in Translation - from Subtitles to RCEShakacon
 
Oversight: Exposing spies on macOS
Oversight: Exposing spies on macOS Oversight: Exposing spies on macOS
Oversight: Exposing spies on macOS Shakacon
 
Modern Reconnaissance Phase on APT - protection layer
Modern Reconnaissance Phase on APT - protection layerModern Reconnaissance Phase on APT - protection layer
Modern Reconnaissance Phase on APT - protection layerShakacon
 
A Decompiler for Blackhain-Based Smart Contracts Bytecode
A Decompiler for Blackhain-Based Smart Contracts BytecodeA Decompiler for Blackhain-Based Smart Contracts Bytecode
A Decompiler for Blackhain-Based Smart Contracts BytecodeShakacon
 
Honey, I Stole Your C2 Server: A Dive into Attacker Infrastructure
Honey, I Stole Your C2 Server:  A Dive into Attacker InfrastructureHoney, I Stole Your C2 Server:  A Dive into Attacker Infrastructure
Honey, I Stole Your C2 Server: A Dive into Attacker InfrastructureShakacon
 
Dock ir incident response in a containerized, immutable, continually deploy...
Dock ir   incident response in a containerized, immutable, continually deploy...Dock ir   incident response in a containerized, immutable, continually deploy...
Dock ir incident response in a containerized, immutable, continually deploy...Shakacon
 
Reviewing the Security of ASoC Drivers in Android Kernel
Reviewing the Security of ASoC Drivers in Android KernelReviewing the Security of ASoC Drivers in Android Kernel
Reviewing the Security of ASoC Drivers in Android KernelShakacon
 
Silent Protest: A Wearable Protest Network
Silent Protest:  A Wearable Protest NetworkSilent Protest:  A Wearable Protest Network
Silent Protest: A Wearable Protest NetworkShakacon
 
WiFi-Based IMSI Catcher
WiFi-Based IMSI CatcherWiFi-Based IMSI Catcher
WiFi-Based IMSI CatcherShakacon
 
Sad Panda Analysts: Devolving Malware
Sad Panda Analysts:  Devolving MalwareSad Panda Analysts:  Devolving Malware
Sad Panda Analysts: Devolving MalwareShakacon
 
reductio [ad absurdum]
reductio [ad absurdum]reductio [ad absurdum]
reductio [ad absurdum]Shakacon
 
XFLTReat: a new dimension in tunnelling
XFLTReat:  a new dimension in tunnellingXFLTReat:  a new dimension in tunnelling
XFLTReat: a new dimension in tunnellingShakacon
 
0Day Hunting A.K.A. The Story of a Proper CPE Test by Balazs Bacsay
0Day Hunting A.K.A. The Story of a Proper CPE Test by Balazs Bacsay0Day Hunting A.K.A. The Story of a Proper CPE Test by Balazs Bacsay
0Day Hunting A.K.A. The Story of a Proper CPE Test by Balazs BacsayShakacon
 
Richard wartell malware is hard. let's go shopping!!
Richard wartell   malware is hard.  let's go shopping!!Richard wartell   malware is hard.  let's go shopping!!
Richard wartell malware is hard. let's go shopping!!Shakacon
 
There's Waldo by Patrick Wardle & Colby Moore
There's Waldo by Patrick Wardle & Colby MooreThere's Waldo by Patrick Wardle & Colby Moore
There's Waldo by Patrick Wardle & Colby MooreShakacon
 

More from Shakacon (20)

Web (dis)assembly
Web (dis)assemblyWeb (dis)assembly
Web (dis)assembly
 
Macdoored
MacdooredMacdoored
Macdoored
 
I can be apple and so can you
I can be apple and so can youI can be apple and so can you
I can be apple and so can you
 
Cloud forensics putting the bits back together
Cloud forensics putting the bits back togetherCloud forensics putting the bits back together
Cloud forensics putting the bits back together
 
Pwned in Translation - from Subtitles to RCE
Pwned in Translation - from Subtitles to RCEPwned in Translation - from Subtitles to RCE
Pwned in Translation - from Subtitles to RCE
 
Oversight: Exposing spies on macOS
Oversight: Exposing spies on macOS Oversight: Exposing spies on macOS
Oversight: Exposing spies on macOS
 
Modern Reconnaissance Phase on APT - protection layer
Modern Reconnaissance Phase on APT - protection layerModern Reconnaissance Phase on APT - protection layer
Modern Reconnaissance Phase on APT - protection layer
 
Shamoon
ShamoonShamoon
Shamoon
 
A Decompiler for Blackhain-Based Smart Contracts Bytecode
A Decompiler for Blackhain-Based Smart Contracts BytecodeA Decompiler for Blackhain-Based Smart Contracts Bytecode
A Decompiler for Blackhain-Based Smart Contracts Bytecode
 
Honey, I Stole Your C2 Server: A Dive into Attacker Infrastructure
Honey, I Stole Your C2 Server:  A Dive into Attacker InfrastructureHoney, I Stole Your C2 Server:  A Dive into Attacker Infrastructure
Honey, I Stole Your C2 Server: A Dive into Attacker Infrastructure
 
Dock ir incident response in a containerized, immutable, continually deploy...
Dock ir   incident response in a containerized, immutable, continually deploy...Dock ir   incident response in a containerized, immutable, continually deploy...
Dock ir incident response in a containerized, immutable, continually deploy...
 
Reviewing the Security of ASoC Drivers in Android Kernel
Reviewing the Security of ASoC Drivers in Android KernelReviewing the Security of ASoC Drivers in Android Kernel
Reviewing the Security of ASoC Drivers in Android Kernel
 
Silent Protest: A Wearable Protest Network
Silent Protest:  A Wearable Protest NetworkSilent Protest:  A Wearable Protest Network
Silent Protest: A Wearable Protest Network
 
WiFi-Based IMSI Catcher
WiFi-Based IMSI CatcherWiFi-Based IMSI Catcher
WiFi-Based IMSI Catcher
 
Sad Panda Analysts: Devolving Malware
Sad Panda Analysts:  Devolving MalwareSad Panda Analysts:  Devolving Malware
Sad Panda Analysts: Devolving Malware
 
reductio [ad absurdum]
reductio [ad absurdum]reductio [ad absurdum]
reductio [ad absurdum]
 
XFLTReat: a new dimension in tunnelling
XFLTReat:  a new dimension in tunnellingXFLTReat:  a new dimension in tunnelling
XFLTReat: a new dimension in tunnelling
 
0Day Hunting A.K.A. The Story of a Proper CPE Test by Balazs Bacsay
0Day Hunting A.K.A. The Story of a Proper CPE Test by Balazs Bacsay0Day Hunting A.K.A. The Story of a Proper CPE Test by Balazs Bacsay
0Day Hunting A.K.A. The Story of a Proper CPE Test by Balazs Bacsay
 
Richard wartell malware is hard. let's go shopping!!
Richard wartell   malware is hard.  let's go shopping!!Richard wartell   malware is hard.  let's go shopping!!
Richard wartell malware is hard. let's go shopping!!
 
There's Waldo by Patrick Wardle & Colby Moore
There's Waldo by Patrick Wardle & Colby MooreThere's Waldo by Patrick Wardle & Colby Moore
There's Waldo by Patrick Wardle & Colby Moore
 

Recently uploaded

New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????blackmambaettijean
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 

Recently uploaded (20)

New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 

Windows Systems & Code Signing Protection by Paul Rascagneres

  • 1. Windows systems & code signing protection
  • 2. Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA Windows systems & code signing protection | About me 2  Paul Rascagnères  Member of the CERT SEKOIA  Malware analysis  Incident Response  Security researcher  Yo-yo player  Offices in Luxembourg & Paris  Located in Luxembourg
  • 3. Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA Windows systems & code signing protection | About me 3  Due to questions yesterday: Geography slide about Luxembourg Area: 998 sq mi - 2,586 km2 Population: 576,249
  • 4. Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA Authenticode 4
  • 5. Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA Windows systems & code signing protection | Authenticode 5  The code signing mechanism provided by Microsoft is named Authenticode  Based on certificate  Support expiration date and Microsoft manages a revocation list (for example if a certificate is compromised)
  • 6. Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA Windows systems & code signing protection | Authenticode 6  For the kernel mode, the driver signature is mandatory since Windows 7 – 64 bits  For the user mode, the binary signature is not mandatory. “As a software publisher, there are two reasons to sign your code: to prove its Integrity and to develop its Reputation”1 . 1. https://blogs.msdn.microsoft.com/ieinternals/2011/03/22/everything-you-need-to-know-about-authenticode-code-signing/
  • 7. Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA Windows systems & code signing protection | Authenticode 7
  • 8. Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA Kernel space implications 8
  • 9. Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA Windows systems & code signing protection | Kernel 9  For the kernel mode, the driver signature is mandatory since Windows 7 – 64 bits  Is it the end of rootkit?
  • 10. Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA Windows systems & code signing protection | Kernel 10  For the kernel space, the driver signature is mandatory since Windows 7 – 64 bits  Is it the end of rootkit?
  • 11. Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA Windows systems & code signing protection | Kernel 11  I identified 2 ways used by rootkit developers to bypass this protection:  a “low cost” approach  a “high end” approach
  • 12. Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA Windows systems & code signing protection | Kernel 12  “low cost”  For developing reason, Microsoft provides a test mode on Windows systems. A reboot is required to enable this mode  bcdedit.exe -set TESTSIGNING ON
  • 13. Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA Windows systems & code signing protection | Kernel 13  “low cost”  For developing reason, Microsoft provides a test mode on Windows systems. A reboot is required to enable this mode  bcdedit.exe -set TESTSIGNING ON  The message is shown by winlogon.exe (and attackers patch it, 1 test to alter)
  • 14. Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA Windows systems & code signing protection | Kernel 14  “high end”: Uroburos technique  The malware developers used a vulnerability to disable the driver signature  CVE-2008-3431: http://www.coresecurity.com/content/virtualb ox-privilege-escalation-vulnerability  Vulnerability in VBoxDrv.sys that allows to switch an arbitrary kernel memory address to 0.
  • 15. Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA Windows systems & code signing protection | Kernel 15  “high end”: Uroburos technique  The overwritten address was g_CiEnabled (Ci is for Code Integrity)  Before: kd> dq nt!g_cienabled -> fffff800`02e45eb8 00000001  After: kd> dq nt!g_cienabled -> fffff800`02e45eb8 00000000
  • 16. Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA Windows systems & code signing protection | Kernel 16  “high end”: Uroburos technique  The effect is to “switch” to test mode without rebooting, without the message on the desktop… but with the ability to use the bcdedit.exe command to identify that the machine is in test mode ;)
  • 17. Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA Windows systems & code signing protection | Kernel 17  “high end”: Uroburos technique  the malware opens the VBoxDrv symlink;  it loads ntoskrnl.exe;  it locates g_CiEnabled;  it uses DeviceIoControl() to switch arbitrary address to 0 DeviceIoControl(VBoxDrv, SUP_IOCTL_FAST_DO_NOP, g_CiEnabledAddr, 0, g_CiEnabledAddr, 0, &cb, NULL)  Complete implementation there; http://www.kernelmode.info/forum/viewtopic.php?t=3322&f=11
  • 18. Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA Windows systems & code signing protection | Kernel 18  “high end”: Derusbi technique  The malware developers used a vulnerability to disable the driver signature  CVE-2013-3956: https://www.novell.com/support/kb/doc.php?i d=7012497  Vulnerability in NICM.SYS that allows code execution in kernel space.
  • 19. Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA Windows systems & code signing protection | Kernel 19  “high end”: Derusbi technique  Analysis of the shellcode used during the exploitation 0:001> g [...] String(24,24) at 0000000002c9d230: DeviceNicm 00000000`02c9d250 00000140 Breakpoint 6 hit kernel32!DeviceIoControl: 00000000`76e067b4 ff25ce6e0800 jmp qword ptr [kernel32!_imp_DeviceIoControl (00000000`76e8d688)] ds:00000000`76e8d688={KERNELBASE!DeviceIoControl (000007fe`fda8a1e0)} 0:001> db @r8 00000000`0d0d0000 28 00 0d 0d 00 00 00 00-ff eb 45 00 ff ff ff ff (.........E..... 00000000`0d0d0010 08 20 ef 16 f9 33 8e 06-e5 44 0d 0e c2 72 0a 5e . ...3...D...r.^ 00000000`0d0d0020 2c 02 44 0d 33 49 ae 72-30 00 0d 0d 00 00 00 00 ,.D.3I.r0....... 00000000`0d0d0030 9a 3f 2f 19 0f 36 81 62-25 14 bf 59 13 3b 9f 7b .?/..6.b%..Y.;.{ 00000000`0d0d0040 8d 5b 7f 29 29 3f 98 65-86 bc a2 02 00 f8 ff ff .[.))?.e........ 00000000`0d0d0050 48 b8 30 0e e8 00 80 f8-ff ff 8b 18 80 cb 08 89 H.0............. 00000000`0d0d0060 18 c3 cc cc cc cc cc cc-cc cc cc cc cc cc cc cc ................ 00000000`0d0d0070 cc cc cc cc cc cc cc cc-cc cc cc cc cc cc cc cc ................
  • 20. Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA Windows systems & code signing protection | Kernel 20  “high end”: Derusbi technique  Analysis of the shellcode used during the exploitation $rasm2 -k windows -b 64 -a x86.udis -D "48b8300ee80080f8ffff8b1880cb088918c3" 0x00000000 10 48b8300ee80080f8ffff mov rax, 0xfffff88000e80e30 0x0000000a 2 8b18 mov ebx, [rax] 0x0000000c 3 80cb08 or bl, 0x8 0x0000000f 2 8918 mov [rax], ebx 0x00000011 1 c3 ret kd> !address 0xfffff88000e80e30 […] Usage: Module Base Address: fffff880`00e7b000 End Address: fffff880`00f3b000 Region Size: 00000000`000c0000 VA Type: SystemPTEs Module name: CI.dll Module path: [SystemRootsystem32CI.dll]
  • 21. Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA Windows systems & code signing protection | Kernel 21  “high end”: Derusbi technique  Analysis of the shellcode used during the exploitation  Before: kd> dd 0xfffff88000e80e30 L1 fffff880`00e80e30 00000006  After: kd> dd 0xfffff88000e80e30 L1 fffff880`00e80e30 0000000e
  • 22. Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA Windows systems & code signing protection | Kernel 22  “high end”: Derusbi technique  Analysis of the shellcode used during the exploitation  Why this value?  Let’s check CI.dll
  • 23. Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA Windows systems & code signing protection | Kernel 23  “high end”: Derusbi technique  Mateusz ‘j00ru’ Jurczyk post2 01. VOID SepInitializeCodeIntegrity() 02. { 03. DWORD CiOptions; 04. g_CiEnabled = FALSE; 05. if(!InitIsWinPEMode) 06. g_CiEnabled = TRUE; 07. 08. memset(g_CiCallbacks,0,3*sizeof(SIZE_T)); 09. CiOptions = 4|2; //0x6 by default 10. 11. if(KeLoaderBlock) 12. { 13. if(*(DWORD*)(KeLoaderBlock+84)) 14. { 15. if(SepIsOptionPresent((KeLoaderBlock+84),L"DISABLE_INTEGRITY_CHECKS")) 16. CiOptions = 0; 17. if(SepIsOptionPresent((KeLoaderBlock+84),L"TESTSIGNING")) 18. CiOptions |= 8; //4 or 2 or 8 == 0xe 19. } 20. CiInitialize(CiOptions,(KeLoaderBlock+32),&g_CiCallbacks); 21. } 22. } 2. https://blogs.msdn.microsoft.com/ieinternals/2011/03/22/everything-you-need-to-know-about-authenticode-code-signing/
  • 24. Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA Windows systems & code signing protection | Kernel 24  “high end”: Derusbi technique  Let’s check CI.dll  0xfffff88000e80e30 == dword_7FF404C5E30  This variable contains the CiOptions flags
  • 25. Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA Windows systems & code signing protection | Kernel 25  “high end”: Derusbi technique  The effect is to “switch” to test mode without rebooting, without the message on the desktop and the bcdedit.exe command shows that the machine is not in test mode because the global flag was not modified…
  • 26. Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA Windows systems & code signing protection | Kernel 26  “high end”: GrayFish (Equation Group) technique  Sadly I don’t have the samples :’(  Kaspersky report: https://securelist.com/files/2015/02/Equation _group_questions_and_answers.pdf  “To bypass modern OS security mechanisms that block the execution of untrusted code in kernel mode, GrayFish exploits several legitimate drivers, including one from the CloneCD program. This driver ( ElbyCDIO.sys ) contains a vulnerability which GrayFish exploits to achieve kernel-level code execution”
  • 27. Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA Windows systems & code signing protection | Kernel 27  “high end”: GrayFish (Equation Group) technique  CVE-2009-0824  Code execution in ElbyCDIO.sys (CloneCD)  But no samples hashes in the publication :’(  So I asked & Kaspersky accepted to share the samples with me…
  • 28. Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA Windows systems & code signing protection | Kernel 28  “high end”: GrayFish (Equation Group) technique  CVE-2009-0824  Code execution in ElbyCDIO.sys (CloneCD)  But no samples hashes in the publication :’(  So I asked & Kaspersky accepted to share the samples with me… BUT
  • 29. Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA Windows systems & code signing protection | Kernel 29  “high end”: GrayFish (Equation Group) technique  Kaspersky promised to provide me the sample in March…
  • 30. Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA Windows systems & code signing protection | Kernel 30  “high end”: GrayFish (Equation Group) technique  Kaspersky promised to provide me the sample in March… in April
  • 31. Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA Windows systems & code signing protection | Kernel 31  “high end”: GrayFish (Equation Group) technique  Kaspersky promised to provide me the sample in March… in April… in May
  • 32. Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA Windows systems & code signing protection | Kernel 32  “high end”: GrayFish (Equation Group) technique  Kaspersky promised to provide me the sample in March… in April… in May … in June
  • 33. Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA Windows systems & code signing protection | Kernel 33  “high end”: GrayFish (Equation Group) technique  Kaspersky promised to provide me the sample in March… in April… in May … in June … and in July…
  • 34. Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA Windows systems & code signing protection | Kernel 34  “high end”: GrayFish (Equation Group) technique  Kaspersky promised to provide me the sample in March… in April… in May … in June … and in July…  I’m still waiting :’(
  • 35. Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA Windows systems & code signing protection | Kernel 35  “high end”: HIDEDRV (APT28/Fancy Bear/Sednit/…) technique  I only have the 64 bits .sys file…  No dropper :’(  So I don’t know how the attacker bypass the authenticode :’(  If someone in the room have this dropper, do not hesitate to contact me!!!
  • 36. Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA Windows systems & code signing protection | Kernel 36  “high end”: the same approach  The malware developers use the same approach with different implementation: vulnerability exploitation on legitimate driver.
  • 37. Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA Windows systems & code signing protection | Kernel 37  “high end”: the same approach  What about the expiration date?  In kernel space, we can perfectly load an driver signed by an expired certificate…
  • 38. Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA Windows systems & code signing protection | Kernel 38  “high end”: the same approach  What about the revocation of certificate?  Who really cares of CRL?  The certificate of the vulnerable drivers mentioned today are not yet revoked…  It seems to be complicated to systematically revoke certificates once a vulnerability is found. (huge side effects)  I’m not even sure that CRL works for Kernel space…
  • 39. Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA Windows systems & code signing protection | Kernel 39  Extra trick  The Atheros private certificate leak  https://duo.com/assets/pdf/Dude,_You_Got_ Dell_d.pdf
  • 40. Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA Windows systems & code signing protection | Kernel 40  Extra trick
  • 41. Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA Windows systems & code signing protection | Kernel 41  Extra trick  The Atheros private certificate can be used to sign a driver - even if the cert is expired -  On a fresh default Windows install, the driver can perfectly be loaded - even if the cert is expired -
  • 42. Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA Windows systems & code signing protection | Kernel 42  The future? “Microsoft announced that Windows 10 would not allow installation of drivers unless the driver was signed via the SysDev portal (that is, signed by Microsoft, thought this will not require the driver to pass the HLK tests.” source “The NT Insider May-June 2016” Not implemented for Windows 10 RS2 Preview…
  • 43. Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA User space (new) implications in Windows 10 TH2 43
  • 44. Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA Windows systems & code signing protection | User Space 44  The protected processes  Microsoft implemented a Signing Level in Windows 8.  Alex Ionescu perfectly documented this code signing feature: http://www.alex- ionescu.com/?p=146
  • 45. Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA Windows systems & code signing protection | User Space 45  The protected processes
  • 46. Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA Windows systems & code signing protection | User Space 46  The protected processes  No more PROCESS_ALL_ACCESS, PROCESS_CREATE_PROCESS, PROCESS_CREATE_THREAD, PROCESS_DUP_HANDLE, PROCESS_QUERY_INFORMATION, PROCESS_SET_INFORMATION, PROCESS_SET_QUOTA, PROCESS_VM_OPERATION, PROCESS_VM_READ, PROCESS_VM_WRITE  Welcome PROCESS_QUERY_LIMITED_INFORMATION  Only available for Microsoft binaries… you cannot create your own protected process :’(
  • 47. Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA Windows systems & code signing protection | User Space 47  “Protecting Microsoft Edge against binary injection”  Communication by Microsoft: https://blogs.windows.com/msedgedev/2015/ 11/17/microsoft-edge-module-code-integrity/  “The latest Windows 10 updates strengthen Microsoft Edge with industry-leading enforcement against loading unauthorized DLLs into Microsoft Edge content processes.” (latest == TH2)
  • 48. Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA Windows systems & code signing protection | User Space 48  “Protecting Microsoft Edge against binary injection”  Documented VS Undocumented
  • 49. Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA Windows systems & code signing protection | User Space 49  “Protecting Microsoft Edge against binary injection”  Mitigation Policy typedef enum _PROCESS_MITIGATION_POLICY { ProcessDEPPolicy, ProcessASLRPolicy, ProcessDynamicCodePolicy, ProcessStrictHandleCheckPolicy, ProcessSystemCallDisablePolicy, ProcessMitigationOptionsMask, ProcessExtensionPointDisablePolicy, ProcessControlFlowGuardPolicy, ProcessSignaturePolicy, ProcessFontDisablePolicy, ProcessImageLoadPolicy, MaxProcessMitigationPolicy } PROCESS_MITIGATION_POLICY, *PPROCESS_MITIGATION_POLICY;
  • 50. Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA Windows systems & code signing protection | User Space 50  “Protecting Microsoft Edge against binary injection”  Mitigation Policy typedef struct _PROCESS_MITIGATION_BINARY_SIGNATURE_POLICY { union { DWORD Flags; struct { DWORD MicrosoftSignedOnly : 1; DWORD StoreSignedOnly : 1; DWORD MitigationOptIn : 1; DWORD ReservedFlags : 29; } DUMMYSTRUCTNAME; } DUMMYUNIONNAME; } PROCESS_MITIGATION_BINARY_SIGNATURE_POLICY, *PPROCESS_MITIGATION_BINARY_SIGNATURE_POLICY;
  • 51. Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA Windows systems & code signing protection | User Space 51  “Protecting Microsoft Edge against binary injection”  How does it work?  During a LoadLibrary() API call -> the kernel calls NtCreateSection(); -> MiCreateSection() is called; -> MiValidateSectionCreate() is called; -> ci.dll (Code Integrity) is used in order to check signatures
  • 52. Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA Windows systems & code signing protection | User Space 52  “Protecting Microsoft Edge against binary injection”  Is it bulletproof?
  • 53. Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA Windows systems & code signing protection | User Space 53  “Protecting Microsoft Edge against binary injection”  Does it bulletproof?  For proper .dll injection via LoadLibrary(): YES  For dirty injection (shellcode injection, in memory patching, …): NO Code test: https://github.com/SekoiaLab/BinaryInjectionMitigation/
  • 54. Shakacon – 13-14 July 2016 – Paul Rascagnères - SEKOIA Questions? or awkward silence? or applause to wake up your neighbour? 54