Lampion is a Windows banking trojan first documented in December 2019 and associated with the Brazilian ChePro malware lineage. It primarily targets Portuguese users and organizations, including government, financial services, transportation, and education. Its core functions include stealing banking credentials through fraudulent overlay windows, collecting host information, and providing remote access and data exfiltration. It monitors running processes and browser window titles for targeted banking services before displaying interfaces that impersonate the victim’s bank. Its operators have not been definitively identified.
Distribution commonly relies on Portuguese-language phishing emails impersonating tax authorities, banks, and private-sector organizations, using payment receipts, invoices, or administrative documents as lures. Infection chains use ZIP archives containing malicious scripts or HTML pages that imitate trusted services, including SAPO Transfer. Successive JavaScript and Visual Basic Script stages retrieve and execute a DLL-based payload. Campaigns have also adopted ClickFix prompts that persuade victims to execute malicious PowerShell commands, while newer distribution activity includes SEO poisoning and compromised websites. Persistence is established through scheduled tasks and Windows startup mechanisms.
Lampion uses extensive script obfuscation, encrypted strings, staged execution, and junk padding to impede detection and analysis. Some campaigns inflate the final DLL to approximately 750 MB and download it in chunks before reconstructing it locally. Host reconnaissance includes hardware fingerprinting and identification of installed security software. Anti-analysis checks include an x86 trap-flag technique that detects discrepancies in virtual-machine exception handling; affected samples terminate when a virtual environment is detected. Some variants retrieve a code-decryption key from a Google Docs document, making removal of that document an effective kill switch.
43 distinct techniques documented for this family, organized by ATT&CK tactic.
A combined 35% of social engineering cases involved less conventional methods, including SEO poisoning and malvertising, smishing and MFA bombing.
victims are directed to a fake SAPO portal
This piece of malware is known for the usage of the Portuguese Government Finance & Tax (Autoridade Tributária e Aduaneira) email templates to lure victims to install the malicious loader (a VBS file). However, fake templates of banking organizations in Portugal have been used by criminals to disseminate the threat in the wild.
Emails templates are delivering malicious PDFs impersonating banking organizations in Portugal to spread Lampion trojan.
The email sent to the recipient is sent a proof of payment and other documents, which are accessible at the URL hXXps://we[.]tl/t-pNvQIG8UJS. When the recipient interacts with the URL, they are directed to the page where they can download a ZIP file containing the documents referenced in the email.
another VBS ( jghfszcekwr.vbs ) is created with code responsible for executing the previous VBS file ( sznyetzkkg.vbs ) via a scheduled task also created by the 1st VBS loader.
A scheduled task is created with the service description and author Administrator user associated. This scheduled task will execute the second VBS file jghfszcekwr.vbs
Next, it will initiate a wscript process... Upon running the larger script, another wscript process is initiated.
The ClickFix lure tricks users into launching a PowerShell command that downloads an obfuscated VBScript (.vbs)... PowerShell continues to be the most leveraged native binary, with cmdlets such as iwr (Invoke-WebRequest), irm (Invoke-RestMethod), and iex (Invoke-Expression) being very prolific.
Creates a .cmd file into the Windows startup folder to maintain persistence.
the trojan loader – the VBS files – propagated along with the new campaign has significant differences.
The downloaded JavaScript is inserted into the page and executed without obvious warning signs.
Once the ZIP file is downloaded, its contents can be extracted to reveal a folder containing the two files seen in Figure 2. The VBS file... is the file of concern as this launches the script, to lead the malicious process.
Les pièces jointes sont des archives ZIP contenant des fichiers HTML fortement obfusqués... Le fichier HTML rend une fausse page SAPO Transfer et exécute du JavaScript
another VBS ( jghfszcekwr.vbs ) is created with code responsible for executing the previous VBS file ( sznyetzkkg.vbs ) via a scheduled task also created by the 1st VBS loader.
A scheduled task is created with the service description and author Administrator user associated. This scheduled task will execute the second VBS file jghfszcekwr.vbs
Creates a .cmd file into the Windows startup folder to maintain persistence.
Creates a .cmd file into the Windows startup folder to maintain persistence.
another VBS ( jghfszcekwr.vbs ) is created with code responsible for executing the previous VBS file ( sznyetzkkg.vbs ) via a scheduled task also created by the 1st VBS loader.
A scheduled task is created with the service description and author Administrator user associated. This scheduled task will execute the second VBS file jghfszcekwr.vbs
The P-17-4 DLL is then renamed when downloaded and injected into the memory via the DLL injection technique.
The final payload is a dynamic link library (DLL) functioning as a remote access Trojan (RAT), capable of injecting overlays into banking websites to steal credentials
Creates a .cmd file into the Windows startup folder to maintain persistence.
Creates a .cmd file into the Windows startup folder to maintain persistence.
criminals are enlarging the file size around 56 MB of junk to bypass its detection... The VBS file contains a lot of junk sequences, and after some rounds of code cleaning and deobfuscation, 31.7 MB of useless lines of code were removed.
Les pièces jointes sont des archives ZIP contenant des fichiers HTML fortement obfusqués (~1,3 Mo), artificiellement gonflés pour contourner la détection statique... DLL RAT (~750 Mo, gonflé artificiellement)
the 2nd DLL called “ soprateste.zip ” which is protected with a hardcoded password.
The strongest tactic taken would be spoofing a legitimate company, which could potentially be a result of compromised credentials.
The P-17-4 DLL is then renamed when downloaded and injected into the memory via the DLL injection technique.
The final payload is a dynamic link library (DLL) functioning as a remote access Trojan (RAT), capable of injecting overlays into banking websites to steal credentials
the Lampion Portuguese banking trojan used a Google Docs text document as the source for a key required to unlock some of its code—and deleting the document acted as a kill-switch.
“Final payloads are often ‘fileless’… launched in memory by living-off-the-land binaries (LOLBins)… code injected into LOLBins, such as msbuild.exe, regasm.exe, or powershell.exe… signs pointing to LOLBins—such as powershell, mshta, rundll32, wscript…”
C:\Windows\System32\rundll32.dll\”%AppData%\Local\Temp\rand_folder\random_name.dll” mJ8Lf9v0GZnptOVNB2I
Malware can detect whether it is executing in a physical or virtual machine (VM) by monitoring the response of the CPU after setting this single bit. ... When the malware finds out it is executing in a virtual machine, it will terminate its execution or provide fake outputs to hide its real intentions.
Some of the most common evasion techniques involve malware conducting various system checks against the environment it is executing in. For example, malware will often look for abnormal screen resolution, hard disk and physical memory size.
To determine whether a VM is used, malware can check whether the single-step exception was delivered to the correct CPU instruction, after executing specific instructions (e.g. CPUID, RDTSC, IN) that cause the VM to exit with the TF enabled.
The system checks are also intertwined with multiple anti-reverse engineering techniques to hide from human analysts.
By leveraging Google Docs, the actors behind Lampion were able to conceal controlling communications to the malware and evade reputation-based detection by using a trusted host.
If the title of the pages matches the hardcoded strings presented above, then it starts the malicious overlay process that presents fake messages and windows impersonating the target bank to lure the victims.
capable of injecting overlays into banking websites to steal credentials
When started, the trojan collects information about the opened processes on the target machine.
The final VBS component performs victim checks, gathers system information, and contacts command-and-control infrastructure for the next payload.
Malware can detect whether it is executing in a physical or virtual machine (VM) by monitoring the response of the CPU after setting this single bit. ... When the malware finds out it is executing in a virtual machine, it will terminate its execution or provide fake outputs to hide its real intentions.
Some of the most common evasion techniques involve malware conducting various system checks against the environment it is executing in. For example, malware will often look for abnormal screen resolution, hard disk and physical memory size.
To determine whether a VM is used, malware can check whether the single-step exception was delivered to the correct CPU instruction, after executing specific instructions (e.g. CPUID, RDTSC, IN) that cause the VM to exit with the TF enabled.
envoie un beacon Base64 au C2 (nom AV, nom d’hôte, empreinte machine)
The system checks are also intertwined with multiple anti-reverse engineering techniques to hide from human analysts.
If the title of the pages matches the hardcoded strings presented above, then it starts the malicious overlay process that presents fake messages and windows impersonating the target bank to lure the victims.
capable of injecting overlays into banking websites to steal credentials
The main goal of the DLL loader is just to unzip the 2nd DLL called “ soprateste.zip ” which is protected with a hardcoded password.
Inside was a roughly 1.3MB HTML document padded with meaningless code and random strings... These VBS scripts are also padded with junk data... The final DLL is around 750MB, but its size does not reflect genuine complexity.
follow-on VBS scripts, which establish persistence via scheduled tasks, connect to a remote command-and-control (C2) server
The final VBS component performs victim checks, gathers system information, and contacts command-and-control infrastructure for the next payload.
Frequently, droppers and loaders use legitimate websites and cloud services with built-in TLS support to further disguise the traffic.
2nd_stage_vbs ) that will download the Lampions’ final stage – two DLLs from AWS S3 buckets
malware operators have also been adopting TLS for essentially the same reasons: to prevent defenders from detecting and stopping deployment of malware and theft of data.
These payloads affect Windows and macOS devices and typically lead to information theft and data exfiltration.
71 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
23 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.