Skip to content
Tutorial emka
Menu
  • Home
  • Debian Linux
  • Ubuntu Linux
  • Red Hat Linux
Menu

Packagist Attacked! How to Detect Hidden Malware Like This?

Posted on May 24, 2026

Imagine you are building a giant tower out of different sets of building blocks. You trust the boxes you bought from the store, but what if one small piece inside a box was designed to knock the whole tower down once you finished? This is exactly what happened in a recent “coordinated” supply chain attack. Hackers hid malicious code inside popular programming building blocks, specifically targeting developers who use both PHP and JavaScript. It is a very clever trick that every young coder needs to understand to keep their projects safe.

Modern software development often involves using many different languages at once. For example, a developer might use PHP to handle the logic of a website and JavaScript to make the website look pretty and interactive. These developers use “package managers” like Composer for PHP and NPM for JavaScript to download pre-written code. Usually, if a developer is working on a PHP project, they carefully check their PHP settings. However, the attackers in this campaign were very sneaky. They added malicious code to a file called package.json, which is used by JavaScript, even though the main project was written in PHP. This is known as “cross-ecosystem placement.” Because security experts were busy looking at the PHP side of things, they almost missed the trap hidden in the JavaScript side.

The way this attack works is quite technical but very interesting. When you install a JavaScript library, the package.json file can contain something called a “postinstall script.” This is a command that runs automatically as soon as the download is finished. In this specific attack, the script was designed to reach out to the internet and download a secret file from a GitHub repository. This file was a Linux binary—a type of program that a computer can run. The script would then save this program into a hidden folder called /tmp/.sshd, change its permissions using a command called chmod so it could be executed, and then run it quietly in the background where the developer couldn’t see it.

One of the most dangerous parts of this attack is how it tried to stay hidden. The hackers named their malicious program “gvfsd-network.” This name was chosen specifically because it looks like a real, boring part of a Linux computer’s system responsible for networking. If a developer looked at their computer’s list of running programs, they might see it and think it was just a normal part of the operating system. Furthermore, the malicious script was set up to disable “TLS verification.” Usually, when your computer talks to a website, it checks a “security certificate” to make sure the website is who they say they are. By disabling this, the hackers made it easier for their malware to download without being blocked by security software.

The attack didn’t just stop at individual computers; it also targeted “GitHub Actions.” These are automated systems that test and build code in the cloud. Because the malware was hidden in the workflow files, it could infect the very tools used to create and distribute software, potentially spreading the “infection” to even more people. Several packages were affected, including versions of Silverstripe, Wave, and Genesis. While these specific malicious versions have been removed from the public library called Packagist, the threat remains because the same bad code has been found in hundreds of other files across GitHub. This shows us that we must always be vigilant and check every part of our project, not just the parts we are currently working on.

To make sure your own projects are safe from these kinds of hidden threats, you should follow a strict routine when adding new tools to your code. It is not enough to just hope the code is safe; you must verify it yourself.

Inspect your dependency files manually. Before running an installation command, open the configuration files to see what they are doing.

    • Open your project folder and locate the package.json file.
    • Scroll down to the section labeled "scripts".
    • Look specifically for entries like "preinstall", "install", or "postinstall".
    • If you see any long strings of code that use commands like curl, wget, chmod, or bash, and you didn’t put them there, do not run the installation.

    Monitor your background processes. Regularly check what is running on your machine to ensure no “secret” programs are active.

      • On a Linux or Mac computer, open the Terminal.
      • Type the command top or htp and press Enter.
      • Look for strange names, especially ones like gvfsd-network or programs running from the /tmp/ directory.
      • If you find something suspicious, you can stop it by finding its “PID” (Process ID) and typing kill -9 [PID].

      Use security scanning tools. There are professional tools designed to find these traps for you.

        • Open your terminal in your project directory.
        • For JavaScript files, type npm audit and press Enter. This will check your package.json against a list of known threats.
        • For PHP projects, use a tool like local-php-security-checker. Run it by typing the command in your terminal to see if any of your Composer packages have known holes.

        Audit your GitHub Workflows. If you use automation, check the instructions you gave the cloud.

          • Go to your project on GitHub.com.
          • Click on the folder named .github and then the folder named workflows.
          • Open each .yml file and read the lines starting with run:.
          • Ensure that no external scripts are being downloaded and executed during your build process without your permission.

          Staying safe in the world of programming requires a mix of curiosity and caution. As you grow as a developer, you will learn that the “supply chain”—the code written by others that you use in your own work—is a very powerful tool, but it must be handled with care. This recent attack on Packagist and GitHub serves as a reminder that threats can come from unexpected directions, such as a JavaScript file hiding inside a PHP project. Always keep your tools updated, use security scanners, and never be afraid to look closely at the code you are downloading. By being careful today, you protect the amazing things you will build tomorrow.

          Leave a Reply Cancel reply

          You must be logged in to post a comment.

          Recent Posts

          • Why Your Google Maps Wear OS Navigation Fails While Using Android Auto
          • Packagist Attacked! How to Detect Hidden Malware Like This?
          • Claude Mythos Keeps Find High-severity Flaws, What You Should You Do?
          • How to Secure Your PHP Applications Against the Recent Laravel-Lang Supply Chain Attack and Credential Stealers
          • How to Protect Your Server from the LiteSpeed cPanel Plugin Privilege Escalation Vulnerability
          • How to build a high-performance private photo cloud with Immich and TrueNAS SCALE
          • How to Build an Endgame Local AI Agent Setup Using an 8-Node NVIDIA Cluster with 1TB Memory
          • How to Master Windows Event Logs to Level Up Your Cybersecurity Investigations and SOC Career
          • How to Build Ultra-Resilient Databases with Amazon Aurora Global Database and RDS Proxy for Maximum Uptime and Performance
          • How to Build Real-Time Personalization Systems Using AWS Agentic AI to Make Every User Feel Special
          • How to Transform Your Windows 11 Interface into a Sleek and Modern Aesthetic Masterpiece
          • How to Understand Google’s New TPU 8 Series for Massive AI Training and Inference
          • How to Level Up Your PC Gaming Experience with the New Valve Steam Controller and Its Advanced Features
          • Is it Time to Replace Nano? Discover Fresh, the Terminal Text Editor You Actually Want to Use
          • How to Design a Services Like Google Ads
          • How to Fix 0x800ccc0b Outlook Error: Step-by-Step Guide for Beginners
          • How to Fix NVIDIA App Error on Windows 11: Simple Guide
          • How to Fix Excel Formula Errors: Quick Fixes for #NAME
          • How to Clear Copilot Memory in Windows 11 Step by Step
          • How to Show Battery Percentage on Windows 11
          • How to Fix VMSp Service Failed to Start on Windows 10/11
          • How to Fix Taskbar Icon Order in Windows 11/10
          • How to Disable Personalized Ads in Copilot on Windows 11
          • What is the Microsoft Teams Error “We Couldn’t Connect the Call” Error?
          • Why Does the VirtualBox System Service Terminate Unexpectedly? Here is the Full Definition
          • Inilah Usia Ideal Anak Masuk SD: 6 Tahun atau 7 Tahun atau 8 Tahun?
          • Cara Daftar Sekolah Maung 2026
          • Anak 6 Tahun Bisa Daftar SD! Kuota Prioritas Tetap Usia 7 Tahun?
          • Apa itu Pemetaan Calon Murid Baru di SPMB Jabar 2026, PCMB Bisa Pilih 1 atau 2 Jalur? Berapa Sekolah?
          • Ini Rekomendasi 15 SMA Swasta Terbaik di Bandung 2026
          • How to Automate Your Entire SEO Strategy Using a Swarm of 100 Free AI Agents Working in Parallel
          • How to create professional presentations easily using NotebookLM’s AI power for school projects and beyond
          • How to Master SEO Automation with Google Gemini 3.1 Flash-Lite in Google AI Studio
          • How to create viral AI video ads and complete brand assets using the Claude and Higgsfield MCP integration
          • How to Transform Your Mac Into a Supercharged AI Assistant with Perplexity Personal Computer
          • Apa itu Spear-Phishing via npm? Ini Pengertian dan Cara Kerjanya yang Makin Licin
          • Apa Itu Predator Spyware? Ini Pengertian dan Kontroversi Penghapusan Sanksinya
          • Mengenal Apa itu TONESHELL: Backdoor Berbahaya dari Kelompok Mustang Panda
          • Siapa itu Kelompok Hacker Silver Fox?
          • Apa itu CVE-2025-52691 SmarterMail? Celah Keamanan Paling Berbahaya Tahun 2025
          ©2026 Tutorial emka | Design: Newspaperly WordPress Theme