Image: CERT Polska
The national incident response team CERT Polska has uncovered a new strain of Android-based NFC relay malware, dubbed NGate, that enables cybercriminals to withdraw cash from ATMs using victimsβ own payment cards β without ever stealing the card physically.
According to CERT Polska, βthe campaign is designed to enable unauthorized cash withdrawals at ATMs using victimsβ own payment cards. Criminals donβt physically steal the card; they relay the cardβs NFC traffic from the victimβs Android phone to a device the attacker controls at an ATM.β
The attack begins with a phishing and phone-based social engineering campaign that impersonates bank support representatives. Victims receive fake security alerts via email or SMS, claiming there is a βtechnical problem or a security incident.β The message leads to a phishing site prompting the user to download a malicious Android application.
As CERT Polska explains, βA scammer calls, posing as bank staff, to βconfirm identityβ and to justify the app. The user also receives an SMS message confirming the identity of the alleged bank employee.β
The fraudulent app then instructs the victim to βverify their payment card directly within the appβ by tapping the card against the phone (using NFC) and entering the PIN on a fake keypad interface.
βWhen the victim taps the card, the app captures the cardβs NFC exchanges (the same data that flows at a terminal/ATM) and sends them over the internet to the attackerβs device standing at an ATM,β CERT Polska notes. βWith the relayed card data + PIN, the attacker withdraws cash.β
The analyzed malicious APK registers itself as an Android Host Card Emulation (HCE) payment service, enabling it to act as a virtual card or reader. In CERT Polskaβs analysis, βthe app registers itself as a Host Card Emulation (HCE) payment service on Android (so it can behave like a virtual card).β
Once installed, the malware activates a native library (libapp.so) that decrypts its configuration from an embedded asset. The report explains that the malwareβs command-and-control (C2) server address is encrypted and decrypted at runtime using a key derived from the appβs signing certificate:
βWe decrypted that asset and recovered the live c2 endpoint: IP/port: 91.84.97.13:5653.β
The malware then establishes a TCP connection (unencrypted, tls=false) to this IP address, allowing real-time transmission of card data and PINs between the infected device and the attackerβs ATM relay terminal.
CERT Polskaβs reverse engineering shows how the native code performs XOR decryption on configuration files, with the key derived from βthe SHA-256 hash of the APK signing certificate.β This obfuscation helps the attackers hide critical parameters like server address, token, and connection mode.
When the victim taps a card, the malware uses Androidβs NFC reader API to intercept EMV data β including the Primary Account Number (PAN), expiration date, and AID (Application Identifier). The malwareβs CardData class serializes these values together with the PIN into a binary structure before exfiltration.
βThe UI includes a PIN pad; the PIN is sent together with the NFC data to the attacker,β the CERT Polska report confirms.
The PIN-capture mechanism uses a custom keyboard component (PinCodeField) that immediately publishes the full PIN string once the fourth digit is entered. CERT Polska emphasizes that βonce the required length is reached (default 4), it publishes the full PIN string to an internal event busβ, which is then sent via socket to the C2 in one hop.
The researchers found that NGate supports two operational roles β one to collect card data (reader mode) and one to emulate a payment card at the ATM (emitter mode).
This setup enables the attacker to relay EMV APDUs and PINs in real time between two devices β one interacting with the victimβs card, the other impersonating it at an ATM, effectively cloning the transaction session without needing to duplicate the physical card.
CERT Polskaβs analysis of the network layer shows a simple, framed TCP protocol sending length-prefixed messages and cleartext payloads. Since TLS was disabled, βframes are easy to signature on the wire, and because tls=false, payloads are cleartext.β
The malware maintains a persistent connection via keepalive pings every seven seconds, ensuring the attackerβs relay stays synchronized while an ATM transaction occurs.
Related Posts:
- NFC Nightmare: New NGate Trojan Drains Bank Accounts via ATMs
- NGate Android Malware Steals NFC Payment Data at ATMs
- UNC1151 Exploits Roundcube Flaw in Spear Phishing Attack
- Smartwares Security Breach: Vulnerabilities Expose Cameras to Remote Takeover
- Ghost Tap: NFC Fraud Surge Linked to Chinese Cybercriminal Groups
Support Our Threat Intelligence
If you find our CVE report and cybersecurity news helpful, consider supporting our work.