Virtual Terminals, POS Security and becoming a billionaire overnight

Grigorios Fragkos

BruCON 0x08 · Day 2

Overview

This talk, delivered by Grigorios Fragkos, delves into the myriad security vulnerabilities present in Point-of-Sale (POS) devices and virtual terminals, which are ubiquitous in modern retail and hospitality. Fragkos, a seasoned security researcher, reveals the culmination of four years of previously undisclosed research, highlighting how these critical payment systems can be easily manipulated through physical access, logical flaws, and software vulnerabilities. The presentation serves as a stark warning to the financial industry, merchants, and consumers about the significant fraud potential that exists, often exploiting seemingly minor oversights or deeply ingrained systemic weaknesses.

Watch on YouTube

Visual summary for Virtual Terminals, POS Security and becoming a billionaire overnight by Grigorios Fragkos
Visual summary for Virtual Terminals, POS Security and becoming a billionaire overnight by Grigorios Fragkos

Key moments

  1. 0:00 Introduction to POS security research
  2. 4:40 Unlocking unattended POS devices easily
  3. 7:40 Deleting POS operating system to avoid payment
  4. 16:00 Bypassing payment authorization with jammers
  5. 21:00 Swapping devices and contactless payment scams
  6. 35:00 Hacking virtual terminals for merchant ID fraud
  7. 43:00 Bonus: Hiding transactions by backdating 71 years
  8. 46:00 Key takeaways and advice for POS security

Virtual Terminals, POS Security and becoming a billionaire overnight

Speakers: Grigorios Fragkos

Conference: BruCON

YouTube: https://www.youtube.com/watch?v=OfZiZRtg3aQ

Overview

This talk, delivered by Grigorios Fragkos, delves into the myriad security vulnerabilities present in Point-of-Sale (POS) devices and virtual terminals, which are ubiquitous in modern retail and hospitality. Fragkos, a seasoned security researcher, reveals the culmination of four years of previously undisclosed research, highlighting how these critical payment systems can be easily manipulated through physical access, logical flaws, and software vulnerabilities. The presentation serves as a stark warning to the financial industry, merchants, and consumers about the significant fraud potential that exists, often exploiting seemingly minor oversights or deeply ingrained systemic weaknesses.

Fragkos's research is particularly noteworthy because it moved beyond theoretical exploits, directly engaging with payment acquirers, banks, financial institutions, and Original Equipment Manufacturers (OEMs). His findings compelled these stakeholders to acknowledge and address the identified issues, many of which have since seen remedial action, though some persistent challenges remain. The talk underscores the critical need for continuous security auditing, robust threat modeling, and a shift in perspective from solely protecting card data to understanding and mitigating the broader logical vulnerabilities within the payment ecosystem.

The core message of the presentation is that despite the perceived security of chip and PIN transactions, numerous avenues exist for malicious actors to bypass security controls, redirect funds, and even avoid payment entirely. Fragkos demonstrates how simple key combinations, physical device manipulation, and sophisticated software exploits can turn a common payment terminal into a tool for significant financial gain or disruption. This article will dissect these vulnerabilities, explore their technical underpinnings, and outline the defensive strategies necessary to counter such threats.

Background

▶ Watch: Introduction to POS security research (0:00)

The pervasive nature of Point-of-Interaction (POI) devices, commonly known as chip and PIN terminals, forms the backdrop for Grigorios Fragkos's extensive research. These devices, essential for modern commerce, are often perceived by consumers and merchants alike as secure, largely due to the presence of PIN authentication. However, Fragkos systematically dismantles this perception, revealing that the common assurances—such as "remember your PIN" and "keep your PIN safe because no one else will be able to use your card"—are fundamentally false.

The problem's genesis lies in a combination of factors: legacy systems, insufficient security testing, and logical design flaws. Fragkos explains that his research, initially conducted behind closed doors over four years, exposed vulnerabilities across various terminal manufacturers and operating system vendors. The financial industry's slow adoption of comprehensive security practices, particularly in the realm of application security and threat modeling for payment software (like Virtual Terminals), created fertile ground for these weaknesses to persist. While PCI DSS (Payment Card Industry Data Security Standard) mandates security controls for cardholder data environments, and PA DSS (Payment Application Data Security Standard) specifically addresses payment applications, Fragkos demonstrates that compliance often represents a baseline rather than an impenetrable defense. Many merchants, content with older, paid-for versions of software, resist upgrades, leaving vulnerable legacy equipment in circulation indefinitely.

Furthermore, the operational environment itself contributes to risk. Devices are frequently left unattended or are easily accessible, allowing for physical tampering. The communication protocols, while often encrypted between the terminal and the acquirer, sometimes rely on plain-text commands for internal device operations, creating a critical attack surface. Fragkos also touches upon human factors, such as merchants not verifying device serial numbers or falling prey to social engineering, which facilitate device swapping and other fraudulent activities. This confluence of technical debt, operational oversights, and logical vulnerabilities creates a landscape ripe for exploitation, challenging the very foundation of trust in everyday payment transactions.

Key Findings

▶ Watch: Deleting POS operating system to avoid payment (7:40)

Grigorios Fragkos's research unveiled a staggering array of vulnerabilities across both physical Point-of-Sale (POS) devices and software-based Virtual Terminals (VTs). His key findings demonstrate that the security of payment systems is often undermined by a combination of physical access, logical flaws, and a reliance on outdated or improperly implemented security controls.

One of the most immediate and concerning discoveries was the ease with which "locked" POS devices could be unlocked. Terminals typically found at a till, controlled by an Electronic Cash Register (ECR), can be unlocked using specific key combinations within 7 to 10 seconds. Once unlocked, these devices become susceptible to direct manipulation.

Fragkos identified several methods to manipulate transactions directly on the device:

  • OS Deletion: A secret key combination can erase the operating system, rendering the device inoperable and deleting all pending transactions, preventing charges from being settled. This essentially puts a merchant out of business for a day or more.
  • Transaction Clearing: While recent updates have protected transaction caches with secure codes, older systems or specific configurations allowed for clearing transaction logs, effectively making payments disappear.
  • Amount Manipulation: Using plain-text commands, attackers could change transaction amounts, turning a €1000 purchase into a €100 charge.
  • Refund Mode Exploitation: Devices could be forced into refund mode, allowing an attacker to credit money back to their own card instead of paying. This is particularly potent in environments with large reserves, like casinos.
  • Gambling Winnings (Quasi-Cash) Abuse: By marking transactions as "game winning credit" (a plain-text transaction type), large refunds or payouts could be legitimized, bypassing scrutiny from financial institutions.

PIN bypasses were another major area of concern:

  • Signature Mode Fallback: A secret key combination could force a device into "signature mode," bypassing the PIN requirement entirely. This allows stolen or found cards to be used with just a scribble.
  • Chip Disabling: Simple physical tricks, such as applying clear sellotape or nail polish to the card's chip, or inserting the card upside-down, would cause the device to "verify" the chip as non-functional and instruct the user to swipe the card. Swiping often bypasses PIN verification and, crucially, makes the transaction appear legitimate to anomaly detection systems because the device itself requested the swipe.
  • Manual Authorization Code Bypass: Using a jammer to block wireless communication between the POS device and its base station would force the device to request a manual authorization code. For American Express cards, any two numbers could bypass this, while other cards required a number conforming to the Luhn algorithm (Fragkos specifically mentioned "11112" as a working example).

The talk also highlighted sophisticated device swapping attacks for both physical POS terminals and Virtual Terminals. Attackers could swap a merchant's legitimate device with their own pre-configured device, rerouting all transactions to the attacker's bank account. This was facilitated by the fact that merchants often don't check serial numbers.

Contactless payment vulnerabilities were also discussed, including the ability to charge cards multiple times in milliseconds using several devices, and the risk of NFC skimmers in crowded environments. Fragkos noted that while contactless fraud is a concern, the industry prioritizes transaction speed and volume, accepting a certain level of fraud as "acceptable loss."

Finally, Fragkos exposed critical vulnerabilities in Virtual Terminals (VTs), software used by merchants to key in card details:

  • Misconfigured Test Versions: Some merchants were accidentally given internal test versions of VTs that were not PA DSS compliant and highly vulnerable.
  • Logical Flaw in Merchant/Terminal ID: The core flaw revolved around the Merchant ID (MID) and Terminal ID (TID) combination, which identifies where funds should be settled. Attackers could edit configuration files to change these IDs.
  • Encryption Header Bypass: Even with encryption, a logical flaw allowed attackers to delete a specific encryption header file and then reboot the VT application. The application, finding the header missing, would regenerate its internal keys using the new, attacker-controlled MID/TID values, effectively rerouting all subsequent payments to the attacker.
  • Evasion through Date Offset: Fragkos demonstrated a method to backdate transactions by 71 years (e.g., to 1985), exploiting a system design limitation where computer lifespans in payment systems end around 2085. This made transactions virtually unfindable by traditional means, as demonstrated by his 500-pound test transaction that took two days for the acquirer to locate.

These findings collectively paint a grim picture of payment system security, emphasizing that attackers can achieve significant financial gains by exploiting a combination of physical access, software vulnerabilities, and logical design flaws that are often overlooked in standard compliance audits.

Technical Deep Dive

▶ Watch: Swapping devices and contactless payment scams (21:00)

The technical core of Grigorios Fragkos's presentation unveils a series of specific methods and vulnerabilities that allow for the compromise and manipulation of payment systems. These techniques range from physical device interaction to sophisticated software exploits targeting the underlying logic of transaction processing.

For physical Point-of-Sale (POS) devices, Fragkos detailed how attackers can gain control. He highlighted that many "locked" terminals, typically tethered to an ECR, can be unlocked using specific, undocumented key combinations. While the exact sequences were not publicly disclosed for obvious reasons, Fragkos stated these operations could be performed within 7 to 10 seconds. Once unlocked, the device's internal menus and functions become accessible.

Crucially, Fragkos revealed that many internal device commands are processed in plain text. Examples of such commands include:

  • unlock: Opens the device for user input.
  • close: Closes an active transaction or menu.
  • start receipt: Initiates a new transaction receipt.
  • close receipt: Finalizes a receipt.
  • cancel transaction: Aborts a pending payment.
  • change amount: Modifies the value of a transaction.

These plain-text commands, if injected into the internal network or directly via an unlocked device, allow for arbitrary manipulation of transaction parameters. Fragkos illustrated this with an example where a €4000 TV purchase could be altered to €10, or a legitimate payment could be deleted entirely by erasing the device's operating system. The OS deletion is achieved via another secret key combination, causing the device to display a blue screen and lose all transaction data, leaving only the BIOS and hardware configuration files intact. Merchants, typically unfamiliar with recovery procedures, would have to send the device back to the vendor, causing significant operational disruption.

Transaction types themselves presented a vulnerability. Fragkos specifically mentioned refund, send offline transactions, pre-auth, quasi-cash, and game winning credit. The game winning credit transaction type, intended for casino payouts, was highlighted as a method to launder funds. Since all these types are processed in plain text, an attacker with control over the device or network could force a transaction to be classified as a legitimate "winning," allowing for large sums to be credited without suspicion.

PIN bypass techniques were a significant focus. One method involves a secret key combination that forces the device into a signature-only mode, bypassing PIN entry. The device would then print a receipt for signing, which an attacker could simply scribble on. Another ingenious method involves physically preventing the chip from being read (e.g., with clear sellotape, nail polish, or by inserting the card upside down). When the device detects a non-functional chip, it prompts the user to swipe the card. This is critical because swiping, when explicitly requested by the device, does not trigger the same anomaly detection flags as a direct swipe, making fraudulent transactions appear legitimate.

For environments where wireless communication is used (e.g., mobile POS devices), Fragkos demonstrated the use of jammers to block signals. When a device cannot communicate with its base, it eventually requests a manual authorization code. For American Express cards, any two digits would suffice. For other cards, a number conforming to the Luhn algorithm was required, with "11112" given as a working example, suggesting a weak or incomplete validation process.

The most sophisticated attacks focused on Virtual Terminals (VTs). These are software applications provided by acquirers, running on standard computers, that allow merchants to process payments by keying in card details. While VTs are subject to PA DSS compliance, Fragkos showed how logical flaws could still be exploited. The core vulnerability lies in the Merchant ID (MID) and Terminal ID (TID), which together identify the merchant and terminal for fund settlement. Attackers could modify the VT's configuration files to change these IDs to their own.

A critical bypass for encrypted VTs involved exploiting software redundancy. When a VT application starts, it generates an encryption header that verifies the integrity of the MID and TID. Fragkos's malware would first delete this encryption header file from the system. Then, it would reboot the VT application process. Upon restarting, the VT application, finding the encryption header missing, would regenerate it using its internal keys, but crucially, it would now incorporate the new, attacker-controlled MID and TID values that were previously injected into the configuration. This effectively reroutes all subsequent transactions to the attacker's bank account.

To evade detection, Fragkos introduced a novel technique: the 71-year date offset. By manipulating the transaction's expiration date during manual key-in (e.g., adding 71 years to the current expiry), the system would backdate the transaction to 1985. This exploits a common system design where payment system date calculations often cap out around 2085. A transaction logged in 1985 would be extremely difficult for standard auditing tools to find, as demonstrated by his 500-pound test transaction that took two days for the acquirer to locate.

Finally, Fragkos touched upon contactless (NFC) payment risks, explaining that while limits exist (e.g., £30 in the UK), multiple devices could tap a card in rapid succession to charge it multiple times. He also mentioned the prevalence of card data on social media, demonstrating a custom tool that could fill in missing digits from partially obscured card photos, leveraging knowledge of BIN ranges and card types (e.g., Visa debit from Wells Fargo).

These technical details underscore the complexity and breadth of vulnerabilities, moving beyond simple data theft to encompass logical manipulation of the payment process itself, offering significant opportunities for well-informed attackers.

Demo / Proof of Concept

▶ Watch: Hacking virtual terminals for merchant ID fraud (35:00)

Grigorios Fragkos's talk included several compelling demonstrations and proof-of-concept scenarios, illustrating the practical feasibility of his findings. While not all were live, they showcased the core mechanisms of the exploits.

One notable demonstration involved the reconstruction of credit card numbers from partial images found on social media. Fragkos presented a custom program designed to take partially obscured card details, replacing missing digits with question marks. Leveraging knowledge of card types (e.g., Visa, debit) and issuing banks (e.g., Wells Fargo), the tool could significantly narrow down the possibilities, sometimes identifying the full card number with surprising ease. He showed multiple examples of people inadvertently posting enough information online for such a tool to work, highlighting a pervasive user security oversight.

A key proof-of-concept revolved around the Virtual Terminal (VT) exploitation. Fragkos presented a simulated environment with a copy of a VT application running on a computer. He showed a log file that tracked transactions, each with an incremental transaction ID. His malware, running undetected in the background, was designed to exploit the logical flaw in the VT's handling of Merchant ID (MID) and Terminal ID (TID). The demonstration involved initiating several transactions through the VT. After the malware had executed its payload (deleting the encryption header and forcing the VT to regenerate its keys with attacker-controlled IDs), subsequent transactions, while appearing normal to the merchant on screen, were demonstrably rerouted to the attacker's simulated bank account. The log file, when refreshed, would show the new transactions, but the underlying system would associate them with the attacker's IDs. This clearly illustrated how a cybercriminal could silently siphon off payments for an entire day, especially during peak shopping events like Black Friday.

Fragkos also recounted a real-world test conducted with an acquirer, which served as a powerful proof-of-concept for his 71-year date offset trick. He challenged the acquirer to find a £500 transaction he performed using this method. By manually keying in a card and adding 71 years to its expiration date, the transaction was backdated by the system to 1985. It took the acquirer's team two full days to locate this transaction, demonstrating the effectiveness of the technique in evading standard detection and auditing processes. This practical validation underscored the severity of the logical flaw and the difficulty in tracing such manipulated transactions.

While not explicitly a live demo in the talk, Fragkos mentioned another powerful visual proof: changing the display on a physical POS device to show his Twitter handle instead of the merchant's name or acquirer's branding. This was achieved by exploiting devices that lacked signed firmware checks, allowing for easy modification of the on-screen display. This highlighted the ease with which some devices could be tampered with, even at a superficial level.

These demonstrations served to concretely illustrate the theoretical vulnerabilities, making the abstract concept of "hacking POS devices" tangible and emphasizing the significant financial and operational risks involved.

Defensive Implications

▶ Watch: Key takeaways and advice for POS security (46:00)

The detailed vulnerabilities exposed by Grigorios Fragkos necessitate a multi-faceted and proactive defensive strategy for all stakeholders in the payment ecosystem, from merchants to financial institutions and consumers.

Firstly, merchant education and awareness are paramount. Merchants must be rigorously trained not to leave Point-of-Interaction (POI) devices unattended, even if "locked." They should be educated on the ease of unlocking devices within seconds and the potential for physical device swapping. A critical practice is to verify the serial number on any device brought to them for payment, especially in a restaurant or mobile setting, to ensure it is their legitimate terminal.

Secondly, robust software update and patch management are essential, particularly for Virtual Terminals (VTs) and POS device firmware. While PA DSS compliance is a baseline, it does not guarantee immunity from logical flaws. Financial institutions and acquirers must enforce timely updates and provide incentives for merchants to adopt the latest, most secure versions of payment software. The existence of "internal test versions" of VTs being accidentally distributed highlights a critical need for stricter internal controls and release management within acquirer organizations.

Thirdly, enhanced real-time monitoring and anomaly detection systems are crucial. The ability of attackers to manipulate transaction types (e.g., "game winning credit"), change amounts, or backdate transactions (the 71-year offset trick) means that traditional fraud detection based solely on card numbers or geographical patterns is insufficient. Systems must be capable of identifying unusual transaction types, sudden changes in Merchant ID/Terminal ID (MID/TID) associations, or transactions with highly improbable dates. Fragkos's experience with the 500-pound transaction that took two days to find underscores this need for more sophisticated, real-time analytics.

Fourthly, physical security for POS devices needs to be re-evaluated. This includes secure mounting options for fixed terminals and stricter protocols for mobile devices. For newer devices that pair via Bluetooth, relying on the device's serial number as the pairing key is a severe vulnerability and should be replaced with stronger, randomly generated, and securely stored pairing credentials. The lack of signed firmware checks on some devices, allowing for easy screen manipulation, points to a need for secure boot processes and cryptographic verification of all loaded firmware.

Fifthly, securing internal networks is vital. Since many device commands are processed in plain text, unauthorized access to a merchant's internal network could allow an attacker to inject malicious commands directly to POS devices, overriding legitimate operations. Network segmentation, strong authentication, and continuous vulnerability scanning are necessary to mitigate this risk.

Finally, consumers also have a role to play in personal security:

  • Do not post photos of credit or debit cards online, even partially obscured, as demonstrated by Fragkos's card reconstruction tool.
  • Consider demagnetizing the magnetic stripe on cards not intended for swipe transactions (e.g., if you primarily use chip and PIN or contactless), as this prevents ATM or swipe-based fraud without affecting chip functionality.
  • Remove or obscure the CVV/CVC code from the back of the card once memorized, as this prevents unauthorized online transactions if the card number is compromised.
  • Use RFID blocker sleeves or wallets for contactless cards to prevent unauthorized skimming attempts in crowded areas.

Ultimately, the talk emphasizes that threat modeling exercises must be an integral part of the entire security and development lifecycle for payment systems. Security teams need to think like cybercriminals, anticipating opportunistic attacks and focusing on logical flaws rather than solely on traditional data breaches. Compliance standards like PCI DSS and PA DSS are important, but they represent minimum requirements; true security demands going beyond compliance to proactively identify and mitigate novel attack vectors.

Key Takeaways

  • Physical Access is a Critical Vulnerability: Even "locked" POS devices can be easily manipulated within seconds using specific key combinations, leading to transaction deletion, amount alteration, or device compromise.
  • Logical Flaws Outweigh Encryption Alone: Despite encrypted communication, vulnerabilities in plain-text commands, transaction type definitions, and application logic (e.g., Merchant ID/Terminal ID manipulation in Virtual Terminals) allow for significant fraud.
  • PINs and Chips Offer a False Sense of Security: PINs can be bypassed through signature mode fallbacks or by physically disabling the chip to force a less secure swipe transaction, which can evade anomaly detection.
  • Virtual Terminals are a Major Attack Surface: Software-based payment terminals are susceptible to malware that can reroute funds by exploiting logical flaws in key regeneration after deleting encryption headers, highlighting a significant gap in PA DSS compliance and security auditing.
  • Creative Evasion Techniques Exist: Attackers can use methods like jamming wireless signals for manual authorization bypass or the "71-year date offset" to backdate transactions to evade detection and auditing for extended periods.
  • Proactive Threat Modeling and Education are Essential: Relying solely on compliance is insufficient. Merchants must be educated on device security, and financial institutions need to implement continuous, real-time anomaly detection and integrate robust threat modeling into their development lifecycles to anticipate and mitigate evolving threats.

About the Speaker(s)

Grigorios Fragkos, known as "Greg," is a seasoned security researcher with a deep focus on payment systems and Point-of-Sale (POS) device security. His presentation at BruCON was the culmination of over four years of intensive research, much of which was initially conducted behind closed doors due to its sensitive nature. During his research, Greg engaged directly with key stakeholders in the financial industry, including payment acquirers, banks, financial institutions, and Original Equipment Manufacturers (OEMs), to highlight and address the vulnerabilities he uncovered.

Beyond his research, Greg is an active member of the cybersecurity community. He is the main organizer for BSides Athens, a prominent community-driven cybersecurity conference. He identifies himself as one of "the good guys," emphasizing his role in helping law enforcement solve cases and working on initiatives that enhance security, though he cannot publicly discuss the specifics of such collaborations. His work underscores a practical, hands-on approach to security, driven by a desire to strengthen defenses against opportunistic cybercriminals.

Reviews

  • Dr. Zero (Offensive Security Researcher) — MUST SEE ★★★★★
  • Heather Calloway (CISO) — MUST SEE ★★★★★

→ Top-rated talks at BruCON 0x08

All talks from BruCON 0x08