Skip to content

new: [expansion] IPGeolocation.io lookup module - #914

Merged
adulau merged 1 commit into
MISP:mainfrom
mateen993:add-ipgeolocation
Oct 8, 2026
Merged

adulau merged 1 commit into
MISP:mainfrom
mateen993:add-ipgeolocation

Conversation

@mateen993

@mateen993 mateen993 commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Adds ipgeolocation, an expansion and hover module for IPGeolocation.io. It takes an IP attribute (ip-src, ip-dst, ip-src|port, ip-dst|port, domain|ip) and returns:

Two sources in one module

  • api_key: the IPGeolocation.io API (v3). Free plans return location and ASN; when a plan refuses the security and abuse modules, the module falls back to the base lookup. Results are cached in memory (cache_ttl, default one hour) so hover does not spend credits on every mouse-over.
  • mmdb_paths: local IPGeolocation.io MMDB databases (files or directories). Nothing leaves the host, which suits air-gapped instances and indicators that must not be shared. Several databases are combined, and a file replaced by an update is re-opened automatically.

Notes for review

  • No new dependency: requests and pymisp, plus maxminddb (already installed through geoip2), imported only for the MMDB source.
  • Until a PyMISP release ships the ipgeolocation-ip template, the module sets the object's meta-category and template UUID itself; without them MISP refuses to create the object.
  • Private and reserved addresses are rejected before any request. API errors show the API's own message, and the API key is masked in connection errors.
  • Documentation entries and logo added, generated with the functions in documentation/generate.py.

Tests

  • tests/test_ipgeolocation.py: 25 tests, no network access. API responses come from the examples in the official IPGeolocation.io OpenAPI specification; the MMDB tests use a fake reader holding records in the layouts of the IPGeolocation.io databases.
  • Also checked against the live API, the public IPGeolocation.io sample databases, and end to end in MISP 2.5.48 (misp-docker) with both sources.

Expansion and hover module that enriches an IP address with geolocation, ASN,
company, threat intelligence (threat score, VPN, proxy, Tor, relay, bot, spam
and attacker flags) and abuse contact information from IPGeolocation.io.

It answers either from the IPGeolocation.io API (api_key) or from local
IPGeolocation.io MMDB databases (mmdb_paths), in which case nothing leaves the
host. Results use the geolocation, asn and domain-ip objects and the new
ipgeolocation-ip object template.
@adulau
adulau merged commit 9af2595 into MISP:main Oct 8, 2026
13 of 14 checks passed
@adulau

adulau commented Oct 8, 2026

Copy link
Copy Markdown
Member

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants