For a few days, I switched from DropBox to ownCloud and I’m now playing more with the available ‘apps‘. Besides the privacy context, ownCloud seduced me with its add-on feature. Is it possible to install external plug-ins (called ‘apps‘) to add new or improve native features. Of course, downloading and enabling apps (read: code written by 3rd parties) in your applications can be risky, keep always in mind that they could have huge impacts and introduce security issues.
My ownCloud instance is used to make some of my documents and data available from any place but I’m also using it to collect data. When I detect a suspicious file while browsing the web, while using a friend’s computer, I always upload this file to my ownCloud for further analysis. To automate some tasks, I tested some apps already available like:
- checksum – which comes in two versions: one which generate the MD5 hash of the file, the other generate the SHA1 hash.
- antivirus – which scans uploaded files with ClamAV.
Having the hash is nice but limited. ClamAV is far from being the most powerful antivirus solution. That’s why I decided to learn how apps are working and wrote my first one! This first app is based on the ‘checksum‘ one, it computes the MD5 hash of files and then it checks against VirusTotal if the MD5 is known. If it’s the case, it displays the file score as seen in the screenshot below:
I did not re-invent the wheel and simple used the PHP API developed by Andreas Breitschopp. Of course, you will need an account on VirusTotal and an API key. I published the app on the official repository: http://apps.owncloud.com/content/show.php/owncloud-virustotal?content=161310.
Some features to add:
- Send new files to VirusTotal for analyze
- Make the API key configurable with the settings page (to prevent editing the source code)
If you’ve ideas, let me know!