Skip to content

PE - GS를 제대로 검사하지 못하는 문제 #46

@koyokr

Description

@koyokr
PS E:\project\checksec-pe-sample\sample> python ..\..\2019_KUCIS_Project_checksec.py\version_elf+pe\ver.1\checksec.py .\x64-no-gs.exe
        Filename   .NET    NX Dynamic Base  ASLR    CFG Force Integrity    GS High Entropy VA Isolation    RFG   SEH Safe SEH
 .\x64-no-gs.exe  False  True         True  True  False           False  True            True      True  False  True    False
PS E:\project\checksec-pe-sample\sample> ..\..\winchecksec\build\Release\winchecksec.exe .\x64-no-gs.exe
Dynamic Base    : true
ASLR            : true
High Entropy VA : true
Force Integrity : false
Isolation       : true
NX              : true
SEH             : true
CFG             : false
RFG             : false
SafeSEH         : false
GS              : true
Authenticode    : false
.NET            : false

winchecksec과 프로젝트 코드 모두 GS가 설정되지 않으면
load config의 security cookie의 값이 0일 것이라는 가정 하에 판단한다.

https://github.com/InformationSecurity119/2019_KUCIS_Project_checksec.py/blob/1e055090f101aa94b1da93b2a7d4d53f1e01a9df/version_elf%2Bpe/ver.1/Analyze_PE.py#L68-L72

그러나 GS를 설정하지 않고 빌드한 프로그램도 load config의 security cookie 값이 0이 아닐 수 있다.

https://stackoverflow.com/questions/7829929/how-to-say-if-a-binary-is-gs-compiled-or-not-and-without-symbols

Metadata

Metadata

Labels

bugSomething isn't workinghelp wantedExtra attention is needed

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions