Analysis of NGate malware campaign (NFC relay) #1556
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🤖 Automated Content Update
This PR was automatically generated by the HackTricks News Bot based on a technical blog post.
📝 Source Information
🎯 Content Summary
Threat overview
NGate is an Android-based NFC relay kit used to cash out ATMs with the victim’s own payment card. Operators social-engineer victims into sideloading an app (e.g., from
files[.]fm/u/yfwsanu886), tapping their physical card against the phone (NFC reader mode), and entering the card PIN. The app relays EMV APDUs and the PIN over a simple framed TCP protocol to an attacker device at an ATM or to a proxy C2, enabling real-time ATM withdrawals.App s...
🔧 Technical Details
NFC relay via Android reader↔HCE emitter: Use a victim device in NFC reader mode to capture live EMV APDUs and the card PIN, then forward them to an attacker device implementing
HostApduService(HCE) at the terminal. The emitter relays APDUs to the ATM, enabling withdrawals as if using the victim’s card.HCE abuse with no unlock: Declare an Android
host-apdu-servicewithandroid:requireDeviceUnlock="false"and a payment AID. InprocessCommandApdu, forward inbound APDUs upstream and return minimal responses, acting as a transparent relay endpoint.Config concealment via cert-derived XOR: Store C2 config as ASCII‑hex under
assets/____and decrypt at runtime by XOR-ing with a 32‑byte key computed as SHA‑256 of the app signing certificate (DER). This hides host/port/token from simple static checks and couples config to the signing key.Cleartext framed C2 channel: Implement cli...
🤖 Agent Actions
I explored the repository and found the most relevant place for NFC/EMV relay content is the existing RFID/NFC page under todo/radio-hacking. It already covers HF NFC/EMV basics and tooling (Flipper, Proxmark), so I extended it with a concise, technical section documenting Android-based NFC relay via Host Card Emulation (HCE), APDU forwarding, PIN harvesting, framed C2 protocol, and config concealment derived from the APK signing certificate—abstracted from the provided CERT-PL NGate analysis.
What I changed:
No new files were created.
This PR was automatically created by the HackTricks Feed Bot. Please review the changes carefully before merging.
📚 Repository Maintenance
All .md files have been checked for proper formatting (headers, includes, etc.).