Malware Persistence

repo: Karneades/awesome-malware-persistence
category: Security


Awesome Malware Persistence Awesome

A curated list of awesome malware persistence tools and resources.

Malware persistence consists of techniques that adversaries use to keep access to systems across restarts, changed credentials, and other interruptions that could cut off their access. Techniques used for persistence include any access, action, or configuration changes that let them maintain their foothold on systems, such as replacing or hijacking legitimate code or adding startup code.

Main article about malware persistence with more context and information.

Contents

Techniques

Persistence techniques and detection.

Generic

  • MITRE ATT&CK tactic "TA0003 - Persistence" - Persistence tactic information in the MITRE ATT&CK framework.
  • Forensic Artifact repository - A free, community-sourced, machine-readable knowledge base of digital forensic artifacts.
  • Sigma rules - Repository of detection rules, covering persistence techniques as well. You can even use filters such as --filter tag=attack.persistence or specifically for one technique tag=attack.t1084.

Linux

macOS

Windows

Cloud

Firmware

Databases

Persistence Removal

Tools and commands for persistence mechanisms removal. Beside the tools mentioned below, use standard OS commands to remove the persistence.

Generic

Windows

  • PowerSponse - A incident response tool covering various commands for cleanup of persistence mechanisms as well.
  • [Removing Backdoors – Powershell Empire Edition](https://www.n00py.io/2017/01/removing-backdoors-powershell-empire-edition/) - Various blog posts handle the removal of WMI implants.
  • RegDelNull - Removal of registry keys with null bytes - used e.g. in run keys for evasion.

Detection Testing

Tools for testing detections. Use the techniques described in Persistence Techniques to create these files or add the configuration changes by hand to test your detections.

Generic

Linux

  • PANIX - A highly customizable Linux persistence tool. Perform various persistence techniques against Linux systems, among others Debian and RHEL.
  • Diamorphine - A loadable kernel module (LKM) rootkit for Linux Kernels (x86/x86_64 and ARM64).

macOS

  • PoisonApple - Perform various persistence techniques on macOS.

Windows

Prevention

Tools for preventing malicious persistence.

macOS

  • BlockBlock - A tool which provides continual protection by monitoring persistence locations and protects them accordingly. Similar to KnockKnock but for blocking.

Collection

Tools for persistence collection.

Generic

  • Awesome Forensics - Use the tools from this list which includes awesome free (mostly open source) forensic analysis tools and resources. They help collecting the persistence mechanisms at scale, e.g. by using remote forensics tools.
  • osquery - Query persistence mechanisms on clients.
  • OSSEC - Use rules and logs from the HIDS to detection configuration changes.

Linux

There is no dedicated persistence collection tool for Linux I'm aware of. Use some of the tools from #General or standard OS commands for collection. Thanks for contributing links to Linux specific persistence collection tools.

  • [Linux Security and Monitoring Scripts](https://github.com/sqall01/LSMS) - Security and monitoring scripts you can use to monitor your Linux installation for security-related events or for an investigation. Among other finding systemd unit files used for malware persistence.

macOS

Windows

Contributing

Contributions welcome! Read the contribution guidelines first.

[[curator]]
I'm the Curator. I can help you navigate, organize, and curate this wiki. What would you like to do?