Fav-Up : IP Lookup By Favicon Using Shodan

Fav-Up is a tool used for lookups for real IP starting from the favicon icon and using Shodan.

Installation

pip3 install -r requirements.txt

Shodan API key (not the free one)

Usage

CLI

First define how you pass the API key:

  • -k or --key to pass the key to the stdin
  • -kf or --key-file to pass the filename which get the key from
  • -sc or --shodan-cli to get the key from Shodan CLI (if you initialized it)

As of now, this tool can be used in three different ways

  • -ff or --favicon-file: you store locally a favicon icon which you want to lookup
  • -fu or --favicon-url: you don’t store locally the favicon icon, but you know the exact url where it resides
  • -w or --web: you don’t know the URL of the favicon icon, but you still know that’s there
  • -fh or --favicon-hash: you know the hash and want to search the entire internet.

You can specify input files which may contain urls to domain, to favicon icons, or simply locations of locally stored icons:

  • -fl, --favicon-list: the file contains the full path of all the icons which you want to lookup
  • -ul, --url-list: the file contains the full URL of all the icons which you want to lookup
  • -wl, --web-list: the contains all the domains which you want to lookup

You can also save the results to a CSV/JSON file:

-o--output: specify the output and the format, e.g.: results.csv will save to a CSV file (the type is automatically recognized by the extension of the output file)

Examples

  • Favicon-file

python3 favUp.py –favicon-file favicon.ico -sc

  • Favicon-url

python3 favUp.py –favicon-url https://domain.behind.cloudflare/assets/favicon.ico -sc

  • Web

python3 favUp.py –web domain.behind.cloudflare -sc

Module

from favUp import FavUp
f = FavUp()
f.shodanCLI = True
f.web = “domain.behind.cloudflare”
f.show = True
f.run()
for result in f.faviconsList:
print(f”Real-IP: {result[‘found_ips’]}”)
print(f”Hash: {result[‘favhash’]}”)

All Attributes

VariableType
FavUp.showbool
FavUp.keystr
FavUp.keyFilestr
FavUp.shodanCLIbool
FavUp.faviconFilestr
FavUp.faviconURLstr
FavUp.webstr
FavUp.shodanShodan class
FavUp.faviconsListlist[dict]

FavUp.faviconsList stores all the results, the key fields depend by the type of the lookup you want to do.

  • In case of –favicon-file or –favicon-list:
    • favhash stores the hash of the favicon icon
    • file stores the path
  • In case of –favicon-url or –url-list:
    • favhash stores the hash of the favicon icon
    • url stores the URL of the favicon icon
    • domain stores the domain name
    • maskIP stores the “fake” IP (e.g. the Cloudflare one)
    • maskISP store the ISP name associated to the maskIP
  • In case of –web or –web-list:
    • favhash stores the hash of the favicon icon
    • domain stores the domain name
    • maskIP stores the “fake” IP (e.g. the Cloudflare one)
    • maskISP store the ISP name associated to the maskIP

(in this case the URL of the favicon icon is returned by the href attribute of HTML element)

If, while searching for the favicon icon, nothing useful is found, not-found will be returned.

In all three cases, found_ips field is added for every checked entry. If no IP(s) have been found, not-found will be

Compatibility

At least python3.6 is required due to spicy syntax.

Disclaimer

This tool is for educational purposes only. The authors and contributors don’t take any responsibility for the misuse of this tool. Use It At Your Own Risk!

R K

Recent Posts

Install VirtualBox on Ubuntu 18.04 from the Oracle Repository

VirtualBox is a free, open-source, cross-platform virtualization application maintained by Oracle. It lets you run multiple…

12 hours ago

Install PostgreSQL on Ubuntu 18.04 with Remote Access Setup

PostgreSQL (also called Postgres) is a free, open-source, object-relational database management system with a strong reputation…

12 hours ago

Install VMware on Ubuntu 18.04: Workstation Player Setup Guide

VMware Workstation Player is a mature, stable virtualization platform that lets you run multiple isolated operating…

12 hours ago

Set Up a UFW Firewall on Ubuntu 18.04: Allow, Deny, and Manage

A properly configured firewall is one of the most important layers of security for any internet-facing server. UFW (Uncomplicated Firewall) is a user-friendly front-end for managing iptables rules that ships pre-installed on Ubuntu. Its defaults are sensible: block all incoming connections, allow all outgoing connections. No outside traffic reaches your server unless you explicitly open a port. This guide covers how to configure a UFW firewall on Ubuntu 18.04, from setting default policies and application profiles to writing allow and deny rules for specific ports, IPs, and subnets. <strong>Prerequisite:</strong>&nbsp;You&nbsp;need&nbsp;sudo&nbsp;access. Configure UFW Firewall on Ubuntu: Defaults, SSH, and Application Profiles If UFW is not installed, add it with: bashsudo…

12 hours ago

Disable UFW Firewall on Ubuntu 18.04: Stop, Reset, and Re-enable

UFW (Uncomplicated Firewall) is a user-friendly front-end for managing iptables rules on Ubuntu. It ships pre-installed…

12 hours ago

Install Apache Cassandra on Ubuntu 18.04: NoSQL Setup Guide

Apache Cassandra is a free, open-source NoSQL database designed for high availability and linear scalability with…

2 days ago