3 ms·
This is loaded question : 1) you can't control formats to guarantee safety. You can have malformed files (like pdfs used to hack google) or valid files with p
by adamzochowski 16y ago
This is loaded question :
1) you can't control formats to guarantee safety. You can have malformed files (like pdfs used to hack google) or valid files with payload (most doc viruses are valid files)
2) you can try to identify / help users with some files by providing more information about files. Start by running commands 'file -b' and 'file -ib', and then deeper inspections: 'pdfinfo' for pdfs, etc Also read zipinfo/file comments (old school stuff like: files.bbs / descript.ion / zip global comment / zip per file comment, etc)
3) you can help people mark files up. Aka: is this secure / verified file. And also is the person trusted. This heads into whole can of worms regarding trust relationships.
4) in the end you can't guarantee anything. Instead of a popup just before download give indication to how you see a file. Mark .exe as less secure file than .txt . If you want cutesy go with a cake. A text file will be a nice cake. EXE will be a rotten cake (and add a note 'cake is a lie' for gamers refernce)
5) for internal things rely on various hash methods. For my stuff I use: md4/md5/ sha1/sha224/sha256/sha384/sha512 /ripemd160/whirlpool/ crc32/adler32/ ed2k_chain/ed2k_aich_chain/ed2k_root (i use these to detect dupe files)
Additional benefit of these hashes is that you can block a whole series of files. Many a pirate site will provide either SHA1 file hash (mostly gnutella) or ed2k_root (which is same md4 for files below 9.8mb). Some torrent files will contain md5 per file. CRC32 is also quite popular in pirate scene (atleast rely on crc32 to flag potential pirate content that could land you in prison).
Finally, also rely on hashing like ssdeep, which will help you detect viruses.
---
Finally, talk to your users about file formats. They can help you deal with files, give hints how to inspect them, etc.
Kind regards
- jayzee 16y agoThanks a ton!