# Phishing & Domain Security Detector (`ntriqpro/phish-radar`) Actor

Check whether a domain is a phishing site or legitimate: threat-feed lookups, fraud pattern checks and look-alike domain detection, returned as a clear verdict per URL. Built for SOC analysts, compliance teams and brand-protection monitoring.

- **URL**: https://apify.com/ntriqpro/phish-radar.md
- **Developed by:** [daehwan kim](https://apify.com/ntriqpro) (community)
- **Categories:** Developer tools, AI, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$50.00 / 1,000 phishing detection scans

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Phish Radar - Phishing Detection & Brand Monitoring MCP Server

Real-time phishing detection and brand monitoring system for AI agents. Analyzes URLs and domains for phishing indicators, typosquatting, homoglyphs, and lookalike domains.

### Features

#### 1. **Phishing Detection** (`phishing_detect`)

Comprehensive URL/domain analysis with:

- **Typosquatting detection** - Identifies domains similar to known brands (Levenshtein distance)
- **Homoglyph detection** - Catches visually similar character substitutions (0/O, 1/l/I, etc.)
- **Domain age analysis** - Detects recently registered suspicious domains
- **SSL certificate inspection** - Flags free certificates (Let's Encrypt) when combined with brand similarity
- **DNS records** - Checks for MX, SPF, DKIM, DMARC records
- **Hosting location** - Identifies suspicious geography patterns

**Score: 0-100 phishing confidence**

- **PHISHING (70+)**: Block immediately
- **SUSPICIOUS (40-69)**: Review recommended
- **SAFE (<40)**: Low risk

#### 2. **Domain Trust Score** (`domain_trust`)

Evaluates domain trustworthiness (0-100) based on:

- Email infrastructure (MX, SPF, DKIM, DMARC) - 25 points
- SSL certificate type (EV > OV > DV) - 20 points
- TLD reputation - 20 points
- Nameserver reputation - 15 points
- DNS records - 5 points

**Levels:**

- **HIGHLY\_TRUSTED (80+)**: Enterprise-grade domain
- **TRUSTED (60-79)**: Legitimate domain
- **NEUTRAL (40-59)**: Unproven domain
- **SUSPICIOUS (20-39)**: Warning signs present
- **UNTRUSTED (<20)**: High-risk domain

#### 3. **Brand Monitor** (`brand_monitor`)

Detects lookalike domains targeting your brand:

- **Typosquats** - Single character swaps/deletions (paypa1.com vs paypal.com)
- **Homoglyphs** - Visually confusing substitutions
- **Keyword additions** - Security-related additions (paypal-secure.com)
- **TLD variations** - Same domain on different extensions (paypal.xyz)

Returns high-risk domains that actually exist with full risk assessment.

### Usage

#### Example 1: Check a Suspicious URL

```json
{
  "toolName": "phishing_detect",
  "input": {
    "url": "https://paypa1-secure.com/login"
  }
}
```

**Response:**

```json
{
  "url": "https://paypa1-secure.com/login",
  "domain": "paypa1-secure.com",
  "verdict": "PHISHING",
  "confidence": 0.97,
  "phishing_score": 94,
  "signals": {
    "typosquat_of": "paypal.com",
    "typosquat_distance": 1,
    "homoglyph_detected": true,
    "homoglyph_count": 1,
    "domain_age_days": 3,
    "ssl_issuer": "Let's Encrypt",
    "ssl_free_cert": true,
    "has_mx_records": false,
    "suspicious_tld": false,
    "dns_a_records": ["185.234.xx.xx"],
    "hosting_country": "RU"
  },
  "action": "BLOCK",
  "details": "High-confidence phishing domain detected (score: 94). Domain is a typosquat of paypal.com (distance: 1). Contains 1 homoglyph character substitution. Uses free SSL certificate (Let's Encrypt) - commonly abused. No MX records configured - not set up for legitimate email."
}
```

#### Example 2: Check Domain Trust

```json
{
  "toolName": "domain_trust",
  "input": {
    "domain": "stripe.com"
  }
}
```

**Response:**

```json
{
  "domain": "stripe.com",
  "trust_score": 92,
  "trust_level": "HIGHLY_TRUSTED",
  "factors": {
    "domain_age_days": null,
    "has_mx": true,
    "has_spf": true,
    "has_dkim": true,
    "has_dmarc": true,
    "ssl_type": "EV",
    "ssl_issuer": "DigiCert",
    "has_ssl": true,
    "tld_risk": "LOW",
    "nameservers": ["ns1.stripe.com", "ns2.stripe.com"],
    "a_records_count": 4
  }
}
```

#### Example 3: Monitor Brand Lookalikes

```json
{
  "toolName": "brand_monitor",
  "input": {
    "brand_domain": "stripe.com",
    "limit": 10
  }
}
```

**Response:**

```json
{
  "brand": "stripe.com",
  "brand_name": "stripe",
  "lookalikes_found": 8,
  "domains": [
    {
      "domain": "str1pe.com",
      "exists": true,
      "risk": "HIGH",
      "type": "homoglyph",
      "tld_risk": "LOW"
    },
    {
      "domain": "stripe-secure.com",
      "exists": true,
      "risk": "HIGH",
      "type": "keyword_addition",
      "tld_risk": "LOW"
    },
    {
      "domain": "stripee.com",
      "exists": true,
      "risk": "MEDIUM",
      "type": "insertion",
      "tld_risk": "LOW"
    }
  ],
  "analysis_time_ms": 2847
}
```

### Implementation Details

#### No External API Dependencies

- **DNS Queries**: Native Node.js `dns/promises` module
- **SSL Certificates**: Node.js `tls` module for direct connections
- **WHOIS**: Direct TCP port 43 protocol (future enhancement)
- **GeoIP**: Simplified IP-to-country mapping (for production, integrate MaxMind)

#### Known Brands Database

Includes 80+ major brands across:

- Financial Services (PayPal, Stripe, Square, etc.)
- Tech Companies (Apple, Google, Microsoft, etc.)
- Cryptocurrency (Coinbase, Kraken, Binance, etc.)
- Cloud Providers (AWS, Azure, Google Cloud, etc.)
- E-commerce (Amazon, eBay, Shopify, etc.)

Easily extensible in `src/data/known_brands.js`.

#### Suspicious TLDs

Monitors 40+ high-risk TLDs commonly used in phishing:

- Cheap registration TLDs: `.xyz`, `.top`, `.click`, `.bid`
- Free TLDs: `.tk`, `.ml`, `.ga`, `.cf`
- Cryptocurrency scams: `.btc`, `.eth`, `.crypto`
- Sanctioned regions: `.ru`, `.ir`, `.kp`

### Phishing Score Calculation

#### High-Risk Signals (Add Points)

- Typosquat distance 1: +35 points
- Typosquat distance 2: +25 points
- Homoglyph detected: +20 points
- Suspicious TLD: +15 points
- Free SSL + typosquat: +15 points
- No MX + typosquat: +10 points
- Hosting in RU + typosquat: +10 points

#### Low-Risk Signals (Subtract Points)

- Has MX records: -5 points
- Trusted CA cert: -5 points

**Final Score Clamped: 0-100**

### Confidence Levels

- **70+ (PHISHING)**: 0.70-0.99 confidence → **BLOCK**
- **40-69 (SUSPICIOUS)**: 0.50-0.95 confidence → **REVIEW**
- **<40 (SAFE)**: 0.95+ confidence → **ALLOW**

### Pricing

- **$0.05 per tool call** (per domain/URL analyzed)
- Bulk monitoring: $0.05 × number of domains checked

Example: Monitoring 100 brand lookalikes = $5.00 per execution

### Implementation Notes

#### Security Considerations

- **No WHOIS PII collection**: Personal information (owner names, emails) excluded per GDPR
- **No certificate validation bypass**: Uses system trust stores
- **Rate limiting**: Implement externally to avoid DNS query floods
- **Timeout protection**: 5-second SSL connection timeout

#### Performance

- Parallel DNS queries for speed
- Batch processing for large domain lists (10 concurrent)
- Caching at application level (not in Actor)

#### Future Enhancements

1. **WHOIS Integration**: For domain registration date analysis
2. **GeoIP Database**: MaxMind for accurate IP location
3. **SSL Certificate History**: Certificate Transparency logs
4. **Reputation Scoring**: Integration with Phishing/Malware databases
5. **Machine Learning**: Pattern recognition for new phishing techniques

### API Signature

All tools follow MCP standard with JSON input/output.

#### Tool Request Format

```json
{
  "toolName": "phishing_detect|domain_trust|brand_monitor",
  "input": {
    // tool-specific inputs
  }
}
```

#### Error Response

```json
{
  "error": "Error description",
  "tool": "tool_name"
}
```

### Testing

```bash
## Local testing
npm install
node src/main.js

## With Apify SDK (when deployed)
apify call phish-radar --input input.json
```

### Maintenance

- Update `known_brands.js` quarterly with emerging platforms
- Monitor `suspicious_tlds.js` for new high-abuse extensions
- Review phishing signal weights annually based on threat patterns

### Support

For brand additions or TLD updates, modify:

- Brand list: `src/data/known_brands.js`
- TLD list: `src/data/suspicious_tlds.js`

***

**Version**: 1.0
**Node.js**: 18+
**License**: Private (ntriq)

***

### 🔗 Related Actors by ntriqpro

Build your data pipeline with the ntriqpro Actor suite:

- [**maigret-actor**](https://apify.com/ntriqpro/maigret-actor) — Maigret OSINT — Username search
- [**website-tech-detector**](https://apify.com/ntriqpro/website-tech-detector) — Website Tech Stack Scanner
- [**eu-sanctions-monitor**](https://apify.com/ntriqpro/eu-sanctions-monitor) — EU Sanctions Screening — KYC/AML

### ⭐ Love it? Leave a Review

Your rating helps professionals discover this actor. [Rate it here](https://apify.com/ntriqpro/phish-radar/reviews).

### Disclaimer

**RISK ASSESSMENT DISCLAIMER**: This tool provides data-driven risk analysis based on publicly available and curated sources. Assessments are indicative only and **NOT** professional risk management advice. You must engage qualified professionals (risk managers, insurance brokers, compliance officers) to validate findings before making investment or operational decisions. Risk scores do not constitute investment advice or due diligence completion. We assume no liability for business decisions based on this tool's output.

# Actor input Schema

## `action` (type: `string`):

Action to perform

## `toolName` (type: `string`):

Name of the tool to execute

## `input` (type: `object`):

Input parameters for the selected tool

## Actor input object example

```json
{}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("ntriqpro/phish-radar").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("ntriqpro/phish-radar").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call ntriqpro/phish-radar --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,ntriqpro/phish-radar"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/k5VmDMSypydtAhvBC/builds/VzTMhq38CpbfUOO2s/openapi.json
