Web Analytic Tools
June 26th, 2008 by Jordan Del-Grande (Dedicated Page)I recently had a client inquire about some of the potential risks associated with using a 3rd party web analytics tool.
Businesses normally want to use these tools to report on the behavior of users who visit their site in order to improve customer experience and measure sales performance. All that is required is for the business to include an innocuous JavaScript tag (provided by the 3rd party) into each page they would like to measure. If the user allows javascript to be run, the script is run each time a user visits the website calling a more advanced script back on the 3rd party server.
For example, let’s say I provided a web analytics service and you used me as a 3rd party. I would provide you with the below script and then you would place the following tag on every page of your website…
<script src=http://www.securitytechsience.com/sts.js” type=”text/javascript”></script>
The sts.js script on my server would then run in the user’s browser every time a user visited your site . I would then provide you a log-in page that generates pretty reports for you to see how your user base is behaving.
Sounds great doesn’t it? Now for the risks…
NB: The below risks are applicable for companies that house more than just browser ware web applications.
Integrity of the script – Maybe the script is OK today but what about tomorrow?
How could you be assured that the 3rd party wouldn’t change it? What if the 3rd party server was hacked and replaced with malicious code by someone else? If a change were to occur how long before you would notice? If you did notice then what?
The above questions really hit home to three of the core functions of information security within any organisation…
- Change control: If the 3rd party wanted to change the script then they should notify you and this would be input to your change control process.
- Audit & Monitoring: The 3rd party should provide this, but you could just as easily write a script that does an hourly download of the script and compares it to your known good script.
- Incident Response: If the script were to change without prior change control notification then there should be an incident response plan to follow.
Integrity of the 3rd Party
How could you be sure that the 3rd party uses a level of security practices that are aligned with your organisation? How could you be sure that if things did go wrong you were covered?
The above questions are concerned with a breadth of business units such as operational risk & compliance, legal as well as information security. They would include questions such as…
- Is there a contract between the third party and the organisation?
- Does the contract include x, y, z to cover the organisaion in the event of a, b, c?
- Does the contract include a SAS70 or equivalent?
- Does the contract in include a monetary figure?
- Has privacy been considered?
In most (if not all) 3rd party contracts, the above questions favour the 3rd party and not you.
Confidentiality of the Data
How can your be certain that any confidential data remains secure? How is the data (both confidential and non-confidential) transferred?
Although you may be using SSL (ie, https), the 3rd party may not and the data is transferred via http. If this is the case, then any sensitive data passed is transferred across the Internet in the clear.
Even if you are using SSL and the 3rd party is using SSL (ie, https) as well, what if the javascript is requesting http GET requests? In that case, the URI and it’s parameters are passed over the Internet in clear text. For example,
GET https://www.example.com/cc_valid.js?credit_no=123412341234&date=31122008&ccv=123
And finally, do you really want an external script running anywhere near your customer’s sensitive information?
Problem
As you can see the above solution adds some considerable overhead if you want to implement it securely in order to protect your customers data and your company’s reputation. As a business the benefits that were promised at the beginning of sales pitch may not be sounding so great anymore and you may be leaning toward building a solution in-house. Although it is a secure solution, you soon find out it comes at a much higher cost. So is there an alternative solution?
Solution
I would recommend copying the 3rd party script on a local organisational server so that the control of the script is now with you. The company is now forced to contact you when they would like to update the script. You could go even further and ask that the reporting funcitonality is housed on your network. That is, you provide the box and they provide the application. If they won’t allow you to house the application you could always set up a B2B channel with the 3rd party in the cases where sensitive data may be transferred – This channel could be over a dedicated link or VPN using an IPSEC tunnel.