Recruitment Directory's Blog - Australia's #1 Recruitment Technology Blog!
Have you ever clicked on what you thought was a safe website URL and then all of a sudden your browser/antivirus software blocks the webpage?
Every day, I am alerted to yet another recruitment website falling victim to some sort of security incident. If you own or manage a website, YOU
are responsible for your websiteís security and have an implied "duty of care" to provide safe 3rd party links.
Imagine this... A user clicks on your job boards "Apply Now" button, and is redirected to a 3rd party application form.
Unfortunately the website the user was redirected to is insecure and has been flagged as a badware site.
The user then completes the application form and attaches their resume containing personal details, bank account, visa, passport etc.
The userís details have now been intercepted by another party and can now be used for fraud, identity theft etc. The user may have also downloaded or accepted infected documents.
To reduce the risk associated with 3rd party links. You SHOULD automatically check (wash) all your URL links (within the job advert or linkout URL) as well as the email address (@domain) against known Malware or Black list.
There are various enterprise programs available from security providers, but in this example we will focus on integrating with Google's Safe Browsing API.
The Google Safe Browsing API
is an experimental service that allows you check URLs against Google's constantly-updated blacklists of suspected phishing and malware pages.
If you use Firefox you would already be familiar with the malware or phishing warning screen
that shows up when you visit suspicious sites. You will use this API to download an encrypted table for local, client-side lookups of URLs.
A small company can obtain the API key and query Google Safe Browsing API directly. There is no need to maintain local list of md5 hashes. This approach is a lot simpler. Another advantage - you always use a fresh list of URLs (no 30 min delay until the next execution of a cron job)
Making calls to the API is pretty straightforward. You need to first register with Google to get a developer key in order to access the service. Once you do this you simply call a certain URL which responds with a list of MD5 hash
values to suspected malware sites.
It is important to note for privacy and security reasons; we are not directly comparing the real URL against another list of URLs. Instead comparing the MD5 hashes (which in theory, almost can't be reversed back to the original URL string)Step 1.
Sign up for an API developer keyStep 2.
Set up 2 tables in your local database to store the downloaded lists (see example code below).Step 3.
Create 2 pages google_malware.php
(see example code below). You will need to set up a cron job every 30 minutes to automatically download the updated lists. Step 4.
Create a script to check all your URLs (converting to md5) against the downloaded malware/black list on every update.
If the script finds a match between your website's data and the downloaded malware/black list you should immediately change the status of the job advert to "offline". Inform the advertiser of your findings and manually check the URL with your own browser. Create Database Tables
CREATE TABLE IF NOT EXISTS google_malware (
malware_hash VARCHAR(28) NOT NULL DEFAULT ''
PRIMARY KEY (malware_hash))
CREATE TABLE IF NOT EXISTS google_blacklist (
blacklist_hash VARCHAR(28) NOT NULL DEFAULT '',
PRIMARY KEY (blacklist_hash))
Article URL: http://www.recruitmentdirectory.com.au/Blog/is-your-job-site-redirecting-candidates-to-insecure-websites-a275.html
Article Tags: api hacking google safe browsing api job board recruitment website safety security php script md5 hash malware blacklist phishing database email encryption exploit mysql privacy sql injection vulnerability identity theft Hide Comments (0)