Repository navigation
Add NetAPI analyzer. Closes #4111 - #4149
Open
slavaolesik wants to merge 1 commit into
Open
slavaolesik wants to merge 1 commit into
slavaolesik wants to merge 1 commit into
Conversation
Free observable analyzer for ip, domain and url: checks the value (a URL is reduced to its host) against the NetAPI compromised feed with one keyless request. Listed now sets a malicious evaluation, a listing of a parent domain or a past listing only a suspicious one, not listed creates no data model. Added to FREE_TO_USE_ANALYZERS.
3 of 4 tasks
Member
|
please update the migration number (there are new changes in develop) |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds the
NetAPIobservable analyzer proposed in #4111 (thanks for assigning it to me). It checks an IP, a domain or a URL host against the NetAPI compromised feed with one request tohttps://netapi.com/api-json/?method=compromised-check&value=.... The API is free and needs no key (limits per client IP: 30 requests a minute, 1,000 a day).matched_value.DataModel:
malicious, reliability 7malicious, reliability 5 (shown as suspicious);www.<domain>matched on<domain>counts as the domain itself, since the feed stores domains withoutwww.malicious, reliability 3 (shown as suspicious)The block reason, the matched value and the first / last seen dates go to
additional_info.The analyzer is added to
FREE_TO_USE_ANALYZERS. Docs PR: intelowlproject/docs#78Analysis result
Observable
1.0.166.69(IP), analyzerNetAPIonly, status SUCCESS in 0.49 s.Raw JSON
{ "analyzer": "NetAPI", "observable": "1.0.166.69", "status": "SUCCESS", "report": { "note": "Seen in the compromised feed within the last 48 hours.", "type": "ip", "lists": { "page": "https://netapi.com/compromised-ips/", "current": "https://netapi.com/api2/?method=compromised&dataset_type=ip", "all_time": "https://netapi.com/api2/?method=compromised&dataset_type=ip-all" }, "value": "1.0.166.69", "source": "NetAPI Nightwatch compromised IP feed, updated hourly (CC BY 4.0)", "last_seen": "2026-11-13 05:36:10 UTC", "registrar": null, "first_seen": "2026-11-03", "listed_now": true, "listed_ever": true, "block_reason": "NetAPI network sensors: service exploit", "matched_value": "1.0.166.69" }, "data_model": { "evaluation": "malicious", "reliability": 7, "additional_info": { "last_seen": "2026-11-13 05:36:10 UTC", "first_seen": "2026-11-03", "listed_now": true, "block_reason": "NetAPI network sensors: service exploit", "matched_value": "1.0.166.69" } } }Type of change
Checklist
developdumpplugincommand and added it in the project as a data migration (0203_analyzer_config_netapi, after0202_analyzer_config_scan_malware; the dumped config is identical, formatted with Ruff in the layout of the latest plugin migration).FREE_TO_USE_ANALYZERSplaybook (migration0069_add_netapi_to_free_to_use).urlthat contains this information.get_mocker_response()method of the unittest class.DataModelfor the new analyzer following the documentationRuff) gave 0 errors (ruff 0.14.10, the version pinned in.pre-commit-config.yaml:ruff checkandruff format --checkon the new files).testsfolder). All the tests (new and old ones) gave 0 errors: not all of them. The 12 new tests pass in the container, and real runs on a listed domain, itswww.host, a subdomain, a URL, a past listing, a subdomain of a past listing, a clean domain and a clean IP give the verdicts listed above. The fulltestssuite ran with 1072 tests; the only failures (51) are tests that need the sample files oftests/test_files.zip, which I did not extract on my machine (Windows Defender quarantines them), so those files were empty. No failure touches this change.async_testsfailed on my setup with a kombu / redis-py version mismatch, unrelated as well.DeepSource,Django Doctorsor other third-party linters have triggered any alerts during the CI checks, I have solved those alerts.Thanks!
Slava
Disclosure: I run NetAPI, the service this analyzer queries.