Fastvue TMG Reporter provides a Top Applications chart in the Bandwidth Dashboard, which is built using the User Agent field in Forefront TMG's proxy log file (referred to as ClientAgent or c-agent depending on your log file format)
It is usually easy to identify these applications
However, some are fairly obscure and don’t give you much indication.
The data that makes up the application identifier is called the User Agent String. The user agent is a field in the HTTP request header. The request header is sent in the initial GET request and the User Agent field is often used to determine the capabilities or limitations of the application.
The format of the User Agent field is specified in RFC 2616 Section 14.43.
The User-Agent request-header field contains information about the user agent originating the request. This is for statistical purposes, the tracing of protocol violations, and automated recognition of user agents for the sake of tailoring responses to avoid particular user agent limitations. User agents SHOULD include this field with requests. The field can contain multiple product tokens (section 3.8) and comments identifying the agent and any subproducts which form a significant part of the user agent. By convention, the product tokens are listed in order of their significance for identifying the application.
As a rule almost all browser user agent strings look as follows:
[version] ([system and browser information]) [platform] ([platform details]) [extensions].
Most browsers start with Mozilla to indicate compatibility, which is a hangover from the mid 1990’s browser wars. Here are some Internet Explorer User Agent examples with various versions and extensions:
Looking at these you can see that a common field value is MSIE. We can reasonably assume that all user agents containing this value represent a version of Internet Explorer. Similar common values exist for other browsers such as Firefox and Chrome.
TMG Reporter does a nice job of representing these user agents with common values into more readable Applications. For all others, the raw user agent is displayed.
In addition to identifying the browser or application being used, the user agent strings sent by popular browsers usually include information about the host operating system. This is particularly useful when using a website traffic analysis tool such as Google Analytics as it can help target users more accurately.
For instance, if a retailer notices a large amount of Windows XP traffic they could start pushing more Windows 7 upgrade sales. Likewise, if it detects traffic coming from an Apple OSX device it would exclude this promotion completely.
Web developers can also use the User Agent string to dynamically format web page content for smart phones, tables and desktops (although using css media queries is widely considered a better approach).
This of course raises some questions about privacy and security since a large amount of user machine information is revealed. For example, if you know that a connection is being made from a machine with IE6 on Windows XP, you know what potential vulnerabilities there are on that system.
All Internet applications should identify themselves with a unique user agent string. We can therefore use this to determine if certain applications are drawing large amounts of traffic unbeknownst to users. An easy example of this is Adobe updater.
Adobe Acrobat Updater/10.0.0 CFNetwork/520.2.5 Darwin/11.2.0
You could use a time based access rule to block traffic to the Adobe Update servers during peak office hours. TMG Reporter will help you identify this too.
Since machines effectively advertise what they are with the agent string you can use this to track down non-compliant machines. As an example setting a filter for agent type containing MSIE6 will help you find machines on your network that are far out of date.
The user agent string can also be useful for blocking applications that communicate over HTTP on port 80 using Forefront TMG's HTTP Filter. For a good example, see Richard Hicks' post, Block Instant Messaging Traffic using Forefront TMG's HTTP Filter
You can use TMG’s log monitoring to track down machines running user agents that could pose a risk to your network.
Certain sites use the user agent string to respond with or render a particular version of the site. I am going to use a local site in the example. Using a Firefox plugin called TamperData we can intercept and edit the initial GET request and replace Firefox's user agent string with that of a mobile platform.
We now get redirected to the .mobi site as opposed to the full site.
Some browsers are including this type of spoofing as a feature in order to allow the user to set site version preferences. For example, the Dolphin browser has a setting to enable desktop mode. This will force sites such as Facebook to render the full version desktop version rather than the mobile version.
Browser developer tools such as the ones included in Internet Explorer or Chrome also often provide the functionality to spoof older versions of the browser to test backwards compatibility.
And unfortunately certain types of Malware also use user agent spoofing to avoid detection.
User agent strings can be very useful, but as they are very easily 'spoofed', they cannot be considered 100% accurate or “honest”. Having a good understanding of them can however give you a valuable insight in managing your environment's Internet consumption and identifying potential problem areas.
Download our FREE 30-day trial, or schedule a demo and we'll show you how it works.
Make The World A Better Place with Fastvue and Microsoft Reputation Services (MRS)
How to Report on YouTube Activity with Fastvue TMG Reporter