icon/x Created with Sketch.

Splunk Cookie Policy

We use our own and third-party cookies to provide you with a great online experience. We also use these cookies to improve our products and services, support our marketing campaigns, and advertise to you on our website and other websites. Some cookies may continue to collect information after you have left our website. Learn more (including how to update your settings) here.
Accept Cookie Policy

Accept License Agreements

This app is provided by a third party and your right to use the app is in accordance with the license provided by that third-party licensor. Splunk is not responsible for any third-party apps and does not provide any warranty or support. If you have any questions, complaints or claims with respect to this app, please contact the licensor directly.

Thank You

Downloading URL Expander
SHA256 checksum (url-expander_11.tgz) 95af057952f40e695aebdb038d1a101ee6ffb1c6723a71f9d797c4e8602a0dd3 SHA256 checksum (url-expander_10.tgz) 2e3797b2c06aee9ff480004ea9c498a17007f4bd5835025092f42d26bce57ad4
To install your download
For instructions specific to your download, click the Details tab after closing this window.

Flag As Inappropriate

URL Expander

Overview
Details
URL Expander safely retrieves the real location of shortened links, potentially unmasking malicious urls.

Core Features:
- Expanding links masked by URL shortening services.
- Following/limiting redirect chains (ie. redirects that lead to more redirects)
- Low-level proxy capabilities for hiding your origin (if desired)
- Specifying a useragent string for use in retrieving URLs

URL Expander was built with security analysts in mind, specifically for use with log data containing shortened links where the actual location isn't revealed in the logs. For example, some email appliances may scan incoming emails for hyperlinks, but if any of those hyperlinks are short URLs, the real location may not be specified in the logs.

Usage

| expandurl field=<string> [redirect_limit=(<# of times to expand a daisy redirect of shortened links>)]

field: the name of the field containing the short URL.

redirect_limit: Defaults to 0, meaning redirects are not followed. Some short URLs will lead to other short URLs, which lead to other short URLs, etc. "redirect_limit" allows you to follows these redirects while specifying the max # of redirects to follow (avoiding an endless loop). This field is not required.

NOTE: The "expandurl" command works best if you narrow your search results to only URLs masked by shortening services. This can be done easily with a lookup table.


Output

expandurl will produce a new field for each row named "expanded_url".

Sample:
url,expanded_url
http://bitly.com/[short_link1], http://someexpandedurl1.com/stuff
https://goo.gl/[short_link2], http://anotherlongurl.com/stuff2


Examples

Example 1: Expand short URLS, don't follow redirects

index=your_index [inputlookup short_services.csv | return 10000 $short_service] | expandurl field=url | table url, expanded_url

In this example, short_services.csv is a lookup table containing a list of shortening services like "tiny.cc", "ow.ly", "bitly.com", etc. This narrows the search results. You should provide this table.

The expandurl command is applied to the "url" field of every row, outputting a new field named "expanded_url".

Example 2: Expand URLs and follow up to 3 redirects

index=your_index [inputlookup short_services.csv | return 10000 $short_service] | expandurl field=url redirect_limit=3 | table url, expanded_url

In this example, short_services.csv is a lookup table containing a list of shortening services like "tiny.cc", "ow.ly", "bitly.com", etc. This narrows the search results. You should provide this table.

The expandurl command is applied to the "url" field of every row, outputting a new field named "expanded_url". If the URL leads to a daisy chain of redirects, up to 3 redirects will be followed (hence the redirect=3 attribute).


Lookup Table

As stated above, it is best to narrow your search results by matching on a list of URL shortening services. Here is a look uptable you can upload as "short_services.csv" for use with the examples above:

short_service
7.ly
adf.ly
admy.link
al.ly
bc.vc
bit.do
doiop.com
fur.ly
good.ly
is.dg
lnked.in
lynk.my
mcaf.ee
ouo.io
ow.ly
ph.dog
qr.net
s.id
shrinkee.com
shrinkurl.in
sptfy.com
thinfi.com
tiny.cc
tinyurl.com
tny.im
urlkr.com
v.gd
y2u.be
zi.ma
zzb.bz
adfoc.us
bitly.com
coinurl.com
git.io
goo.gl
hec.su
shorte.st
tldrify.com
tr.im

Release Notes

Version 1.1
Feb. 9, 2017

Fixed bug in requests

Version 1.0
Jan. 30, 2017

30
Installs
208
Downloads
Share Subscribe LOGIN TO DOWNLOAD

Subscribe Share

AppInspect Tooling

Splunk AppInspect evaluates Splunk apps against a set of Splunk-defined criteria to assess the validity and security of an app package and components.

Are you a developer?

As a Splunkbase app developer, you will have access to all Splunk development resources and receive a 50GB license to build an app that will help solve use cases for customers all over the world. Splunkbase has 1000+ apps and add-ons from Splunk, our partners and our community. Find an app or add-on for most any data source and user need, or simply create your own with help from our developer portal.

Follow Us:
© 2005-2019 Splunk Inc. All rights reserved.
Splunk®, Splunk>®, Listen to Your Data®, The Engine for Machine Data®, Hunk®, Splunk Cloud™, Splunk Light™, SPL™ and Splunk MINT™ are trademarks and registered trademarks of Splunk Inc. in the United States and other countries. All other brand names, product names, or trademarks belong to their respective owners.