Skip to content

Commit 11dc0fa

Browse files
committed
output: display Return Flow Guard status
1 parent 897e1cd commit 11dc0fa

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

checksec/output.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ def __init__(self):
8080
self.table_pe.add_column("SafeSEH", justify="center")
8181
self.table_pe.add_column("Force Integrity", justify="center")
8282
self.table_pe.add_column("Control Flow Guard", justify="center")
83+
self.table_pe.add_column("Return Flow Guard", justify="center")
8384
self.table_pe.add_column("Isolation", justify="center")
8485

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

274+
if not checksec.rfg:
275+
rfg_res = "[red]No"
276+
else:
277+
rfg_res = "[green]Yes"
278+
273279
if not checksec.isolation:
274280
isolation_res = "[red]No"
275281
else:
@@ -286,6 +292,7 @@ def add_checksec_result(self, filepath: Path, checksec: Union[ELFChecksecData, P
286292
safe_seh_res,
287293
force_integrity_res,
288294
guard_cf_res,
295+
rfg_res,
289296
isolation_res,
290297
)
291298
else:
@@ -345,7 +352,8 @@ def add_checksec_result(self, filepath: Path, checksec: Union[ELFChecksecData, P
345352
"seh": checksec.seh,
346353
"safe_seh": checksec.safe_seh,
347354
"guard_cf": checksec.guard_cf,
348-
"force_integrity": checksec.force_integrity
355+
"rfg": checksec.rfg,
356+
"force_integrity": checksec.force_integrity,
349357
}
350358
else:
351359
raise NotImplementedError

0 commit comments

Comments
 (0)