You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Applicable to: native with PDBs (required for this analysis)
Not applicable to: *nix binaries
User-facing strings
Fail: '{0}' does not enable the Control-flow Enforcement Technology (CET) Shadow Stack mitigation. To resolve this issue, pass /CETCOMPAT on the linker command lines.
Linker option is only available starting in Visual Studio 2019 version 16.7. Rule should therefore examine the linker version details to ensure the toolchain that compiled the binary supports the flag. If the toolchain is too old, the rule CanAnalyze should return MetadataConditions.ImageCompiledWithOutdatedTools. BA2008.EnableControlFlowGuard has an example of this pattern.
It is occasionally helpful to provide a rule property that controls the version parameterization (this is mostly helpful to overcome issues in toolchain versioning). It's not clear this rule requires this kind of configurability. BA2008.EnableControlFlowGuard has an example of providing a knob for minimal linker version that can be used as a model, however.
Rule metadata should capture relevant expanded information and links to external guidance.
Note that this PE bit is ignored in cases where feature is unsupported by Windows or runtime hardware. This mitigation is an opt-in Windows feature, allowing some flexibility in requiring compiling with /CETCOMPAT (allowing app developers to opt into actual usage).
How to resolve
/CETCOMPAT
The text was updated successfully, but these errors were encountered:
eddynaka
changed the title
Windows PE rule proposal: enforce CET shadow stack compatibility
[RULE REQUEST] Enforce CET shadow stack compatibility
Apr 26, 2021
Rule Proposal: Enforce CET shadow stack compatibility to defend against return-oriented programming (ROP) based malware attacks.
Rule metadata
Rule descriptions
Platform & applicability
User-facing strings
Links/Additional Information
Notes on implementation
CanAnalyze
should returnMetadataConditions.ImageCompiledWithOutdatedTools
.BA2008.EnableControlFlowGuard
has an example of this pattern.BA2008.EnableControlFlowGuard
has an example of providing a knob for minimal linker version that can be used as a model, however.How to resolve
/CETCOMPAT
The text was updated successfully, but these errors were encountered: