Skip to content
This repository has been archived by the owner on Nov 18, 2024. It is now read-only.
/ rdns-lookup Public archive

Does RDNS queries for an IP range and uploads results to a Humio lookup file

License

Notifications You must be signed in to change notification settings

humio/rdns-lookup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rdns-lookup

rdns-lookup is a Java application for doing reverse DNS requests against a range of IP addresses and uploading the results as a lookup file in Humio.

In general, reverse DNS cannot be trusted. The owner of an IP may be able to modify the results of a reverse DNS query to an arbitrary value, but for something like an internal network it may be possible to know that reverse DNS requests are truthful. In addition, Humio may not be running on the same network as the one we wish to perform reverse DNS in. This application this issue by building a reverse DNS lookup locally and uploading it to Humio.

Building

Build using mvn package -DskipTests. The resulting uber-jar is located at target/rdns-lookup-$VERSION-jar-with-dependencies.jar.

Usage

java -jar rdns-lookup.jar [-hV] [-t[=<token>]] <url> <repo> <filename> [<ranges>...]

Parameter Usage
<url> URL to Humio cluster to upload to
<repo> Repository in cluster to upload to
<filename> File in repository to upload to
<ranges> IP ranges to scan
-t, --token API token to authenticate with
-h, --help Displays help
-V, --version Displays version

If -t or --token is not set, then the environment variable HUMIO_TOKEN is used as API token. If that is not set either, then no API token will be included in the request.

Ranges can either be specified either as

  • a single address, i.e. 192.168.0.1
  • CIDR notation, i.e. 192.168.0.0/24.
  • a range, i.e. 192.168.0.0-192.168.0.10. The range is inclusive.
  • @file, i.e. @path/to/file. The file will be read and each line will be interpreted as one of the above.

Both IPv4 and IPv6 addresses are supported.

Example

Do RDNS queries against CIDR subnet 192.158.0.0/24 (192.158.0.0 to 192.158.0.255 inclusive) and upload the results to a file called rdns.csv in the repo called myRepo on the EU Humio cloud:

java -jar rdns-lookup.jar https://cloud.humio.com myRepo rdns.csv 192.168.0.0/24

About

Does RDNS queries for an IP range and uploads results to a Humio lookup file

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published