Last Updated: 2015-09-03 10:01:43 UTC
by Xavier Mertens (Version: 1)
A few days ago, Tom wrote a diary(1) about RTIR(2) and its REST API. He explained how the tool can be fulfilled with external data. Being a DShield contributor for years (I submit my firewall logs), I like to search for IP addresses information in the DShield database. By default, RTIR extracts IP addresses from tickets and has an interface to query services like WHOIS servers, to perform a traceroute or to query any third-party website. RTIR being extremely configurable, why not extend it to query the DShield database using the ISC API(3)!
If IP addresses can be queried via the URL "https://isc.sans.edu/ipinfo.html?ip=x.x.x.x", don't do this. First of all for performance reasons but the page cannot be displayed in an iframe (that's the case in RTIR) because it sets the 'X-Frame-Options' to 'SAMEORIGIN'. To query details of an IP address, use the following IP API call:
Results are returned in XML. To integrate DShield lookups into RTIR, follow this procedure.
1. Create a new page called "isc_ipinfo.php" in your Apache server running RTIR (or any available HTTP server). This page will receive the IP address, query the DShield API and reformat (basically) the XML output:
2. Edit your $RTIRHOME/etc/RTIR_SiteConfig.pm and add the new service in $RTIRIframeResearchToolConfig (pointing to your URL):
3. Restart your RTIR instance and enjoy! You can now query the DShield API:
It's also easy to create new "portlets" to be used in dashboards. As a bonus, let's display the ISC Infocon status in a RTIR dashboard.
1. Create the new portlet in $RTIRHOME/local/html/Elements. Let's call it "InfoconStatus":
2. Enable the new portlet in $RTIRHOME/etc/RTIS_SiteConfig.pm:
3. Restart your RTIR instance and adapt your favorite dashboards: