Skip to content

Commit

Permalink
output: display Return Flow Guard status
Browse files Browse the repository at this point in the history
  • Loading branch information
Wenzel committed Oct 11, 2020
1 parent 897e1cd commit 11dc0fa
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion checksec/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ def __init__(self):
self.table_pe.add_column("SafeSEH", justify="center")
self.table_pe.add_column("Force Integrity", justify="center")
self.table_pe.add_column("Control Flow Guard", justify="center")
self.table_pe.add_column("Return Flow Guard", justify="center")
self.table_pe.add_column("Isolation", justify="center")

# init console
Expand Down Expand Up @@ -270,6 +271,11 @@ def add_checksec_result(self, filepath: Path, checksec: Union[ELFChecksecData, P
else:
guard_cf_res = "[green]Yes"

if not checksec.rfg:
rfg_res = "[red]No"
else:
rfg_res = "[green]Yes"

if not checksec.isolation:
isolation_res = "[red]No"
else:
Expand All @@ -286,6 +292,7 @@ def add_checksec_result(self, filepath: Path, checksec: Union[ELFChecksecData, P
safe_seh_res,
force_integrity_res,
guard_cf_res,
rfg_res,
isolation_res,
)
else:
Expand Down Expand Up @@ -345,7 +352,8 @@ def add_checksec_result(self, filepath: Path, checksec: Union[ELFChecksecData, P
"seh": checksec.seh,
"safe_seh": checksec.safe_seh,
"guard_cf": checksec.guard_cf,
"force_integrity": checksec.force_integrity
"rfg": checksec.rfg,
"force_integrity": checksec.force_integrity,
}
else:
raise NotImplementedError
Expand Down

0 comments on commit 11dc0fa

Please sign in to comment.