XKEYSCORE, Cipher Detection, and You!
Open PDF +1 other copyDocument date: 2008-08-21
Pages: 17
Genre: slides
Banner: TOP SECRET//COMINT//REL TO USA, FVEY
Classification: TOP SECRET COMINT
Dissemination: REL TO USA, FVEY
A TOP SECRET presentation from NSA's Mathematics Research Group dated 21 August 2008, explaining how XKeyscore detects encrypted and steganographic communications — describing the fingerprint and C++ plug-in systems used to flag sessions using particular ciphers, VPNs, encrypted archives and hidden-data tools, with worked examples detecting RAR archives, OpenVPN, digital certificates and various encryption products, plus a revealing note that detection of encryption is itself used to identify communications worth targeting.
XKEYSCORE, WEALTHYCLUSTER, TURMOIL, CADENCE, UTT, PINWALE, PRESSUREWAVE, TRAFFICTHIEF, PHOSPHORESSENCE, SHELLLOCK, SEDENA, SMOKYSINK, PICARESQUE, PRIVAC, WHARFRAT
People mentioned:
-
Countries:
-
Tags:
Mathematics Research Group, cipher detection, encryption detection, steganography, fingerprints, FORNSAT, F6, FISA, RAR, OpenVPN, x509, digital certificate, Kryptel, CipherPad, Helix Stronghold, VPN analysis, C++ plug-in, code-based fingerprint, rolling buffer, metadata, content buffer, retrospective retrieval, anchor, regex, DHCP, ECI, releasability, rednet
Identifier:
xks-cipher-detection-and-you
Also known as:
EFF_-_20131211-svt-xkeyscore_sources
PDF SHA-256:
56cd85589f3a9e3ca5d74d200a55015a15bdff8d603d7b76e83760fc50ad3b9d
My notes
TOP SECRET//COMINT//REL TO USA, FVEY
XKEYSCORE, Cipher Detection, and You!
[REDACTED]
Mathematics Research Group
21 August 2008
TOP SECRET//COMINT//REL TO USA, FVEY
UNCLASSIFIED
The Protocol Stack
- Application Layer (HTTP, FTP, etc.)
- Transport Layer (TCP, UDP)
- Network Layer (IPv4, IPv6)
- Data Link Layer (PPP)
- Physical Layer (Copper, Fiber)
UNCLASSIFIED
TOP SECRET//COMINT//REL TO USA, FVEY
Data Sources
- FORNSAT (downlink)
- Overhead (uplink)
- Special Source
- Tailored Access
- F6
- FISA (limited)
- 3rd party
TOP SECRET//COMINT//REL TO USA, FVEY
SECRET//COMINT//REL TO USA, FVEY
Front-end Processing
WEALTHYCLUSTER2/TURMOIL
Demodulate Demultiplex Packetize Sessionize
Decrypt?
SECRET//COMINT//REL TO USA, FVEY
SECRET//COMINT//REL TO USA, FVEY
What does XEYSCORE do?
- Selection of tasked CADENCE/UTT terms.
- Send hits to PINWALE/PRESSUREWAVE.
- Tipping to TRAFFICTHIEF.
- Fingerprinting.
- SIGINT development using two rolling buffers:
- Metadata
- Content (data)
SECRET//COMINT//REL TO USA, FVEY
TOP SECRET//COMINT//REL TO USA, FVEY
Retrospective Searching
XKEYSCORE
- All data are stored, not just hits.
- Queries are distributed to entire network of sites.
Metadata Buffer
- ~30 days
- Searchable
- MySQL database
Content Buffer
- ~7 days
- Retrievable
- Archived on disk
TOP SECRET//COMINT//REL TO USA, FVEY
TOP SECRET//COMINT//REL TO USA, FVEY
Fingerprinting
- Pattern matching against the data.
- Session is marked, but not sent to PINWALE.
- Fingerprint stored as metadata.
- Have to search for it.
- Rich set of patterns
- Strings have a minimum of three* anchors (fixed bytes).
- [Exception: Two bytes at the beginning of a session]
- Regular expressions allowed (require nonoptional string of three* bytes within regex)
- Context-dependent terms.
- *XKS reserves the right to increase this to four.
- Strings have a minimum of three* anchors (fixed bytes).
TOP SECRET//COMINT//REL TO USA, FVEY
TOP SECRET//COMINT//REL TO USA, FVEY
Examples
7.0) = 'helix stronghold encrypted file';
'\xd6\x56\x34\xb7\x80\x05\xfe\x8b'c and
'\xaf\x52\x72\x60\xdd\xfe\x72\xc2'c and
(port(443) or port(80));
fingerprint('encryption/the_algorithm',
3.0)=
/-XYZ-.{0,30}mp[eg]/;
TOP SECRET//COMINT//REL TO USA, FVEY
TOP SECRET//COMINT//REL TO USA, FVEY
Syntax Features
- Case Sensitivity
fingerprint('certificate/digital_id') =
'-BEGIN CERTIFICATE-'c;
- Full Boolean logic
- Grouping with parentheses
- Operators:
and,or,not
- Variables
$udp = protocol('udp');
fingerprint('vpn/openvpn/x509/wera') =
$udp and 'openvpn_wera'c;
TOP SECRET//COMINT//REL TO USA, FVEY
TOP SECRET//COMINT//REL TO USA, FVEY
Available Functions
- port
- first
- hex
fingerprint('encryption/kryptel') =
hex('E8E2454300040004635C4EE9A2F9D111A
489E498F70C0B43404F4BFA50F2D111A4898E6
30458E285');
- pos
fingerprint('encryption/cipherpad') =
pos('CPAD1'c) < 4000;
TOP SECRET//COMINT//REL TO USA, FVEY
TOP SECRET//COMINT//REL TO USA, FVEY
- Distance (similar to pos, but for distance between tokens)
- Lpos
Spop_basic = lpos('+OK 'c) or '\nQUIT';
- First
appid('mail/smtp/...) = first('ehlo') and ... ;
- Last (similar to first)
- Follows (one token after another)
- Between (one token between two others)
- Order
TOP SECRET//COMINT//REL TO USA, FVEY
TOP SECRET//COMINT//REL TO USA, FVEY
Other Features
- Fingerprint definitions updated hourly throughout the entire enterprise.
- Workflows
- Submit through user interface.
- Standing queries that run like cron jobs.
- Limited follow-on processing.
- User interface for fingerprint submission (coming soon).
- Currently done by XKS personnel.
TOP SECRET//COMINT//REL TO USA, FVEY
TOP SECRET//COMINT//REL TO USA, FVEY
Plug-ins
- Full power of C++ for when pattern matching does not suffice.
- Usually limited to certain file types
- Huge JPEG volume from web surfing
- Current steg/encryption plugins that fingerprint sessions:
- PHOSPHORESSENCE library of steg detectors
- SHELLLOCK steg detection
- SEDENA indigenous encryption software
- Drawback: Must wait for site upgrade to deploy.
TOP SECRET//COMINT//REL TO USA, FVEY
TOP SECRET//COMINT//REL TO USA, FVEY
Trade-off
- Fingerprints easily deployed, but limited to pattern matching.
- Plug-ins slow to deploy, but allow for complex testing.
- New compromise:
- Snippets of C++ code in fingerprint
- Deployed hourly like fingerprint with most of the flexibility of a full plug-in.
- Very complicated tests probably still need to be plug-ins.
- Currently stood up at only a few sites.
TOP SECRET//COMINT//REL TO USA, FVEY
TOP SECRET//COMINT//REL TO USA, FVEY
Example
fingerprint('encryption/archive/rar') =
'\x52\x61\x72\x21\x1a\x07\x00'c
: c++ {{
const uint8_t *ptr =
find_first("\x52\x61\x72\x21\x1a\x07\x00");
if (ptr == NULL)
return false;
if (end()-ptr < 64)
return false;
if ((ptr[23] &0x04) != 0x04)
return false;
if ((ptr[10] &0x80) != 0x80)
return false;
return true;
}};
TOP SECRET//COMINT//REL TO USA, FVEY
TOP SECRET//COMINT//REL TO USA, FVEY
Advanced Feature
- Follow-on check with anchorless regexes:
%dhcp_check = regex {{
^[\x01\x02][\x01- ]\x06.*c\x82sc
}};
appid('netmanagement/dhcp/client_to_server',
3.0) =
from_port(68) and to_port(67)
: %dhcp_check;
TOP SECRET//COMINT//REL TO USA, FVEY
TOP SECRET//COMINT//REL TO USA, FVEY
Releasability Issues
- Nearly all XKS personnel have PICARESQUE!
- Those that don't have PRIVAC.
- XKS distribution comes in two flavors
- 1st & 2nd party
- 3rd party
- No NOFORN capabilities permitted.
- Special dispensation from [REDACTED] for some capabilities to SMOKYSINK.
- Can keep PICARESQUE code running on R1's rednet if absolutely necessary.
TOP SECRET//COMINT//REL TO USA, FVEY
Published in the Same Report
(10 of 46 documents)
-
XKEYSCORE intro [pdf]
A TOP SECRET NSA presentation from 2008 introducing XKeyscore — one of the earliest overview documents in the archive — describing the system as a globally distributed Linux cluster across approximately 150 sites and 700+ servers that stores a ~3-day rolling buffer of all unfiltered internet traffic, and demonstrating its core capabilities for finding previously unknown targets by mining metadata, tracking documents by embedded image hashes, detecting encryption and VPN use, and language tracking.
Programs: XKEYSCORE · TURMOIL · TURBULENCE · TRAFFICTHIEF · WEALTHYCLUSTER · MOONSHINE · SEARCHLIGHT · MARINA · PSC · SSO · TIMBERLINEPeople: bin Laden, Osama“'Brasil é um grande alvo', diz jornalista sobre vigilância dos EUA” - O Globo ↗ (2013-07-07) · “XKeyscore: NSA tool collects 'nearly everything a user does on the internet'” - The Guardian ↗ (2013-07-31) · “No Place to Hide” - Metropolitan Books ↗ (2014-05-13) · “XKEYSCORE: NSA’s Google for the World’s Private Communications” - The Intercept ↗ (2015-07-01) · Greenwald, Glenn · Bridi, Sônia · Marquis-Boire, Morgan · Lee, Micah -
Advanced HTTP Activity Analysis [pdf]
This NSA training document from 2009 teaches intelligence analysts how to analyze HTTP internet traffic and exploit it using the XKEYSCORE surveillance system to monitor and identify internet users globally.
“XKEYSCORE: NSA’s Google for the World’s Private Communications” - The Intercept ↗ (2015-07-01) · “No Place to Hide” - Metropolitan Books ↗ (2014-05-13) · Marquis-Boire, Morgan · Greenwald, Glenn · Lee, Micah -
Analyzing Mobile/Cellular DNI in XKEYSCORE, May 2009 [pdf]
The XKEYSCORE document explains how the agency analyzes mobile/cellular device internet usage by collecting and processing both converged DNI/DNR data within cellular networks and traditional internet traffic, using various tools and indicators to identify mobile users even when their device type isn't immediately evident. The document demonstrates how the system can track mobile internet activity across applications like Yahoo Mail and identifies devices through various technical "hints" including MSISDN codes, browser fingerprints, and user agent strings.
-
Atomic SIGINT Data Format (ASDF) Configuration Read Me [pdf]
This document is a technical configuration guide for setting up XKEYSCORE surveillance systems to generate and forward metadata in the Atomic SIGINT Data Format (ASDF) to various data repositories including MARINA, which tracks users' browser activity and online behavior.
Marking: SECRET -
CADENCE Read Me [pdf]
This NSA engineering manual details how to configure XKEYSCORE—the agency's sprawling surveillance system—to integrate with CADENCE, an automated keyword scanning tool that filters intercepted communications and routes intelligence based on search terms submitted by analysts.
-
How to configure category throttling in XKEYSCORE [pdf]
An NSA technical guide explains how to configure "category throttling" in XKEYSCORE—a feature that automatically stops forwarding intercepted communications once analyst-defined collection targets hit predetermined data volume or session count limits, allowing the surveillance system to continue processing but prevent overflow from high-volume targets.
-
CNE Analysis in XKEYSCORE [pdf]
This document is an NSA training presentation from October 2009 demonstrating how XKEYSCORE integrates with Computer Network Exploitation (CNE) operations, allowing analysts to search and analyze data extracted from compromised computers including keystrokes, browser history, registry files, documents, emails, and directory structures collected through implants like UNITEDRAKE and OLYMPUS.
Programs: XKEYSCORE · OLYMPUS · UNITEDRAKE · PINWALE · TUNINGFORK · TURBOCHASER · MARINA · JOLLYROGER · TREASUREMAP · TURBINE · PRESSUREWAVE · MAD · TUCKER · EXPANDINGPULLY · UNIX · SEARCHLIGHT · KEYLOGGER · PILBEAM · FOXACID · WAYTIDE · SHADOWQUEST · SEAGULLFARO · DARKHELMET · LUTEUSICARUS · FOGGYBOTTOM · GREENCHAOS · RADIUS · NKB · VALIDATOR -
Communications System - How To Guide [pdf]
A TOP SECRET and sensitive compartmented information (SCI) how-to document for the NSA’s XKEYSCORE “Comms” backbone, laying out ports, peer/allow rules, bandwidth pools, and proxy classifications that stitch clusters to central control—a scalable architecture for moving surveillance data with security markings baked in. It also walks through firewall exceptions, HTTPS port-sharing, and a MAILORDER file pipeline, exposing the nuts‑and‑bolts of how collection flows across sites, proxies, and viewers.
-
DEEPDIVE Readme [pdf]
This document is a confidential technical guide that provides step-by-step procedures for configuring an XKEYSCORE server to function as a DEEPDIVE server. DEEPDIVE enhances XKEYSCORE by adding a front-end filter and a rolling buffer of all unfiltered data, creating a federated query system that can scan all collection sites with a single query.
-
DNI101 [pdf]
This TOP SECRET training guide, "DNI 101," provides a workflow for Digital Network Intelligence analysts on how to investigate a target's email address, detailing the specific tools, databases, and methodology used, and stressing the critical difference between initial open-source/classified research and the active "targeting" of raw SIGINT repositories like XKEYSCORE, PINWALE, and MARINA.
Programs: NKB · FOXTRAIL · FOREMAN · PINWALE · LIONHEART · XKEYSCORE · DISHFIRE · MARINA · MECWEB · MAINWAY · TRAFFICTHIEF · MAUI · ANCHORY · M3 · INTELLINK · HOMEBASE · PROTON · UTT · CADENCE · SPEEDBUMP · TUNINGFORK · MASTERSHAKE · BLACKPEARL · JACKSPARROW · ROADBED · STORYDUTY · LIONROAR · DOPHONE · UIS
Related Documents
-
VALIANTSURF [pdf]
An NSA WikiInfo page for VALIANTSURF — the coverterm for NSA's IPSec VPN decryption capability within the TURMOIL collection platform — describing the four data flow types for intercepting and breaking encrypted VPN traffic, the full deployment roster across collection sites including Menwith Hill, SMOKYSINK, MUSCULAR, CROSSCUT and others, and the architectural taxonomy of the VALIANTSURF programme including its MALIBU and WAIMEA processing architectures and their relationship to LONGHAUL, POISONNUT and GALLANTWAVE.
Programs: VALIANTSURF · TURMOIL · TURBULENCE · HOOKED · HOOKEDHAND · CINDER · CINDERASH · CINDERTRACK · SCARLETFEVER · LONGHAUL · FALLOUT · TOYGRIPPE · PICARESQUE · XKEYSCORE · PRESSUREWAVE · ASDF · MAILORDER · TUBE · KEYCARD · POISONNUT · ISLANDHIDEAWAY · ISLANDTRANSPORT · EXOPUMP · CORALREEF · PINWALE · TUSCARORA · ONEROOF · CONVEYANCE · TURTLEPOWER · WDM · CADENCE · UTT · SCISSORS · FISHWAY · BTUBE · DNCA · ROMULANALE · GALLANTWAVE · ROMULANGAWK · ROMULANGOWL · MALIBU · WAIMEA · WAIMEAVISAGE · ROMULANVISAGE · WAIMEAVISE · ROMULANVISE · APEX · METROTUBE · MADFORGE · JSORCERER · CROSSCUT · CIET · LATTICE · STARQUAKE · SARATOGA · MUSCULAR · SMOKYSINK · SLACKKEY · TUMMS · PURGE · SURGE · NUCLEON · SPAGIC · PPF · SOAP · TUMULT · FIP · PIQBLADE · DEEPDIVE · IBRIDGE -
X-KEYSCORE as a SIGDEV tool 2009 [pdf]
A 2009 TOP SECRET NSA presentation describing XKeyscore as a SIGINT development tool — explaining how it captures and temporarily stores the full content of internet traffic (the 95%+ that was previously dropped because it didn't match any target) across 125 sites worldwide, "slowing down the internet" so analysts can retroactively reconstruct a target's entire online session, discover new targets, and search the content of documents, web searches, emails and chats that contain no tasked selector.
Programs: XKEYSCORE · PINWALE · TRAFFICTHIEF · MARINA · AGILITY · PILBEAM · MAILORDER · CADENCE · NKB · PSC · SSO · UIS“XKEYSCORE: NSA’s Google for the World’s Private Communications” - The Intercept ↗ (2015-07-01) · “No Place to Hide” - Metropolitan Books ↗ (2014-05-13) · “FRA has access to controversial surveillance system” - SVT Nyheter ↗ (2013-12-11) · Marquis-Boire, Morgan · Greenwald, Glenn · Lee, Micah · Bergman, Sven · Dyfvermark, Joachim · Gallagher, Ryan · Laurin, Fredrik · Struwe, Filip -
XKEYSCORE intro [pdf]
A TOP SECRET NSA presentation from 2008 introducing XKeyscore — one of the earliest overview documents in the archive — describing the system as a globally distributed Linux cluster across approximately 150 sites and 700+ servers that stores a ~3-day rolling buffer of all unfiltered internet traffic, and demonstrating its core capabilities for finding previously unknown targets by mining metadata, tracking documents by embedded image hashes, detecting encryption and VPN use, and language tracking.
Programs: XKEYSCORE · TURMOIL · TURBULENCE · TRAFFICTHIEF · WEALTHYCLUSTER · MOONSHINE · SEARCHLIGHT · MARINA · PSC · SSO · TIMBERLINEPeople: bin Laden, Osama“'Brasil é um grande alvo', diz jornalista sobre vigilância dos EUA” - O Globo ↗ (2013-07-07) · “XKeyscore: NSA tool collects 'nearly everything a user does on the internet'” - The Guardian ↗ (2013-07-31) · “No Place to Hide” - Metropolitan Books ↗ (2014-05-13) · “XKEYSCORE: NSA’s Google for the World’s Private Communications” - The Intercept ↗ (2015-07-01) · Greenwald, Glenn · Bridi, Sônia · Marquis-Boire, Morgan · Lee, Micah -
TURBULENCE - Fielded Capability: End-to-End VPN, SPIN 9 Design Review [pdf]
An NSA SPIN 9 design review presentation describing the transition of TURMOIL's VPN decryption capability from the legacy Red Architecture to the new Blue Architecture — covering the full end-to-end dataflow, component interfaces, test scenarios and detailed processing specifications for each system in the VPN decryption pipeline.
Programs: TURBULENCE · TURMOIL · KEYCARD · WEALTHYCLUSTER · TUBE · XKEYSCORE · PRESSUREWAVE · EXOPUMP · PWV · TOYGRIPPE · PICARESQUE · AGILITY · MAILORDER · ISLANDTRANSPORT · PIQBLADE · PINWALE · TRAFFICTHIEF · IBRIDGE · PPF · METROTUBE · FIP · SSO -
VOIP in XKEYSCORE [pdf]
A TOP SECRET XKeyscore training presentation from 2009 describing how the system intercepts internet phone calls — automatically matching the call setup information (who is calling whom) with the actual voice data even when they travel through different countries and collection sites, then decoding the audio into playable recordings that analysts can listen to through Windows Media Player.