Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CISOfy/lynis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolai Søborg <git@xn--sb-lka.org>2021-03-04 00:38:45 +0300
committerNicolai Søborg <git@xn--sb-lka.org>2021-03-04 00:38:45 +0300
commit3d2f57fe1d3b0597d0c45a01d9f2c1f625e52c47 (patch)
tree18a9c789a329558933ef4fa5bb97983a6889540a /include/tests_crypto
parent0b6f3006934822ca75b19cc6aed1f796c6eeffa6 (diff)
Check MemoryOverwriteRequest Control
Diffstat (limited to 'include/tests_crypto')
-rw-r--r--include/tests_crypto26
1 files changed, 26 insertions, 0 deletions
diff --git a/include/tests_crypto b/include/tests_crypto
index d41a55ce..227401c3 100644
--- a/include/tests_crypto
+++ b/include/tests_crypto
@@ -293,6 +293,32 @@
#
#################################################################################
#
+ # Test : CRYP-8006
+ # Description : Check that the MemoryOverwriteRequest-bit is set to protect against cold-boot attacks
+ Register --test-no CRYP-8006 --os Linux --weight L --network NO --root-only NO --category security --description "MemoryOverwriteRequest-bit set"
+ if [ ${SKIPTEST} -eq 0 ]; then
+ MOR_CONTROL="${ROOTDIR}sys/firmware/efi/efivars/MemoryOverwriteRequestControl-e20939be-32d4-41be-a150-897f85d49829"
+ LogText "Test: looking for ${MOR_CONTROL}"
+ if [ -f "${MOR_CONTROL}" ]; then
+ DATA=$(od -An --skip-bytes=4 "$MOR_CONTROL")
+ if [ "$DATA" = " 000001" ]; then
+ LogText "Result: MOR-bit set"
+ Display --indent 2 --text "MOR-bit set" --result "${STATUS_YES}" --color GREEN
+ elif [ "$DATA" = " 000000" ]; then
+ LogText "Result: MOR-bit not set!"
+ Display --indent 2 --text "MOR-bit set" --result "${STATUS_NO}" --color RED
+ else
+ LogText "Result: MOR-bit unknown. Found: $DATA"
+ Display --indent 2 --text "MOR-bit set" --result "${STATUS_UNKNOWN}" --color YELLOW
+ fi
+ else
+ LogText "Result: could not find ${MOR_CONTROL}"
+ Display --indent 2 --text "- MOR variable not found" --result "${STATUS_WEAK}" --color WHITE
+ fi
+ fi
+#
+#################################################################################
+#
Report "rng_found=${RNG_FOUND}"
#
#################################################################################