SlideShare a Scribd company logo
It’s all about gong fu! (part 2)
Understanding and Defeating Windows 8.1 Kernel
Patch Protection:
Andrea Allievi
Talos Security Research and Intelligence Group - Cisco Systems Inc.
aallievi@cisco.com
November 20th, 2014 - NoSuchCon
2© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
Who am I
•  Security researcher, focused on Malware Research
•  Work for Cisco Systems in the TALOS Security Research and
Intelligence Group
•  Microsoft OSs Internals enthusiast / Kernel system level developer
•  Previously worked for PrevX, Webroot and Saferbytes
•  Original designer of the first UEFI Bootkit in 2012, and other
research projects/analysis
3© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
Agenda
0. Some definitions
1.  Introduction to Patchguard and Driver Signing Enforcement
2.  Kernel Patch Protection Implementation
3.  Attacking Patchguard
4.  Demo time
5.  Going ahead in Patchguard Exploitation
4© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
Introduction
5© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
Definitions
•  Patchguard or Kernel Patch Protection is a Microsoft technology
developed to prevent any kind of modification to the Windows Kernel
•  Driver Signing Enforcement, aka DSE, prevents any non-digitally
signed code from being loaded and executed in the Windows Kernel
•  A Deferred Procedure Call, aka DPC, is an operating system
mechanism which allows high-priority tasks to defer required but
lower-priority tasks for later execution
•  An Asynchronous Procedure Call, aka APC, is a function that
executes asynchronously in the context of a particular thread.
6© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
•  Snake campaign – Uroburos rootkit: an advanced rootkit capable of
infecting several version of Windows, including Windows 7 64 bit
•  Rootkit not able to infect Windows 8 / 8.1 because of security
mitigations, enhanced DSE and Patchguard implementation
•  Reversed the entire rootkit; this made me wonder how to to defeat
DSE and Patchguard in Windows 8.1.
•  This was done in the past with an UEFI bootkit - my approach now
uses a kernel driver
My work
7© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
•  Implemented completely differently than on Windows 7 (kernel 6.1)
•  A kernel driver is usually loaded by the NtLoadDriver API function –
ends in ZwCreateSection.
•  A large call stack is made, that ends in SeValidateImageHeader
•  SeValidateImageHeader - CiValidateImageHeader code integrity
routine
•  Still easy to disarm, a simple modification of the g_CiOptions internal
variable is enough
Windows 8.1 Code Integrity
8© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
•  If the value of the g_ciOptions variable changes, the Patchguard code
is able to pinpoint the modification and crash the system
•  Kernel Patch Protection implemented in various parts of the OS.
Function names voluntarily misleading
•  Patchguard in Windows 8.1 is much more effective than previous
implementations
•  Multiple PG buffers and contexts installed on the target system
•  Uses a large numbers of tricks to hinder analysis
Windows 8.1 Kernel Patch Protection
9© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
Windows 8.1 Kernel Patch Protection
Implementation
10© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
•  KeInitAmd64SpecificState raises a Divide Error exception – execution
transferred to KiFilterFiberContext
•  KiInitializePatchguard is a huge function (~ 96 Kbyte of pure code)
that builds a large PG buffer
•  Structured Exception handling implementation:
http://vrt-blog.snort.org/2014/06/exceptional-behavior-windows-81-
x64-seh.html
•  Other initialization point: ExpLicenseWatchInitWorker (rare)
Kernel Patch Protection – How does it work?
11© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
int	
  KeInitAmd64SpecificState()	
  {
	
  	
  	
  	
  DWORD	
  dbgMask	
  =	
  0;
	
  	
  	
  	
  int	
  dividend	
  =	
  0,	
  result	
  =	
  0;
	
  	
  	
  	
  int	
  value	
  =	
  0;	
  
	
  	
  	
  	
  //	
  Exit	
  in	
  case	
  the	
  system	
  is	
  booted	
  in	
  safe	
  mode
	
  	
  	
  	
  if	
  (InitSafeBootMode)	
  return	
  0;
	
  	
  	
  	
  //	
  KdDebuggerNotPresent:	
  1	
  -­‐	
  no	
  debugger;	
  0	
  -­‐	
  a	
  debugger	
  is	
  attached
	
  	
  	
  	
  dbgMask	
  =	
  KdDebuggerNotPresent;
	
  	
  	
  	
  //	
  KdPitchDebugger:	
  1	
  -­‐	
  debugger	
  disabled;	
  0	
  -­‐	
  a	
  debugger	
  could	
  be	
  attached
	
  	
  	
  	
  dbgMask	
  |=	
  KdPitchDebugger;
	
  	
  	
  	
  	
  
	
  	
  	
  	
  if	
  (dbgMask)	
  dividend	
  =	
  -­‐1;	
  	
  	
  	
  	
  	
  //	
  Debugger	
  completely	
  disabled	
  (0xFFFFFFFF)
	
  	
  	
  	
  else	
  dividend	
  =	
  0x11;	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  //	
  Debugger	
  might	
  be	
  enabled
	
  	
  	
  	
  	
  
	
  	
  	
  	
  value	
  =	
  (int)_rotr(dbgMask,	
  1);	
  	
  	
  	
  //	
  value64	
  is	
  equal	
  to	
  0	
  if	
  debugger	
  is	
  enable
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
   	
   	
  	
  	
  	
  //	
  0x80000000	
  if	
  debugger	
  is	
  NOT	
  enabled	
  	
  
	
  	
  	
  	
  //	
  Perform	
  a	
  signed	
  division	
  between	
  two	
  32	
  bit	
  integers:
	
  	
  	
  	
  result	
  =	
  (int)(value	
  /	
  dividend);	
  	
  	
  //	
  IDIV	
  value,	
  dividend
	
  	
  	
  	
  return	
  result;
}
12© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
The Kernel Patch Protection buffer
3 main sections surrounded by a random number of randomly generated values
1.  Internal configuration area.
13© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
The Kernel Patch Protection buffer
2.  Patchguard’s code and a copy of some NT kernel functions
14© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
The Kernel Patch Protection buffer
3.  Protected code and data
15© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
Implementation - Scheme
•  Patchguard code is linked to the system in different ways: Timers, DPC
routines, KPRCB reserved data fields, APC routines and a System Thread
•  Patchguard initialization stub function KiFilterFiberContext randomly
decides the PG link type and the number of PG contexts (1 to 4)
ü  See here:
http://blog.ptsecurity.com/2014/09/microsoft-windows-81-kernel-
patch.html
•  Entry points code: recover PG contexts, decrypts the first 4 bytes
16© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
Implementation – Scheme 2
•  Patchguard code located inside the big buffer (section 2) organized mainly in
4 blocks:
17© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
Kernel Patch Protection – System checks
•  Patchguard code implemented mainly in the “INITKDBG” section +
chunks in “.text” section
•  INITKDBG section copied, then discarded
•  The self-verification routine executed with a copy of the original
processor IDT
•  Finally queues a Work item -> Main Check Routine…
18© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
The Main check routine
•  Self-verification of the remaining bytes of section 1 and 2
•  PatchguardEncryptAndWait function: on-the-fly encryption, waits a random
number of minutes
•  Verifies each code and data chunks of the protected kernel modules.
•  Uses an array of Patchguard data structures
•  If a modification is detected, a system crash initiated by “SdbpCheckDll”
function
19© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
//	
  Calculate	
  a	
  DWORD	
  key	
  for	
  a	
  specified	
  Chunk
DWORD	
  CalculateNtChunkPgKey(QWORD	
  qwMasterKey,	
  int	
  iNumBitsToRotate,	
  LPBYTE	
  chunkPtr,	
  DWORD	
  chunkSize)	
  
{
//	
  …	
  some	
  declarations	
  here	
  … 	
  
for	
  (count	
  =	
  0;	
  count	
  <	
  chunkSize	
  /	
  sizeof(QWORD);	
  count++)	
  {
QWORD	
  *	
  qwPtr	
  =	
  (QWORD*)chunkPtr; 	
  //	
  Current	
  buffer	
  QWORD	
  pointer
qwCurKey	
  =	
  _rotl64((*qwPtr)	
  ^	
  qwCurKey,	
  iNumBitsToRotate);	
  //	
  Update	
  the	
  key
chunkPtr	
  +=	
  sizeof(QWORD); 	
  //	
  Update	
  buffer	
  ptr
}
	
  
//	
  Calculate	
  remaining	
  bytes	
  to	
  process
DWORD	
  dwRemainingByte	
  =	
  chunkSize	
  %	
  sizeof(QWORD);
for	
  (count	
  =	
  0;	
  count	
  <	
  dwRemainingByte;	
  count++)	
  {
LONGLONG	
  qwByte	
  = 	
  //	
  Current	
  signed-­‐extended	
  byte
	
  (LONGLONG)(*chunkPtr);
qwCurKey	
  =	
  _rotl64(qwCurKey	
  ^	
  qwByte,	
  iNumBitsToRotate); 	
   	
  	
  //	
  Update	
  the	
  key
chunkPtr	
  ++; 	
   	
  //	
  Update	
  buffer	
  ptr
}
	
  
//	
  Calculate	
  DWORD	
  key
while	
  (qwCurKey)	
  {
dwRetKey	
  ^=	
  (DWORD)qwCurKey;
qwCurKey	
  =	
  qwCurKey	
  >>	
  31;
}
//	
  Keep	
  in	
  mind	
  that	
  the	
  following	
  key	
  is	
  verified	
  after	
  resetting	
  its	
  MSB:	
  (dwRetKey	
  &	
  0x7FFFFFFF)
return	
  dwRetKey;
}
20© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
Attacking Patchguard
21© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
Available attacks
All the available attacks have been defeated by the last version of Kernel Patch
protection:
•  x64 debug registers (DR registers)
•  Exception handler hooking, Patching the kernel timer DPC dispatcher
•  Hooking KeBugCheckEx and/or other kernel key functions
•  Patchguard code decryption routine modification (McAfee method)
22© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
Available attacks – The Uroburos method
•  Uroburos rootkit hooks RtlCaptureContext internal Nt Kernel routine.
•  It’s a function directly called by KeBugCheckEx, used by Patchguard to crash
the system.
•  Uroburos filters all the RtlCaptureContext calls made by KeBugCheckEx
•  If the call is a Patchguard one, it restores the thread execution to its start
address.
•  If the IRQL too high - Uroburos exploits its own hook to KiRetireDpcList
23© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
Some new attacks
2 different types of feasible attacks idealized:
•  Neutralize and block every Patchguard entry point
•  On-the-fly modification of the encrypted Patchguard buffer, and make
it auto-deleting
After my first article released, other guy, Tandasat method: hooking the
end of KiCommitThreadWait and KiAttemptFastRemovePriQueue
functions https://github.com/tandasat/PgResarch/tree/master/DisPG
24© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
Some new attacks – Can we innovate?
•  All available methods try to prevent the Patchguard Code from being
executed.
•  Patchguard code can be an attacker best friend J
25© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
Forging Windows 8.1 Patchguard
My method uses a kernel-mode driver that does some things:
1.  Acquires all processors ownership (very important step) and searches the
Patchguard buffers starting from Windows Timers queue, DPC list, processor
KPRCB structure, APC list, system threads list
2.  Retrieves all the PG contexts (decryption key and so on...), and decrypts the
Patchguard buffers
3.  Analyses the buffer, retrieves all the needed information, and modifies it in a clever
manner:
ü  Identify self-verify routine and disable it
ü  Identify main check routine and disarm it
ü  Let the Patchguard code execution continues
4.  Re-encrypts Patchguard buffer, releases all processors ownership
26© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
27© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
Forging Windows 8.1 Patchguard - Details
The implementation is not easy. I have had to overcome some difficulties. Patchguard
Contexts:
1.  Timers – Search in system timer list
2.  DPC – Search in system DPCs queue
3.  APC – Insert an hook to KeInsertQueueApc
4.  KPRCB – Analyse the undocumented fields in KPRCB structure (AcpiReserved,
HalReserved)
5.  Patchguard Thread – Search in the system threads list (very rare)
6.  Other entry points (KiBalanceSetManagerPeriodicDpc) – KeInsertQueueDpc hook
28© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
Demo Time
29© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
Demo Time - Results
•  Windows 8.1 Professional x64 – Fully updated
•  Results:
ü  Reliable method, works well on all versions of Windows 8.1
ü  Hard to develop
•  Comparison with other method:
ü  Completely different method, platform dependent (it relies on “symsrv.dll” to
obtain Windows symbols)
ü  It can’t take advantage of Patchguard code to do some attacker’s dirty things J
30© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
Going ahead
31© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
Anti-Patchguard – Going ahead
•  What happens if an attacker changes some verification hases directly located
in the Patchguard buffer?
•  A very strong weapon could bear:
Use Windows 8.1 code to protect an attacker’ rootkit code
•  The Patchguard buffer, in its main section, includes 3 keys: The master key
and 2 self-verification keys
•  To achieve our goal we should modify some DWORD hashes, and finally we
need to resign the entire Patchguard buffer
32© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
//	
  Re-­‐sign	
  a	
  Patchguard	
  buffer	
  modifying	
  its	
  Self-­‐Verify	
  keys	
  
NTSTATUS	
  ReSignPgBuffer(LPBYTE	
  lpPgBuff)	
  {	
  
//	
  ...	
  a	
  lot	
  of	
  declarations	
  here	
  ...	
  
lpqwPgSelfVerifyKey	
  =	
  (QWORD*)((LPBYTE)lpPgBuff	
  +	
  0x3F0);	
  
	
   //	
  Save	
  original	
  data	
  and	
  set	
  to	
  0	
  
	
   RtlCopyMemory(&orgPgWorkItem,	
  pPgWorkItem,	
  sizeof(WORK_QUEUE_ITEM));	
  
	
   RtlZeroMemory(pPgWorkItem,	
  sizeof(WORK_QUEUE_ITEM));	
  
	
   qwOrgPgSignKey	
  =	
  *lpqwPgSelfVerifyKey;	
  lpqwPgSelfVerifyKey[0]	
  =	
  0;	
  
	
   dwOrgNumOfVerifiedBytes	
  =	
  *lpdwNumOfVerifiedBytes;	
  lpdwNumOfVerifiedBytes[0]	
  =	
  0;	
  
	
  
	
   //	
  Now	
  recalculate	
  Patchguard	
  Self-­‐Verify	
  Key	
  
	
   qwNewSelfKey	
  =	
  CalculatePgSelfVerifyKey(qwPgMasterKey,	
  iNumToRotate,	
  (LPBYTE)lpPgBuff,	
  
dwNumBytesToSelfCheck);	
  
	
   DbgPrint("ReSignPgBuffer	
  -­‐	
  Successfully	
  calculated	
  and	
  replaced	
  PG	
  Self-­‐Verify	
  Key.	
  Old	
  One:	
  
0x%08X'%08X	
  -­‐	
  New	
  One:	
  0x%08X'%08X.rn",	
  
	
   	
   qwOrgPgSignKey	
  >>	
  32,	
  (DWORD)qwOrgPgSignKey,	
  qwNewSelfKey	
  >>	
  32,	
  (DWORD)qwNewSelfKey);	
  
	
   *lpqwPgSelfVerifyKey	
  =	
  qwNewSelfKey;	
  
	
  
	
   //	
  Restore	
  previous	
  data	
  
	
   RtlCopyMemory(pPgWorkItem,	
  &orgPgWorkItem,	
  sizeof(WORK_QUEUE_ITEM));	
  
	
   *lpdwNumOfVerifiedBytes	
  =	
  dwNumBytesToSelfCheck;	
  
	
   return	
  STATUS_SUCCESS;	
  
}	
  
33© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
Use Windows 8.1 code to protect an attacker’s rootkit code
•  Our tests have demonstrated that the method is reliable, we have installed
and protected a hook to the NtCreateFile API function
•  Patchguard recognizes the new code as original and starts protecting it
•  If an anti-rootkit solution tries to touch the “hook” code, the system suddenly
crashes J
•  Some problems, research still in progress
•  Very cool way to recruit an opponent technology J J
•  Time for another demo?
34© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
Use Windows 8.1 code to protect an attacker’ rootkit code
35© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
Questions Time
36© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
Resources and Acknowledgements
37© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
Available resources
Patchguard 8.1 Introduction material available on the VRT blog:
1.  http://vrt-blog.snort.org/2014/04/snake-campaign-few-words-about-uroburos.html
2.  http://vrt-blog.snort.org/2014/06/exceptional-behavior-windows-81-x64-seh.html
3.  http://vrt-blog.snort.org/2014/08/the-windows-81-kernel-patch-protection.html
Analysis of previous versions of Patchguard:
1.  http://www.zer0mem.sk/?p=271 (inspiration for my title)
2.  http://www.uninformed.org/?v=3&a=3
3.  http://uninformed.org/index.cgi?v=8&a=5
4.  http://www.codeproject.com/Articles/28318/Bypassing-PatchGuard
Brand-new analysis, methods and techniques:
1.  http://blog.ptsecurity.com/2014/09/microsoft-windows-81-kernel-patch.html
2.  https://github.com/tandasat/PgResarch/tree/master/DisPG
38© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
Personal info
Andrea Allievi – AaLl86
Email: aallievi@cisco.com
Twitter: @aall86
Talos blog: http://blogs.cisco.com/talos
Sourcefire VRT blog (retired): http://vrt-blog.snort.org/
My personal website: www.andrea-allievi.com
Skype: aall86
For any question, information, send me a mail or a request on skype!
39© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
•  TALOS Team for the help and support: Alain, Shaun, Angel,
Douglas, Mariano, Emmanuel
•  Microsoft engineers for developing a great technology
•  My family and girlfriend for the support J
•  Zer0mem for lending me the title J
Acknowledgements - Thanks to
40© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
Thank you for attending!
ps. Ready for the next Windows 10 Patchguard disarm?
NSC #2 - D2 01 - Andrea Allievi - Windows 8.1 Patch Protections

More Related Content

What's hot

Kernel Recipes 2015: Anatomy of an atomic KMS driver
Kernel Recipes 2015: Anatomy of an atomic KMS driverKernel Recipes 2015: Anatomy of an atomic KMS driver
Kernel Recipes 2015: Anatomy of an atomic KMS driver
Anne Nicolas
 
CSW2017Richard Johnson_harnessing intel processor trace on windows for vulner...
CSW2017Richard Johnson_harnessing intel processor trace on windows for vulner...CSW2017Richard Johnson_harnessing intel processor trace on windows for vulner...
CSW2017Richard Johnson_harnessing intel processor trace on windows for vulner...
CanSecWest
 
Defeating x64: The Evolution of the TDL Rootkit
Defeating x64: The Evolution of the TDL RootkitDefeating x64: The Evolution of the TDL Rootkit
Defeating x64: The Evolution of the TDL Rootkit
Alex Matrosov
 
Windows's Kindnesses - Commoner to D-K(d)OM (Direct Kernel Object Manipulation)
Windows's Kindnesses - Commoner to D-K(d)OM (Direct Kernel Object Manipulation)Windows's Kindnesses - Commoner to D-K(d)OM (Direct Kernel Object Manipulation)
Windows's Kindnesses - Commoner to D-K(d)OM (Direct Kernel Object Manipulation)
Nullbyte Security Conference
 
Cryptography 101 for Java developers
Cryptography 101 for Java developersCryptography 101 for Java developers
Cryptography 101 for Java developers
Michel Schudel
 
Android 5.0 Lollipop platform change investigation report
Android 5.0 Lollipop platform change investigation reportAndroid 5.0 Lollipop platform change investigation report
Android 5.0 Lollipop platform change investigation report
hidenorly
 
OffensiveCon2022: Case Studies of Fuzzing with Xen
OffensiveCon2022: Case Studies of Fuzzing with XenOffensiveCon2022: Case Studies of Fuzzing with Xen
OffensiveCon2022: Case Studies of Fuzzing with Xen
Tamas K Lengyel
 
Looking into trusted and encrypted keys
Looking into trusted and encrypted keysLooking into trusted and encrypted keys
Looking into trusted and encrypted keys
SUSE Labs Taipei
 
Kernel Memory Protection by an Insertable Hypervisor which has VM Introspec...
Kernel Memory Protection by an Insertable Hypervisor which has VM Introspec...Kernel Memory Protection by an Insertable Hypervisor which has VM Introspec...
Kernel Memory Protection by an Insertable Hypervisor which has VM Introspec...
Kuniyasu Suzaki
 
Di shen pacsec_final
Di shen pacsec_finalDi shen pacsec_final
Di shen pacsec_final
PacSecJP
 
CSW2017 Privilege escalation on high-end servers due to implementation gaps i...
CSW2017 Privilege escalation on high-end servers due to implementation gaps i...CSW2017 Privilege escalation on high-end servers due to implementation gaps i...
CSW2017 Privilege escalation on high-end servers due to implementation gaps i...
CanSecWest
 
SnakeGX (full version)
SnakeGX (full version) SnakeGX (full version)
SnakeGX (full version)
Flavio Toffalini
 
Genode Compositions
Genode CompositionsGenode Compositions
Genode Compositions
Vasily Sartakov
 
CSW2017 Weston miller csw17_mitigating_native_remote_code_execution
CSW2017 Weston miller csw17_mitigating_native_remote_code_executionCSW2017 Weston miller csw17_mitigating_native_remote_code_execution
CSW2017 Weston miller csw17_mitigating_native_remote_code_execution
CanSecWest
 
SnakeGX (short version)
SnakeGX (short version)SnakeGX (short version)
SnakeGX (short version)
Flavio Toffalini
 
Genode Components
Genode ComponentsGenode Components
Genode Components
Vasily Sartakov
 
Genode Architecture
Genode ArchitectureGenode Architecture
Genode Architecture
Vasily Sartakov
 
How to drive a malware analyst crazy
How to drive a malware analyst crazyHow to drive a malware analyst crazy
How to drive a malware analyst crazy
Michael Boman
 
EFI Secure Key
EFI Secure KeyEFI Secure Key
EFI Secure Key
SUSE Labs Taipei
 
CanSecWest 2017 - Port(al) to the iOS Core
CanSecWest 2017 - Port(al) to the iOS CoreCanSecWest 2017 - Port(al) to the iOS Core
CanSecWest 2017 - Port(al) to the iOS Core
Stefan Esser
 

What's hot (20)

Kernel Recipes 2015: Anatomy of an atomic KMS driver
Kernel Recipes 2015: Anatomy of an atomic KMS driverKernel Recipes 2015: Anatomy of an atomic KMS driver
Kernel Recipes 2015: Anatomy of an atomic KMS driver
 
CSW2017Richard Johnson_harnessing intel processor trace on windows for vulner...
CSW2017Richard Johnson_harnessing intel processor trace on windows for vulner...CSW2017Richard Johnson_harnessing intel processor trace on windows for vulner...
CSW2017Richard Johnson_harnessing intel processor trace on windows for vulner...
 
Defeating x64: The Evolution of the TDL Rootkit
Defeating x64: The Evolution of the TDL RootkitDefeating x64: The Evolution of the TDL Rootkit
Defeating x64: The Evolution of the TDL Rootkit
 
Windows's Kindnesses - Commoner to D-K(d)OM (Direct Kernel Object Manipulation)
Windows's Kindnesses - Commoner to D-K(d)OM (Direct Kernel Object Manipulation)Windows's Kindnesses - Commoner to D-K(d)OM (Direct Kernel Object Manipulation)
Windows's Kindnesses - Commoner to D-K(d)OM (Direct Kernel Object Manipulation)
 
Cryptography 101 for Java developers
Cryptography 101 for Java developersCryptography 101 for Java developers
Cryptography 101 for Java developers
 
Android 5.0 Lollipop platform change investigation report
Android 5.0 Lollipop platform change investigation reportAndroid 5.0 Lollipop platform change investigation report
Android 5.0 Lollipop platform change investigation report
 
OffensiveCon2022: Case Studies of Fuzzing with Xen
OffensiveCon2022: Case Studies of Fuzzing with XenOffensiveCon2022: Case Studies of Fuzzing with Xen
OffensiveCon2022: Case Studies of Fuzzing with Xen
 
Looking into trusted and encrypted keys
Looking into trusted and encrypted keysLooking into trusted and encrypted keys
Looking into trusted and encrypted keys
 
Kernel Memory Protection by an Insertable Hypervisor which has VM Introspec...
Kernel Memory Protection by an Insertable Hypervisor which has VM Introspec...Kernel Memory Protection by an Insertable Hypervisor which has VM Introspec...
Kernel Memory Protection by an Insertable Hypervisor which has VM Introspec...
 
Di shen pacsec_final
Di shen pacsec_finalDi shen pacsec_final
Di shen pacsec_final
 
CSW2017 Privilege escalation on high-end servers due to implementation gaps i...
CSW2017 Privilege escalation on high-end servers due to implementation gaps i...CSW2017 Privilege escalation on high-end servers due to implementation gaps i...
CSW2017 Privilege escalation on high-end servers due to implementation gaps i...
 
SnakeGX (full version)
SnakeGX (full version) SnakeGX (full version)
SnakeGX (full version)
 
Genode Compositions
Genode CompositionsGenode Compositions
Genode Compositions
 
CSW2017 Weston miller csw17_mitigating_native_remote_code_execution
CSW2017 Weston miller csw17_mitigating_native_remote_code_executionCSW2017 Weston miller csw17_mitigating_native_remote_code_execution
CSW2017 Weston miller csw17_mitigating_native_remote_code_execution
 
SnakeGX (short version)
SnakeGX (short version)SnakeGX (short version)
SnakeGX (short version)
 
Genode Components
Genode ComponentsGenode Components
Genode Components
 
Genode Architecture
Genode ArchitectureGenode Architecture
Genode Architecture
 
How to drive a malware analyst crazy
How to drive a malware analyst crazyHow to drive a malware analyst crazy
How to drive a malware analyst crazy
 
EFI Secure Key
EFI Secure KeyEFI Secure Key
EFI Secure Key
 
CanSecWest 2017 - Port(al) to the iOS Core
CanSecWest 2017 - Port(al) to the iOS CoreCanSecWest 2017 - Port(al) to the iOS Core
CanSecWest 2017 - Port(al) to the iOS Core
 

Viewers also liked

NSC #2 - D3 05 - Alex Ionescu- Breaking Protected Processes
NSC #2 - D3 05 - Alex Ionescu- Breaking Protected ProcessesNSC #2 - D3 05 - Alex Ionescu- Breaking Protected Processes
NSC #2 - D3 05 - Alex Ionescu- Breaking Protected Processes
NoSuchCon
 
NSC #2 - D1 03 - Sébastien Dudek - HomePlugAV PLC
NSC #2 - D1 03 - Sébastien Dudek - HomePlugAV PLCNSC #2 - D1 03 - Sébastien Dudek - HomePlugAV PLC
NSC #2 - D1 03 - Sébastien Dudek - HomePlugAV PLC
NoSuchCon
 
NSC #2 - D1 01 - Rolf Rolles - Program synthesis in reverse engineering
NSC #2 - D1 01 - Rolf Rolles - Program synthesis in reverse engineeringNSC #2 - D1 01 - Rolf Rolles - Program synthesis in reverse engineering
NSC #2 - D1 01 - Rolf Rolles - Program synthesis in reverse engineering
NoSuchCon
 
NSC #2 - Challenge Introduction
NSC #2 - Challenge IntroductionNSC #2 - Challenge Introduction
NSC #2 - Challenge Introduction
NoSuchCon
 
NSC #2 - Challenge Solution
NSC #2 - Challenge SolutionNSC #2 - Challenge Solution
NSC #2 - Challenge Solution
NoSuchCon
 
NSC #2 - D3 01 - Thomas Braden - Exploitation of hardened MSP430-based device
NSC #2 - D3 01 - Thomas Braden - Exploitation of hardened MSP430-based deviceNSC #2 - D3 01 - Thomas Braden - Exploitation of hardened MSP430-based device
NSC #2 - D3 01 - Thomas Braden - Exploitation of hardened MSP430-based device
NoSuchCon
 
NSC #2 - D2 05 - Andrea Barisani - Forging the USB Armory
NSC #2 - D2 05 - Andrea Barisani - Forging the USB ArmoryNSC #2 - D2 05 - Andrea Barisani - Forging the USB Armory
NSC #2 - D2 05 - Andrea Barisani - Forging the USB Armory
NoSuchCon
 
NSC #2 - D2 02 - Benjamin Delpy - Mimikatz
NSC #2 - D2 02 - Benjamin Delpy - MimikatzNSC #2 - D2 02 - Benjamin Delpy - Mimikatz
NSC #2 - D2 02 - Benjamin Delpy - Mimikatz
NoSuchCon
 
NSC #2 - D1 02 - Georgi Geshev - Your Q is my Q
NSC #2 - D1 02 - Georgi Geshev - Your Q is my QNSC #2 - D1 02 - Georgi Geshev - Your Q is my Q
NSC #2 - D1 02 - Georgi Geshev - Your Q is my Q
NoSuchCon
 
NSC #2 - D3 04 - Guillaume Valadon & Nicolas Vivet - Detecting BGP hijacks
NSC #2 - D3 04 - Guillaume Valadon & Nicolas Vivet - Detecting BGP hijacksNSC #2 - D3 04 - Guillaume Valadon & Nicolas Vivet - Detecting BGP hijacks
NSC #2 - D3 04 - Guillaume Valadon & Nicolas Vivet - Detecting BGP hijacks
NoSuchCon
 
NSC #2 - D3 02 - Peter Hlavaty - Attack on the Core
NSC #2 - D3 02 - Peter Hlavaty - Attack on the CoreNSC #2 - D3 02 - Peter Hlavaty - Attack on the Core
NSC #2 - D3 02 - Peter Hlavaty - Attack on the Core
NoSuchCon
 
NSC #2 - D2 06 - Richard Johnson - SAGEly Advice
NSC #2 - D2 06 - Richard Johnson - SAGEly AdviceNSC #2 - D2 06 - Richard Johnson - SAGEly Advice
NSC #2 - D2 06 - Richard Johnson - SAGEly Advice
NoSuchCon
 
NSC #2 - D3 03 - Jean-Philippe Aumasson - Cryptographic Backdooring
NSC #2 - D3 03 - Jean-Philippe Aumasson - Cryptographic BackdooringNSC #2 - D3 03 - Jean-Philippe Aumasson - Cryptographic Backdooring
NSC #2 - D3 03 - Jean-Philippe Aumasson - Cryptographic Backdooring
NoSuchCon
 
NSC #2 - D2 03 - Nicolas Collignon - Google Apps Engine Security
NSC #2 - D2 03 - Nicolas Collignon - Google Apps Engine SecurityNSC #2 - D2 03 - Nicolas Collignon - Google Apps Engine Security
NSC #2 - D2 03 - Nicolas Collignon - Google Apps Engine Security
NoSuchCon
 
NSC #2 - D2 04 - Ezequiel Gutesman - Blended Web and Database Attacks
NSC #2 - D2 04 - Ezequiel Gutesman - Blended Web and Database AttacksNSC #2 - D2 04 - Ezequiel Gutesman - Blended Web and Database Attacks
NSC #2 - D2 04 - Ezequiel Gutesman - Blended Web and Database Attacks
NoSuchCon
 
NSC #2 - D1 05 - Renaud Lifchitz - Quantum computing in practice
NSC #2 - D1 05 - Renaud Lifchitz - Quantum computing in practiceNSC #2 - D1 05 - Renaud Lifchitz - Quantum computing in practice
NSC #2 - D1 05 - Renaud Lifchitz - Quantum computing in practice
NoSuchCon
 

Viewers also liked (16)

NSC #2 - D3 05 - Alex Ionescu- Breaking Protected Processes
NSC #2 - D3 05 - Alex Ionescu- Breaking Protected ProcessesNSC #2 - D3 05 - Alex Ionescu- Breaking Protected Processes
NSC #2 - D3 05 - Alex Ionescu- Breaking Protected Processes
 
NSC #2 - D1 03 - Sébastien Dudek - HomePlugAV PLC
NSC #2 - D1 03 - Sébastien Dudek - HomePlugAV PLCNSC #2 - D1 03 - Sébastien Dudek - HomePlugAV PLC
NSC #2 - D1 03 - Sébastien Dudek - HomePlugAV PLC
 
NSC #2 - D1 01 - Rolf Rolles - Program synthesis in reverse engineering
NSC #2 - D1 01 - Rolf Rolles - Program synthesis in reverse engineeringNSC #2 - D1 01 - Rolf Rolles - Program synthesis in reverse engineering
NSC #2 - D1 01 - Rolf Rolles - Program synthesis in reverse engineering
 
NSC #2 - Challenge Introduction
NSC #2 - Challenge IntroductionNSC #2 - Challenge Introduction
NSC #2 - Challenge Introduction
 
NSC #2 - Challenge Solution
NSC #2 - Challenge SolutionNSC #2 - Challenge Solution
NSC #2 - Challenge Solution
 
NSC #2 - D3 01 - Thomas Braden - Exploitation of hardened MSP430-based device
NSC #2 - D3 01 - Thomas Braden - Exploitation of hardened MSP430-based deviceNSC #2 - D3 01 - Thomas Braden - Exploitation of hardened MSP430-based device
NSC #2 - D3 01 - Thomas Braden - Exploitation of hardened MSP430-based device
 
NSC #2 - D2 05 - Andrea Barisani - Forging the USB Armory
NSC #2 - D2 05 - Andrea Barisani - Forging the USB ArmoryNSC #2 - D2 05 - Andrea Barisani - Forging the USB Armory
NSC #2 - D2 05 - Andrea Barisani - Forging the USB Armory
 
NSC #2 - D2 02 - Benjamin Delpy - Mimikatz
NSC #2 - D2 02 - Benjamin Delpy - MimikatzNSC #2 - D2 02 - Benjamin Delpy - Mimikatz
NSC #2 - D2 02 - Benjamin Delpy - Mimikatz
 
NSC #2 - D1 02 - Georgi Geshev - Your Q is my Q
NSC #2 - D1 02 - Georgi Geshev - Your Q is my QNSC #2 - D1 02 - Georgi Geshev - Your Q is my Q
NSC #2 - D1 02 - Georgi Geshev - Your Q is my Q
 
NSC #2 - D3 04 - Guillaume Valadon & Nicolas Vivet - Detecting BGP hijacks
NSC #2 - D3 04 - Guillaume Valadon & Nicolas Vivet - Detecting BGP hijacksNSC #2 - D3 04 - Guillaume Valadon & Nicolas Vivet - Detecting BGP hijacks
NSC #2 - D3 04 - Guillaume Valadon & Nicolas Vivet - Detecting BGP hijacks
 
NSC #2 - D3 02 - Peter Hlavaty - Attack on the Core
NSC #2 - D3 02 - Peter Hlavaty - Attack on the CoreNSC #2 - D3 02 - Peter Hlavaty - Attack on the Core
NSC #2 - D3 02 - Peter Hlavaty - Attack on the Core
 
NSC #2 - D2 06 - Richard Johnson - SAGEly Advice
NSC #2 - D2 06 - Richard Johnson - SAGEly AdviceNSC #2 - D2 06 - Richard Johnson - SAGEly Advice
NSC #2 - D2 06 - Richard Johnson - SAGEly Advice
 
NSC #2 - D3 03 - Jean-Philippe Aumasson - Cryptographic Backdooring
NSC #2 - D3 03 - Jean-Philippe Aumasson - Cryptographic BackdooringNSC #2 - D3 03 - Jean-Philippe Aumasson - Cryptographic Backdooring
NSC #2 - D3 03 - Jean-Philippe Aumasson - Cryptographic Backdooring
 
NSC #2 - D2 03 - Nicolas Collignon - Google Apps Engine Security
NSC #2 - D2 03 - Nicolas Collignon - Google Apps Engine SecurityNSC #2 - D2 03 - Nicolas Collignon - Google Apps Engine Security
NSC #2 - D2 03 - Nicolas Collignon - Google Apps Engine Security
 
NSC #2 - D2 04 - Ezequiel Gutesman - Blended Web and Database Attacks
NSC #2 - D2 04 - Ezequiel Gutesman - Blended Web and Database AttacksNSC #2 - D2 04 - Ezequiel Gutesman - Blended Web and Database Attacks
NSC #2 - D2 04 - Ezequiel Gutesman - Blended Web and Database Attacks
 
NSC #2 - D1 05 - Renaud Lifchitz - Quantum computing in practice
NSC #2 - D1 05 - Renaud Lifchitz - Quantum computing in practiceNSC #2 - D1 05 - Renaud Lifchitz - Quantum computing in practice
NSC #2 - D1 05 - Renaud Lifchitz - Quantum computing in practice
 

Similar to NSC #2 - D2 01 - Andrea Allievi - Windows 8.1 Patch Protections

Joanna Rutkowska Subverting Vista Kernel
Joanna Rutkowska   Subverting Vista KernelJoanna Rutkowska   Subverting Vista Kernel
Joanna Rutkowska Subverting Vista Kernel
guestf1a032
 
Android Boot Time Optimization
Android Boot Time OptimizationAndroid Boot Time Optimization
Android Boot Time Optimization
Kan-Ru Chen
 
SMP implementation for OpenBSD/sgi
SMP implementation for OpenBSD/sgiSMP implementation for OpenBSD/sgi
SMP implementation for OpenBSD/sgi
Takuya ASADA
 
Pluggable Infrastructure with CI/CD and Docker
Pluggable Infrastructure with CI/CD and DockerPluggable Infrastructure with CI/CD and Docker
Pluggable Infrastructure with CI/CD and Docker
Bob Killen
 
Rsockets ofa12
Rsockets ofa12Rsockets ofa12
Rsockets ofa12
trustitrusti
 
DPDK Summit 2015 - Intel - Keith Wiles
DPDK Summit 2015 - Intel - Keith WilesDPDK Summit 2015 - Intel - Keith Wiles
DPDK Summit 2015 - Intel - Keith Wiles
Jim St. Leger
 
Dan Norris: Exadata security
Dan Norris: Exadata securityDan Norris: Exadata security
Dan Norris: Exadata security
Kyle Hailey
 
The Future of Security and Productivity in Our Newly Remote World
The Future of Security and Productivity in Our Newly Remote WorldThe Future of Security and Productivity in Our Newly Remote World
The Future of Security and Productivity in Our Newly Remote World
DevOps.com
 
Defcon 22 - Stitching numbers - generating rop payloads from in memory numbers
Defcon 22 - Stitching numbers - generating rop payloads from in memory numbersDefcon 22 - Stitching numbers - generating rop payloads from in memory numbers
Defcon 22 - Stitching numbers - generating rop payloads from in memory numbers
Alexandre Moneger
 
Attack your Trusted Core
Attack your Trusted CoreAttack your Trusted Core
Attack your Trusted Core
Di Shen
 
Rodrigo Almeida - Microkernel development from project to implementation
Rodrigo Almeida - Microkernel development from project to implementationRodrigo Almeida - Microkernel development from project to implementation
Rodrigo Almeida - Microkernel development from project to implementation
Felipe Prado
 
FIPS 140-2 Validations in a Secure Enclave
FIPS 140-2 Validations in a Secure EnclaveFIPS 140-2 Validations in a Secure Enclave
FIPS 140-2 Validations in a Secure Enclave
wolfSSL
 
Mitigating Java Deserialization attacks from within the JVM
Mitigating Java Deserialization attacks from within the JVMMitigating Java Deserialization attacks from within the JVM
Mitigating Java Deserialization attacks from within the JVM
Apostolos Giannakidis
 
learning STM -32
learning STM -32 learning STM -32
learning STM -32
SeoTechnoscripts
 
STM -32
STM -32STM -32
Timings of Init : Android Ramdisks for the Practical Hacker
Timings of Init : Android Ramdisks for the Practical HackerTimings of Init : Android Ramdisks for the Practical Hacker
Timings of Init : Android Ramdisks for the Practical Hacker
Stacy Devino
 
Mitigating Java Deserialization attacks from within the JVM (improved version)
Mitigating Java Deserialization attacks from within the JVM (improved version)Mitigating Java Deserialization attacks from within the JVM (improved version)
Mitigating Java Deserialization attacks from within the JVM (improved version)
Apostolos Giannakidis
 
44CON London 2015 - How to drive a malware analyst crazy
44CON London 2015 - How to drive a malware analyst crazy44CON London 2015 - How to drive a malware analyst crazy
44CON London 2015 - How to drive a malware analyst crazy
44CON
 
ProjectVault[VivekKumar_CS-C_6Sem_MIT].pptx
ProjectVault[VivekKumar_CS-C_6Sem_MIT].pptxProjectVault[VivekKumar_CS-C_6Sem_MIT].pptx
ProjectVault[VivekKumar_CS-C_6Sem_MIT].pptx
Vivek Kumar
 
XPDDS18: Design Session - SGX deep dive and SGX Virtualization Discussion, Ka...
XPDDS18: Design Session - SGX deep dive and SGX Virtualization Discussion, Ka...XPDDS18: Design Session - SGX deep dive and SGX Virtualization Discussion, Ka...
XPDDS18: Design Session - SGX deep dive and SGX Virtualization Discussion, Ka...
The Linux Foundation
 

Similar to NSC #2 - D2 01 - Andrea Allievi - Windows 8.1 Patch Protections (20)

Joanna Rutkowska Subverting Vista Kernel
Joanna Rutkowska   Subverting Vista KernelJoanna Rutkowska   Subverting Vista Kernel
Joanna Rutkowska Subverting Vista Kernel
 
Android Boot Time Optimization
Android Boot Time OptimizationAndroid Boot Time Optimization
Android Boot Time Optimization
 
SMP implementation for OpenBSD/sgi
SMP implementation for OpenBSD/sgiSMP implementation for OpenBSD/sgi
SMP implementation for OpenBSD/sgi
 
Pluggable Infrastructure with CI/CD and Docker
Pluggable Infrastructure with CI/CD and DockerPluggable Infrastructure with CI/CD and Docker
Pluggable Infrastructure with CI/CD and Docker
 
Rsockets ofa12
Rsockets ofa12Rsockets ofa12
Rsockets ofa12
 
DPDK Summit 2015 - Intel - Keith Wiles
DPDK Summit 2015 - Intel - Keith WilesDPDK Summit 2015 - Intel - Keith Wiles
DPDK Summit 2015 - Intel - Keith Wiles
 
Dan Norris: Exadata security
Dan Norris: Exadata securityDan Norris: Exadata security
Dan Norris: Exadata security
 
The Future of Security and Productivity in Our Newly Remote World
The Future of Security and Productivity in Our Newly Remote WorldThe Future of Security and Productivity in Our Newly Remote World
The Future of Security and Productivity in Our Newly Remote World
 
Defcon 22 - Stitching numbers - generating rop payloads from in memory numbers
Defcon 22 - Stitching numbers - generating rop payloads from in memory numbersDefcon 22 - Stitching numbers - generating rop payloads from in memory numbers
Defcon 22 - Stitching numbers - generating rop payloads from in memory numbers
 
Attack your Trusted Core
Attack your Trusted CoreAttack your Trusted Core
Attack your Trusted Core
 
Rodrigo Almeida - Microkernel development from project to implementation
Rodrigo Almeida - Microkernel development from project to implementationRodrigo Almeida - Microkernel development from project to implementation
Rodrigo Almeida - Microkernel development from project to implementation
 
FIPS 140-2 Validations in a Secure Enclave
FIPS 140-2 Validations in a Secure EnclaveFIPS 140-2 Validations in a Secure Enclave
FIPS 140-2 Validations in a Secure Enclave
 
Mitigating Java Deserialization attacks from within the JVM
Mitigating Java Deserialization attacks from within the JVMMitigating Java Deserialization attacks from within the JVM
Mitigating Java Deserialization attacks from within the JVM
 
learning STM -32
learning STM -32 learning STM -32
learning STM -32
 
STM -32
STM -32STM -32
STM -32
 
Timings of Init : Android Ramdisks for the Practical Hacker
Timings of Init : Android Ramdisks for the Practical HackerTimings of Init : Android Ramdisks for the Practical Hacker
Timings of Init : Android Ramdisks for the Practical Hacker
 
Mitigating Java Deserialization attacks from within the JVM (improved version)
Mitigating Java Deserialization attacks from within the JVM (improved version)Mitigating Java Deserialization attacks from within the JVM (improved version)
Mitigating Java Deserialization attacks from within the JVM (improved version)
 
44CON London 2015 - How to drive a malware analyst crazy
44CON London 2015 - How to drive a malware analyst crazy44CON London 2015 - How to drive a malware analyst crazy
44CON London 2015 - How to drive a malware analyst crazy
 
ProjectVault[VivekKumar_CS-C_6Sem_MIT].pptx
ProjectVault[VivekKumar_CS-C_6Sem_MIT].pptxProjectVault[VivekKumar_CS-C_6Sem_MIT].pptx
ProjectVault[VivekKumar_CS-C_6Sem_MIT].pptx
 
XPDDS18: Design Session - SGX deep dive and SGX Virtualization Discussion, Ka...
XPDDS18: Design Session - SGX deep dive and SGX Virtualization Discussion, Ka...XPDDS18: Design Session - SGX deep dive and SGX Virtualization Discussion, Ka...
XPDDS18: Design Session - SGX deep dive and SGX Virtualization Discussion, Ka...
 

Recently uploaded

Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Alpen-Adria-Universität
 
Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!
GDSC PJATK
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
Tatiana Kojar
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
Operating System Used by Users in day-to-day life.pptx
Operating System Used by Users in day-to-day life.pptxOperating System Used by Users in day-to-day life.pptx
Operating System Used by Users in day-to-day life.pptx
Pravash Chandra Das
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 
Trusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process MiningTrusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process Mining
LucaBarbaro3
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Tatiana Kojar
 
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
alexjohnson7307
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
saastr
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
Wouter Lemaire
 
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Jeffrey Haguewood
 
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdfNunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
flufftailshop
 
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - HiikeSystem Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
Hiike
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 

Recently uploaded (20)

Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
 
Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
Operating System Used by Users in day-to-day life.pptx
Operating System Used by Users in day-to-day life.pptxOperating System Used by Users in day-to-day life.pptx
Operating System Used by Users in day-to-day life.pptx
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 
Trusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process MiningTrusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process Mining
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
 
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
 
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
 
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdfNunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
 
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - HiikeSystem Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 

NSC #2 - D2 01 - Andrea Allievi - Windows 8.1 Patch Protections

  • 1. It’s all about gong fu! (part 2) Understanding and Defeating Windows 8.1 Kernel Patch Protection: Andrea Allievi Talos Security Research and Intelligence Group - Cisco Systems Inc. aallievi@cisco.com November 20th, 2014 - NoSuchCon
  • 2. 2© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Who am I •  Security researcher, focused on Malware Research •  Work for Cisco Systems in the TALOS Security Research and Intelligence Group •  Microsoft OSs Internals enthusiast / Kernel system level developer •  Previously worked for PrevX, Webroot and Saferbytes •  Original designer of the first UEFI Bootkit in 2012, and other research projects/analysis
  • 3. 3© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Agenda 0. Some definitions 1.  Introduction to Patchguard and Driver Signing Enforcement 2.  Kernel Patch Protection Implementation 3.  Attacking Patchguard 4.  Demo time 5.  Going ahead in Patchguard Exploitation
  • 4. 4© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Introduction
  • 5. 5© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Definitions •  Patchguard or Kernel Patch Protection is a Microsoft technology developed to prevent any kind of modification to the Windows Kernel •  Driver Signing Enforcement, aka DSE, prevents any non-digitally signed code from being loaded and executed in the Windows Kernel •  A Deferred Procedure Call, aka DPC, is an operating system mechanism which allows high-priority tasks to defer required but lower-priority tasks for later execution •  An Asynchronous Procedure Call, aka APC, is a function that executes asynchronously in the context of a particular thread.
  • 6. 6© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential •  Snake campaign – Uroburos rootkit: an advanced rootkit capable of infecting several version of Windows, including Windows 7 64 bit •  Rootkit not able to infect Windows 8 / 8.1 because of security mitigations, enhanced DSE and Patchguard implementation •  Reversed the entire rootkit; this made me wonder how to to defeat DSE and Patchguard in Windows 8.1. •  This was done in the past with an UEFI bootkit - my approach now uses a kernel driver My work
  • 7. 7© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential •  Implemented completely differently than on Windows 7 (kernel 6.1) •  A kernel driver is usually loaded by the NtLoadDriver API function – ends in ZwCreateSection. •  A large call stack is made, that ends in SeValidateImageHeader •  SeValidateImageHeader - CiValidateImageHeader code integrity routine •  Still easy to disarm, a simple modification of the g_CiOptions internal variable is enough Windows 8.1 Code Integrity
  • 8. 8© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential •  If the value of the g_ciOptions variable changes, the Patchguard code is able to pinpoint the modification and crash the system •  Kernel Patch Protection implemented in various parts of the OS. Function names voluntarily misleading •  Patchguard in Windows 8.1 is much more effective than previous implementations •  Multiple PG buffers and contexts installed on the target system •  Uses a large numbers of tricks to hinder analysis Windows 8.1 Kernel Patch Protection
  • 9. 9© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Windows 8.1 Kernel Patch Protection Implementation
  • 10. 10© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential •  KeInitAmd64SpecificState raises a Divide Error exception – execution transferred to KiFilterFiberContext •  KiInitializePatchguard is a huge function (~ 96 Kbyte of pure code) that builds a large PG buffer •  Structured Exception handling implementation: http://vrt-blog.snort.org/2014/06/exceptional-behavior-windows-81- x64-seh.html •  Other initialization point: ExpLicenseWatchInitWorker (rare) Kernel Patch Protection – How does it work?
  • 11. 11© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential int  KeInitAmd64SpecificState()  {        DWORD  dbgMask  =  0;        int  dividend  =  0,  result  =  0;        int  value  =  0;          //  Exit  in  case  the  system  is  booted  in  safe  mode        if  (InitSafeBootMode)  return  0;        //  KdDebuggerNotPresent:  1  -­‐  no  debugger;  0  -­‐  a  debugger  is  attached        dbgMask  =  KdDebuggerNotPresent;        //  KdPitchDebugger:  1  -­‐  debugger  disabled;  0  -­‐  a  debugger  could  be  attached        dbgMask  |=  KdPitchDebugger;                  if  (dbgMask)  dividend  =  -­‐1;            //  Debugger  completely  disabled  (0xFFFFFFFF)        else  dividend  =  0x11;                        //  Debugger  might  be  enabled                  value  =  (int)_rotr(dbgMask,  1);        //  value64  is  equal  to  0  if  debugger  is  enable                                                                    //  0x80000000  if  debugger  is  NOT  enabled            //  Perform  a  signed  division  between  two  32  bit  integers:        result  =  (int)(value  /  dividend);      //  IDIV  value,  dividend        return  result; }
  • 12. 12© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential The Kernel Patch Protection buffer 3 main sections surrounded by a random number of randomly generated values 1.  Internal configuration area.
  • 13. 13© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential The Kernel Patch Protection buffer 2.  Patchguard’s code and a copy of some NT kernel functions
  • 14. 14© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential The Kernel Patch Protection buffer 3.  Protected code and data
  • 15. 15© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Implementation - Scheme •  Patchguard code is linked to the system in different ways: Timers, DPC routines, KPRCB reserved data fields, APC routines and a System Thread •  Patchguard initialization stub function KiFilterFiberContext randomly decides the PG link type and the number of PG contexts (1 to 4) ü  See here: http://blog.ptsecurity.com/2014/09/microsoft-windows-81-kernel- patch.html •  Entry points code: recover PG contexts, decrypts the first 4 bytes
  • 16. 16© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Implementation – Scheme 2 •  Patchguard code located inside the big buffer (section 2) organized mainly in 4 blocks:
  • 17. 17© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Kernel Patch Protection – System checks •  Patchguard code implemented mainly in the “INITKDBG” section + chunks in “.text” section •  INITKDBG section copied, then discarded •  The self-verification routine executed with a copy of the original processor IDT •  Finally queues a Work item -> Main Check Routine…
  • 18. 18© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential The Main check routine •  Self-verification of the remaining bytes of section 1 and 2 •  PatchguardEncryptAndWait function: on-the-fly encryption, waits a random number of minutes •  Verifies each code and data chunks of the protected kernel modules. •  Uses an array of Patchguard data structures •  If a modification is detected, a system crash initiated by “SdbpCheckDll” function
  • 19. 19© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential //  Calculate  a  DWORD  key  for  a  specified  Chunk DWORD  CalculateNtChunkPgKey(QWORD  qwMasterKey,  int  iNumBitsToRotate,  LPBYTE  chunkPtr,  DWORD  chunkSize)   { //  …  some  declarations  here  …   for  (count  =  0;  count  <  chunkSize  /  sizeof(QWORD);  count++)  { QWORD  *  qwPtr  =  (QWORD*)chunkPtr;  //  Current  buffer  QWORD  pointer qwCurKey  =  _rotl64((*qwPtr)  ^  qwCurKey,  iNumBitsToRotate);  //  Update  the  key chunkPtr  +=  sizeof(QWORD);  //  Update  buffer  ptr }   //  Calculate  remaining  bytes  to  process DWORD  dwRemainingByte  =  chunkSize  %  sizeof(QWORD); for  (count  =  0;  count  <  dwRemainingByte;  count++)  { LONGLONG  qwByte  =  //  Current  signed-­‐extended  byte  (LONGLONG)(*chunkPtr); qwCurKey  =  _rotl64(qwCurKey  ^  qwByte,  iNumBitsToRotate);      //  Update  the  key chunkPtr  ++;    //  Update  buffer  ptr }   //  Calculate  DWORD  key while  (qwCurKey)  { dwRetKey  ^=  (DWORD)qwCurKey; qwCurKey  =  qwCurKey  >>  31; } //  Keep  in  mind  that  the  following  key  is  verified  after  resetting  its  MSB:  (dwRetKey  &  0x7FFFFFFF) return  dwRetKey; }
  • 20. 20© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Attacking Patchguard
  • 21. 21© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Available attacks All the available attacks have been defeated by the last version of Kernel Patch protection: •  x64 debug registers (DR registers) •  Exception handler hooking, Patching the kernel timer DPC dispatcher •  Hooking KeBugCheckEx and/or other kernel key functions •  Patchguard code decryption routine modification (McAfee method)
  • 22. 22© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Available attacks – The Uroburos method •  Uroburos rootkit hooks RtlCaptureContext internal Nt Kernel routine. •  It’s a function directly called by KeBugCheckEx, used by Patchguard to crash the system. •  Uroburos filters all the RtlCaptureContext calls made by KeBugCheckEx •  If the call is a Patchguard one, it restores the thread execution to its start address. •  If the IRQL too high - Uroburos exploits its own hook to KiRetireDpcList
  • 23. 23© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Some new attacks 2 different types of feasible attacks idealized: •  Neutralize and block every Patchguard entry point •  On-the-fly modification of the encrypted Patchguard buffer, and make it auto-deleting After my first article released, other guy, Tandasat method: hooking the end of KiCommitThreadWait and KiAttemptFastRemovePriQueue functions https://github.com/tandasat/PgResarch/tree/master/DisPG
  • 24. 24© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Some new attacks – Can we innovate? •  All available methods try to prevent the Patchguard Code from being executed. •  Patchguard code can be an attacker best friend J
  • 25. 25© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Forging Windows 8.1 Patchguard My method uses a kernel-mode driver that does some things: 1.  Acquires all processors ownership (very important step) and searches the Patchguard buffers starting from Windows Timers queue, DPC list, processor KPRCB structure, APC list, system threads list 2.  Retrieves all the PG contexts (decryption key and so on...), and decrypts the Patchguard buffers 3.  Analyses the buffer, retrieves all the needed information, and modifies it in a clever manner: ü  Identify self-verify routine and disable it ü  Identify main check routine and disarm it ü  Let the Patchguard code execution continues 4.  Re-encrypts Patchguard buffer, releases all processors ownership
  • 26. 26© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
  • 27. 27© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Forging Windows 8.1 Patchguard - Details The implementation is not easy. I have had to overcome some difficulties. Patchguard Contexts: 1.  Timers – Search in system timer list 2.  DPC – Search in system DPCs queue 3.  APC – Insert an hook to KeInsertQueueApc 4.  KPRCB – Analyse the undocumented fields in KPRCB structure (AcpiReserved, HalReserved) 5.  Patchguard Thread – Search in the system threads list (very rare) 6.  Other entry points (KiBalanceSetManagerPeriodicDpc) – KeInsertQueueDpc hook
  • 28. 28© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Demo Time
  • 29. 29© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Demo Time - Results •  Windows 8.1 Professional x64 – Fully updated •  Results: ü  Reliable method, works well on all versions of Windows 8.1 ü  Hard to develop •  Comparison with other method: ü  Completely different method, platform dependent (it relies on “symsrv.dll” to obtain Windows symbols) ü  It can’t take advantage of Patchguard code to do some attacker’s dirty things J
  • 30. 30© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Going ahead
  • 31. 31© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Anti-Patchguard – Going ahead •  What happens if an attacker changes some verification hases directly located in the Patchguard buffer? •  A very strong weapon could bear: Use Windows 8.1 code to protect an attacker’ rootkit code •  The Patchguard buffer, in its main section, includes 3 keys: The master key and 2 self-verification keys •  To achieve our goal we should modify some DWORD hashes, and finally we need to resign the entire Patchguard buffer
  • 32. 32© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential //  Re-­‐sign  a  Patchguard  buffer  modifying  its  Self-­‐Verify  keys   NTSTATUS  ReSignPgBuffer(LPBYTE  lpPgBuff)  {   //  ...  a  lot  of  declarations  here  ...   lpqwPgSelfVerifyKey  =  (QWORD*)((LPBYTE)lpPgBuff  +  0x3F0);     //  Save  original  data  and  set  to  0     RtlCopyMemory(&orgPgWorkItem,  pPgWorkItem,  sizeof(WORK_QUEUE_ITEM));     RtlZeroMemory(pPgWorkItem,  sizeof(WORK_QUEUE_ITEM));     qwOrgPgSignKey  =  *lpqwPgSelfVerifyKey;  lpqwPgSelfVerifyKey[0]  =  0;     dwOrgNumOfVerifiedBytes  =  *lpdwNumOfVerifiedBytes;  lpdwNumOfVerifiedBytes[0]  =  0;       //  Now  recalculate  Patchguard  Self-­‐Verify  Key     qwNewSelfKey  =  CalculatePgSelfVerifyKey(qwPgMasterKey,  iNumToRotate,  (LPBYTE)lpPgBuff,   dwNumBytesToSelfCheck);     DbgPrint("ReSignPgBuffer  -­‐  Successfully  calculated  and  replaced  PG  Self-­‐Verify  Key.  Old  One:   0x%08X'%08X  -­‐  New  One:  0x%08X'%08X.rn",       qwOrgPgSignKey  >>  32,  (DWORD)qwOrgPgSignKey,  qwNewSelfKey  >>  32,  (DWORD)qwNewSelfKey);     *lpqwPgSelfVerifyKey  =  qwNewSelfKey;       //  Restore  previous  data     RtlCopyMemory(pPgWorkItem,  &orgPgWorkItem,  sizeof(WORK_QUEUE_ITEM));     *lpdwNumOfVerifiedBytes  =  dwNumBytesToSelfCheck;     return  STATUS_SUCCESS;   }  
  • 33. 33© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Use Windows 8.1 code to protect an attacker’s rootkit code •  Our tests have demonstrated that the method is reliable, we have installed and protected a hook to the NtCreateFile API function •  Patchguard recognizes the new code as original and starts protecting it •  If an anti-rootkit solution tries to touch the “hook” code, the system suddenly crashes J •  Some problems, research still in progress •  Very cool way to recruit an opponent technology J J •  Time for another demo?
  • 34. 34© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Use Windows 8.1 code to protect an attacker’ rootkit code
  • 35. 35© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Questions Time
  • 36. 36© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Resources and Acknowledgements
  • 37. 37© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Available resources Patchguard 8.1 Introduction material available on the VRT blog: 1.  http://vrt-blog.snort.org/2014/04/snake-campaign-few-words-about-uroburos.html 2.  http://vrt-blog.snort.org/2014/06/exceptional-behavior-windows-81-x64-seh.html 3.  http://vrt-blog.snort.org/2014/08/the-windows-81-kernel-patch-protection.html Analysis of previous versions of Patchguard: 1.  http://www.zer0mem.sk/?p=271 (inspiration for my title) 2.  http://www.uninformed.org/?v=3&a=3 3.  http://uninformed.org/index.cgi?v=8&a=5 4.  http://www.codeproject.com/Articles/28318/Bypassing-PatchGuard Brand-new analysis, methods and techniques: 1.  http://blog.ptsecurity.com/2014/09/microsoft-windows-81-kernel-patch.html 2.  https://github.com/tandasat/PgResarch/tree/master/DisPG
  • 38. 38© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Personal info Andrea Allievi – AaLl86 Email: aallievi@cisco.com Twitter: @aall86 Talos blog: http://blogs.cisco.com/talos Sourcefire VRT blog (retired): http://vrt-blog.snort.org/ My personal website: www.andrea-allievi.com Skype: aall86 For any question, information, send me a mail or a request on skype!
  • 39. 39© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential •  TALOS Team for the help and support: Alain, Shaun, Angel, Douglas, Mariano, Emmanuel •  Microsoft engineers for developing a great technology •  My family and girlfriend for the support J •  Zer0mem for lending me the title J Acknowledgements - Thanks to
  • 40. 40© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Thank you for attending! ps. Ready for the next Windows 10 Patchguard disarm?