Skip to content

new: [expansion] Lamis Network IP intelligence & risk scoring module - #905

Merged
adulau merged 1 commit into
MISP:mainfrom
VitaliGrecciani:feature/lamis-network-expansion
Sep 23, 2026
Merged

adulau merged 1 commit into
MISP:mainfrom
VitaliGrecciani:feature/lamis-network-expansion

Conversation

@VitaliGrecciani

Copy link
Copy Markdown
Contributor

Summary

This PR introduces an expansion module for Lamis Network, an EU-hosted IP intelligence and risk scoring service, as proposed in #904.

Module Features

  • Supported observables: ip-src, ip-dst (both IPv4 and IPv6).
  • Enrichment provided:
    • ASN Object (asn): Autonomous System Number (asn) and provider name (description), connected to the input observable via includes ObjectReference.
    • Geolocation Object (geolocation): Country code (countrycode), country name (country), and city (city), connected via locates ObjectReference.
    • MISP Tags:
      • network:tor="exit-node" if observable is an active Tor exit node.
      • network:vpn="active" if observable is a known VPN endpoint.
      • ioc:artifact-state="suspicious" if the contextual fraud score meets or exceeds risk_threshold (default: 75/100).
    • Contextual Comment: Human-readable breakdown of detected proxy indicators (VPN, Tor, Public Proxy, Datacenter) and risk score.

Configuration Parameters

  • api_key (required): Lamis Network API token.
  • risk_threshold (optional, default: 75): Threshold (0–100) to apply ioc:artifact-state="suspicious".
  • timeout (optional, default: 10): HTTP connection timeout in seconds.

Data Privacy & Community Tier

  • Data retention: Evaluated IP addresses are not stored or retained in query logs.
  • Hosting: Austrian / EU jurisdiction.
  • Community Tier: 50,000 requests/month (10 req/s rate limit), freely available for open-source developers, academic researchers, and CSIRT/CERT evaluation. Terms and keys available at https://lamisnetwork.com/community.html.

Testing & Quality

  • Comprehensive unit test suite in tests/test_lamis_network.py (20 tests, 100% offline mocks with unittest.mock).
  • Covers introspection, schema validation, configuration fallbacks, extreme number handling (OverflowError on 1e309), boolean guards, IPv6, non-dict API payloads, HTTP 401/429/500, timeouts, invalid JSON, and serialized PyMISP tag bindings.
  • Fully verified with pytest and formatted to repository standards with ruff.

Closes #904.

@adulau
adulau merged commit 00c34e3 into MISP:main Sep 23, 2026
7 checks passed
@adulau

adulau commented Sep 23, 2026

Copy link
Copy Markdown
Member

Thank you very much for the contribution.

@VitaliGrecciani

Copy link
Copy Markdown
Contributor Author

Thanks for reviewing and merging it! I' ll keep an eye on any issues that come up and help maintain the module

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.

[Feature Request] Lamis Network IP Intelligence & Risk Scoring expansion module

2 participants