Skip to content

Add NetAPI threat intelligence provider - #956

Open
Slava Olesik (slavaolesik) wants to merge 5 commits into
microsoft:mainfrom
slavaolesik:netapi-ti-provider
Open

Slava Olesik (slavaolesik) wants to merge 5 commits into
microsoft:mainfrom
slavaolesik:netapi-ti-provider

Conversation

@slavaolesik

@slavaolesik Slava Olesik (slavaolesik) commented Oct 26, 2026 •

Copy link
Copy Markdown

What this adds

A NetAPI threat intelligence provider. NetAPI publishes a free feed of compromised domains, a feed of compromised IP addresses and the NetAPI Top 1M, a daily popularity ranking. Both feeds are NetAPI's own. The domain feed comes mostly from NetAPI's own detection (malware domains held by sinkhole name servers, and domains related to confirmed phishing), with CERT Polska's phishing list added to it. The IP feed holds the IPv4 addresses that attacked the sensors of NetAPI Nightwatch, NetAPI's own honeypot network (brute force, exploits, malware downloads, etc.), updated every hour. About 73% of these addresses are in none of blocklist.de, CINS, GreenSnow and IPsum. A lookup answers "is this host in the feed now, was it in the past, and since when".

Supported observables: dns, hostname, url, ipv4, ipv6. No file hashes. The IP feed holds IPv4 addresses only, so an IPv6 address is always reported as not listed.

The API needs no key (30 requests a minute and 1,000 a day per IP), so the config entry has no Args block, as for ScanMalware:

TIProviders:
  NetAPI:
    Primary: True
    Provider: "NetAPI"

Behaviour

  • The default query calls compromised-check. A current listing (within the last 48 hours) is a hit with severity high. A past listing only is a hit with severity information: most of those are incidents that are over, often a legitimate site that was compromised and cleaned up. A value that was never listed is a negative result. Details carries the listing state, the matched entry, first and last seen, the source and the registrar.
  • A hostname or URL is matched through its registered domain, and Matched Value shows which entry matched, so a listing of example.com is not presented as a listing of www.example.com itself.
  • The rank subtype (dns-rank, hostname-rank) calls domain-rank and returns the position of the registered domain in the NetAPI Top 1M, the same kind of context as the OpenPageRank provider.
  • Both queries are declarative _QUERIES entries, one request each, no override of the lookup flow. No auth header is sent. The provider sets its own User-Agent, netapi-msticpy/1.0.

Verification

  • pytest tests/context/test_tiproviders.py: 41 passed on unmodified main, 42 passed with this change.
  • pytest tests/context/test_netapi.py: 11 passed: current, past and never-listed results, the registered-domain match, URLs, both rank results, a 429, an empty answer, no auth header and unsupported hashes. Coverage of the new module is 100% (measured with coverage run and COVERAGE_CORE=sysmon, since pytest-cov hits the same numpy: cannot load module more than once per process error mentioned in Add ScanMalware threat intelligence provider #938).
  • ruff check and ruff format --check clean, pylint 10.00/10, pydocstyle --convention=numpy and mypy clean on the new module.
  • After the test data update (2026-11-27): pytest tests/context/test_tiproviders.py tests/context/test_netapi.py 53 passed, ruff, pylint (10.00/10) and pydocstyle clean on the module again.
  • Verified end to end through TILookup against the live API (2026-11-27):
www.govsafebreakthrough.com  hostname        True   high         matched govsafebreakthrough.com, NetAPI: sinkholed malware domain, registrar MarkMonitor
www.inpost-paczka.com        hostname        True   high         matched inpost-paczka.com, hole.cert.pl, registrar PublicDomainRegistry
1.0.156.207                  ipv4            True   high         NetAPI network sensors: service exploit
190.196.253.71               ipv4            True   information  NetAPI network sensors: infection attempt, last seen 2026-11-09 14:23:38 UTC
1.1.1.1                      ipv4            False  information  Not listed, now or in the past.
github.com                   dns             False  information  Not listed, now or in the past.
github.com                   dns       rank  True   information  Rank 10, snapshot 2026-11-27

Disclosure

I run NetAPI. Happy to adjust anything here, including dropping the provider from the default config.

@slavaolesik

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree company="CodeRockers LTD"

@slavaolesik

Copy link
Copy Markdown
Author

NetAPI is discontinuing its compromised IP feed, so I have narrowed this PR to domains, hostnames and URLs. The ipv4 and ipv6 queries are gone, and the provider is now tested in its own module instead of the shared harness, because that harness looks up IP addresses in bulk. I have updated the description to match.

@slavaolesik

Copy link
Copy Markdown
Author

Update: NetAPI keeps its compromised IP feed after all, so I put the IP part of this PR back as it was first submitted. Sorry for the back and forth.

@slavaolesik

Copy link
Copy Markdown
Author

Update: the IP part of the feed was a compilation of third-party blocklists and is now NetAPI's own: the addresses that attacked the sensors of NetAPI Nightwatch, NetAPI's own honeypot network, updated every hour. About 65% of the addresses are not in any other public blocklist, and known research scanners such as Shodan and Censys are kept out. The API and the provider's behaviour are unchanged. I have updated the module docstring, the description and the verification run.

The domain feed is NetAPI's own detection (domains held by sinkhole
name servers, domains related to confirmed phishing) plus CERT Polska's
phishing list, listed now within 48 hours like the IP feed. The test
fixtures are live answers of 2026-11-27 instead of the old blackbook
and urlhaus.abuse.ch rows.
@slavaolesik

Copy link
Copy Markdown
Author

Update: the domain feed is now NetAPI's own as well. Since 2026-11-22 most of it comes from our own detection (malware domains held by sinkhole name servers, and domains related to confirmed phishing), with CERT Polska's phishing list added to it, and listed now means seen within the last 48 hours for domains too. The API and the provider's behaviour are unchanged.

In this push: the module docstring describes the current feeds, and the test fixtures are new live answers (a sinkholed hostname, a past-listed IP) instead of the old blackbook and urlhaus.abuse.ch rows. 53 tests pass, and the description has a new live TILookup run.

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.

1 participant