mfthomps / Labtainers

Labtainers: A Docker-based cyber lab framework
https://nps.edu/web/c3o/labtainers
272 stars 68 forks source link

onewayhash lab issue #23

Closed syndir closed 5 years ago

syndir commented 5 years ago

Problem: In the onewayhash lab PDF, task 2 asks the user to "generate a keyed hash using HMAC-MD5, HMAC-SHA256, and HMAC-SHA1 for any file that you choose". The checkwork command only verifies that the work was completed when these commands are issued against filetodigest.txt specifically.

The issue seems to be around: labs/onewayhash/instr_config/goals.config:

# GROUP: Three prescribed algorithms for HMAC operations
hmac_md5_done = matchany : string_equal : hmacmd5filedigest : answer=filetodigest.txt
hmac_sha1_done = matchany : string_equal : hmacsha1filedigest : answer=filetodigest.txt
hmac_sha256_done = matchany : string_equal : hmacsha256filedigest : answer=filetodigest.txt

labs/onewayhash/instr_config/results.config:

hmacmd5filedigest = openssl.stdout : PARENS : 1 : STARTSWITH : HMAC-MD5
hmacsha1filedigest = openssl.stdout : PARENS : 1 : STARTSWITH : HMAC-SHA1
hmacsha256filedigest = openssl.stdout : PARENS : 1 : STARTSWITH : HMAC-SHA256

Desired Fix: Either the PDF could be updated to specify these commands should be executed against filetodigest.txt, or the .config files could be updated to detect them being executed against any file.

mfthomps commented 5 years ago

Thanks for the report. An update has been published to change the assessment to match the lab manual. Instructors need only run update-labtainer.sh from their labtainer-student directory. And then run the gradelab again, but with the "-r" option.