cookiengineer/antimiasma

:rocket: Miasma Malware Discovery and Mitigation Tool

16

stars

20

commits

Go

primary language

Aug 18, 2026

updated

README

Antimiasma

This is a Discovery and Mitigation Tool for the Miasma malware or Miasma worm which is distributed by TeamPCP also known as APT28/29.

Detailed Blogpost about the Miasma Malware:

https://cookie.engineer/weblog/articles/malware-insights-miasma-campaign.html

Download

If you don't have go installed, ready-to-use downloads are available in the Releases section on GitHub.

Usage

This shows how to:

  • discover infected repositories
  • mitigate infected repositories by removing the implants/tasks/scripts
antimiasma discover ~/Software; # shows a list of infected repositories
antimiasma mitigate ~/Software; # removes the miasma worm in all infected repositories

Testing

A minimal Miasma implant sample is available at miasma-sample. That repository contains the spreading mechanisms and infiltrated files, but not the actual malware implant.

If you're unsure whether antimiasma works on your system, you can clone the miasma-sample repository safely to test the antimiasma discover and antimiasma mitigate actions against it.

git clone https://github.com/cookiengineer/miasma-sample.git /tmp/miasma-sample;

# shows the /tmp/miasma-sample repository as infected
antimiasma discover /tmp;

# mitigates the infected repository
antimiasma mitigate /tmp;

Implementation Status

Take a look at the utils/miasma folder for implementation details.

PS: If you have a malware sample of ongoing miasma campaigns that are not supported, PLEASE don't hesitate to file an issue and send me the malware sample so that I can debug/reverse engineer it and add support for removal. Thank you!

NameTypeInfected FileDescriptionDiscoverMitigate
Claude CodeIDE.claude/settings.jsonexecutes on Claude Code session start[x][x]
CursorIDE.cursor/rules/setup.mdcexecutes on open of folder/repo in Cursor[x][x]
GeminiIDE.gemini/settings.jsonexecutes on Gemini session start[x][x]
VSCodeIDE.vscode/tasks.jsonexecutes on open of folder/repo in VS Code[x][x]
AURAUR PackagesPKGBUILD and *.installexecutes on prepare, build, install, package[x][2]
ComposerPHP Packagescomposer.jsonexecutes on composer run script[x][x]
GoGo Packagesgo.modexecutes on go generate and go buildNEED SAMPLENEED SAMPLE
NPMNPM Packagespackage.jsonexecutes on npx or npm run script[x][x]
PacmanPacman Packagesinstallexecutes on {pre,post}_{install,upgrade,remove}[x][2]
PIPPyPI Packages*-setup.pthexecutes on pip install of dependencies[x][1]
Miasma BlightBun Implant.github/setup.jsthe Miasma "Blight" campaign worm implant[x][x]
Miasma HadesBun Implant_index.jsthe Miasma "Hades" campaign worm implant[x][x]
Miasma AtomiceBPF Implantsrc/hook/depsthe Miasma "Atomic Arch" campaign worm implant[x][x]
Miasma HWGANPM Packagessetup.mjs, Math_Symbol.js, math_init.mjsthe Miasma "Here We Go Again" campaign worm implant[x][x]

[1] pip install commands use compressed whl files for distribution. The *-setup.pth cannot be detected. Only after an infected package already ran the malware payload, the Miasma implant can be removed.

[2] needs manual mitigation of already installed packages that were discovered in /var/lib/pacman/local/*.

Notes

This Mitigation Tool has been prototyped with an abliterated qwen3-coder:30b@Q8 running inside the exocomp Agentic Environment.

The Code has been carefully reviewed and verified by Cookie Engineer.

Please verify its correct behavior by running it against the Miasma Sample repository which contains safe-to-test samples that use the same mechanism but don't contain the actual malware dropper nor worm implant.

Acknowledgements

  • RedHat, for disclosing the breach very quickly and correctly
  • My cat, for emotional support during implementation
  • The Prodigy, for being the best music band of our time
  • Person of Interest and Michael Emerson, for the remnant inspiration for this with ICE9
  • TeamPCP, the assumed authors of Miasma, for making my weekend more fun

Reading Material

Miasma Blight Campaign:

Miasma Hades Campaign:

Miasma Atomic Campaign:

Miasma Here We Go Again Campaign:

License

AGPL-3.0

Contributors

cookiengineer

20 commits

cookiengineer/antimiasma

:rocket: Miasma Malware Discovery and Mitigation Tool

16

stars

20

commits

Go

primary language

Aug 18, 2026

updated

README

Antimiasma

This is a Discovery and Mitigation Tool for the Miasma malware or Miasma worm which is distributed by TeamPCP also known as APT28/29.

Detailed Blogpost about the Miasma Malware:

https://cookie.engineer/weblog/articles/malware-insights-miasma-campaign.html

Download

If you don't have go installed, ready-to-use downloads are available in the Releases section on GitHub.

Usage

This shows how to:

  • discover infected repositories
  • mitigate infected repositories by removing the implants/tasks/scripts
antimiasma discover ~/Software; # shows a list of infected repositories
antimiasma mitigate ~/Software; # removes the miasma worm in all infected repositories

Testing

A minimal Miasma implant sample is available at miasma-sample. That repository contains the spreading mechanisms and infiltrated files, but not the actual malware implant.

If you're unsure whether antimiasma works on your system, you can clone the miasma-sample repository safely to test the antimiasma discover and antimiasma mitigate actions against it.

git clone https://github.com/cookiengineer/miasma-sample.git /tmp/miasma-sample;

# shows the /tmp/miasma-sample repository as infected
antimiasma discover /tmp;

# mitigates the infected repository
antimiasma mitigate /tmp;

Implementation Status

Take a look at the utils/miasma folder for implementation details.

PS: If you have a malware sample of ongoing miasma campaigns that are not supported, PLEASE don't hesitate to file an issue and send me the malware sample so that I can debug/reverse engineer it and add support for removal. Thank you!

NameTypeInfected FileDescriptionDiscoverMitigate
Claude CodeIDE.claude/settings.jsonexecutes on Claude Code session start[x][x]
CursorIDE.cursor/rules/setup.mdcexecutes on open of folder/repo in Cursor[x][x]
GeminiIDE.gemini/settings.jsonexecutes on Gemini session start[x][x]
VSCodeIDE.vscode/tasks.jsonexecutes on open of folder/repo in VS Code[x][x]
AURAUR PackagesPKGBUILD and *.installexecutes on prepare, build, install, package[x][2]
ComposerPHP Packagescomposer.jsonexecutes on composer run script[x][x]
GoGo Packagesgo.modexecutes on go generate and go buildNEED SAMPLENEED SAMPLE
NPMNPM Packagespackage.jsonexecutes on npx or npm run script[x][x]
PacmanPacman Packagesinstallexecutes on {pre,post}_{install,upgrade,remove}[x][2]
PIPPyPI Packages*-setup.pthexecutes on pip install of dependencies[x][1]
Miasma BlightBun Implant.github/setup.jsthe Miasma "Blight" campaign worm implant[x][x]
Miasma HadesBun Implant_index.jsthe Miasma "Hades" campaign worm implant[x][x]
Miasma AtomiceBPF Implantsrc/hook/depsthe Miasma "Atomic Arch" campaign worm implant[x][x]
Miasma HWGANPM Packagessetup.mjs, Math_Symbol.js, math_init.mjsthe Miasma "Here We Go Again" campaign worm implant[x][x]

[1] pip install commands use compressed whl files for distribution. The *-setup.pth cannot be detected. Only after an infected package already ran the malware payload, the Miasma implant can be removed.

[2] needs manual mitigation of already installed packages that were discovered in /var/lib/pacman/local/*.

Notes

This Mitigation Tool has been prototyped with an abliterated qwen3-coder:30b@Q8 running inside the exocomp Agentic Environment.

The Code has been carefully reviewed and verified by Cookie Engineer.

Please verify its correct behavior by running it against the Miasma Sample repository which contains safe-to-test samples that use the same mechanism but don't contain the actual malware dropper nor worm implant.

Acknowledgements

  • RedHat, for disclosing the breach very quickly and correctly
  • My cat, for emotional support during implementation
  • The Prodigy, for being the best music band of our time
  • Person of Interest and Michael Emerson, for the remnant inspiration for this with ICE9
  • TeamPCP, the assumed authors of Miasma, for making my weekend more fun

Reading Material

Miasma Blight Campaign:

Miasma Hades Campaign:

Miasma Atomic Campaign:

Miasma Here We Go Again Campaign:

License

AGPL-3.0

Contributors

cookiengineer

20 commits

Languages

Go

93.8%

JavaScript

5.1%

Shell

1.1%