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:
authorTopi Miettinen <toiwoton@gmail.com>2020-03-21 15:12:06 +0300
committerTopi Miettinen <toiwoton@gmail.com>2020-03-21 17:26:30 +0300
commit26a54991ba6a09f1fcc5f8f68cb9ae64539c8230 (patch)
treebd5b5e7968c449dd7406cbc9441de3c9d8a27154 /include/tests_crypto
parent695eef64ade2ce3413c16ce91105787460d0708b (diff)
Check for software pseudo random number generators
Check for running audio-entropyd, havegd or jitterentropy-rngd. Signed-off-by: Topi Miettinen <toiwoton@gmail.com>
Diffstat (limited to 'include/tests_crypto')
-rw-r--r--include/tests_crypto26
1 files changed, 24 insertions, 2 deletions
diff --git a/include/tests_crypto b/include/tests_crypto
index 6a9cb5f2..5c2a0804 100644
--- a/include/tests_crypto
+++ b/include/tests_crypto
@@ -196,8 +196,8 @@
#################################################################################
#
# Test : CRYP-8004
- # Description : Test for presence of random number generators
- Register --test-no CRYP-8004 --os Linux --weight L --network NO --root-only NO --category security --description "Presence of random number generators"
+ # Description : Test for presence of hardware random number generators
+ Register --test-no CRYP-8004 --os Linux --weight L --network NO --root-only NO --category security --description "Presence of hardware random number generators"
if [ ${SKIPTEST} -eq 0 ]; then
LogText "Test: looking for ${ROOTDIR}sys/class/misc/hw_random/rng_current"
if [ -f "${ROOTDIR}sys/class/misc/hw_random/rng_current" ]; then
@@ -224,6 +224,28 @@
#
#################################################################################
#
+ # Test : CRYP-8005
+ # Description : Test for presence of software pseudo random number generators
+ Register --test-no CRYP-8005 --os Linux --weight L --network NO --root-only NO --category security --description "Presence of software pseudo random number generators"
+ if [ ${SKIPTEST} -eq 0 ]; then
+ LogText "Test: looking for software pseudo random number generators"
+ FOUND=""
+ for SERVICE in audio-entropyd havegd jitterentropy-rngd; do
+ if IsRunning "${SERVICE}" --full; then
+ FOUND="${FOUND} ${SERVICE}"
+ fi
+ done
+ if [ -z "${FOUND}" ]; then
+ Display --indent 2 --text "- SW prng" --result "${STATUS_NO}" --color YELLOW
+ ReportSuggestion "${TEST_NO}" "Utilize software pseudo random number generators"
+ else
+ Display --indent 2 --text "- SW prng" --result "${STATUS_YES}" --color GREEN
+ LogText "Result: found ${FOUND} running"
+ fi
+ fi
+#
+#################################################################################
+#
WaitForKeyPress