SlideShare a Scribd company logo
1 of 53
Download to read offline
WCE Internals
      Hernan Ochoa
(hernan@ampliasecurity.com)
What is WCE?
• Windows Credentials Editor v1.0

• Manipulates Windows Logon Sessions

• Evolution of the Pass-the-Hash Toolkit (also
  written by me)

• WCE v1.1 to be published after this is over 
WCE features
• Dump in-memory credentials of logon
  sessions
  – Lists in-memory logon sessions
     • Dumps in-memory username, domain, LM & NT
       hashes
     • current, future and terminated (…)
  – Great to ‘steal’ credentials not stored locally
WCE features

• Pass-The-Hash
  – Change/delete NTLM credentials of logon sessions
  – Create new logon sessions and associate arbitrary
    NTLM credentials
WCE features

• Does not require code injection to dump in-
  memory credentials (v1.1)
  – No need to run code inside LSASS.EXE
  – Can locate, list and decrypt Logon Sessions and
    NTLM credentials just by reading memory
WCE features
• Single executable (wce.exe)
  – Easier to use, upload, etc.

• Supports
  – Windows XP
  – Windows 2003
  – Windows Vista
  – Windows 7
  – Windows 2008
How does it work?
• Windows NT Logon and authentication model


            Logon
                                       LSA
          Processes




                      Authentication
                        Packages
Windows NT Logon and
Authentication Model
      WINLOGON.EXE



      LSA AUTH API
      (LSASRV.DLL)


       MSV1_0.DLL
     (NTLM AUTH PKG)
            …


        LSASS.EXE
Windows NT Logon and Authentication Model:
                  NTLM

                                     WINLOGON.EXE




                                                              NTLM
                                                              CREDS
msv1_0.dll!LsaApLogonUser/Ex/Ex2()
                                                     Logon
   • Authenticates user
                                                    Session
   • Create logon session
                                                     (LUID)
   • Add Credentials to Session

              LSASS.EXE
Logon Sessions  Credentials

           Logon Session
Process       (LUID)          NTLM
                           CREDENTIALS
Implementation:
                   two possible ways…
 'Use Auth Package API’ Method    ‘Read LSASS Memory’ Method
           (less safe)                     (very safe)



• List LUIDs                      • Read LSASS Memory
• Run code inside LSASS.EXE          • Learn inner workings
• Call MSV1_0.DLL Functions          • Undocumented
    • AddPrimaryCredential              structures
    • GetPrimaryCredentials          • List Logon Sessions
    • DeletePrimaryCredential        • Find keys and friends
• No need to encrypt or decrypt      • Decrypt/Encrypt
  credentials                           credentials

• OS/Version ~independent         • OS/Version dependent
Initialization of auth packages

                   Loads authentication packages and
LSASS.EXE
                    calls <authpkg>.dll!LsaApInitializePackage

                         • For Example,
                           msv1_0.dll!LsaApInitializepackage()


 NTSTATUS LsaApInitializePackage(
     __in ULONG AuthenticationPackageId,
     __in PLSA_DISPATCH_TABLE LsaDispatchTable,
     __in_opt PLSA_STRING Database,
     __in_opt PLSA_STRING Confidentiality,
     __out PLSA_STRING *AuthenticationPackageName );
Functions provided to auth packages

typedef struct LSA_DISPATCH_TABLE {
        PLSA_CREATE_LOGON_SESSION             CreateLogonSession;
        PLSA_DELETE_LOGON_SESSION             DeleteLogonSession;
        PLSA_ADD_CREDENTIAL                   AddCredential;
        PLSA_GET_CREDENTIALS                  GetCredentials;
        PLSA_DELETE_CREDENTIAL                DeleteCredential;
        PLSA_ALLOCATE_LSA_HEAP                AllocateLsaHeap;
        PLSA_FREE_LSA_HEAP                    FreeLsaHeap;
        PLSA_ALLOCATE_CLIENT_BUFFER           AllocateClientBuffer;
        PLSA_FREE_CLIENT_BUFFER               FreeClientBuffer;
        PLSA_COPY_TO_CLIENT_BUFFER            CopyToClientBuffer;
        PLSA_COPY_FROM_CLIENT_BUFFER          CopyFromClientBuffer;
} LSA_DISPATCH_TABLE, *PLSA_DISPATCH_TABLE;
Functions handling credentials


NTSTATUS AddCredential(
  __in PLUID LogonId,
  __in ULONG AuthenticationPackage,
  __in PLSA_STRING PrimaryKeyValue,
  __in PLSA_STRING Credentials
);
Functions handling credentials
NTSTATUS GetCredentials(
 __in PLUID LogonId,
 __in ULONG AuthenticationPackage,
 __inout PULONG QueryContext,
 __in BOOLEAN RetrieveAllCredentials,
 __inout PLSA_STRING PrimaryKeyValue,
 __out PULONG PrimaryKeyLength,
 __out PLSA_STRING Credentials
     );
Functions handling credentials


NTSTATUS DeleteCredential(
  __in PLUID LogonId,
  __in ULONG AuthenticationPackage,
  __in PLSA_STRING PrimaryKeyValue
);
Windows NT Logon and Authentication Model:
             NTLM in detail

                                            WINLOGON.EXE




 LUID luid = LsaLogonUser( …,MSV1_0_PACKAGE_ID,… )



 msv1_0.dll!LsaApLogonUser/Ex/Ex2()
     • Create logon session
     • Authenticates against local sam or AD
     • msv1_0.dll!NlpAddPrimaryAddCredential(LUID, [username, domain,
        LM/NT hashes],…)
         • Lsasrv.dll!AddCredential(LUID,…)
'Use Auth
                    Implementation:
Package API’
  Method
                       Summary
       • Find by ‘signatures’ and heuristics
           • MSV1_0.DLL!NlpAddPrimaryCredential
           • MSV1_0.DLL!NlpDeletePrimaryCredential
           • MSV1_0.DLL!NlpGetPrimaryCredential
       • Run code inside LSASS.EXE
       • Call *PrimaryCredential functions
       • LSASRV.DLL functions are not called directly, eg:
           • MSV1_0.DLL!NlpAddPrimaryCredential()
                • LSASRV.DLL!AddCredential()

       • No need to encrypt/decrypt credentials
'Use Auth          Implementation:
 Package API’
   Method        Credentials Block Format


• MSV1_0.DLL!NlpAddPrimaryCredential(PLUID pluid, BYTE* ptrtoCreds,
  DWORD dwCredsSize);

• MSV1_0.DLL!NlpDeletePrimaryCredential(PLUID pluid);

• MSV1_0.DLL!NlpGetPrimaryCredential(PLUID pluid, DWORD* ptrtoCreds,
  DWORD whatever);


                 ptrtoCreds                ?
'Use Auth
                       Implementation:
Package API’       Credentials Block Format
  Method



      ptrtoCreds

                   typedef struct {
                      UNICODE_STR ustr_domain;
                      UNICODE_STR ustr_username;
                      BYTE NThash[16];
                      BYTE LMhash[16];
                      BYTE Udomain[MAX_DOMAIN_LEN];
                      BYTE Uuser[MAX_USERNAME_LEN];
                   } CREDSBLOCK;
'Use Auth
Package API’
                   Implementation:
  Method       Credentials Block Format

ptrtoCreds

       +00h          000C000D
       +04h          00000030
       +08h          00080009
       +0Ch          0000003C
       +10h          11111111111111111111111111111111
       +20h          22222222222222222222222222222222
       +30h          D0O0M0A0IN00
       +3Ch          T0E0S0T00
'Use Auth
 Package         Implementation:
   API’
 Method
            working with Session Isolation
'Use Auth
 Package           Implementation:
   API’
 Method
             working with Session Isolation

             Inject code                 LSASS.EXE
   WCE.EXE

                                        INJECTED CODE
                                             Call
                                       msv1_0.dll!NlpAdd
                                       PrimaryCredential
                                             Etc.

Session 1                  Session 0
'Use Auth
 Package
                 Implementation:
   API’     working with Session Isolation
 Method
'Use Auth
 Package
                 Implementation:
   API’     working with Session Isolation
 Method
'Use Auth
 Package
                 Implementation:
   API’     working with Session Isolation
 Method
'Use Auth
   Package                        Implementation:
     API’
   Method
                        working with Session Isolation




(Note: CreateRemoteThread() is not the the only way to inject & run code...)
'Use Auth
 Package              Implementation:
   API’
 Method
               working with Session Isolation

   • Windows Vista/7/2008
         • NTDLL.DLL!NtCreateThreadEx

   • Windows XP/2003
     • RDP / Terminal Services
         • Create a Windows Service and do everything there
         • WCE.EXE also acts as a Windows Service
             • Installs, starts, stops and removes itself
             • IPC via Named Pipe
‘Read LSASS
  Memory’          Implementation
  Method


• No need to run code inside LSASS.EXE (SUPER SAFE!)
   • ReadProcessMemory() only!

• Reverse engineer inner workings of LSASS.EXE (LSASRV.DLL)
   • Structures used internally to hold logon sessions
   • Structures used internally to hold credentials
       • Structures used internally to hold NTLM Hashes
   • Decrypt credentials
       • Find keys
       • Algorithm
       • Anything else needed to decrypt (e.g.: IV)
‘Read LSASS                               Implementation:
  Memory’                       Logon sessions & credentials structures
  Method
                                  LSASRV.DLL!LogonSessionList
                                  LSASRV.DLL!LogonSessionListCount
SESSION_ENTRY
 NEXT       PREV        …       UserLen    UserPtr      DomainLen       DomainPtr     …    PtrToCreds



   ?        AuthPkgId            PtrToCreds

CREDS_ENTRY
                                                                         CREDS_HASH_ENTRY

                            ?     PrimaryLen         PrimaryPtr     HashesLen       HashesPtr



                                                NTLM         LM          Domain     User
DomainLen   DomainOff       userLen   userOff                       …
                                                hash        hash          Name      Name

NTLM_CREDS_BLOCK (encrypted)
‘Read LSASS              Implementation:
       Memory’
       Method         changes in SESSION_ENTRY
        Windows XP/2003                      Windows Vista/7/2008

struct SESSION_ENTRY {                 struct SESSION_ENTRY {

           DWORD nextEntry;                    DWORD nextEntry;
           DWORD prevEntry;                    DWORD prevEntry;
           DWORD unk1;                         DWORD UNKNOWN[18];
           DWORD unk2;                         DWORD userSize;
           DWORD userSize;                     DWORD userNamePtrUnicode;
                                               DWORD machineSize;
           DWORD userNamePtrUnicode;
                                               DWORD machinePtrUnicode;
           DWORD machineSize;
                                               …
           DWORD machinePtrUnicode;
           ….
     +0x48 DWORD PtrToCreds;            +0x88 DWORD PtrToCreds;
};                                     };
Implementation:
                           LsaEncryptMemory()
       Windows XP/2003                          Windows Vista/7/2008

                         Lsasrv.dll!LsaEncryptMemory()



                              NTLM_CREDS_BLOCK



• Encrypted with desX-CBC or RC4         • Encrypted with 3DES-CBC or AES-128-CFB
   • If mod(size/8) == 0 => desX-cbc        • If mod(size/8) == 0 => 3DES-CBC
   • Otherwise use RC4                      • Otherwise use 3DES-CBC
• Encrypted with desX-CBC                • Encrypted with 3DES-CBC
Implementation
lsasrv.dll!LsaInitializeProtectedMemory (XP/2003)
                                0                                    190h
   VirtualAlloc()
                                    90h      8 8 8

  cbRandomKey = 100h
  pDESXTable
  pRandomKey
                                           struct DESXTable {
  SystemFunction036( byte                    byte inWhitening[8];
  Feedback[8],8)                             byte outWhitening[8];
                                             DESTable desTable;
                                          }
  desxkey( pDESXTable ,
  pRandomKey )                            struct DESTable {
                                             unsigned long keys[16][2];
                                          }
  SystemFunction036(
  pRandomKey, cbRandomKey )
Implementation
lsasrv.dll!LsaInitializeProtectedMemory                    (Vista/7/2008)
h3DesProvider = BCryptOpenAlgorithmProvider( )
hAesProvider = BCryptOpenAlgorithmProvider( )
                                     BCryptSetProperty( h3DesProvider, "CBCMode" )
                                     BCryptSetProperty( hAesProvider, "CFBMode" )

BCryptGetProperty( h3DesProvider, "ObjectLength" )
BCryptGetProperty( hAesProvider, "ObjectLength" )

                      BCryptGenRandom( h3DesProvider, 24 )
                      h3DesKey = BCryptGenerateSymmetricKey( h3DesProvider, 24 )

BCryptGenRandom( hAesProvider, 16 )
hAesKey = BCryptGenerateSymmetricKey( hAesProvider, 16 )

                                         BCryptGenRandom( InitializationVector, 16 )
Implementation:
                   crypto functions used
      Windows XP/2003                   Windows Vista/7/2008


•    Uses custom desX-CBC        • Uses Cryptography API: Next
    implementation                 Generation (CNG)
     – Located in LSASRV.DLL            • Exported by BCRYPT.DLL
     – Is not an API                    • BCryptOpenAlgorithmProvider
     – Not exported by any Win32
                                        • BCryptSetProperty /
        DLL
                                          BCryptGetProperty
                                        • BCryptGenRandom
                                        • BCryptGenerateSymmetricKey
                                        • BCryptEncrypt / BCryptDecrypt
Implementation
• desX-cbc ‘trick’ – ‘Reuse’ LsaEncryptMemory
                        CODE!LSASRV.DLL
                         LsaEncrptMemory()




           DATA                                  DATA
        IV, DESXTABLE                         IV, DESXTABLE



        LSASRV.DLL
                                             LSASRV.DLL

        LSASS.EXE                            PROCESS.EXE
Implementation:
                pseudo-code (Vista/7/2008)


LSASRV.DLL!LsaInitializeProtectedMemory(..) {

     …
        h3DesKey = BCryptGenerateSymmetricKey(
BCryptGenRandom(24 bytes) );
        …
        hAesKey = BCryptGenerateSymmetricKey(BCryptGenRandom(16
bytes))
        …
        IV = BCryptGenRandom(16 bytes)
}
Implementation
   Finding the encryption key (Vista/7/2008)
  LSASRV.DLL!LsaInitializeProtected
  Memory()
NTSTATUS WINAPI BCryptGenerateSymmetricKey(
      __inout BCRYPT_ALG_HANDLE hAlgorithm,
      __out BCRYPT_KEY_HANDLE *phKey,
      __out_opt PUCHAR pbKeyObject,
      __in ULONG cbKeyObject,
      __in PUCHAR pbSecret,
      __in ULONG cbSecret,
      __in ULONG dwFlags );
Implementation
    Finding the encryption key (Vista/7/2008)

• BCRYPT_KEY_HANDLE hKey
  – hKey = Pointer to Memory Block (BLOB)
  – hKey + 0x3C => encryption key


• To extract key, read from LSASS.EXE(LSASRV.DLL)
  – ((unsigned char*)h3DesKey)+0x3C
  – ((unsigned char*))hAesKey)+0x3C
Implementation
    Finding the encryption key (Vista/7/2008)

• Actually, offset changes between OSes
  – hKey + 0x3C => encryption key (Win7)
  – hKey + 0x2C => encryption key (Win2008)


• To be safe, I ‘discover’ the offset at runtime
  – I wrote a custom function for that
    ‘KeyDiscoverOffset()’
Implementation
     Finding the encryption key (Vista/7/2008)
• KeyDiscoverOffset()
  – Uses CNG API to create key object with hard-coded key
  – Look for hard-coded key inside BLOB pointed to by
    BCRYPT_KEY_HANDLE

 BCRYPT_KEY_HANDLE hKey              +0h


 hKey =                              +3Ch    KKKKKKKK…
 BCryptGenerateSymmetricKey(...,”K
 KKKKKKK…”)
                                     +...h
Implementation
          Finding the IV (Vista/7/2008)
• IV is also needed
• To extract IV
  – Read IV from LSASS.EXE (LSASRV.DLL) memory
  – Symbol ‘InitializationVector’


• With IV and Key, just use CNG
  – BCryptDecrypt and friends
  – No need to run code inside LSASS.EXE
Implementation:
                    Addresses Needed

      Windows XP/2003              Windows Vista/7/2008



•   LsaLogonSessionList        •   LsaLogonSessionList
•   LsaLogonSessionListCount   •   LsaLogonSessionListCount
•   DESXTable                  •   h3DesKey
•   Feedback                   •   InitializationVector
•   LsaEncryptMemory
Implementation:
             Addresses Needed

• Database of addresses

• ID by SHA1 hash of LSASRV.DLL

• Yes, addresses still an issue..
   • But ..
       • Getlsasrvaddr.exe to the rescue..
GetLSASRVADDR.exe
• Finds needed addresses automatically
   • User-friendly
   • No IDC script, IDA or anything weird like that
     is needed 

• Uses Microsoft symbol server
   • Requires http outbound connection (!)

• Associates addresses and DLLs using SHA1
GetLSASRVADDR.exe
GetLSASRVADDR.exe
• Could be integrated with WCE but..
      • The outbound connection might be an
        issue
      • huge not-there-by-default DLLs needed
           •   Symsrv.dll and dbghelp.dll (new version,
               not the default one)

•   Could implement own version of ‘symbol
    server’ protocol

•   Or perhaps it is best to use heuristics..
Implementation:
       ASLR and Windows Vista/7/2008

• LSASRV.DLL addresses and ASLR
  – Not an issue..
  – To locate symbols don’t use hard-coded addresses
  – Use Offsets instead
  – ASLR is just at boot time
  – Get current LSASRV.DLL Base Address at run-time
    and add offset
WCE execution flow (simplified)
                     List           READ
   START                                        END
                    Creds?          MEM



                    XP/2003
Install/Run/Use        ?              Vista/7   INJECT
  WCE Service                         /2008      CODE


                  CurSessionID ==
                   LSASessionID?
WCE vs PTH
Feature                                    WCE                  PTH
Supports Windows Vista/7/2008               YES                  NO

Single executable                           YES                  NO
                                                          (many executables,
                                                        need to upload dll, etc)
Delete NTLM Credentials                     YES                  NO

Works with session isolation                YES                  NO
(e.g.: via RDP)
Programmatic discovery of new                YES                 NO
LSASRV addresses                             (via
                                       getlsasrvaddr)
Seamlessly chooses code injection or        YES                  NO
reading from memory
Conclusions
• WCE v1.1
  – More features and OSes supported
  – Works via RDP/Terminal Services
  – No code injection needed
  – Better solution for ‘addresses issue’
  – ‘zombie’ logon sessions and credentials still
    around in Windows 7 and family..
  – Download WCE v1.1!
     • http://www.ampliasecurity.com/research/wce_v1_1.tgz
‘zombie’ logon sessions and credentials
         NTLM
         CREDS

    Logon
   Session       RDP/Terminal Services
                 connection




                                         Domain Admin
Some Server
(e.g.: backup
server nobody
cares about)

                           Attacker
Preguntas?
             Gracias!
Hernan Ochoa (hernan@ampliasecurity.com)

http://www.twitter.com/hernano
http://www.twitter.com/ampliasecurity
http://www.ampliasecurity.com/blog/

More Related Content

What's hot

Linux Serial Driver
Linux Serial DriverLinux Serial Driver
Linux Serial Driver艾鍗科技
 
Windows kernel basic exploit
Windows kernel basic exploitWindows kernel basic exploit
Windows kernel basic exploitKyoungseok Yang
 
Linux Ethernet device driver
Linux Ethernet device driverLinux Ethernet device driver
Linux Ethernet device driver艾鍗科技
 
How to use KASAN to debug memory corruption in OpenStack environment- (2)
How to use KASAN to debug memory corruption in OpenStack environment- (2)How to use KASAN to debug memory corruption in OpenStack environment- (2)
How to use KASAN to debug memory corruption in OpenStack environment- (2)Gavin Guo
 
Static partitioning virtualization on RISC-V
Static partitioning virtualization on RISC-VStatic partitioning virtualization on RISC-V
Static partitioning virtualization on RISC-VRISC-V International
 
U-boot and Android Verified Boot 2.0
U-boot and Android Verified Boot 2.0U-boot and Android Verified Boot 2.0
U-boot and Android Verified Boot 2.0GlobalLogic Ukraine
 
MES102 - Verse on Premises 2.0 Best Practices
MES102 - Verse on Premises 2.0 Best PracticesMES102 - Verse on Premises 2.0 Best Practices
MES102 - Verse on Premises 2.0 Best PracticesDylan Redfield
 
ACPI Debugging from Linux Kernel
ACPI Debugging from Linux KernelACPI Debugging from Linux Kernel
ACPI Debugging from Linux KernelSUSE Labs Taipei
 
Linux Kernel Booting Process (1) - For NLKB
Linux Kernel Booting Process (1) - For NLKBLinux Kernel Booting Process (1) - For NLKB
Linux Kernel Booting Process (1) - For NLKBshimosawa
 
Linux presentation
Linux presentationLinux presentation
Linux presentationNikhil Jain
 
[Python] Quick book for dell switch_os10
[Python] Quick book for dell switch_os10[Python] Quick book for dell switch_os10
[Python] Quick book for dell switch_os10Jo Hoon
 
Android Storage - Vold
Android Storage - VoldAndroid Storage - Vold
Android Storage - VoldWilliam Lee
 
Credential store using HashiCorp Vault
Credential store using HashiCorp VaultCredential store using HashiCorp Vault
Credential store using HashiCorp VaultMayank Patel
 
Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...
Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...
Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...Linaro
 
SANS Forensics 2009 - Memory Forensics and Registry Analysis
SANS Forensics 2009 - Memory Forensics and Registry AnalysisSANS Forensics 2009 - Memory Forensics and Registry Analysis
SANS Forensics 2009 - Memory Forensics and Registry Analysismooyix
 
BeagleBone Black: Platform Bring-Up with Upstream Components
BeagleBone Black: Platform Bring-Up with Upstream ComponentsBeagleBone Black: Platform Bring-Up with Upstream Components
BeagleBone Black: Platform Bring-Up with Upstream ComponentsGlobalLogic Ukraine
 
Speed up your asset imports for big projects - Unite Copenhagen 2019
Speed up your asset imports for big projects - Unite Copenhagen 2019Speed up your asset imports for big projects - Unite Copenhagen 2019
Speed up your asset imports for big projects - Unite Copenhagen 2019Unity Technologies
 
Qt5 (minimal) on beaglebone, with Yocto
Qt5 (minimal) on beaglebone, with YoctoQt5 (minimal) on beaglebone, with Yocto
Qt5 (minimal) on beaglebone, with YoctoPrabindh Sundareson
 
Hacking and securing ios applications
Hacking and securing ios applicationsHacking and securing ios applications
Hacking and securing ios applicationsSatish b
 

What's hot (20)

Linux Serial Driver
Linux Serial DriverLinux Serial Driver
Linux Serial Driver
 
Windows kernel basic exploit
Windows kernel basic exploitWindows kernel basic exploit
Windows kernel basic exploit
 
Linux Ethernet device driver
Linux Ethernet device driverLinux Ethernet device driver
Linux Ethernet device driver
 
How to use KASAN to debug memory corruption in OpenStack environment- (2)
How to use KASAN to debug memory corruption in OpenStack environment- (2)How to use KASAN to debug memory corruption in OpenStack environment- (2)
How to use KASAN to debug memory corruption in OpenStack environment- (2)
 
Static partitioning virtualization on RISC-V
Static partitioning virtualization on RISC-VStatic partitioning virtualization on RISC-V
Static partitioning virtualization on RISC-V
 
U-boot and Android Verified Boot 2.0
U-boot and Android Verified Boot 2.0U-boot and Android Verified Boot 2.0
U-boot and Android Verified Boot 2.0
 
MES102 - Verse on Premises 2.0 Best Practices
MES102 - Verse on Premises 2.0 Best PracticesMES102 - Verse on Premises 2.0 Best Practices
MES102 - Verse on Premises 2.0 Best Practices
 
Embedded linux network device driver development
Embedded linux network device driver developmentEmbedded linux network device driver development
Embedded linux network device driver development
 
ACPI Debugging from Linux Kernel
ACPI Debugging from Linux KernelACPI Debugging from Linux Kernel
ACPI Debugging from Linux Kernel
 
Linux Kernel Booting Process (1) - For NLKB
Linux Kernel Booting Process (1) - For NLKBLinux Kernel Booting Process (1) - For NLKB
Linux Kernel Booting Process (1) - For NLKB
 
Linux presentation
Linux presentationLinux presentation
Linux presentation
 
[Python] Quick book for dell switch_os10
[Python] Quick book for dell switch_os10[Python] Quick book for dell switch_os10
[Python] Quick book for dell switch_os10
 
Android Storage - Vold
Android Storage - VoldAndroid Storage - Vold
Android Storage - Vold
 
Credential store using HashiCorp Vault
Credential store using HashiCorp VaultCredential store using HashiCorp Vault
Credential store using HashiCorp Vault
 
Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...
Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...
Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...
 
SANS Forensics 2009 - Memory Forensics and Registry Analysis
SANS Forensics 2009 - Memory Forensics and Registry AnalysisSANS Forensics 2009 - Memory Forensics and Registry Analysis
SANS Forensics 2009 - Memory Forensics and Registry Analysis
 
BeagleBone Black: Platform Bring-Up with Upstream Components
BeagleBone Black: Platform Bring-Up with Upstream ComponentsBeagleBone Black: Platform Bring-Up with Upstream Components
BeagleBone Black: Platform Bring-Up with Upstream Components
 
Speed up your asset imports for big projects - Unite Copenhagen 2019
Speed up your asset imports for big projects - Unite Copenhagen 2019Speed up your asset imports for big projects - Unite Copenhagen 2019
Speed up your asset imports for big projects - Unite Copenhagen 2019
 
Qt5 (minimal) on beaglebone, with Yocto
Qt5 (minimal) on beaglebone, with YoctoQt5 (minimal) on beaglebone, with Yocto
Qt5 (minimal) on beaglebone, with Yocto
 
Hacking and securing ios applications
Hacking and securing ios applicationsHacking and securing ios applications
Hacking and securing ios applications
 

Viewers also liked

Índice del libro "Hacking Web Technologies"
Índice del libro "Hacking Web Technologies"Índice del libro "Hacking Web Technologies"
Índice del libro "Hacking Web Technologies"Telefónica
 
LDAP Injection & Blind LDAP Injection
LDAP Injection & Blind LDAP InjectionLDAP Injection & Blind LDAP Injection
LDAP Injection & Blind LDAP InjectionChema Alonso
 
DirtyTooth: It´s only Rock'n Roll but I like it
DirtyTooth: It´s only Rock'n Roll but I like itDirtyTooth: It´s only Rock'n Roll but I like it
DirtyTooth: It´s only Rock'n Roll but I like itTelefónica
 
DirtyTooth: It´s only Rock'n Roll but I like it [Slides]
DirtyTooth: It´s only Rock'n Roll but I like it [Slides]DirtyTooth: It´s only Rock'n Roll but I like it [Slides]
DirtyTooth: It´s only Rock'n Roll but I like it [Slides]Telefónica
 
Golden ticket, pass the ticket mi tm kerberos attacks explained
Golden ticket, pass the ticket mi tm   kerberos attacks explainedGolden ticket, pass the ticket mi tm   kerberos attacks explained
Golden ticket, pass the ticket mi tm kerberos attacks explainedPeter Swedin
 
Máxima Seguridad en WordPress
Máxima Seguridad en WordPressMáxima Seguridad en WordPress
Máxima Seguridad en WordPressTelefónica
 
Índice del libro "Infraestructuras Críticas y Sistemas Industriales: Auditor...
Índice del libro "Infraestructuras Críticas y Sistemas Industriales: Auditor...Índice del libro "Infraestructuras Críticas y Sistemas Industriales: Auditor...
Índice del libro "Infraestructuras Críticas y Sistemas Industriales: Auditor...Telefónica
 
Connection String Parameter Pollution Attacks
Connection String Parameter Pollution AttacksConnection String Parameter Pollution Attacks
Connection String Parameter Pollution AttacksChema Alonso
 
Hacking con buscadores
Hacking con buscadoresHacking con buscadores
Hacking con buscadoresTensor
 
RamsonCloud O365: Paga por tus mensajes de correo en Office 365
RamsonCloud O365: Paga por tus mensajes de correo en Office 365RamsonCloud O365: Paga por tus mensajes de correo en Office 365
RamsonCloud O365: Paga por tus mensajes de correo en Office 365Telefónica
 
Some dirty, quick and well-known tricks to hack your bad .NET WebApps
Some dirty, quick and well-known tricks to hack your bad .NET WebAppsSome dirty, quick and well-known tricks to hack your bad .NET WebApps
Some dirty, quick and well-known tricks to hack your bad .NET WebAppsTelefónica
 
Hacking iOS: iPhone & iPad (2º Edición) [Índice]
Hacking iOS: iPhone & iPad (2º Edición) [Índice]Hacking iOS: iPhone & iPad (2º Edición) [Índice]
Hacking iOS: iPhone & iPad (2º Edición) [Índice]Telefónica
 
Tu iPhone es tan (in)seguro como tu Windows
Tu iPhone es tan (in)seguro como tu WindowsTu iPhone es tan (in)seguro como tu Windows
Tu iPhone es tan (in)seguro como tu WindowsChema Alonso
 
Índice del libro de Windows Server 2016: Administración, Seguridad y Operaciones
Índice del libro de Windows Server 2016: Administración, Seguridad y OperacionesÍndice del libro de Windows Server 2016: Administración, Seguridad y Operaciones
Índice del libro de Windows Server 2016: Administración, Seguridad y OperacionesTelefónica
 
Codemotion ES 2014: Love Always Takes Care & Humility
Codemotion ES 2014: Love Always Takes Care & HumilityCodemotion ES 2014: Love Always Takes Care & Humility
Codemotion ES 2014: Love Always Takes Care & HumilityChema Alonso
 
Capitulo I: Blog
Capitulo I: BlogCapitulo I: Blog
Capitulo I: BlogHackerEpico
 
Libro Bitcoin: La tecnología Blockchain y su investigación
Libro Bitcoin: La tecnología Blockchain y su investigaciónLibro Bitcoin: La tecnología Blockchain y su investigación
Libro Bitcoin: La tecnología Blockchain y su investigaciónTelefónica
 
Servicio VPN con OpenVPN y Latch sobre Raspberry Pi
Servicio VPN con OpenVPN y Latch sobre Raspberry PiServicio VPN con OpenVPN y Latch sobre Raspberry Pi
Servicio VPN con OpenVPN y Latch sobre Raspberry PiTelefónica
 
La evolución de la tecnología
La evolución de la tecnologíaLa evolución de la tecnología
La evolución de la tecnologíaAntonio Mg
 
Manual de integración de Latch en Mosquito MQTT Broker
Manual de integración de Latch en Mosquito MQTT BrokerManual de integración de Latch en Mosquito MQTT Broker
Manual de integración de Latch en Mosquito MQTT BrokerTelefónica
 

Viewers also liked (20)

Índice del libro "Hacking Web Technologies"
Índice del libro "Hacking Web Technologies"Índice del libro "Hacking Web Technologies"
Índice del libro "Hacking Web Technologies"
 
LDAP Injection & Blind LDAP Injection
LDAP Injection & Blind LDAP InjectionLDAP Injection & Blind LDAP Injection
LDAP Injection & Blind LDAP Injection
 
DirtyTooth: It´s only Rock'n Roll but I like it
DirtyTooth: It´s only Rock'n Roll but I like itDirtyTooth: It´s only Rock'n Roll but I like it
DirtyTooth: It´s only Rock'n Roll but I like it
 
DirtyTooth: It´s only Rock'n Roll but I like it [Slides]
DirtyTooth: It´s only Rock'n Roll but I like it [Slides]DirtyTooth: It´s only Rock'n Roll but I like it [Slides]
DirtyTooth: It´s only Rock'n Roll but I like it [Slides]
 
Golden ticket, pass the ticket mi tm kerberos attacks explained
Golden ticket, pass the ticket mi tm   kerberos attacks explainedGolden ticket, pass the ticket mi tm   kerberos attacks explained
Golden ticket, pass the ticket mi tm kerberos attacks explained
 
Máxima Seguridad en WordPress
Máxima Seguridad en WordPressMáxima Seguridad en WordPress
Máxima Seguridad en WordPress
 
Índice del libro "Infraestructuras Críticas y Sistemas Industriales: Auditor...
Índice del libro "Infraestructuras Críticas y Sistemas Industriales: Auditor...Índice del libro "Infraestructuras Críticas y Sistemas Industriales: Auditor...
Índice del libro "Infraestructuras Críticas y Sistemas Industriales: Auditor...
 
Connection String Parameter Pollution Attacks
Connection String Parameter Pollution AttacksConnection String Parameter Pollution Attacks
Connection String Parameter Pollution Attacks
 
Hacking con buscadores
Hacking con buscadoresHacking con buscadores
Hacking con buscadores
 
RamsonCloud O365: Paga por tus mensajes de correo en Office 365
RamsonCloud O365: Paga por tus mensajes de correo en Office 365RamsonCloud O365: Paga por tus mensajes de correo en Office 365
RamsonCloud O365: Paga por tus mensajes de correo en Office 365
 
Some dirty, quick and well-known tricks to hack your bad .NET WebApps
Some dirty, quick and well-known tricks to hack your bad .NET WebAppsSome dirty, quick and well-known tricks to hack your bad .NET WebApps
Some dirty, quick and well-known tricks to hack your bad .NET WebApps
 
Hacking iOS: iPhone & iPad (2º Edición) [Índice]
Hacking iOS: iPhone & iPad (2º Edición) [Índice]Hacking iOS: iPhone & iPad (2º Edición) [Índice]
Hacking iOS: iPhone & iPad (2º Edición) [Índice]
 
Tu iPhone es tan (in)seguro como tu Windows
Tu iPhone es tan (in)seguro como tu WindowsTu iPhone es tan (in)seguro como tu Windows
Tu iPhone es tan (in)seguro como tu Windows
 
Índice del libro de Windows Server 2016: Administración, Seguridad y Operaciones
Índice del libro de Windows Server 2016: Administración, Seguridad y OperacionesÍndice del libro de Windows Server 2016: Administración, Seguridad y Operaciones
Índice del libro de Windows Server 2016: Administración, Seguridad y Operaciones
 
Codemotion ES 2014: Love Always Takes Care & Humility
Codemotion ES 2014: Love Always Takes Care & HumilityCodemotion ES 2014: Love Always Takes Care & Humility
Codemotion ES 2014: Love Always Takes Care & Humility
 
Capitulo I: Blog
Capitulo I: BlogCapitulo I: Blog
Capitulo I: Blog
 
Libro Bitcoin: La tecnología Blockchain y su investigación
Libro Bitcoin: La tecnología Blockchain y su investigaciónLibro Bitcoin: La tecnología Blockchain y su investigación
Libro Bitcoin: La tecnología Blockchain y su investigación
 
Servicio VPN con OpenVPN y Latch sobre Raspberry Pi
Servicio VPN con OpenVPN y Latch sobre Raspberry PiServicio VPN con OpenVPN y Latch sobre Raspberry Pi
Servicio VPN con OpenVPN y Latch sobre Raspberry Pi
 
La evolución de la tecnología
La evolución de la tecnologíaLa evolución de la tecnología
La evolución de la tecnología
 
Manual de integración de Latch en Mosquito MQTT Broker
Manual de integración de Latch en Mosquito MQTT BrokerManual de integración de Latch en Mosquito MQTT Broker
Manual de integración de Latch en Mosquito MQTT Broker
 

Similar to Hernan Ochoa - WCE Internals [RootedCON 2011]

DEF CON 27 - ALVARO MUNOZ / OLEKSANDR MIROSH - sso wars the token menace
DEF CON 27 - ALVARO MUNOZ / OLEKSANDR MIROSH - sso wars the token menaceDEF CON 27 - ALVARO MUNOZ / OLEKSANDR MIROSH - sso wars the token menace
DEF CON 27 - ALVARO MUNOZ / OLEKSANDR MIROSH - sso wars the token menaceFelipe Prado
 
Understanding Windows Lateral Movements
Understanding Windows Lateral MovementsUnderstanding Windows Lateral Movements
Understanding Windows Lateral MovementsDaniel López Jiménez
 
SSL Certificates and Operations
SSL Certificates and OperationsSSL Certificates and Operations
SSL Certificates and OperationsNisheed KM
 
OpenStack Toronto Meetup - Keystone 101
OpenStack Toronto Meetup - Keystone 101OpenStack Toronto Meetup - Keystone 101
OpenStack Toronto Meetup - Keystone 101Steve Martinelli
 
InSecure Remote Operations - NullCon 2023 by Yossi Sassi
InSecure Remote Operations - NullCon 2023 by Yossi SassiInSecure Remote Operations - NullCon 2023 by Yossi Sassi
InSecure Remote Operations - NullCon 2023 by Yossi SassiYossi Sassi
 
Securing Microservices using Play and Akka HTTP
Securing Microservices using Play and Akka HTTPSecuring Microservices using Play and Akka HTTP
Securing Microservices using Play and Akka HTTPRafal Gancarz
 
0x02 - Windows Privilege Esc - A Low Level Explanation of Token Theft
0x02 - Windows Privilege Esc - A Low Level Explanation of Token Theft0x02 - Windows Privilege Esc - A Low Level Explanation of Token Theft
0x02 - Windows Privilege Esc - A Low Level Explanation of Token TheftRussell Sanford
 
0x002 - Windows Priv Esc - A Low Level Explanation of Token Theft
0x002 - Windows Priv Esc - A Low Level Explanation of Token Theft0x002 - Windows Priv Esc - A Low Level Explanation of Token Theft
0x002 - Windows Priv Esc - A Low Level Explanation of Token TheftRussell Sanford
 
Issue certificates with PyOpenSSL
Issue certificates with PyOpenSSLIssue certificates with PyOpenSSL
Issue certificates with PyOpenSSLPau Freixes
 
Offensive Python for Pentesting
Offensive Python for PentestingOffensive Python for Pentesting
Offensive Python for PentestingMike Felch
 
Passbolt Introduction and Usage for secret managment
Passbolt Introduction and Usage for secret managmentPassbolt Introduction and Usage for secret managment
Passbolt Introduction and Usage for secret managmentThierry Gayet
 
Lateral Movement - Phreaknik 2016
Lateral Movement - Phreaknik 2016Lateral Movement - Phreaknik 2016
Lateral Movement - Phreaknik 2016Xavier Ashe
 
Codetainer: a Docker-based browser code 'sandbox'
Codetainer: a Docker-based browser code 'sandbox'Codetainer: a Docker-based browser code 'sandbox'
Codetainer: a Docker-based browser code 'sandbox'Jen Andre
 
Lateral Movement: How attackers quietly traverse your Network
Lateral Movement: How attackers quietly traverse your NetworkLateral Movement: How attackers quietly traverse your Network
Lateral Movement: How attackers quietly traverse your NetworkEC-Council
 
Lateral Movement - Hacker Halted 2016
Lateral Movement - Hacker Halted 2016Lateral Movement - Hacker Halted 2016
Lateral Movement - Hacker Halted 2016Xavier Ashe
 

Similar to Hernan Ochoa - WCE Internals [RootedCON 2011] (20)

DEF CON 27 - ALVARO MUNOZ / OLEKSANDR MIROSH - sso wars the token menace
DEF CON 27 - ALVARO MUNOZ / OLEKSANDR MIROSH - sso wars the token menaceDEF CON 27 - ALVARO MUNOZ / OLEKSANDR MIROSH - sso wars the token menace
DEF CON 27 - ALVARO MUNOZ / OLEKSANDR MIROSH - sso wars the token menace
 
Understanding Windows Lateral Movements
Understanding Windows Lateral MovementsUnderstanding Windows Lateral Movements
Understanding Windows Lateral Movements
 
SSL Certificates and Operations
SSL Certificates and OperationsSSL Certificates and Operations
SSL Certificates and Operations
 
Dominique
DominiqueDominique
Dominique
 
OpenStack Toronto Meetup - Keystone 101
OpenStack Toronto Meetup - Keystone 101OpenStack Toronto Meetup - Keystone 101
OpenStack Toronto Meetup - Keystone 101
 
InSecure Remote Operations - NullCon 2023 by Yossi Sassi
InSecure Remote Operations - NullCon 2023 by Yossi SassiInSecure Remote Operations - NullCon 2023 by Yossi Sassi
InSecure Remote Operations - NullCon 2023 by Yossi Sassi
 
Securing Microservices using Play and Akka HTTP
Securing Microservices using Play and Akka HTTPSecuring Microservices using Play and Akka HTTP
Securing Microservices using Play and Akka HTTP
 
0x02 - Windows Privilege Esc - A Low Level Explanation of Token Theft
0x02 - Windows Privilege Esc - A Low Level Explanation of Token Theft0x02 - Windows Privilege Esc - A Low Level Explanation of Token Theft
0x02 - Windows Privilege Esc - A Low Level Explanation of Token Theft
 
0x002 - Windows Priv Esc - A Low Level Explanation of Token Theft
0x002 - Windows Priv Esc - A Low Level Explanation of Token Theft0x002 - Windows Priv Esc - A Low Level Explanation of Token Theft
0x002 - Windows Priv Esc - A Low Level Explanation of Token Theft
 
Django cryptography
Django cryptographyDjango cryptography
Django cryptography
 
OpenStack Keystone
OpenStack KeystoneOpenStack Keystone
OpenStack Keystone
 
Issue certificates with PyOpenSSL
Issue certificates with PyOpenSSLIssue certificates with PyOpenSSL
Issue certificates with PyOpenSSL
 
Offensive Python for Pentesting
Offensive Python for PentestingOffensive Python for Pentesting
Offensive Python for Pentesting
 
Passbolt Introduction and Usage for secret managment
Passbolt Introduction and Usage for secret managmentPassbolt Introduction and Usage for secret managment
Passbolt Introduction and Usage for secret managment
 
Intro to Apache Shiro
Intro to Apache ShiroIntro to Apache Shiro
Intro to Apache Shiro
 
Lateral Movement - Phreaknik 2016
Lateral Movement - Phreaknik 2016Lateral Movement - Phreaknik 2016
Lateral Movement - Phreaknik 2016
 
Codetainer: a Docker-based browser code 'sandbox'
Codetainer: a Docker-based browser code 'sandbox'Codetainer: a Docker-based browser code 'sandbox'
Codetainer: a Docker-based browser code 'sandbox'
 
Rails Security
Rails SecurityRails Security
Rails Security
 
Lateral Movement: How attackers quietly traverse your Network
Lateral Movement: How attackers quietly traverse your NetworkLateral Movement: How attackers quietly traverse your Network
Lateral Movement: How attackers quietly traverse your Network
 
Lateral Movement - Hacker Halted 2016
Lateral Movement - Hacker Halted 2016Lateral Movement - Hacker Halted 2016
Lateral Movement - Hacker Halted 2016
 

More from RootedCON

Rooted2020 A clockwork pentester - Jose Carlos Moral & Alvaro Villaverde
Rooted2020 A clockwork pentester - Jose Carlos Moral & Alvaro VillaverdeRooted2020 A clockwork pentester - Jose Carlos Moral & Alvaro Villaverde
Rooted2020 A clockwork pentester - Jose Carlos Moral & Alvaro VillaverdeRootedCON
 
rooted2020 Sandbox fingerprinting -_evadiendo_entornos_de_analisis_-_victor_c...
rooted2020 Sandbox fingerprinting -_evadiendo_entornos_de_analisis_-_victor_c...rooted2020 Sandbox fingerprinting -_evadiendo_entornos_de_analisis_-_victor_c...
rooted2020 Sandbox fingerprinting -_evadiendo_entornos_de_analisis_-_victor_c...RootedCON
 
Rooted2020 hunting malware-using_process_behavior-roberto_amado
Rooted2020 hunting malware-using_process_behavior-roberto_amadoRooted2020 hunting malware-using_process_behavior-roberto_amado
Rooted2020 hunting malware-using_process_behavior-roberto_amadoRootedCON
 
Rooted2020 compliance as-code_-_guillermo_obispo_-_jose_mariaperez_-_
Rooted2020 compliance as-code_-_guillermo_obispo_-_jose_mariaperez_-_Rooted2020 compliance as-code_-_guillermo_obispo_-_jose_mariaperez_-_
Rooted2020 compliance as-code_-_guillermo_obispo_-_jose_mariaperez_-_RootedCON
 
Rooted2020 the day i_ruled_the_world_deceiving_software_developers_through_op...
Rooted2020 the day i_ruled_the_world_deceiving_software_developers_through_op...Rooted2020 the day i_ruled_the_world_deceiving_software_developers_through_op...
Rooted2020 the day i_ruled_the_world_deceiving_software_developers_through_op...RootedCON
 
Rooted2020 si la-empresa_ha_ocultado_el_ciberataque,_como_se_ha_enterado_el_r...
Rooted2020 si la-empresa_ha_ocultado_el_ciberataque,_como_se_ha_enterado_el_r...Rooted2020 si la-empresa_ha_ocultado_el_ciberataque,_como_se_ha_enterado_el_r...
Rooted2020 si la-empresa_ha_ocultado_el_ciberataque,_como_se_ha_enterado_el_r...RootedCON
 
Rooted2020 wordpress-another_terror_story_-_manuel_garcia_-_jacinto_sergio_ca...
Rooted2020 wordpress-another_terror_story_-_manuel_garcia_-_jacinto_sergio_ca...Rooted2020 wordpress-another_terror_story_-_manuel_garcia_-_jacinto_sergio_ca...
Rooted2020 wordpress-another_terror_story_-_manuel_garcia_-_jacinto_sergio_ca...RootedCON
 
Rooted2020 Atacando comunicaciones-de_voz_cifradas_-_jose_luis_verdeguer
Rooted2020 Atacando comunicaciones-de_voz_cifradas_-_jose_luis_verdeguerRooted2020 Atacando comunicaciones-de_voz_cifradas_-_jose_luis_verdeguer
Rooted2020 Atacando comunicaciones-de_voz_cifradas_-_jose_luis_verdeguerRootedCON
 
rooted2020-Rootkit necurs no_es_un_bug,_es_una_feature_-_roberto_santos_-_jav...
rooted2020-Rootkit necurs no_es_un_bug,_es_una_feature_-_roberto_santos_-_jav...rooted2020-Rootkit necurs no_es_un_bug,_es_una_feature_-_roberto_santos_-_jav...
rooted2020-Rootkit necurs no_es_un_bug,_es_una_feature_-_roberto_santos_-_jav...RootedCON
 
Rooted2020 stefano maccaglia--_the_enemy_of_my_enemy
Rooted2020 stefano maccaglia--_the_enemy_of_my_enemyRooted2020 stefano maccaglia--_the_enemy_of_my_enemy
Rooted2020 stefano maccaglia--_the_enemy_of_my_enemyRootedCON
 
Rooted2020 taller de-reversing_de_binarios_escritos_en_golang_-_mariano_palom...
Rooted2020 taller de-reversing_de_binarios_escritos_en_golang_-_mariano_palom...Rooted2020 taller de-reversing_de_binarios_escritos_en_golang_-_mariano_palom...
Rooted2020 taller de-reversing_de_binarios_escritos_en_golang_-_mariano_palom...RootedCON
 
Rooted2020 virtual pwned-network_-_manel_molina
Rooted2020 virtual pwned-network_-_manel_molinaRooted2020 virtual pwned-network_-_manel_molina
Rooted2020 virtual pwned-network_-_manel_molinaRootedCON
 
Rooted2020 van a-mear_sangre_como_hacer_que_los_malos_lo_paguen_muy_caro_-_an...
Rooted2020 van a-mear_sangre_como_hacer_que_los_malos_lo_paguen_muy_caro_-_an...Rooted2020 van a-mear_sangre_como_hacer_que_los_malos_lo_paguen_muy_caro_-_an...
Rooted2020 van a-mear_sangre_como_hacer_que_los_malos_lo_paguen_muy_caro_-_an...RootedCON
 
Rooted2020 todo a-siem_-_marta_lopez
Rooted2020 todo a-siem_-_marta_lopezRooted2020 todo a-siem_-_marta_lopez
Rooted2020 todo a-siem_-_marta_lopezRootedCON
 
Rooted2020 roapt evil-mass_storage_-_tu-ya_aqui_-_david_reguera_-_abel_valero
Rooted2020 roapt evil-mass_storage_-_tu-ya_aqui_-_david_reguera_-_abel_valeroRooted2020 roapt evil-mass_storage_-_tu-ya_aqui_-_david_reguera_-_abel_valero
Rooted2020 roapt evil-mass_storage_-_tu-ya_aqui_-_david_reguera_-_abel_valeroRootedCON
 
Rooted2020 live coding--_jesus_jara
Rooted2020 live coding--_jesus_jaraRooted2020 live coding--_jesus_jara
Rooted2020 live coding--_jesus_jaraRootedCON
 
Rooted2020 legalidad de-la_prueba_tecnologica_indiciaria_cuando_tu_papi_es_un...
Rooted2020 legalidad de-la_prueba_tecnologica_indiciaria_cuando_tu_papi_es_un...Rooted2020 legalidad de-la_prueba_tecnologica_indiciaria_cuando_tu_papi_es_un...
Rooted2020 legalidad de-la_prueba_tecnologica_indiciaria_cuando_tu_papi_es_un...RootedCON
 
Rooted2020 hackeando el-mundo_exterior_a_traves_de_bluetooth_low-energy_ble_-...
Rooted2020 hackeando el-mundo_exterior_a_traves_de_bluetooth_low-energy_ble_-...Rooted2020 hackeando el-mundo_exterior_a_traves_de_bluetooth_low-energy_ble_-...
Rooted2020 hackeando el-mundo_exterior_a_traves_de_bluetooth_low-energy_ble_-...RootedCON
 
Rooted2020 evading deep-learning_malware_detectors_-_javier_yuste
Rooted2020 evading deep-learning_malware_detectors_-_javier_yusteRooted2020 evading deep-learning_malware_detectors_-_javier_yuste
Rooted2020 evading deep-learning_malware_detectors_-_javier_yusteRootedCON
 
Rooted2020 encontrando 0days-en_2020_-_antonio_morales
Rooted2020 encontrando 0days-en_2020_-_antonio_moralesRooted2020 encontrando 0days-en_2020_-_antonio_morales
Rooted2020 encontrando 0days-en_2020_-_antonio_moralesRootedCON
 

More from RootedCON (20)

Rooted2020 A clockwork pentester - Jose Carlos Moral & Alvaro Villaverde
Rooted2020 A clockwork pentester - Jose Carlos Moral & Alvaro VillaverdeRooted2020 A clockwork pentester - Jose Carlos Moral & Alvaro Villaverde
Rooted2020 A clockwork pentester - Jose Carlos Moral & Alvaro Villaverde
 
rooted2020 Sandbox fingerprinting -_evadiendo_entornos_de_analisis_-_victor_c...
rooted2020 Sandbox fingerprinting -_evadiendo_entornos_de_analisis_-_victor_c...rooted2020 Sandbox fingerprinting -_evadiendo_entornos_de_analisis_-_victor_c...
rooted2020 Sandbox fingerprinting -_evadiendo_entornos_de_analisis_-_victor_c...
 
Rooted2020 hunting malware-using_process_behavior-roberto_amado
Rooted2020 hunting malware-using_process_behavior-roberto_amadoRooted2020 hunting malware-using_process_behavior-roberto_amado
Rooted2020 hunting malware-using_process_behavior-roberto_amado
 
Rooted2020 compliance as-code_-_guillermo_obispo_-_jose_mariaperez_-_
Rooted2020 compliance as-code_-_guillermo_obispo_-_jose_mariaperez_-_Rooted2020 compliance as-code_-_guillermo_obispo_-_jose_mariaperez_-_
Rooted2020 compliance as-code_-_guillermo_obispo_-_jose_mariaperez_-_
 
Rooted2020 the day i_ruled_the_world_deceiving_software_developers_through_op...
Rooted2020 the day i_ruled_the_world_deceiving_software_developers_through_op...Rooted2020 the day i_ruled_the_world_deceiving_software_developers_through_op...
Rooted2020 the day i_ruled_the_world_deceiving_software_developers_through_op...
 
Rooted2020 si la-empresa_ha_ocultado_el_ciberataque,_como_se_ha_enterado_el_r...
Rooted2020 si la-empresa_ha_ocultado_el_ciberataque,_como_se_ha_enterado_el_r...Rooted2020 si la-empresa_ha_ocultado_el_ciberataque,_como_se_ha_enterado_el_r...
Rooted2020 si la-empresa_ha_ocultado_el_ciberataque,_como_se_ha_enterado_el_r...
 
Rooted2020 wordpress-another_terror_story_-_manuel_garcia_-_jacinto_sergio_ca...
Rooted2020 wordpress-another_terror_story_-_manuel_garcia_-_jacinto_sergio_ca...Rooted2020 wordpress-another_terror_story_-_manuel_garcia_-_jacinto_sergio_ca...
Rooted2020 wordpress-another_terror_story_-_manuel_garcia_-_jacinto_sergio_ca...
 
Rooted2020 Atacando comunicaciones-de_voz_cifradas_-_jose_luis_verdeguer
Rooted2020 Atacando comunicaciones-de_voz_cifradas_-_jose_luis_verdeguerRooted2020 Atacando comunicaciones-de_voz_cifradas_-_jose_luis_verdeguer
Rooted2020 Atacando comunicaciones-de_voz_cifradas_-_jose_luis_verdeguer
 
rooted2020-Rootkit necurs no_es_un_bug,_es_una_feature_-_roberto_santos_-_jav...
rooted2020-Rootkit necurs no_es_un_bug,_es_una_feature_-_roberto_santos_-_jav...rooted2020-Rootkit necurs no_es_un_bug,_es_una_feature_-_roberto_santos_-_jav...
rooted2020-Rootkit necurs no_es_un_bug,_es_una_feature_-_roberto_santos_-_jav...
 
Rooted2020 stefano maccaglia--_the_enemy_of_my_enemy
Rooted2020 stefano maccaglia--_the_enemy_of_my_enemyRooted2020 stefano maccaglia--_the_enemy_of_my_enemy
Rooted2020 stefano maccaglia--_the_enemy_of_my_enemy
 
Rooted2020 taller de-reversing_de_binarios_escritos_en_golang_-_mariano_palom...
Rooted2020 taller de-reversing_de_binarios_escritos_en_golang_-_mariano_palom...Rooted2020 taller de-reversing_de_binarios_escritos_en_golang_-_mariano_palom...
Rooted2020 taller de-reversing_de_binarios_escritos_en_golang_-_mariano_palom...
 
Rooted2020 virtual pwned-network_-_manel_molina
Rooted2020 virtual pwned-network_-_manel_molinaRooted2020 virtual pwned-network_-_manel_molina
Rooted2020 virtual pwned-network_-_manel_molina
 
Rooted2020 van a-mear_sangre_como_hacer_que_los_malos_lo_paguen_muy_caro_-_an...
Rooted2020 van a-mear_sangre_como_hacer_que_los_malos_lo_paguen_muy_caro_-_an...Rooted2020 van a-mear_sangre_como_hacer_que_los_malos_lo_paguen_muy_caro_-_an...
Rooted2020 van a-mear_sangre_como_hacer_que_los_malos_lo_paguen_muy_caro_-_an...
 
Rooted2020 todo a-siem_-_marta_lopez
Rooted2020 todo a-siem_-_marta_lopezRooted2020 todo a-siem_-_marta_lopez
Rooted2020 todo a-siem_-_marta_lopez
 
Rooted2020 roapt evil-mass_storage_-_tu-ya_aqui_-_david_reguera_-_abel_valero
Rooted2020 roapt evil-mass_storage_-_tu-ya_aqui_-_david_reguera_-_abel_valeroRooted2020 roapt evil-mass_storage_-_tu-ya_aqui_-_david_reguera_-_abel_valero
Rooted2020 roapt evil-mass_storage_-_tu-ya_aqui_-_david_reguera_-_abel_valero
 
Rooted2020 live coding--_jesus_jara
Rooted2020 live coding--_jesus_jaraRooted2020 live coding--_jesus_jara
Rooted2020 live coding--_jesus_jara
 
Rooted2020 legalidad de-la_prueba_tecnologica_indiciaria_cuando_tu_papi_es_un...
Rooted2020 legalidad de-la_prueba_tecnologica_indiciaria_cuando_tu_papi_es_un...Rooted2020 legalidad de-la_prueba_tecnologica_indiciaria_cuando_tu_papi_es_un...
Rooted2020 legalidad de-la_prueba_tecnologica_indiciaria_cuando_tu_papi_es_un...
 
Rooted2020 hackeando el-mundo_exterior_a_traves_de_bluetooth_low-energy_ble_-...
Rooted2020 hackeando el-mundo_exterior_a_traves_de_bluetooth_low-energy_ble_-...Rooted2020 hackeando el-mundo_exterior_a_traves_de_bluetooth_low-energy_ble_-...
Rooted2020 hackeando el-mundo_exterior_a_traves_de_bluetooth_low-energy_ble_-...
 
Rooted2020 evading deep-learning_malware_detectors_-_javier_yuste
Rooted2020 evading deep-learning_malware_detectors_-_javier_yusteRooted2020 evading deep-learning_malware_detectors_-_javier_yuste
Rooted2020 evading deep-learning_malware_detectors_-_javier_yuste
 
Rooted2020 encontrando 0days-en_2020_-_antonio_morales
Rooted2020 encontrando 0days-en_2020_-_antonio_moralesRooted2020 encontrando 0days-en_2020_-_antonio_morales
Rooted2020 encontrando 0days-en_2020_-_antonio_morales
 

Recently uploaded

FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 

Recently uploaded (20)

FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 

Hernan Ochoa - WCE Internals [RootedCON 2011]

  • 1. WCE Internals Hernan Ochoa (hernan@ampliasecurity.com)
  • 2. What is WCE? • Windows Credentials Editor v1.0 • Manipulates Windows Logon Sessions • Evolution of the Pass-the-Hash Toolkit (also written by me) • WCE v1.1 to be published after this is over 
  • 3. WCE features • Dump in-memory credentials of logon sessions – Lists in-memory logon sessions • Dumps in-memory username, domain, LM & NT hashes • current, future and terminated (…) – Great to ‘steal’ credentials not stored locally
  • 4. WCE features • Pass-The-Hash – Change/delete NTLM credentials of logon sessions – Create new logon sessions and associate arbitrary NTLM credentials
  • 5. WCE features • Does not require code injection to dump in- memory credentials (v1.1) – No need to run code inside LSASS.EXE – Can locate, list and decrypt Logon Sessions and NTLM credentials just by reading memory
  • 6. WCE features • Single executable (wce.exe) – Easier to use, upload, etc. • Supports – Windows XP – Windows 2003 – Windows Vista – Windows 7 – Windows 2008
  • 7. How does it work? • Windows NT Logon and authentication model Logon LSA Processes Authentication Packages
  • 8. Windows NT Logon and Authentication Model WINLOGON.EXE LSA AUTH API (LSASRV.DLL) MSV1_0.DLL (NTLM AUTH PKG) … LSASS.EXE
  • 9. Windows NT Logon and Authentication Model: NTLM WINLOGON.EXE NTLM CREDS msv1_0.dll!LsaApLogonUser/Ex/Ex2() Logon • Authenticates user Session • Create logon session (LUID) • Add Credentials to Session LSASS.EXE
  • 10. Logon Sessions  Credentials Logon Session Process (LUID) NTLM CREDENTIALS
  • 11. Implementation: two possible ways… 'Use Auth Package API’ Method ‘Read LSASS Memory’ Method (less safe) (very safe) • List LUIDs • Read LSASS Memory • Run code inside LSASS.EXE • Learn inner workings • Call MSV1_0.DLL Functions • Undocumented • AddPrimaryCredential structures • GetPrimaryCredentials • List Logon Sessions • DeletePrimaryCredential • Find keys and friends • No need to encrypt or decrypt • Decrypt/Encrypt credentials credentials • OS/Version ~independent • OS/Version dependent
  • 12. Initialization of auth packages Loads authentication packages and LSASS.EXE calls <authpkg>.dll!LsaApInitializePackage • For Example, msv1_0.dll!LsaApInitializepackage() NTSTATUS LsaApInitializePackage( __in ULONG AuthenticationPackageId, __in PLSA_DISPATCH_TABLE LsaDispatchTable, __in_opt PLSA_STRING Database, __in_opt PLSA_STRING Confidentiality, __out PLSA_STRING *AuthenticationPackageName );
  • 13. Functions provided to auth packages typedef struct LSA_DISPATCH_TABLE { PLSA_CREATE_LOGON_SESSION CreateLogonSession; PLSA_DELETE_LOGON_SESSION DeleteLogonSession; PLSA_ADD_CREDENTIAL AddCredential; PLSA_GET_CREDENTIALS GetCredentials; PLSA_DELETE_CREDENTIAL DeleteCredential; PLSA_ALLOCATE_LSA_HEAP AllocateLsaHeap; PLSA_FREE_LSA_HEAP FreeLsaHeap; PLSA_ALLOCATE_CLIENT_BUFFER AllocateClientBuffer; PLSA_FREE_CLIENT_BUFFER FreeClientBuffer; PLSA_COPY_TO_CLIENT_BUFFER CopyToClientBuffer; PLSA_COPY_FROM_CLIENT_BUFFER CopyFromClientBuffer; } LSA_DISPATCH_TABLE, *PLSA_DISPATCH_TABLE;
  • 14. Functions handling credentials NTSTATUS AddCredential( __in PLUID LogonId, __in ULONG AuthenticationPackage, __in PLSA_STRING PrimaryKeyValue, __in PLSA_STRING Credentials );
  • 15. Functions handling credentials NTSTATUS GetCredentials( __in PLUID LogonId, __in ULONG AuthenticationPackage, __inout PULONG QueryContext, __in BOOLEAN RetrieveAllCredentials, __inout PLSA_STRING PrimaryKeyValue, __out PULONG PrimaryKeyLength, __out PLSA_STRING Credentials );
  • 16. Functions handling credentials NTSTATUS DeleteCredential( __in PLUID LogonId, __in ULONG AuthenticationPackage, __in PLSA_STRING PrimaryKeyValue );
  • 17. Windows NT Logon and Authentication Model: NTLM in detail WINLOGON.EXE LUID luid = LsaLogonUser( …,MSV1_0_PACKAGE_ID,… ) msv1_0.dll!LsaApLogonUser/Ex/Ex2() • Create logon session • Authenticates against local sam or AD • msv1_0.dll!NlpAddPrimaryAddCredential(LUID, [username, domain, LM/NT hashes],…) • Lsasrv.dll!AddCredential(LUID,…)
  • 18. 'Use Auth Implementation: Package API’ Method Summary • Find by ‘signatures’ and heuristics • MSV1_0.DLL!NlpAddPrimaryCredential • MSV1_0.DLL!NlpDeletePrimaryCredential • MSV1_0.DLL!NlpGetPrimaryCredential • Run code inside LSASS.EXE • Call *PrimaryCredential functions • LSASRV.DLL functions are not called directly, eg: • MSV1_0.DLL!NlpAddPrimaryCredential() • LSASRV.DLL!AddCredential() • No need to encrypt/decrypt credentials
  • 19. 'Use Auth Implementation: Package API’ Method Credentials Block Format • MSV1_0.DLL!NlpAddPrimaryCredential(PLUID pluid, BYTE* ptrtoCreds, DWORD dwCredsSize); • MSV1_0.DLL!NlpDeletePrimaryCredential(PLUID pluid); • MSV1_0.DLL!NlpGetPrimaryCredential(PLUID pluid, DWORD* ptrtoCreds, DWORD whatever); ptrtoCreds ?
  • 20. 'Use Auth Implementation: Package API’ Credentials Block Format Method ptrtoCreds typedef struct { UNICODE_STR ustr_domain; UNICODE_STR ustr_username; BYTE NThash[16]; BYTE LMhash[16]; BYTE Udomain[MAX_DOMAIN_LEN]; BYTE Uuser[MAX_USERNAME_LEN]; } CREDSBLOCK;
  • 21. 'Use Auth Package API’ Implementation: Method Credentials Block Format ptrtoCreds +00h 000C000D +04h 00000030 +08h 00080009 +0Ch 0000003C +10h 11111111111111111111111111111111 +20h 22222222222222222222222222222222 +30h D0O0M0A0IN00 +3Ch T0E0S0T00
  • 22. 'Use Auth Package Implementation: API’ Method working with Session Isolation
  • 23. 'Use Auth Package Implementation: API’ Method working with Session Isolation Inject code LSASS.EXE WCE.EXE INJECTED CODE Call msv1_0.dll!NlpAdd PrimaryCredential Etc. Session 1 Session 0
  • 24. 'Use Auth Package Implementation: API’ working with Session Isolation Method
  • 25. 'Use Auth Package Implementation: API’ working with Session Isolation Method
  • 26. 'Use Auth Package Implementation: API’ working with Session Isolation Method
  • 27. 'Use Auth Package Implementation: API’ Method working with Session Isolation (Note: CreateRemoteThread() is not the the only way to inject & run code...)
  • 28. 'Use Auth Package Implementation: API’ Method working with Session Isolation • Windows Vista/7/2008 • NTDLL.DLL!NtCreateThreadEx • Windows XP/2003 • RDP / Terminal Services • Create a Windows Service and do everything there • WCE.EXE also acts as a Windows Service • Installs, starts, stops and removes itself • IPC via Named Pipe
  • 29. ‘Read LSASS Memory’ Implementation Method • No need to run code inside LSASS.EXE (SUPER SAFE!) • ReadProcessMemory() only! • Reverse engineer inner workings of LSASS.EXE (LSASRV.DLL) • Structures used internally to hold logon sessions • Structures used internally to hold credentials • Structures used internally to hold NTLM Hashes • Decrypt credentials • Find keys • Algorithm • Anything else needed to decrypt (e.g.: IV)
  • 30. ‘Read LSASS Implementation: Memory’ Logon sessions & credentials structures Method LSASRV.DLL!LogonSessionList LSASRV.DLL!LogonSessionListCount SESSION_ENTRY NEXT PREV … UserLen UserPtr DomainLen DomainPtr … PtrToCreds ? AuthPkgId PtrToCreds CREDS_ENTRY CREDS_HASH_ENTRY ? PrimaryLen PrimaryPtr HashesLen HashesPtr NTLM LM Domain User DomainLen DomainOff userLen userOff … hash hash Name Name NTLM_CREDS_BLOCK (encrypted)
  • 31. ‘Read LSASS Implementation: Memory’ Method changes in SESSION_ENTRY Windows XP/2003 Windows Vista/7/2008 struct SESSION_ENTRY { struct SESSION_ENTRY { DWORD nextEntry; DWORD nextEntry; DWORD prevEntry; DWORD prevEntry; DWORD unk1; DWORD UNKNOWN[18]; DWORD unk2; DWORD userSize; DWORD userSize; DWORD userNamePtrUnicode; DWORD machineSize; DWORD userNamePtrUnicode; DWORD machinePtrUnicode; DWORD machineSize; … DWORD machinePtrUnicode; …. +0x48 DWORD PtrToCreds; +0x88 DWORD PtrToCreds; }; };
  • 32. Implementation: LsaEncryptMemory() Windows XP/2003 Windows Vista/7/2008 Lsasrv.dll!LsaEncryptMemory() NTLM_CREDS_BLOCK • Encrypted with desX-CBC or RC4 • Encrypted with 3DES-CBC or AES-128-CFB • If mod(size/8) == 0 => desX-cbc • If mod(size/8) == 0 => 3DES-CBC • Otherwise use RC4 • Otherwise use 3DES-CBC • Encrypted with desX-CBC • Encrypted with 3DES-CBC
  • 33. Implementation lsasrv.dll!LsaInitializeProtectedMemory (XP/2003) 0 190h VirtualAlloc() 90h 8 8 8 cbRandomKey = 100h pDESXTable pRandomKey struct DESXTable { SystemFunction036( byte byte inWhitening[8]; Feedback[8],8) byte outWhitening[8]; DESTable desTable; } desxkey( pDESXTable , pRandomKey ) struct DESTable { unsigned long keys[16][2]; } SystemFunction036( pRandomKey, cbRandomKey )
  • 34. Implementation lsasrv.dll!LsaInitializeProtectedMemory (Vista/7/2008) h3DesProvider = BCryptOpenAlgorithmProvider( ) hAesProvider = BCryptOpenAlgorithmProvider( ) BCryptSetProperty( h3DesProvider, "CBCMode" ) BCryptSetProperty( hAesProvider, "CFBMode" ) BCryptGetProperty( h3DesProvider, "ObjectLength" ) BCryptGetProperty( hAesProvider, "ObjectLength" ) BCryptGenRandom( h3DesProvider, 24 ) h3DesKey = BCryptGenerateSymmetricKey( h3DesProvider, 24 ) BCryptGenRandom( hAesProvider, 16 ) hAesKey = BCryptGenerateSymmetricKey( hAesProvider, 16 ) BCryptGenRandom( InitializationVector, 16 )
  • 35. Implementation: crypto functions used Windows XP/2003 Windows Vista/7/2008 • Uses custom desX-CBC • Uses Cryptography API: Next implementation Generation (CNG) – Located in LSASRV.DLL • Exported by BCRYPT.DLL – Is not an API • BCryptOpenAlgorithmProvider – Not exported by any Win32 • BCryptSetProperty / DLL BCryptGetProperty • BCryptGenRandom • BCryptGenerateSymmetricKey • BCryptEncrypt / BCryptDecrypt
  • 36. Implementation • desX-cbc ‘trick’ – ‘Reuse’ LsaEncryptMemory CODE!LSASRV.DLL LsaEncrptMemory() DATA DATA IV, DESXTABLE IV, DESXTABLE LSASRV.DLL LSASRV.DLL LSASS.EXE PROCESS.EXE
  • 37. Implementation: pseudo-code (Vista/7/2008) LSASRV.DLL!LsaInitializeProtectedMemory(..) { … h3DesKey = BCryptGenerateSymmetricKey( BCryptGenRandom(24 bytes) ); … hAesKey = BCryptGenerateSymmetricKey(BCryptGenRandom(16 bytes)) … IV = BCryptGenRandom(16 bytes) }
  • 38. Implementation Finding the encryption key (Vista/7/2008) LSASRV.DLL!LsaInitializeProtected Memory() NTSTATUS WINAPI BCryptGenerateSymmetricKey( __inout BCRYPT_ALG_HANDLE hAlgorithm, __out BCRYPT_KEY_HANDLE *phKey, __out_opt PUCHAR pbKeyObject, __in ULONG cbKeyObject, __in PUCHAR pbSecret, __in ULONG cbSecret, __in ULONG dwFlags );
  • 39. Implementation Finding the encryption key (Vista/7/2008) • BCRYPT_KEY_HANDLE hKey – hKey = Pointer to Memory Block (BLOB) – hKey + 0x3C => encryption key • To extract key, read from LSASS.EXE(LSASRV.DLL) – ((unsigned char*)h3DesKey)+0x3C – ((unsigned char*))hAesKey)+0x3C
  • 40. Implementation Finding the encryption key (Vista/7/2008) • Actually, offset changes between OSes – hKey + 0x3C => encryption key (Win7) – hKey + 0x2C => encryption key (Win2008) • To be safe, I ‘discover’ the offset at runtime – I wrote a custom function for that ‘KeyDiscoverOffset()’
  • 41. Implementation Finding the encryption key (Vista/7/2008) • KeyDiscoverOffset() – Uses CNG API to create key object with hard-coded key – Look for hard-coded key inside BLOB pointed to by BCRYPT_KEY_HANDLE BCRYPT_KEY_HANDLE hKey +0h hKey = +3Ch KKKKKKKK… BCryptGenerateSymmetricKey(...,”K KKKKKKK…”) +...h
  • 42. Implementation Finding the IV (Vista/7/2008) • IV is also needed • To extract IV – Read IV from LSASS.EXE (LSASRV.DLL) memory – Symbol ‘InitializationVector’ • With IV and Key, just use CNG – BCryptDecrypt and friends – No need to run code inside LSASS.EXE
  • 43. Implementation: Addresses Needed Windows XP/2003 Windows Vista/7/2008 • LsaLogonSessionList • LsaLogonSessionList • LsaLogonSessionListCount • LsaLogonSessionListCount • DESXTable • h3DesKey • Feedback • InitializationVector • LsaEncryptMemory
  • 44. Implementation: Addresses Needed • Database of addresses • ID by SHA1 hash of LSASRV.DLL • Yes, addresses still an issue.. • But .. • Getlsasrvaddr.exe to the rescue..
  • 45. GetLSASRVADDR.exe • Finds needed addresses automatically • User-friendly • No IDC script, IDA or anything weird like that is needed  • Uses Microsoft symbol server • Requires http outbound connection (!) • Associates addresses and DLLs using SHA1
  • 47. GetLSASRVADDR.exe • Could be integrated with WCE but.. • The outbound connection might be an issue • huge not-there-by-default DLLs needed • Symsrv.dll and dbghelp.dll (new version, not the default one) • Could implement own version of ‘symbol server’ protocol • Or perhaps it is best to use heuristics..
  • 48. Implementation: ASLR and Windows Vista/7/2008 • LSASRV.DLL addresses and ASLR – Not an issue.. – To locate symbols don’t use hard-coded addresses – Use Offsets instead – ASLR is just at boot time – Get current LSASRV.DLL Base Address at run-time and add offset
  • 49. WCE execution flow (simplified) List READ START END Creds? MEM XP/2003 Install/Run/Use ? Vista/7 INJECT WCE Service /2008 CODE CurSessionID == LSASessionID?
  • 50. WCE vs PTH Feature WCE PTH Supports Windows Vista/7/2008 YES NO Single executable YES NO (many executables, need to upload dll, etc) Delete NTLM Credentials YES NO Works with session isolation YES NO (e.g.: via RDP) Programmatic discovery of new YES NO LSASRV addresses (via getlsasrvaddr) Seamlessly chooses code injection or YES NO reading from memory
  • 51. Conclusions • WCE v1.1 – More features and OSes supported – Works via RDP/Terminal Services – No code injection needed – Better solution for ‘addresses issue’ – ‘zombie’ logon sessions and credentials still around in Windows 7 and family.. – Download WCE v1.1! • http://www.ampliasecurity.com/research/wce_v1_1.tgz
  • 52. ‘zombie’ logon sessions and credentials NTLM CREDS Logon Session RDP/Terminal Services connection Domain Admin Some Server (e.g.: backup server nobody cares about) Attacker
  • 53. Preguntas? Gracias! Hernan Ochoa (hernan@ampliasecurity.com) http://www.twitter.com/hernano http://www.twitter.com/ampliasecurity http://www.ampliasecurity.com/blog/