Showing posts with label patch. Show all posts
Showing posts with label patch. Show all posts

Friday, July 29, 2011

Advapi32 patch for 64-bit Windows XP SP2

I have been asked this week by a customer to provide the patch for the advapi32 dll on Windows XP SP2 64-bit, with version number 5.2.3790.4455. For the 32-bit dll that resides in SysWOW64, it is the same as the one I have already published for Windows Server 2003 SP2. So, I had only to come up with the patch for the 64-bit dll. And without waiting, here are the patch bytes :
  • Advapi32 dll version 5.2.3790.4455 in SysWOW64 directory :
    • At offset 0x11E3F : change 75 to 90
    • At offset 0x11E40 : change 08 to 90
    • At offset 0x11E47 : change 74 to EB
  • Advapi32 dll version 5.2.3790.4455 in System32 directory :
    • At offset 0x11B05 : change 0F to 90
    • At offset 0x11B06 : change 84 to E9
    • At offset 0x4D06F : change 0F to 90
    • At offset 0x4D070 : change 85 to 90
    • At offset 0x4D071 : change 96 to 90
    • At offset 0x4D072 : change 4A to 90
    • At offset 0x4D073 : change FC to 90
    • At offset 0x4D074 : change FF to 90

Sunday, February 20, 2011

Advapi32 patch for 64-bit Vista SP2 and Windows 2008 SP2

Recently, a reader of this blog asked for the patch of the 64-bit advapi32 dll of Windows Server 2008 SP2 64-bit (version 6.0.6002.18005). So, here it is (it also applies to Vista SP2 64-bit).
For the 32-bit advapi32 dll on these systems, I have already published the corresponding patch in the following post about Vista SP2 : http://blog.idrassi.com/2009/08/advapi32-patch-for-windows-vista-sp2.html

  • Advapi32 dll in System32 directory, version 6.0.6002.18005:
    • At offset 0x2BC9D : change 75 to 90
    • At offset 0x2BC9E : change 0B to 90
    • At offset 0x2BCA4 : change 0F to 90
    • At offset 0x2BCA5 : change 84 to E9
Its new SHA-256 hash value that should be put in the manifest files is :
oUGG12aBTnJoj/xm5nagheO7ePTc0P3BfW1fxRdbwB4=

    Tuesday, February 2, 2010

    Advapi32 patch for Windows 7, 32-bit and 64-bit

    It has been a log time since my last posting about the release candidate for Windows 7. I was quite busy since then and I couldn't find time to come up with a patch. Luckily, one reader of this blog, Natko Kalisnik, spent time working on this and he contacted me recently to share his findings. Hi approach is different from the one I usually follow (his is more prudent) but it leads to the same result. Without getting into more details, here it is for a 64-bit version of Windows 7. For the 32-bit version, just take the patch for the dll in SysWOW64. cryptsp.dll 32-bit in SysWOW64, version 6.1.7600.16385 : - At offset 0x3CF4 : change 0F to 90 - At offset 0x3CF5 : change 85 to E9 Its new SHA256 hash value is : +0SIH7z7WWOMju2QxD4MuCAdC4nnhijXHr8vCLIJ6HE= cryptsp.dll 64-bit in System32, version 6.1.7600.16385 : - At offset 0x32E3 : change C3 to DB - At offset 0x337D : change C3 to DB - At offset 0x33C4 : change C3 to C4 And its new SHA256 hash value is : 2STx7caFTALkBzuo3qvvdlsBddMCZNmSq/NTqtjK0Y4= Just a last word about the how to apply this patch for new comers. Some manifest files must be updated using the new hash values. They are located under C:\Windows\winsxs\Manifests : For 32-bit : x86_microsoft-windows-cryptsp-dll_31bf3856ad364e35_6.1.7600.16385_none_2933c430682017d9.manifest For 64-bit : amd64_microsoft-windows-cryptsp-dll_31bf3856ad364e35_6.1.7600.16385_none_85525fb4207d890f.manifest The hash value to be modified is in the XML node dsig:DigestValue. Also, you need to replace cryptsp.dll with the patched one in the following folders under C:\Windows\winsxs : For 32-bit : x86_microsoft-windows-cryptsp-dll_31bf3856ad364e35_6.1.7600.16385_none_2933c430682017d9 For 64-bit : amd64_microsoft-windows-cryptsp-dll_31bf3856ad364e35_6.1.7600.16385_none_85525fb4207d890f This is sufficient for having a running patched system. For a more complete patch, you can have a look at the directory C:\Windows\winsxs\Backup : it contains copies of the manifest files and dlls that you can also patch.

    Wednesday, August 19, 2009

    Advapi32 patch for Windows Vista SP2

    Hi, Here is the patch bytes for the advapi32 of Windows Vista SP2 that enable CSP testing without the MS signing process. You'll also find the value of the SHA256 hash of the resulting dll: this value must be updated on the two manifest files associated with advapi32 and which are located under winsxs\Manifests and winsxs\backup. To find them, just do a file name search containing the strings "advapi32" and "6.0.6002.18005". Do the same search to find the other folder besides winsxs\backup and system32 where you must put the patched copy. Patch for advapi32.dll version 6.0.6002.18005 : - At offset 0x2C106 : change 75 to 90 - At offset 0x2C107 : change 0C to 90 - At offset 0x2C10E : change 0F to 90 - At offset 0x2C10F : change 84 to E9 The new SHA256 hash value is : UJ03+cGhkgBS/X7C/YIy+tu0ko+6sgJmmdHUexvsWSk=

    Tuesday, May 26, 2009

    Patch for new Advapi32 dll of Windows Server 2003 SP2

    As for Windows XP SP3, Microsoft released through Windows Update a new version of Advapi32 for Windows Server 2003 SP2 with version number 5.2.3790.4455. Here is the corresponding patch:
    • Advapi32 dll, version 5.2.3790.4455:
      • At offset 0x11E3F : change 75 to 90
      • At offset 0x11E40 : change 08 to 90
      • At offset 0x11E47 : change 74 to EB

    Sunday, May 3, 2009

    Advapi32 patch for Windows 7 RC

    After the recent release of Windows 7 RC, here is the patch for developing and tesing CSPs under this new platform. Unlike previous Windows versions and because of internal changes on Advapi32, the patch applies this time to cryptsp.dll and not to advapi32.dll...so the title of this post is really just for historical reasons!! Here is the patch :
    • Cryptsp dll, version 6.1.7100.0 :
      • At offset 0x34CB : change 75 to 90
      • At offset 0x34CC : change 10 to 90
      • At offset 0x34D3 : change 75 to 90
      • At offset 0x34D4 : change 08 to 90
    The SHA-256 hash of the patched dll is in BASE64 encoding : 6bzJDA9IknZNgyO8sugtmLZxMfeVvZBToZQ82P8ahFI= This value is needed in order to update the manifest files associated with cryptsp.dll in the WINSXS directory.

    Tuesday, April 28, 2009

    Patch for new Advapi32.dll of Windows XP SP3

    On February 9th 2009, Microsoft released through Windows Update a new version of Advapi32 for Windows XP SP3 with version number 5.1.2600.5755. Here is the corresponding patch:
    • Advapi32 dll, version 5.1.2600.5755:
      • At offset 0x175C1 : change 75 to 90
      • At offset 0x175C2 : change 0C to 90
      • At offset 0x175C9 : change 0F to 90
      • At offset 0x175CA : change 84 to E9

    Thursday, August 7, 2008

    Advapi32 patch for Windows Vista 64-Bit (pre SP1)

    A reader of this blog requested the patch for the advapi32 dll of the Vista 64-Bit (pre SP1). So here it is. For the SysWow64 copy, its patch is the same as the one of Vista 32-Bit version I already published.
    • Advapi32 dll in System32 directory, version 5.2.3790.3959:
      • At offset 0x12B39 : change 0F to 90
      • At offset 0x12B3A : change 84 to E9
      • At offset 0x67B0D : change 0F to 90
      • At offset 0x67B0E : change 85 to 90
      • At offset 0x67B0F : change 2C to 90
      • At offset 0x67B10 : change B0 to 90
      • At offset 0x67B11 : change FA to 90
      • At offset 0x67B12 : change FF to 90

    Monday, June 30, 2008

    Advapi32 patch for Windows Vista SP1 64-Bit

    Following a request by a reader of this blog, here is the patch for the advapi32 (version 6.0.6001.18000) of Windows Vista SP1 64-Bit. It's for the one present on the System32 folder used by native 64-Bit applications. The patch for the SysWow64 copy is the same as for the Windows Vista SP1 32-Bit version.
    • Advapi32 dll, version 6.0.6001.18000, 64-Bit :
      • At offset 0x27C29 : change 75 to 90
      • At offset 0x27C2A : change 0B to 90
      • At offset 0x27C30 : change 0F to 90
      • At offset 0x27C31 : change 84 to E9

    Thursday, June 5, 2008

    Advapi32 Patch for Windows XP SP3

    The SP3 of Windows XP is already here and with its arrival comes the necessity of testing and validating CSP dlls under it. So, as usual, I'm releasing the necessary patch of advapi32 dll to help on this and avoid the signing process. And here we go :
    • Advapi32 dll, version 5.1.2600.5512:
      • At offset 0x175A1 : change 75 to 90
      • At offset 0x175A2 : change 0C to 90
      • At offset 0x175A9 : change 0F to 90
      • At offset 0x175AA : change 84 to E9

    Monday, June 2, 2008

    Advapi32 Patch for Windows 2003 SP2 64-Bit

    As requested by a reader of this blog, here is the patch for advapi32 dll bundled with Windows 2003 Server SP2 64-Bit (it took me sometime...). This patch is for the copy present in the System32 folder. The one in the SysWOW64 folder is the same as the 32-bit advapi32 dll of Windows 2003 Server SP2 for whom I have already posted a patch before.
    • Advapi32 dll in System32 directory, version 5.2.3790.3959:
      • At offset 0x11AC5 : change 0F to 90
      • At offset 0x11AC6 : change 84 to E9
      • At offset 0x4D0C4 : change 0F to 90
      • At offset 0x4D0C5 : change 85 to 90
      • At offset 0x4D0C6 : change 01 to 90
      • At offset 0x4D0C7 : change 4A to 90
      • At offset 0x4D0C8 : change FC to 90
      • At offset 0x4D0C9 : change FF to 90

    Tuesday, April 22, 2008

    Advapi32 Patch for Windows XP 64-Bit

    As usual, here is the patch of advapi32 on Windows XP 64-Bit that enables testing of CSP dlls without Microsoft signature. In this platform, there is two versions of this dll : on in the System32 directory that is the real 64-bit one, and one in the SysWOW64 directory that is the 32-bit one. So, we have to patch the two dlls. You'll find below the usual patch description for each one of them. You may notice that two have an identical version number, 5.2.3790.1830, that is the same for advapi32 on Windows 2003 SP1. This is why the patch for the SysWOW64 copy is identical to the one on Windows 2003 SP1.
    • Advapi32 dll in SysWOW64 directory :
      • At offset 0x68CD : change 0F to EB
      • At offset 0x68CE : change 84 to 42
      • At offset 0x68CF : change 62 to 90
      • At offset 0x68D0 : change 0B to 90
      • At offset 0x68D1 : change 03 to 90
      • At offset 0x68D2 : change 00 to 90
    • Advapi32 dll in System32 directory :
      • At offset 0x11B15 : change 0F to 90
      • At offset 0x11B16 : change 84 to E9
      • At offset 0x4D2AD : change 0F to 90
      • At offset 0x4D2AE : change 85 to 90
      • At offset 0x4D2AF : change 68 to 90
      • At offset 0x4D2B0 : change 48 to 90
      • At offset 0x4D2B1 : change FC to 90
      • At offset 0x4D2B2 : change FF to 90

    Monday, April 21, 2008

    Advapi32 patch for new Windows OS versions

    This is an update of my previous post about the patching of advapi32 dll. You'll find here patches for Windows 2003 Server SP2, Windows Vista, Windows Server 2008 and Windows Vista SP1. The last two platforms share the same version of the advapi32 dll.
    • Windows 2003 SP2: advapi32 version = 5.2.3790.3959
      • At offset 0x11E3F : change 75 to 90
      • At offset 0x11E40 : change 08 to 90
      • At offset 0x11E47 : change 74 to EB
    • Windows Vista : advapi32 version = 6.0.6000.16386
      • At offset 0x37B7D : change 0F to 90
      • At offset 0x37B7E : change 84 to E9
      • At offset 0x4B66D : change 0F to 90
      • At offset 0x4B66E : change 85 to 90
      • At offset 0x4B66F : change 10 to 90
      • At offset 0x4B670 : change C5 to 90
      • At offset 0x4B671 : change FE to 90
      • At offset 0x4B672 : change FF to 90
    • Windows 2008 and Windows Vista SP1 : advapi32 version = 6.0.6001.18000
      • At offset 0x2420C : change 75 to 90
      • At offset 0x2420D : change 0C to 90
      • At offset 0x24214 : change 0F to 90
      • At offset 0x24215 : change 84 to E9

    Wednesday, April 18, 2007

    Advapi32 patch for CSP development

    Microsoft provides the use of cryptography in its operations systems by exposing an application programming interface called CAPI. It's relies on a set of dynamically-linked libraries called CSP (Cryptographic Service Provider) that actually perform all the cryptographic work. In order to be used by the system, a CSP dll must be signed by Microsoft, otherwise, CAPI will refuse to use it. The problem is that the signature process can take many days: That delay can be frustrating for a CSP developer/tester. For that, Microsoft used to ship with the CSP development kit a modified version of the advapi32 dll. This dll is responsible for the verification of the signature associated with a CSP module. The modified version bypasses this verification and thus enables the use of a development version of the CSP dll on the system where it's installed. The problem is that Windows 2000 SP2 is the last supported target for the Microsoft modified advapi32 dll!! So, for those targeting a much newer version of Windows (which is the case of 99% of CSP developers), they find themselves left with no support. Fortunately, some talented people managed to hack the advapi32 signature verification mechanism. Thus, they could provide the community with a patched version of this dll for various new versions of Windows. In the following, I will give the detail of modifications that must be applied to the advapi32 dll at the byte level. All you need for that is a good hexadecimal editor. Personally, I use HxD : it's free and you can get it from here. Once the patch dll is in your hands, you must put it on the system: of course, this can't be done while Windows is running, so you have to find another way to access the system32 directory. I suggest you to use a dual boot system. And here is the patches :
    • Windows 2000 SP4: advapi32 version = 5.0.2195.6710
      • At offset 0x17061 : change 0F to E9
      • At offset 0x17062 : change 84 to 2C
      • At offset 0x17063 : change 22 to 06
      • At offset 0x17064 : change 06 to 01
    • Windows 2000 SP4: advapi32 version = 5.0.2195.7038
      • At offset 0xEA97 : change 0F to E9
      • At offset 0xEA98 : change 84 to 93
      • At offset 0xEA99 : change 89 to 83
      • At offset 0xEA9A : change 83 to 01
      • At offset 0xEA9B : change 01 to 00
      • At offset 0xEA9C : change 00 to 90
    • Windows XP SP1 : advapi32 version = 5.1.2600.1106
      • At offset 0x8794 : change 0F to EB
      • At offset 0x8795 : change 84 to 71
      • At offset 0x8796 : change 55 to 90
      • At offset 0x8797 : change 14 to 90
      • At offset 0x8798 : change 02 to 90
      • At offset 0x8799 : change 00 to 90
    • Windows XP SP2:
      • At offset 0x17C19 : change 75 to 90
      • At offset 0x17C1A : change 0c to 90
      • At offset 0x17C21 : change 0f to 90
      • At offset 0x17C22 : change 84 to E9
    • Windows 2003 SP1: advapi32 version 5.2.3790.1830
      • At offset 0x68CD : change 0F to EB
      • At offset 0x68CE : change 84 to 42
      • At offset 0x68CF : change 62 to 90
      • At offset 0x68D0 : change 0B to 90
      • At offset 0x68D1 : change 03 to 90
      • At offset 0x68D2 : change 00 to 90
    Under windows Vista, a new architecture called CNG (Crypto NextGen) was introduced. It adds the notion of card modules that exposes cryptographic features and are called by the CNG runtime. These modules don't need to be signed, thus removing the burden of the Microsoft signature process.