Describe the bug
requesting the load_configuration.security_cookie can return an invalid value.
To Reproduce
Steps to reproduce the behavior:
- download cmd.zip and uncompress it to get
cmd.exe (winxp executable
- load it with lief in python
- get the security cookie
In [1]: import lief
In [2]: pe = lief.parse("/home/wenzel/local/cmd.exe")
Unable to find the section associated with BOUND_IMPORT
In [3]: pe.load_configuration.security_cookie
Out[3]: 1255357304
Expected behavior
The issue is that winchecksec is telling me that cmd.exe doesn't have a stack cookie:
$ winchecksec cmd.exe
Dynamic Base : "NotPresent"
ASLR : "NotPresent"
High Entropy VA : "NotPresent"
Force Integrity : "NotPresent"
Isolation : "Present"
NX : "NotPresent"
SEH : "Present"
CFG : "NotPresent"
RFG : "NotPresent"
SafeSEH : "NotPresent"
GS : "NotPresent"
Authenticode : "NotPresent"
.NET : "NotPresent"
And winchecksec GS check is implemented here, by verifying that the security cookie is != 0.
So, assuming that winchecksec is correct, lief should return 0 and not 1255357304
Environment (please complete the following information):
- System and Version : Ubuntu 20.04
- Target format PE
- LIEF commit version:
0.11.0-f58605f but also reproductible with 0.10.0
Thanks !
Describe the bug
requesting the
load_configuration.security_cookiecan return an invalid value.To Reproduce
Steps to reproduce the behavior:
cmd.exe(winxp executableExpected behavior
The issue is that
winchecksecis telling me thatcmd.exedoesn't have a stack cookie:And winchecksec GS check is implemented here, by verifying that the security cookie is
!= 0.So, assuming that winchecksec is correct,
liefshould return0and not1255357304Environment (please complete the following information):
0.11.0-f58605fbut also reproductible with0.10.0Thanks !