< Back to blog
high🎣Phishing
investigatedMarch 3, 2026publishedMarch 3, 2026

NFe-RAT: Inside a Live Brazilian Banking Trojan Operation Targeting 11 Financial Institutions

Threat Actors:ProfileNetwork Exposure20.195.216.43 189.37.69.81(xxb3xx)** | Created VM, set up tunnels, operates C2 |real IP (Uberlandia, MG, ALGAR TELECOM AS16735) |+ two unknown (DigitalOcean + unknown IP)Identifiers for Investigationβ€” Confirmed AllaSenha/CarnavalHeist LineageIdentifiers
#phishing#social-engineering#credential-theft#c2#dga#apt#spearphishing

Published: 2026-03-08 | Author: Breakglass Intelligence | Tags: banking trojan, Brazil, AllaSenha, CarnavalHeist, RAT, threat intelligence


TL;DR

We obtained root access to the C2 relay infrastructure of an active Brazilian banking RAT and monitored live victim connections across five Brazilian states over a 5+ hour window. The malware -- which we designate NFe-RAT -- is a confirmed evolution of the AllaSenha/CarnavalHeist family, delivering a Delphi-compiled banking trojan via a six-stage attack chain that culminates in fileless reflective DLL injection. The RAT targets 11+ Brazilian financial institutions with bank-specific credential overlay modules, and one confirmed victim was a healthcare facility running exposed DICOM medical imaging infrastructure.


A Medical Facility Among the Victims

The most alarming finding from this investigation is not the malware itself but who it has already compromised. During live monitoring of the C2 relay, we observed 7 unique victim IPs beaconing to the threat actor's infrastructure. The most active victim -- responsible for over 80 connections in 30 minutes -- was IP 177.154.164.194 in Vila Velha, Espirito Santo. Shodan records for this host reveal an open DICOM port (11112), the standard protocol for medical imaging systems. This host likely belongs to a healthcare facility, meaning the NFe-RAT infection creates a dual-risk scenario: banking credential theft via the RAT's overlay modules, and potential exposure of patient medical imaging data under Brazil's LGPD data protection law.

All seven victims are residential broadband subscribers across five Brazilian states (Espirito Santo, Ceara, Paraiba, Minas Gerais, and Rio de Janeiro). None appeared in any public threat intelligence feeds prior to this report -- all are freshly compromised endpoints.


Attribution: AllaSenha Evolves

NFe-RAT is not a novel malware family. It is a confirmed direct descendant of AllaSenha (documented by HarfangLab in 2024) and CarnavalHeist (documented by Cisco Talos in 2024). The evidence is not circumstantial -- it is structural:

AttributeAllaSenha (2024)NFe-RAT (2026)Match
Internal DLL nameAccess_PC_Client_dll.dllAccess_PC_Client_dll.dllExact
Loader DLL nameexecutor.dllexecutor.dllExact
Infection chainPython + PythonMemoryModule + DLLPython + PythonMemoryModule + DLLExact
Payload formatPickle5 serialized dictPickle5 protocol 4 dictExact
C2 beaconpyCodeV10 - *NEWW* {host}|{ver}|{proc}pyCodeV1 - {host}|{ver}|{priv}Protocol family
Command delimiters<|COMMAND|><|COMMAND|>Exact
CompilerDelphi XE5 / 10.4Delphi XE5Match
C2 hostingAzure BrazilSouthAzure BrazilSouthExact
Build path userbert1mxxb3xx (machine user: maria)Different operator

The different operator username and DGA mechanism (Dynu DDNS vs. Azure subdomains) point to either a Malware-as-a-Service model or source code sharing within the Brazilian cybercrime ecosystem. The build path C:\Users\maria\Desktop\Driver\Trampo 2025\kl Delphi\ -- where "Trampo" is Portuguese slang for "hustle" -- confirms a sustained criminal operation. None of the file hashes appear in any public threat intelligence database.


The Six-Stage Attack Chain

NFe-RAT reaches victim machines through a carefully engineered multi-stage delivery pipeline, each stage designed to evade a different layer of defense.

Stage 0: Phishing Page

The campaign impersonates Brazil's Nota Fiscal Eletronica (NF-e) electronic tax invoice system via nfe-pdf[.]shop (registered 2026-02-28, Cloudflare-proxied). The Portuguese-language page branded "Portal de Documentos" implements OS gating (Windows-only), browser gating (blocks Firefox -- search-ms: requires Chromium), anti-bot checks (mouse movement >3px with isTrusted verification), and click tracking via contar-acesso.php and cliques.php.

Stage 1: search-ms: Protocol Abuse (T1204.001)

Clicking "Visualizar Nota Fiscal" invokes search-ms: to open a WebDAV share over HTTPS (@SSL), disguised as the user's "Downloads" folder using CLSID {2227A280-3AEA-1069-A2DE-08002B30309D}. The victim sees what appears to be a PDF.

Stage 2: Weaponized .lnk (T1204.002)

The .lnk file (NF410296447634.pdf.lnk) uses the Edge icon and pads its target field with 45+ digits of numeric noise to hide the real command in Properties dialogs. The actual payload fetches a .bat downloader from the sister domain notas-pdf[.]shop via WebDAV. The .lnk leaks an attacker machine SID: S-1-5-21-2526624856-4161533469-3970102354-1001.

Stage 3: Batch Downloader (T1059.003)

The .bat creates a decoy PDF ("Documento Fiscal") for social engineering, derives a unique machine ID (NM) from the computer name via base64, downloads the official Python 3.12.5 embedded (32-bit) from python.org, renames pythonw.exe to {NM}.exe for process camouflage, and executes an embedded base64 Python stager.

Stage 4: Python Stager with DGA (T1059.006, T1568.002)

The stager implements a date-seeded Domain Generation Algorithm producing three .ddnsfree.com domains per day, plus a port generation algorithm producing ten ports per day -- creating 30 possible (domain, port) connection targets selected at random each attempt.

DGA domain algorithm (simplified):

di = day_of_month + weekday
char = 'rstuvxzwkyjlmnopqabcghjlabcdefghijlmnopq'[di]
# SHA1 hash seeded with date components, repeated 10x, truncated to 48 chars
domain = f"{truncated_hash}.ddnsfree.com"

Port algorithm:

ports = [int(str(int(DDMMYYYY * x))[:4]) for x in range(60, 100, 4)]

The stager includes a Broadwell CPU sandbox check (T1497.001) -- if the processor name contains "Broadwell", execution halts, as this string is common in cloud VM processor descriptions.

Upon connecting, the stager sends the beacon pyCodeV1 - {hostname} | {os_version} | {cpu_name} and receives a 4.8MB pickle payload via raw TCP.

Stage 5: CodePy Loader (T1547.001, T1620)

The pickle payload (protocol 4) contains three keys:

KeyContentSize
CodePyPython loader script4,508 bytes
filePassword-protected ZIP (executor.dll)~2.5 MB
file2Password-protected ZIP (PythonForWindows framework)~2.9 MB

ZIP password: Snh2301**Snh2301**

The CodePy loader establishes persistence by double-base64 encoding the stager into {NM}.txt and creating a registry Run key at HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\{NM_reversed}. It then extracts the PythonForWindows toolkit and uses pmm.MemoryModule for reflective DLL injection of the final payload.

Stage 6: executor.dll -- The Banking RAT (T1055, T1056.001)

The final payload is a 2.6MB Delphi-compiled DLL (Access_PC_Client_dll.dll) loaded entirely in memory -- no PE is written to disk (T1620). The specimen analyzed was compiled on 2026-03-03 at 12:26:48 UTC, just hours before our investigation began.

The loader spawns 50 threads attempting DLL injection with 60-second timeouts and 2-second delays between attempts, a brute-force approach to ensure the RAT loads despite potential race conditions.


RAT Capabilities: Full Banking Fraud Toolkit

The executor.dll command protocol uses <|COMMAND|> delimiters over TCP. Analysis of the DLL's strings reveals a comprehensive remote access and banking fraud toolkit.

Bank-Specific Credential Overlays

Beyond standard remote desktop, mouse/keyboard control, and screen capture capabilities, the RAT's primary purpose is bank-specific credential theft.

The RAT contains dedicated overlay modules targeting 11+ Brazilian financial institutions. These are not generic phishing forms -- each module is tailored to the specific bank's authentication flow:

Target InstitutionCommandsCredential Types
Banco do BrasilBB-PASS6, BB-PASS8, BB-PROCURADOR, BB-AMARELO, BB-AZUL6/8-digit passwords, proxy auth, yellow/blue token
ItauITAU-SNH-ENTRADA, ITAU-SNH-CARTAO, ITAU-TK-CHAVEIRO, ITAU-TK-SMS, ITAU-TK-APPEntry password, card password, keychain/SMS/app tokens
BradescoASS-BLUE, ASS-BLUE-PJDigital signature (personal and business)
SantanderASS-SANTA, STN-6DGSignature, 6-digit code
Banco SafraSAFRA-DADOSFull credentials
SicrediSICREDI-TOKEN-CELULAR, SICREDI-TOKEN-CHAVEIROMobile/keychain tokens
SicoobSICOOB-SNH66-digit password
UnicredUNICRED-ASS, UNICRED-TKNSignature, token
BanrisulDESCO-TKCHAVEIRO, DESCO-TKAPP, DESCO-PISCAKeychain/app/blinking tokens
PIX (all banks)QRCODE, QR-CONFIRMADOQR code capture for instant payments

The command <|FECHAR-ANYDESK|> (Kill AnyDesk) is a notable anti-remote-support mechanism -- it prevents IT staff from remotely connecting to investigate while the operator controls the machine.


Infrastructure: Disposable Relay Architecture

The threat actor operates behind residential CGNAT in Uberlandia, Minas Gerais (ALGAR TELECOM, AS16735), with zero internet-facing attack surface. All victim traffic routes through a disposable Azure VM (Standard_D2s_v3, Brazil South) functioning as a pure SSH reverse tunnel relay -- no C2 software touches the relay disk.

The VM was provisioned the same day (09:24 UTC) and configured via scripted setup in under 10 seconds: enable PermitRootLogin, enable GatewayPorts, set root password. No iptables rules, no SSH keys, no bash history, no software beyond base Ubuntu 24.04. The C2 application runs on port 22447 on the attacker's machine (identified via sshd heap memory analysis), forwarding through 10 daily-rotating DGA ports.


Threat Actor Profile

FieldValue
Usernamexxb3xx
Real IP189.37.69.81
LocationUberlandia, Minas Gerais, Brazil
ISPALGAR TELECOM S/A (AS16735)
ConnectionResidential broadband, behind CGNAT
Build machine usermaria
Dev environmentDelphi XE5, x86 target
Password (reused everywhere)Snh2301**Snh2301** (Azure root, user account, both ZIP payloads)
OPSECPoor -- no VPN, build path in binary, full credential reuse

During our 5+ hour monitoring window, the operator reconnected three times at ~90-minute intervals, demonstrating sustained operational tempo.


MITRE ATT&CK Mapping

TacticTechnique IDTechniqueNFe-RAT Implementation
Initial AccessT1566.002Spearphishing LinkNF-e tax invoice phishing page
ExecutionT1204.001Malicious Linksearch-ms: protocol handler abuse
ExecutionT1059.003Windows Command Shell.bat downloader with certutil
ExecutionT1059.006PythonStager, CodePy loader, pickle exec()
PersistenceT1547.001Registry Run KeyHKCU\...\Run\{NM_reversed}
Defense EvasionT1620Reflective Code LoadingPythonMemoryModule (pmm)
Defense EvasionT1055.001DLL InjectionCreateRemoteThread + VirtualAllocEx
Defense EvasionT1036.005Match Legitimate Namepythonw.exe renamed to {NM}.exe
Defense EvasionT1027.002Software PackingDouble-base64, pickle serialization, UPX
Defense EvasionT1564.001Hidden Files%PROGRAMDATA%{NM}\ set hidden
Defense EvasionT1497.001Sandbox Evasion"Broadwell" CPU string check
DiscoveryT1082System Information DiscoveryRegistry fingerprinting (CPU, OS)
Credential AccessT1056.001KeyloggingPUXAR-TECLAS/TECLAS commands
Credential AccessT1555.003Credentials from Web BrowsersBank-specific overlay attacks
CollectionT1113Screen CaptureDesktop/VIDEO/RENDERIZAR commands
C2T1568.002Domain Generation AlgorithmDate-seeded SHA1, *.ddnsfree.com
C2T1571Non-Standard Port10 daily rotating ports
C2T1572Protocol TunnelingSSH reverse tunnel relay
ImpactT1529System Shutdown/Rebootcmd /c shutdown -s -t 0

Defensive Recommendations

Network Detection

  • Block DGA pattern: Alert on DNS queries matching [a-f0-9]{40,}.ddnsfree.com. The NFe-RAT DGA produces 48-character hex strings as subdomains of ddnsfree.com.
  • Block search-ms: over WebDAV: Monitor for outbound WebDAV connections triggered by search-ms: protocol handler invocations containing @SSL in the URL. Consider disabling the search-ms: URI handler via Group Policy for users who do not require it.
  • Monitor Python embedded downloads: Alert on downloads of python.org/ftp/python/*/python-*-embed-win32.zip from workstation subnets, particularly when followed by process execution from %PROGRAMDATA%.
  • Pickle payload detection: The C2 payload begins with \x80\x04\x95 (pickle protocol 4 header). IDS rules matching this byte sequence on non-standard ports can catch payload delivery.

Endpoint Detection

  • Registry persistence: Monitor creation of Run keys where the value name is a reversed base64 string pointing to an executable in %PROGRAMDATA% paired with a .txt argument file.
  • Process lineage: Alert on pythonw.exe (or renamed copies) executing from %PROGRAMDATA%\{random}\ directories, especially when the parent process is cmd.exe launched from a .lnk file.
  • File artifacts: The decoy file %USERPROFILE%\downloads\NotaFiscal.pdf containing only the text "Documento Fiscal" is a strong indicator.
  • DLL reflective loading: Monitor for pmm.MemoryModule imports and in-memory DLL loading without corresponding disk writes.

Organizational Controls

  • Disable search-ms: handler on endpoints that do not require it.
  • Block Dynu DDNS (*.ddnsfree.com, *.dynu.com) at the DNS resolver level.
  • Educate Brazilian operations staff about NF-e phishing -- the lure targets a routine business document that every Brazilian company handles.
  • Deploy Snort/Suricata rules for the beacon string pyCodeV1 combined with *NEWW* on any TCP port.

Indicators of Compromise

Network Indicators

TypeIndicatorContext
IP20.195.216.43C2 relay (Azure Brazil South)
IP189.37.69.81Threat actor real IP (ALGAR TELECOM, Uberlandia MG)
Domainnfe-pdf[.]shopPrimary phishing domain
Domainnotas-pdf[.]shopSister phishing domain
Domainnfe-informativo[.]comBackup C2 domain (currently parked)
DGA*.ddnsfree.comC2 DGA domains (48-char hex subdomain)
Port22447C2 application port on attacker machine
URLhxxps://nfe-pdf[.]shop/nota-eletronica-emitida/Phishing landing page
URLhxxps://nfe-pdf[.]shop/NotaFiscal/WebDAV .lnk delivery
URLhxxps://notas-pdf[.]shop/dv/WebDAV .bat delivery

File Indicators

IndicatorTypeDescription
de68f6917d949e086819e69609a8d028747522ae175b16022db84baeffef367dSHA256executor.dll (extracted RAT DLL)
474477f18defcd63f6b5ac45a534fcf4MD5executor.dll
701278d1e19b753f81d42c604e454d1b5c9dd2cf822f2e223ab9f6b10e755ee8SHA256Embedded PE (UPX-packed inner DLL)
1211ecd49405c6069ddad78cd393339b527fac58803ba2bf0d57205cc994746dSHA256Embedded PE (unpacked banking RAT core)
e968533a5de9695c043cf3261dc24f0151b8fc00b64e5ed9f93ece6306305cc2SHA256NF410296447634.pdf.lnk
7846c3b77177481b6cfbb450f14552d77c60c23faf2546a49445b9ba68559cffSHA256C2 pickle payload
7b673e3f3b0390f8d21fc7b8e4f8e8814b34292d561f2b1c14e28003e5907066SHA256executor.dll ZIP (compressed)
935d0a854d8f55b5a96bca0bb40ed9b0c0527dec5199e9b47a5d78dc82a8e2fdSHA256PythonForWindows ZIP (file2)

Host Artifacts

IndicatorTypeDescription
%PROGRAMDATA%\{NM}\{NM}.exeFileRenamed pythonw.exe 3.12.5 (x86)
%PROGRAMDATA%\{NM}\{NM}.txtFileDouble-base64 encoded stager
%PROGRAMDATA%\{NM}\pmm\DirectoryPythonMemoryModule framework
%USERPROFILE%\downloads\NotaFiscal.pdfFileDecoy document ("Documento Fiscal")
HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\{NM_reversed}RegistryPersistence key
Access_PC_Client_dll.dllStringInternal DLL name (in-memory only)
S-1-5-21-2526624856-4161533469-3970102354-1001SIDAttacker build machine SID in .lnk

Behavioral Signatures

IndicatorDescription
pyCodeV1 - *NEWW*C2 beacon prefix on TCP
Snh2301**Snh2301**ZIP password / credential (all systems)
Broadwell CPU checkSandbox evasion string
<|PRINCIPAL|>, <|SENHA|>RAT command protocol delimiters

Conclusion

NFe-RAT represents the ongoing evolution of Brazil's most prolific banking trojan lineage. While the underlying code traces back through AllaSenha, CarnavalHeist, KL Gorki, and ultimately the open-source AllaKore RAT, the 2026 variant demonstrates continued active development: same-day compilation, a DGA mechanism not seen in prior variants, and an expanded target list now covering 11+ financial institutions including PIX QR code capture.

The operator's OPSEC is poor -- password reuse across every system, no VPN, build paths leaked in binaries, and an Azure subscription traceable through Microsoft's records. But the malware architecture is pragmatic and effective: a six-stage delivery chain with anti-analysis at every stage, fileless final execution via reflective DLL injection, and disposable relay infrastructure that can be burned and rebuilt in under 10 minutes.

The different operator identifiers between AllaSenha ("bert1m") and NFe-RAT ("xxb3xx") suggest this malware has moved beyond a single developer. Whether through a Malware-as-a-Service model, source code sales, or a broader affiliate program, the AllaSenha/KL Gorki builder toolkit is now in the hands of multiple operators -- and none of the current campaign's IOCs were present in any public threat intelligence database at the time of this investigation.

For Brazilian financial institutions and their customers, the threat is immediate and ongoing. The C2 infrastructure was fully operational during the entire investigation, and the threat actor demonstrated sustained operational tempo with tunnel reconnections every 90 minutes. The compromise of a healthcare facility with exposed DICOM infrastructure underscores that the blast radius of these campaigns extends well beyond banking fraud.


Investigation conducted 2026-03-03. C2 relay monitored with root access for 5+ hours. All IOCs were live at time of analysis. This report contains the first public documentation of these samples.

References: HarfangLab -- AllaSenha | Cisco Talos -- CarnavalHeist | Malpedia -- AllaSenha

Share: