A cryptographic hash function is an algorithm that takes data of arbitrary size as its input and returns a fixed size value, called message digest or checksum, as its output. For example, sha256sum
calculates the SHA256 (Secure Hash Algorithm 256) message digest. SHA256, as the name indicates, returns a checksum of size 256 bits (32 bytes). Checksum are used to verify data integrity|data was not changed during transmission.
Some Hashing algorithms:SHA224, SHA256, SHA384, SHA512 and RIPEMD160 .Some older hash functions, such as MD5 (Message Digest 5) and SHA-1, are cryptographically broken.
Download task files: https://tryhackme.com/material/deploy
\>> Unzip the file and change directory to task5:cd task5 >> ls command to list files >>sha256sum order.json
[Q1]What is the SHA256 checksum of the file order.json
?
flag:58fbad3deaf043a5bc837ac2c558b5928db47613a74f59caa46815aa07fe1a7f
\>> ls command to list files >> nano order.json >> change amount from 100 to 900.>>sha256sum order.json
[Q2]Open the file order.json
and change the amount from 1000
to 9000
. What is the new SHA256 checksum?
flag:8deb9713329e00854a69812b504ea37234a70a0c8200a73fa0f8b4869bad618d
\>> ls command to list files >> hmac256 3RfDFz82
[Q3]Using SHA256 and the key 3RfDFz82
, what is the HMAC of order.txt
?
flag:c7e4de386a09ef970300243a70a444ee2a4ca62413aeaeb7097d43d2c5fac89f
If this write-up is riddled with typos, blame the sleep deprivation from all-night hacking.