Malshare / MalShare

http://www.malshare.com
22 stars 4 forks source link

SHA256 Migration #63

Closed silascutler closed 1 year ago

silascutler commented 3 years ago

MalShare is ... theoretically backed to MD5. To users, MD5 is the default display name, MD5 is usually sample index, and it's on file system by MD5.

As MD5 hasn't been the relied upon standard for years, we need to migrate to SHA256. Current plan of action is:

  1. Update frontend code to SHA256
  2. Migrate backend to SHA256
  3. Merge in frontend updates.
  4. Test
silascutler commented 3 years ago

Part 1 is roughly complete in https://github.com/Malshare/Frontend/tree/sha256_migration

silascutler commented 3 years ago

Part 2 is underway.

In order to migrate, we need to copy the entire repo to a new path. In order to prevent files from being added to the repo while the script runs, I've temporarily disabled upload processing. New Uploads will also go to /mw/uploads ... which is the way it's supposed to be.

silascutler commented 3 years ago

Side Note Before merging SHA256 changes to frontend, make sure wrap // truncate is setup. image

silascutler commented 3 years ago

Side Note Some hashes were added after the cut off. Will need to be carved from the DB

silascutler commented 3 years ago

In order to migrate, we need to copy the entire repo to a new path. In order to prevent files from being added to the repo while the script runs, I've temporarily disabled upload processing. New Uploads will also go to /mw/uploads ... which is the way it's supposed to be.

I updated the python upload handler to also copy the uploaded file to the new, old repo locations and leave it in the /mw/uploads directory. That way, if need be, we can walk things back.