Shadow AI detection technical specification
This page describes what the Packet Pilot Patrol option "Shadow AI detection" (pp.shadow_ai) looks at, how it judges, and when it shows "Please check", and what to check when it does.
- In addition to approvals that apply to every device, you can now approve a name for one device only (→4. Approvals per device). Even on an approved device, unusual destinations, exfiltration suspicion and overlaps are still detected.
- The button that opens the settings is now a filled button at the top right of the screen with a gear icon and the bold label "AI detection settings".
1What this detection can and cannot do
Shadow AI detection finds, from network traffic, connections to generative AI services that the company has not decided to use, and to MCP servers (Model Context Protocol: the convention by which AI tools connect to outside services). It also looks at suspicious traffic that occurs at the same time as AI use (unusual destinations, large amounts of data sent, DNS tunnelling patterns) and combines it with that use.
2What it looks at (observation point and inputs)
Observation point
The Patrol Service (a Windows service) receives the frames that arrive at the selected NIC (network interface). It reads only the first 600 bytes of each frame. When connected to a switch mirror port (a port that carries a copy of other devices' traffic), it can also see the traffic of other devices on the LAN. Otherwise, it sees only this PC's traffic and broadcast and multicast traffic.
Inputs for judgement (5 kinds)
| # | Input | Where it is read from | What it is used for |
|---|---|---|---|
| ① | Plain-text DNS query names | DNS queries to port 53 (UDP and TCP). Only those sent by devices on the LAN side | Compared with the name list (R1, R2). DNS tunnelling patterns are counted (R4) |
| ② | Addresses in DNS replies | The name and A/AAAA records of DNS replies from source port 53 | Only for names that matched the list, the addresses are remembered. The TTL is rounded to between 60 seconds and 1 hour (up to 4,096 entries) |
| ③ | TLS SNI | The server_name extension of the TLS ClientHello (the first greeting of a connection) in TCP data to port 443 | Compared with the name list. The ECH marker (encrypted_client_hello) is also checked |
| ④ | Connection starts | TCP SYN (without ACK), and the source, destination and port of UDP traffic | Each device's "usual destinations" and repeated connections (R3). Counts of QUIC (UDP port 443) and encrypted DNS. Connections to addresses remembered in ② |
| ⑤ | Packet sizes | The total length field of the IP header (the original size is known even when the frame is cut at 600 bytes) | The amount sent by a device is summed every 10 minutes (R4) |
Only LAN-side addresses are counted as devices. The LAN side means private addresses, the address ranges (prefixes) of the monitoring NIC's OS addresses, and prefixes learned from RA (IPv6 Router Advertisements). Replies from outside servers are never counted as devices. Up to 1,024 devices are counted.
3Traffic it cannot see, and how that is handled
In the following traffic, the destination name cannot be seen. Patrol counts this traffic and shows it in the "Visibility per device" table. That a name cannot be seen is never treated as a reason for "safe".
| Traffic it cannot see | Reason | How Patrol counts it (column in the visibility table) |
|---|---|---|
| Encrypted DNS (DoH, DoT) | The query name is inside the encryption. "Secure DNS" in Windows 11 and browsers | "Encrypted DNS": connections to TCP port 853 (DoT), or to port 443 of known DoH servers (1.1.1.1, 1.0.0.1, 8.8.8.8, 8.8.4.4, 9.9.9.9, 149.112.112.112 and 4 IPv6 addresses) |
| ECH | The real destination name is inside the encryption, and only the outer name appears in the SNI | "ECH": the number of ClientHellos that carried the ECH extension (0xfe0d) |
| QUIC (HTTP/3) | Reading the name requires decrypting and reassembling the first packets | "QUIC": the number of UDP port 443 flows |
| SNI beyond 600 bytes | Recent browsers send large ClientHellos (about 1.8 KB with post-quantum keys), so the SNI can be beyond 600 bytes | "SNI unreadable": the number of ClientHellos whose frame ended before the SNI could be read |
| Traffic inside VPNs and proxies | Only the VPN or proxy server is visible as the destination | Not counted (the destination is the VPN or proxy server) |
| MCP running inside this PC | stdio and localhost traffic does not pass through the NIC | Not visible |
| Other devices when not on a mirror port | Traffic between other devices, and their traffic to the internet, does not reach this PC | The scope of judgement is narrowed (see below) |
Filling in connections without names by address
If Patrol has seen a plain-text DNS reply for a generative AI name, it remembers that address. If a connection whose SNI could not be read, an ECH connection or a QUIC flow later goes to a remembered address, it is counted as the name having been seen, by "Address remembered from DNS". This is not possible if the DNS reply was not seen (for example, a device that uses only encrypted DNS).
Scope of judgement when not on a mirror port
While the capture's visible range is not "traffic between other devices is also visible" (including while it is not yet known), the following applies. The screen and reports show "Only this PC's traffic is being monitored".
- This PC (the monitoring NIC's address) is judged by all 5 rules.
- Other devices are judged by the 2 rules that work from names (unapproved generative AI and MCP) only when names (plain-text DNS, SNI) were actually seen.
- Other devices for which not a single name was seen appear neither in judgements nor in the visibility table.
4The generative AI and MCP name list and approvals
Patrol has a list of the names of generative AI services and MCP servers (43 generative AI entries and 7 MCP entries). The list is updated when Patrol is upgraded to a new version. Users can add names (up to 200). Each name has exactly one kind (generative AI or MCP).
Match forms
| Form | How it is written | Names it matches | Names it does not match |
|---|---|---|---|
| Exact match | api.openai.com | api.openai.com (case and a trailing . are ignored) | x.api.openai.com |
| Suffix match | *.claude.ai | www.claude.ai, a.b.claude.ai | claude.ai itself, notclaude.ai |
Exact matches are checked first. If there is no exact match, the longest suffix match that matches at a label boundary (labels are the parts separated by .) is used.
Approval states
The initial state. Connections are Needs attention (because the purpose is to find Shadow AI).
A name the company may use. It does not become Needs attention in R1 or R2. When a generative AI name is approved, it becomes subject to R3 (unusual destinations).
A name that must not be used. Connections are Needs attention.
Approvals are set per name under "AI detection settings" (the button with the gear icon) at the top right of the Shadow AI detection screen → "Name list and approvals". An approval set here applies to every device.
Approvals per device
A name that may be used "only on this device (for example, a developer's PC)" can be approved per device. An approval is always one device and one name. Other names from the same provider, and other devices, stay Needs attention.
- On the Shadow AI detection screen, in the "Unapproved generative AI" or "Unapproved MCP" table, click the row of that device to open it.
- Below the opened row, a button Approve "name" on this device appears for each name seen on that device. Click the button of each name that may be used (one click per name).
- From the next check (every second), that name on that device is no longer Needs attention. If names that are not approved on that device remain, the row stays.
- To remove an approval, open "AI detection settings" → "Name list and approvals", and click "Remove" on its row under "Approvals per device" at the bottom.
| How the device is remembered | Details |
|---|---|
| MAC address | A device whose MAC address is known from the device list is remembered by its MAC address. The approval keeps working when DHCP changes its IP address, and applies to both the IPv4 and IPv6 addresses of the same device. |
| IP address | A device whose MAC address is not known (a device behind a router, a device seen only on IPv6, etc.) is remembered by its IP address. The approval stops working if the IP address changes. |
| Rule | A name approved for one device |
|---|---|
| R1, R2 Unapproved generative AI / MCP | That name on that device does not become Needs attention (even if the name is set to "Disallowed" for everyone, the approval applies to that device). |
| R3 Unusual destinations | When a generative AI name is approved, that device treats it as an "approved AI", and unusual destinations before and after its use are checked. |
| R4 Exfiltration suspicion | Detected regardless of approvals. A large upload around the time the AI was used becomes Needs attention. |
| R5 Overlap | Detected regardless of approvals. If R3 or R4 overlaps with a Needs attention result of passive detection, it becomes Needs attention. |
The list included with Patrol
| Kind | Provider | Names |
|---|---|---|
| Generative AI | OpenAI | api.openai.com, chatgpt.com, *.chatgpt.com, chat.openai.com, *.oaiusercontent.com, *.oaistatic.com |
| Generative AI | Anthropic | api.anthropic.com, claude.ai, *.claude.ai, claude.com, *.claude.com, *.claudeusercontent.com |
| Generative AI | gemini.google.com, generativelanguage.googleapis.com, aistudio.google.com, aiplatform.googleapis.com | |
| Generative AI | Microsoft | copilot.microsoft.com, *.copilot.microsoft.com, copilot.cloud.microsoft, *.openai.azure.com, *.services.ai.azure.com |
| Generative AI | GitHub | api.githubcopilot.com, *.githubcopilot.com, copilot-proxy.githubusercontent.com |
| Generative AI | Meta | meta.ai, *.meta.ai (Meta AI, Muse) |
| Generative AI | xAI | grok.com, *.grok.com, api.x.ai |
| Generative AI | Perplexity | perplexity.ai, *.perplexity.ai |
| Generative AI | Mistral | api.mistral.ai, chat.mistral.ai |
| Generative AI | DeepSeek | chat.deepseek.com, api.deepseek.com |
| Generative AI | Others | Hugging Face huggingface.co, *.huggingface.co; Cohere api.cohere.com, api.cohere.ai; Groq api.groq.com; OpenRouter openrouter.ai; Poe poe.com, *.poe.com |
| MCP | Public MCP servers | Notion mcp.notion.com; Atlassian mcp.atlassian.com; Linear mcp.linear.app; Stripe mcp.stripe.com; Asana mcp.asana.com; Cloudflare mcp.cloudflare.com, *.mcp.cloudflare.com |
/) cannot be distinguished by Patrol, because Patrol looks only as far as the name.
- GitHub's MCP server (under
api.githubcopilot.com) → counted as GitHub Copilot generative AI. - MCP under Cloudflare's
agents.cloudflare.com, and Grok insidex.com→ not on the list. - Vertex AI regional endpoints (of the form
us-central1-aiplatform.googleapis.com) → forms that split at a-in the middle of a label cannot be matched. If needed, add the names for the regions you use as exact matches.
5Judgement flow and judgement values
Judgement values per device (5)
| Judgement | Shown on screen | Meaning | Result values (outcome, reason_code) |
|---|---|---|---|
| Needs attention | Needs attention | The rule's conditions were met. It has evidence | WARN, CONFIG_WEAKNESS |
| No issues | No issues within what was seen | What is needed for the judgement was seen, and the conditions were not met | PASS, PASSED_ASSERTIONS |
| Learning | Learning usual traffic | The baseline is still being learned, so no comparison can be made yet | NOT_TESTED, INSUFFICIENT_BASELINE |
| Not observed | Names not visible | What is needed for the judgement was not seen (for example, encrypted DNS only) | NOT_TESTED, UNREACHABLE |
| Not applicable | Does not apply | This rule does not apply (for example, the list is empty, or no approved AI is in use) | NOT_APPLICABLE, NOT_RELEVANT |
The judgement for a rule as a whole is the strongest among the devices. The order of strength is "Needs attention > No issues > Learning > Not observed > Not applicable". If there are no devices at all, it is "Not observed". Even when the whole is "No issues", devices whose names are not visible remain in the breakdown as "Not observed". A change from Needs attention to "Names not visible" is not treated as "Improved".
6The 5 rules in detail
The numbers are defaults. Users can change them in the settings (section 9). Every rule judges from what was seen in the last 24 hours.
Condition: A device was seen using a name of kind "generative AI" that is not "Approved" (Undecided or Disallowed), by one of the following methods.
- DNS: The name was queried in plain-text DNS
- SNI: The TLS destination name (SNI) was that name
- Address: A connection was made over TCP port 443 or QUIC to an address of that name remembered from DNS
Judgement: If there is a matching name → Needs attention (the evidence is the name, provider, method, count, and first and last times). If not: if no plain-text DNS or SNI at all was seen for that device, Not observed; otherwise No issues. If the list contains no generative AI names, Not applicable.
Condition: By the same methods as R1, a name of kind "MCP" that is not "Approved" was seen. Generative AI and MCP are kept separate in the list, results, alerts, screens and reports. MCP names are never mixed into R1.
What it cannot see: The content of MCP requests (inside HTTPS), and MCP running inside this PC (stdio, localhost), cannot be seen. All that is known is that "a connection was made to a server with that name".
Scope: Only devices that used approved generative AI in the last 24 hours (MCP is not included). Devices that have not used approved generative AI are Not applicable.
Baseline: The destination addresses a device connected to during the 24 hours after Patrol first saw it are remembered as its "usual destinations". During that time it is Learning.
Condition: From 10 minutes before the last AI use until now, one of the following occurred.
- New connections were made to 5 or more destinations not among the usual destinations
- Connections were made to the same destination 6 or more times at the same interval (beaconing: the mean interval is 10 seconds or more, and every interval is within ±10% of the mean)
The evidence shows the number of destinations not in the baseline, and the repeated destination and count. While the baseline is being learned, it is Learning.
Condition (either):
(a) DNS tunnelling pattern
This is the pattern of a technique that packs information into DNS query names to send it out. The following queries are counted.
- The name has 3 or more labels, and the last 2 labels are taken as the "parent name"
- Before the parent name, there is a label of 40 or more characters whose character variation (Shannon entropy) is 3.5 bits/character or more
The condition is met when, from the same device to the same parent name, there are 30 or more queries of this pattern within 5 minutes.This pattern is met even without AI use. The parent name is used in memory only for counting, and does not appear in records or evidence.
(b) Large amount sent at the same time as AI use
The amount a device sent (the sum of IP header total lengths) is counted in 10-minute windows. When a window closes, the condition is met if all of the following hold.
- 24 hours (the time for learning the baseline) have passed since counting for that device started
- A generative AI or MCP name was seen within 20 minutes of the end of the window (regardless of approval state)
- The amount sent in that window is 20MB or more, and 5 times or more the baseline (the mean of the previous windows)
The evidence shows the number of tunnelling-pattern queries and the length of the long label, or the amount sent and the baseline. When the condition is not met: if no plain-text DNS was seen for that device and there is no baseline for the amount sent yet, it is Learning; otherwise No issues.
Condition: On the same device, 2 or more of the following counts overlapped within the last 60 minutes. However, it is not met if none of R1–R4 is Needs attention.
- Each Needs attention of R1–R4 (whose last time is within the 60 minutes) counts as one. Generative AI and MCP count as separate ones
- Ongoing Needs attention from passive detection (Patrol's own 15 rules) counts as one, however many there are
When the condition is not met: If any of R1–R4 could be judged (No issues or Needs attention), No issues. If none could be judged: if any rule is Learning, Learning; if all are Not applicable, Not applicable; otherwise Not observed. A device with only QUIC is never made "No issues".
Evidence in reports: The overlap form, the rules that overlapped and their last times, the number and rules of passive-detection Needs attention (for example, dns.query_spike), the window in which the overlap was seen (for example, 60 minutes (10:37–11:37)), and the count (for example, 2 overlaps (met at 2 or more)) are each shown on one line. In the JSON report, these are evidence.overlap, signal_details, passive_rules, window_secs and required_signals.
Summary of time windows
7How "Please check" comes to be shown
- Judgement (every second): The Service judges per device and per rule, and updates the badges at the top of the screen (the number of devices with Needs attention and the severity for each rule) and the tables. The IPv4 and IPv6 addresses of the same machine are combined into one device by the MAC address in the device list.
- Alerts: When a rule for a device was not Needs attention in the previous judgement and is Needs attention now, one alert is queued. The OS notification shows only the count, "There are N Shadow AI detection items that need attention" (it does not show devices or names). The same device and rule is not alerted again within 30 minutes (even if it goes back and forth between Needs attention and No issues).
- Reports: Each Needs attention at the time the report is created becomes an "Items to check" card, one per device × rule. The strong form of R5 has priority "Check immediately"; all others have "Please check". The card contains "What to do first", "What is happening", "If it is dangerous", "Common reasons", and the technical evidence.
- Subsiding: A name drops out of the judgement 24 hours after it was last seen. An R5 overlap is no longer met once the last time of the Needs attention leaves the 60-minute window.
8What to check when it appears
How to check each rule
- Ask the person using this device which generative AI they used and for what purpose.
- If it is a generative AI the company allows, set it to "Approved" in the Shadow AI detection name list. If it may be used only on this device, open the row of that device and click Approve "name" on this device (→Approvals per device).
- If it must not be used, explain the usage rules, and check whether confidential or personal information was entered.
Common reasons
- Someone is using generative AI on their own judgement for research or writing at work
- A browser or another app is connecting to a generative AI service automatically
If it is dangerous
- Confidential or personal information is being sent to a generative AI service the company has not decided to use
Reading the evidence: If the method seen is "DNS" only, the name may only have been looked up, without a connection being made (for example, browser prefetching). "SNI" and "Address" mean that a connection to a server with that name was seen.
- Check whether AI tools that connect to MCP servers (AI agents, editor extensions and so on) are being used on this device.
- If it is something the company allows, set it to "Approved" in the name list. If it may be used only on this device, open the row of that device and click Approve "name" on this device.
- If it is not approved, check which internal information and operations the tool has been given access to (the permissions of the accounts of the connected services, tokens that were issued, and so on).
Common reasons
- A developer or user has connected an MCP server to an AI tool
If it is dangerous
- An AI tool is being used, through an MCP server, to read internal information or operate outside services
- Check what was being done on this device around the time AI was used.
- Check whether the destinations in the technical evidence, "Destinations not in the baseline" and "Repeats at the same interval", are places used for work. Compare them with the owner of the destination address (whois and so on) and with the software running on the device.
Common reasons
- A new website was visited, or software was updated
- Periodic connections by synchronisation or monitoring software (these tend to repeat at the same interval)
If it is dangerous
- An AI tool or its extension is sending information to unusual destinations, or is being controlled from outside
- Check whether work that sends large files (backup, sharing, uploading) was done on this device at that time.
- When DNS queries with long names (the DNS tunnelling pattern) appear, check the software running on this device. The tunnelling pattern appears even without AI use.
Common reasons
- Backup, synchronisation to the cloud, or sharing large files
- Security software or a CDN using long names
If it is dangerous
- Internal information is being taken out through DNS queries or large transfers
Suspected compromise of the AI environment (includes R3 or R4)
- After checking the impact on work, decide whether to disconnect this device from the network.
- Check each overlapping suspicion one by one, and scan this device with antivirus software.
- If generative AI service keys (API keys) or passwords are used on this device, consider changing them.
Common reasons
- A large transfer or connections to new destinations happened to coincide with generative AI being used for work
If it is dangerous
- The AI environment (AI tools, keys, conversations) has been compromised by information-stealing malware (an infostealer) or similar, and information is being sent out (Patrol does not look inside the device, so this is not a conclusion)
Overlap of unapproved AI use and traffic that needs attention (only R1/R2 and passive-detection Needs attention)
- Check the generative AI or MCP used on this device, and the passive-detection Needs attention items at the same time, each in its own item.
- If both are work traffic, approve the generative AI, or add the value to the allowed values of the passive detection.
Common reasons
- At the same time as generative AI was used for work, traffic increased because of software updates, synchronisation, sharing large files and so on
If it is dangerous
- Unapproved AI use and unusual traffic are occurring on the same device at the same time (whether they are related cannot be known, because Patrol does not look inside the device)
When there are many "Names not visible" or "Learning"
- Many devices with names not visible: Check the reasons in the "Visibility per device" table. Devices with a lot of encrypted DNS, ECH or QUIC cannot be judged by name. If, under company rules, settings such as pointing browsers' Secure DNS at the internal DNS server are applied, the names become visible in plain-text DNS (these settings are made outside Patrol).
- "Only this PC's traffic is being monitored" is shown: If the Patrol monitoring PC is connected to a switch mirror port, other devices can also be judged.
- Learning: For 24 hours after a device is first seen, the baselines for usual destinations and the amount sent are being learned. If the Service is restarted, the in-memory baselines are learned again.
9Judgement settings (11 items)
These can be changed under "AI detection settings" (the button with the gear icon) at the top right of the Shadow AI detection screen → "Judgement settings". Values outside the range are not saved.
| Group | Item | Default | Range | Rules using it |
|---|---|---|---|---|
| Common | Time for learning usual traffic | 86,400 seconds (24 hours) | 3,600–604,800 seconds (1 hour to 7 days) | R3, R4(b) |
| Unusual destinations | Window for unusual destinations | 600 seconds (10 minutes) | 60–86,400 seconds | R3 |
| Number of unusual destinations | 5 destinations | 1–10,000 | R3 | |
| Number of repeats at the same interval | 6 times | 3–1,000 | R3 | |
| Suspected exfiltration | Window for counting DNS tunnelling | 300 seconds (5 minutes) | 60–86,400 seconds | R4(a) |
| Label length treated as long | 40 characters | 10–63 | R4(a) | |
| Number of DNS tunnelling queries | 30 queries | 1–100,000 | R4(a) | |
| Multiplier for amount sent | 5 times | 2–100 | R4(b) | |
| Minimum amount sent | 20MB | 1MB–10GB | R4(b) | |
| Suspected compromise | Window for overlaps | 3,600 seconds (60 minutes) | 60–86,400 seconds | R5 |
| Number treated as an overlap | 2 | 2–5 | R5 |
Fixed values (cannot be changed in the settings): time for which names and suspicions are used in judgement, 24 hours; window for the amount sent, 10 minutes; closeness to AI use for R4(b), 20 minutes; minimum repeat interval, 10 seconds, with variation ±10%; character variation, 3.5 bits/character; time for which addresses are remembered from DNS, 60 seconds to 1 hour.
10Recording and storage rules
| Item | Where | Content and period |
|---|---|---|
| Listed names seen | The Service's storage (SQLite) | Device address, MAC address, list name, actual name, method, count, first and last times. Only names that matched the list. Saved every 5 minutes. 90 days, up to 10,000 entries |
| Rule results | Same as above | The latest result and history for each rule (only on change, up to 5,000 entries). The breakdown contains only device addresses and judgements |
| Names added by users, approvals, settings | Same as above | Kind, name, note (up to 64 characters), who added it, time |
| Approvals per device | Same as above | Device (MAC address or IP address), name, who decided, time. Up to 2,000. When a name added by a user is removed, its approvals per device are removed too |
| Address → name map, baselines, amounts sent, tunnelling counts | Memory only | Not saved. Counting starts again when the Service is restarted |
| Packet content, names not on the list | — | Not saved anywhere. Names are not written to the Service's log either |
While the option entitlement (pp.shadow_ai) is absent, observations are discarded and no judgements are made. The "Shadow AI detection" item stays on the screen, and instead of its content it shows that the option has not been purchased. Once the entitlement is added, judgements start from that point.