PrivescCheck icon indicating copy to clipboard operation
PrivescCheck copied to clipboard

Unhandled error due non-existing 'TpmGetDeviceInformation' API

Open itm4n opened this issue 1 month ago • 0 comments

The TPM checks may fail if the TpmGetDeviceInformation doesn't exist. In this case, an unhandled exception it thrown by the script. This exception should be gracefully handled.

┏━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ CATEGORY ┃ TA0043 - Reconnaissance                           ┃
┃ NAME     ┃ Misc - TPM Device Information                     ┃
┃ TYPE     ┃ Extended                                          ┃
┣━━━━━━━━━━┻━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
┃ Get information about the machine's Trusted Platform Module  ┃
┃ (TPM), if present.                                           ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
Exception calling "TpmGetDeviceInformation" with "1" argument(s): "Unable to find an entry point named
'TpmGetDeviceInformation' in DLL 'TpmCoreProvisioning'."
At line:307 char:9
+         $RetVal = $script:TpmCoreProvisioning::TpmGetDeviceInformatio ...
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : EntryPointNotFoundException

WARNING: TpmGetDeviceInformation KO 0x

itm4n avatar Nov 24 '25 13:11 itm4n