Encrypting a File and Verifying Its Integrity with Hashdeep

You can follow the steps below to check the integrity of files using Hashdeep:

Calculate Initial Hash Values: First, calculate the cryptographic hash values of all files inside the folder you want to check the integrity of, and store these values in a file. For example, you can calculate SHA-256 hashes with the following command and save them in a file:


Kod:
hashdeep -c sha256 -r /path/to/folder > initial_hashes.txt

Check File Integrity at Regular Intervals: To check the integrity of the file at regular intervals, you can follow these steps:
Create a new copy of the file or take a copy of the existing file.
Calculate the cryptographic hash values of the new file and store these values in a file.
Check File Integrity: To check the file's integrity, use the following command with the initial hash values you saved in the previous step:


Kod:
hashdeep -c sha256 -k initial_hashes.txt -X -r /path/to/folder


-k initial_hashes.txt: Specifies the file containing the initial hash values.
-X: Used to check the integrity of files in the folder.
-r: Recursively scans files and subfolders within the specified folder.
This command will check the file's integrity. If the file has been altered or corrupted, this command will provide error messages. Otherwise, it means the file has been preserved intact.
Hashdeep is a powerful tool that can be used for such integrity check operations and helps ensure your files are secure and intact.

I used sha256 in this example, but you can encrypt using SHA-1, SHA-256, SHA-512, SHA-384, MD5 types as well.




Topic Owner : @meakay Hashdeep İle Bir Dosyayı Şifrelemek ve Bütünlüğünü Kontrol Etmek


11123123.png
 
Üst

Turkhackteam.org internet sitesi 5651 sayılı kanun’un 2. maddesinin 1. fıkrasının m) bendi ile aynı kanunun 5. maddesi kapsamında "Yer Sağlayıcı" konumundadır. İçerikler ön onay olmaksızın tamamen kullanıcılar tarafından oluşturulmaktadır. Turkhackteam.org; Yer sağlayıcı olarak, kullanıcılar tarafından oluşturulan içeriği ya da hukuka aykırı paylaşımı kontrol etmekle ya da araştırmakla yükümlü değildir. Türkhackteam saldırı timleri Türk sitelerine hiçbir zararlı faaliyette bulunmaz. Türkhackteam üyelerinin yaptığı bireysel hack faaliyetlerinden Türkhackteam sorumlu değildir. Sitelerinize Türkhackteam ismi kullanılarak hack faaliyetinde bulunulursa, site-sunucu erişim loglarından bu faaliyeti gerçekleştiren ip adresini tespit edip diğer kanıtlarla birlikte savcılığa suç duyurusunda bulununuz.