Tenable's Research group has released a new Log Correlation Engine TASL script which processes web proxy logs and alerts when specific domains are visited. The script is named blacklist_domain.tasl and can be downloaded from here. Tenable has also added several new PRM libraries to support processing logs from web proxies such as Cisco ASA, Blue Coat and Squid. This blog entry discusses how to obtain these PRM files, install the new TASL script and configure it for real time updates.
Security Monitoring with Web Proxies
Looking for internal traffic to suspicious domains can identify a wide variety of potential network abuses including:
- compromised host detection
- visiting known phishing sites
- visiting sites with adult content
An example list of suspicious domains can be obtained from the Bleeding Threat project here. The correlation used in the TASL script makes use of the list of domains tracked by the Bleeding Threats project and can also be easily extended to include other sources.
When viewing these logs alongside data collected by netflow, sniffed sessions, IDS events, firewall logs and so on, a complete picture of what a host is doing and what sort of activity it is engaged in can be accomplished. Also, organizations that monitor employee activity closely can also attempt to discover when competitor's sites are visited and non-work activity is engaged in.
To configure this sort of monitoring with the LCE, we need to install the new PRM files, install the TASL script and also install or update the "blacklist" PERL utility which obtains updated lists of threats from SANS, Bleeding Threat and other sites.
Links to the new PRM files and TASL script is available below, and a list of shell commands to install and configure these utilities is included in the next section.
PRM to process logs from Squid web proxies.
PRM to process web proxy logs in the NCSA format
PRM to process web proxy logs saved in the W3C extended format
Updated list of PRM IDs
Updated list of PRM groupings
Updated PRM to process events from the blacklist_domain.tasl script
The TASL script which subscribes to web proxy events and performs lookups of suspicious domains.
PERL script which updates both a list of suspicious DNS domains as well as lists of suspicious IP addresses.
The following list of UNIX commands will allow you to update your LCE to process these new log events as well as install the blacklist_domain.tasl script. The PERL utility blacklist.pl requires a click-through license agreement to be downloaded. This should be placed on your LCE in a directory such as /usr/thunder/daemons.These shell commands below assume that the blacklist-2.4.1.tar.gz file is installed there.
rm -f web_squid.prm
rm -f lce_tasl.prm
rm -f prm_map.prm
rm -f PRM_mapping.prm
exit <-- we need to run this script as root
tar xvf blacklist-2.4.1.tar
./blacklist-2.4.1.pl <-- the tool will automatically run in the background
Before restarting the thunder daemon, give the script a chance to reach out and obtain new data. Inside the /usr/thunder/daemons/blacklist directory, the script will update the blacklist.domain file. Once these files have been populated, the thunderd service can be restarted with the following command:
Managing Static Lists of "Bad" Domains
If you do not want to synchronize your list of potential blacklisted domains automatically, you can also manually edit the file /usr/thunder/daemons/blacklist/blacklist-custom.domain. This file won't exist unless you create it. The format of the contents are the same as those for the blacklist.domain file in that it is a domain suffix, a corresponding web site and a description about the item. For example, if you wanted to alert when web users attempted to receive new information from CNN or FOX, an entry could look like this:
If changes to the blacklist-custom.domain file occur, either the thunderd process must be restarted or a SYSLOG message containing the word "Blacklist_File_Update" be received. If the blacklist.pl script is running, it will send such a SYSLOG message to the thunderd process periodically.
For More Information
If this sort of alerting is interesting to your organization, you should also consider running the BlackList IP TASL script. This script uses multiple lists of "bad guy" IP address such as SANS and the Bleeding Threats project to alert when you have network activity to or from these sites. A blog entry detailing how it can be set up and configured is located here.