Skip to content

Add PhishStats API Enrichers for Phishing Intelligence#108

Open
eschultze wants to merge 1 commit into
reconurge:mainfrom
eschultze:feature/add-phishstats-enrichers
Open

Add PhishStats API Enrichers for Phishing Intelligence#108
eschultze wants to merge 1 commit into
reconurge:mainfrom
eschultze:feature/add-phishstats-enrichers

Conversation

@eschultze

Copy link
Copy Markdown

This PR integrates the PhishStats API into Flowsint, adding four new enrichers and a specialized API client to provide real-time phishing intelligence.

Key Changes:

  • New Enrichers:
    • ip_to_phishstats / domain_to_phishstats / website_to_phishstats: Exact match lookups for high-precision intelligence.
    • phrase_to_phishstats: A flexible search enricher that uses the Phrase type and LIKE operators to find matches in page titles and URLs.
  • Graph Intelligence:
    • Findings are automatically mapped to standard Flowsint types: Website, Domain, Ip, ASN, and Organization.
    • PhishStats-specific metadata (scores, safe browsing status, etc.) is stored as properties on the nodes.
  • Robust Client:
    • Implements PhishStatsClient with automatic rate-limiting (20 req/min), timeouts (60s), and exponential backoff for retries.

@dextmorgn dextmorgn left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this is very valuable.

A couple of comments for your enrichers, simply remove the neo4j connection condition as it's not supported in the latest version.

Could you rebase this branch with main and make sure there are no side effect ? I don't expect any, as the neo4j_connection is the only real thing that changed.


def postprocess(self, results: List[OutputType], original_input: List[InputType]) -> List[OutputType]:
"""Create graph nodes and relationships."""
if not self.neo4j_conn:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the latest version an Enricher doesn't have a direct neo4j_connection, it uses a proper graph service.
So you can skip condition in postprocess:

if not self.neo4j_conn:
            return results

As it would raise 'DomainToPhishstatsEnricher' object has no attribute 'neo4j_conn' in the latest version.


def postprocess(self, results: List[OutputType], original_input: List[InputType]) -> List[OutputType]:
"""Create graph nodes and relationships."""
if not self.neo4j_conn:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here


def postprocess(self, results: List[OutputType], original_input: List[InputType]) -> List[OutputType]:
"""Create graph nodes and relationships."""
if not self.neo4j_conn:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here


def postprocess(self, results: List[OutputType], original_input: List[InputType]) -> List[OutputType]:
"""Create graph nodes and relationships."""
if not self.neo4j_conn:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

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