Skip to content

Latest commit

 

History

History
118 lines (88 loc) · 4.19 KB

README.md

File metadata and controls

118 lines (88 loc) · 4.19 KB

geo Abuse IP DB

                           _                    _____ _____  _____  ____  
                     /\   | |                  |_   _|  __ \|  __ \|  _ \ 
   __ _  ___  ___   /  \  | |__  _   _ ___  ___  | | | |__) | |  | | |_) |
  / _` |/ _ \/ _ \ / /\ \ | '_ \| | | / __|/ _ \ | | |  ___/| |  | |  _ < 
 | (_| |  __/ (_) / ____ \| |_) | |_| \__ \  __/_| |_| |    | |__| | |_) |
  \__, |\___|\___/_/    \_\_.__/ \__,_|___/\___|_____|_|    |_____/|____/ 
   __/ |                                                                  
  |___/                                                                       

A wrapper around abuse IPDB for analyzing IPs as per their geo locations.

Table of contents:

About:

  • Abuse IPDB: AbuseIPDB is a project dedicated to helping combat the spread of hackers, spammers, and abusive activity on the internet.

  • IPlocation This free online tool allows you to see the geographical location of any IP address. Just input the IP address and you will be shown the position on a map, coordinates, country, region, city and organization

The objective of this project is to locate abuse IPs from a given list and plot their location on a map by combining the above two to generate KML files which can be imported into Google Maps.

Architecture and design:

*
|_backend
|_frontend

Design:

Backend:

  • Getting the data from Abuse IPDB:
curl -G https://api.abuseipdb.com/api/v2/check \
  --data-urlencode "ipAddress=118.25.6.39" \
  -d maxAgeInDays=90 \
  -d verbose \
  -H "Key: YOUR_OWN_API_KEY" \
  -H "Accept: application/json"
  • Getting the data from IPlocation:
curl https://api.iplocation.net/?ip=8.8.8.8

  • Generation of KML: We generate the KML using simplekml package of python. The python package simplekml was created to generate kml (or kmz). It was designed to alleviate the burden of having to study KML in order to achieve anything worthwhile with it. If you have a simple understanding of the structure of KML, then simplekml is easy to run with and create usable KML. simplekml

Frontend:

To Be Added

Demonstration:

Run:

python Main.py

Result: image

data.json example output file:

image

data.json has the structure:

{
    "<IP from the list>": {
        "abuseData": {
            "data": {
            //AbuseIPDB data
            }
        },
        "geoData": {
        //geodata
        }
    },

We then feed the data retrieved into JSON files

Technologies-used

For the backend, I have made use of Python and various libraries

  • KML: KML is a file format used to display geographic data in an Earth browser such as Google Earth. KML uses a tag-based structure with nested elements and attributes and is based on the XML standard. All tags are case-sensitive and must appear exactly as they are listed in the KML Reference

Local Setup and Contribution:

clone the project locally and initialize the .env file. I have provided an example file for the same and install the packages. Once that is done, run the main file of the project or use individual components from the project to suite your needs. Changes and suggestions are always welcome!

Security:

I take security seriously and so, any security related changes/suggestions are always welcomed!

Future Scope:

Integrating this with other modules

License:

The app is under the Creative Commons Zero v1.0 Universal license