[
  {
    "path": ".gitignore",
    "content": "*.swp\n"
  },
  {
    "path": "LICENSE",
    "content": "Attribution-ShareAlike 4.0 International\n\n=======================================================================\n\nCreative Commons Corporation (\"Creative Commons\") is not a law firm and\ndoes not provide legal services or legal advice. Distribution of\nCreative Commons public licenses does not create a lawyer-client or\nother relationship. Creative Commons makes its licenses and related\ninformation available on an \"as-is\" basis. Creative Commons gives no\nwarranties regarding its licenses, any material licensed under their\nterms and conditions, or any related information. Creative Commons\ndisclaims all liability for damages resulting from their use to the\nfullest extent possible.\n\nUsing Creative Commons Public Licenses\n\nCreative Commons public licenses provide a standard set of terms and\nconditions that creators and other rights holders may use to share\noriginal works of authorship and other material subject to copyright\nand certain other rights specified in the public license below. The\nfollowing considerations are for informational purposes only, are not\nexhaustive, and do not form part of our licenses.\n\n     Considerations for licensors: Our public licenses are\n     intended for use by those authorized to give the public\n     permission to use material in ways otherwise restricted by\n     copyright and certain other rights. Our licenses are\n     irrevocable. Licensors should read and understand the terms\n     and conditions of the license they choose before applying it.\n     Licensors should also secure all rights necessary before\n     applying our licenses so that the public can reuse the\n     material as expected. Licensors should clearly mark any\n     material not subject to the license. This includes other CC-\n     licensed material, or material used under an exception or\n     limitation to copyright. More considerations for licensors:\n\twiki.creativecommons.org/Considerations_for_licensors\n\n     Considerations for the public: By using one of our public\n     licenses, a licensor grants the public permission to use the\n     licensed material under specified terms and conditions. If\n     the licensor's permission is not necessary for any reason--for\n     example, because of any applicable exception or limitation to\n     copyright--then that use is not regulated by the license. Our\n     licenses grant only permissions under copyright and certain\n     other rights that a licensor has authority to grant. Use of\n     the licensed material may still be restricted for other\n     reasons, including because others have copyright or other\n     rights in the material. A licensor may make special requests,\n     such as asking that all changes be marked or described.\n     Although not required by our licenses, you are encouraged to\n     respect those requests where reasonable. More_considerations\n     for the public:\n\twiki.creativecommons.org/Considerations_for_licensees\n\n=======================================================================\n\nCreative Commons Attribution-ShareAlike 4.0 International Public\nLicense\n\nBy exercising the Licensed Rights (defined below), You accept and agree\nto be bound by the terms and conditions of this Creative Commons\nAttribution-ShareAlike 4.0 International Public License (\"Public\nLicense\"). To the extent this Public License may be interpreted as a\ncontract, You are granted the Licensed Rights in consideration of Your\nacceptance of these terms and conditions, and the Licensor grants You\nsuch rights in consideration of benefits the Licensor receives from\nmaking the Licensed Material available under these terms and\nconditions.\n\n\nSection 1 -- Definitions.\n\n  a. Adapted Material means material subject to Copyright and Similar\n     Rights that is derived from or based upon the Licensed Material\n     and in which the Licensed Material is translated, altered,\n     arranged, transformed, or otherwise modified in a manner requiring\n     permission under the Copyright and Similar Rights held by the\n     Licensor. For purposes of this Public License, where the Licensed\n     Material is a musical work, performance, or sound recording,\n     Adapted Material is always produced where the Licensed Material is\n     synched in timed relation with a moving image.\n\n  b. Adapter's License means the license You apply to Your Copyright\n     and Similar Rights in Your contributions to Adapted Material in\n     accordance with the terms and conditions of this Public License.\n\n  c. BY-SA Compatible License means a license listed at\n     creativecommons.org/compatiblelicenses, approved by Creative\n     Commons as essentially the equivalent of this Public License.\n\n  d. Copyright and Similar Rights means copyright and/or similar rights\n     closely related to copyright including, without limitation,\n     performance, broadcast, sound recording, and Sui Generis Database\n     Rights, without regard to how the rights are labeled or\n     categorized. For purposes of this Public License, the rights\n     specified in Section 2(b)(1)-(2) are not Copyright and Similar\n     Rights.\n\n  e. Effective Technological Measures means those measures that, in the\n     absence of proper authority, may not be circumvented under laws\n     fulfilling obligations under Article 11 of the WIPO Copyright\n     Treaty adopted on December 20, 1996, and/or similar international\n     agreements.\n\n  f. Exceptions and Limitations means fair use, fair dealing, and/or\n     any other exception or limitation to Copyright and Similar Rights\n     that applies to Your use of the Licensed Material.\n\n  g. License Elements means the license attributes listed in the name\n     of a Creative Commons Public License. The License Elements of this\n     Public License are Attribution and ShareAlike.\n\n  h. Licensed Material means the artistic or literary work, database,\n     or other material to which the Licensor applied this Public\n     License.\n\n  i. Licensed Rights means the rights granted to You subject to the\n     terms and conditions of this Public License, which are limited to\n     all Copyright and Similar Rights that apply to Your use of the\n     Licensed Material and that the Licensor has authority to license.\n\n  j. Licensor means the individual(s) or entity(ies) granting rights\n     under this Public License.\n\n  k. Share means to provide material to the public by any means or\n     process that requires permission under the Licensed Rights, such\n     as reproduction, public display, public performance, distribution,\n     dissemination, communication, or importation, and to make material\n     available to the public including in ways that members of the\n     public may access the material from a place and at a time\n     individually chosen by them.\n\n  l. Sui Generis Database Rights means rights other than copyright\n     resulting from Directive 96/9/EC of the European Parliament and of\n     the Council of 11 March 1996 on the legal protection of databases,\n     as amended and/or succeeded, as well as other essentially\n     equivalent rights anywhere in the world.\n\n  m. You means the individual or entity exercising the Licensed Rights\n     under this Public License. Your has a corresponding meaning.\n\n\nSection 2 -- Scope.\n\n  a. License grant.\n\n       1. Subject to the terms and conditions of this Public License,\n          the Licensor hereby grants You a worldwide, royalty-free,\n          non-sublicensable, non-exclusive, irrevocable license to\n          exercise the Licensed Rights in the Licensed Material to:\n\n            a. reproduce and Share the Licensed Material, in whole or\n               in part; and\n\n            b. produce, reproduce, and Share Adapted Material.\n\n       2. Exceptions and Limitations. For the avoidance of doubt, where\n          Exceptions and Limitations apply to Your use, this Public\n          License does not apply, and You do not need to comply with\n          its terms and conditions.\n\n       3. Term. The term of this Public License is specified in Section\n          6(a).\n\n       4. Media and formats; technical modifications allowed. The\n          Licensor authorizes You to exercise the Licensed Rights in\n          all media and formats whether now known or hereafter created,\n          and to make technical modifications necessary to do so. The\n          Licensor waives and/or agrees not to assert any right or\n          authority to forbid You from making technical modifications\n          necessary to exercise the Licensed Rights, including\n          technical modifications necessary to circumvent Effective\n          Technological Measures. For purposes of this Public License,\n          simply making modifications authorized by this Section 2(a)\n          (4) never produces Adapted Material.\n\n       5. Downstream recipients.\n\n            a. Offer from the Licensor -- Licensed Material. Every\n               recipient of the Licensed Material automatically\n               receives an offer from the Licensor to exercise the\n               Licensed Rights under the terms and conditions of this\n               Public License.\n\n            b. Additional offer from the Licensor -- Adapted Material.\n               Every recipient of Adapted Material from You\n               automatically receives an offer from the Licensor to\n               exercise the Licensed Rights in the Adapted Material\n               under the conditions of the Adapter's License You apply.\n\n            c. No downstream restrictions. You may not offer or impose\n               any additional or different terms or conditions on, or\n               apply any Effective Technological Measures to, the\n               Licensed Material if doing so restricts exercise of the\n               Licensed Rights by any recipient of the Licensed\n               Material.\n\n       6. No endorsement. Nothing in this Public License constitutes or\n          may be construed as permission to assert or imply that You\n          are, or that Your use of the Licensed Material is, connected\n          with, or sponsored, endorsed, or granted official status by,\n          the Licensor or others designated to receive attribution as\n          provided in Section 3(a)(1)(A)(i).\n\n  b. Other rights.\n\n       1. Moral rights, such as the right of integrity, are not\n          licensed under this Public License, nor are publicity,\n          privacy, and/or other similar personality rights; however, to\n          the extent possible, the Licensor waives and/or agrees not to\n          assert any such rights held by the Licensor to the limited\n          extent necessary to allow You to exercise the Licensed\n          Rights, but not otherwise.\n\n       2. Patent and trademark rights are not licensed under this\n          Public License.\n\n       3. To the extent possible, the Licensor waives any right to\n          collect royalties from You for the exercise of the Licensed\n          Rights, whether directly or through a collecting society\n          under any voluntary or waivable statutory or compulsory\n          licensing scheme. In all other cases the Licensor expressly\n          reserves any right to collect such royalties.\n\n\nSection 3 -- License Conditions.\n\nYour exercise of the Licensed Rights is expressly made subject to the\nfollowing conditions.\n\n  a. Attribution.\n\n       1. If You Share the Licensed Material (including in modified\n          form), You must:\n\n            a. retain the following if it is supplied by the Licensor\n               with the Licensed Material:\n\n                 i. identification of the creator(s) of the Licensed\n                    Material and any others designated to receive\n                    attribution, in any reasonable manner requested by\n                    the Licensor (including by pseudonym if\n                    designated);\n\n                ii. a copyright notice;\n\n               iii. a notice that refers to this Public License;\n\n                iv. a notice that refers to the disclaimer of\n                    warranties;\n\n                 v. a URI or hyperlink to the Licensed Material to the\n                    extent reasonably practicable;\n\n            b. indicate if You modified the Licensed Material and\n               retain an indication of any previous modifications; and\n\n            c. indicate the Licensed Material is licensed under this\n               Public License, and include the text of, or the URI or\n               hyperlink to, this Public License.\n\n       2. You may satisfy the conditions in Section 3(a)(1) in any\n          reasonable manner based on the medium, means, and context in\n          which You Share the Licensed Material. For example, it may be\n          reasonable to satisfy the conditions by providing a URI or\n          hyperlink to a resource that includes the required\n          information.\n\n       3. If requested by the Licensor, You must remove any of the\n          information required by Section 3(a)(1)(A) to the extent\n          reasonably practicable.\n\n  b. ShareAlike.\n\n     In addition to the conditions in Section 3(a), if You Share\n     Adapted Material You produce, the following conditions also apply.\n\n       1. The Adapter's License You apply must be a Creative Commons\n          license with the same License Elements, this version or\n          later, or a BY-SA Compatible License.\n\n       2. You must include the text of, or the URI or hyperlink to, the\n          Adapter's License You apply. You may satisfy this condition\n          in any reasonable manner based on the medium, means, and\n          context in which You Share Adapted Material.\n\n       3. You may not offer or impose any additional or different terms\n          or conditions on, or apply any Effective Technological\n          Measures to, Adapted Material that restrict exercise of the\n          rights granted under the Adapter's License You apply.\n\n\nSection 4 -- Sui Generis Database Rights.\n\nWhere the Licensed Rights include Sui Generis Database Rights that\napply to Your use of the Licensed Material:\n\n  a. for the avoidance of doubt, Section 2(a)(1) grants You the right\n     to extract, reuse, reproduce, and Share all or a substantial\n     portion of the contents of the database;\n\n  b. if You include all or a substantial portion of the database\n     contents in a database in which You have Sui Generis Database\n     Rights, then the database in which You have Sui Generis Database\n     Rights (but not its individual contents) is Adapted Material,\n\n     including for purposes of Section 3(b); and\n  c. You must comply with the conditions in Section 3(a) if You Share\n     all or a substantial portion of the contents of the database.\n\nFor the avoidance of doubt, this Section 4 supplements and does not\nreplace Your obligations under this Public License where the Licensed\nRights include other Copyright and Similar Rights.\n\n\nSection 5 -- Disclaimer of Warranties and Limitation of Liability.\n\n  a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE\n     EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS\n     AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF\n     ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,\n     IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,\n     WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR\n     PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,\n     ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT\n     KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT\n     ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.\n\n  b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE\n     TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,\n     NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,\n     INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,\n     COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR\n     USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN\n     ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR\n     DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR\n     IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.\n\n  c. The disclaimer of warranties and limitation of liability provided\n     above shall be interpreted in a manner that, to the extent\n     possible, most closely approximates an absolute disclaimer and\n     waiver of all liability.\n\n\nSection 6 -- Term and Termination.\n\n  a. This Public License applies for the term of the Copyright and\n     Similar Rights licensed here. However, if You fail to comply with\n     this Public License, then Your rights under this Public License\n     terminate automatically.\n\n  b. Where Your right to use the Licensed Material has terminated under\n     Section 6(a), it reinstates:\n\n       1. automatically as of the date the violation is cured, provided\n          it is cured within 30 days of Your discovery of the\n          violation; or\n\n       2. upon express reinstatement by the Licensor.\n\n     For the avoidance of doubt, this Section 6(b) does not affect any\n     right the Licensor may have to seek remedies for Your violations\n     of this Public License.\n\n  c. For the avoidance of doubt, the Licensor may also offer the\n     Licensed Material under separate terms or conditions or stop\n     distributing the Licensed Material at any time; however, doing so\n     will not terminate this Public License.\n\n  d. Sections 1, 5, 6, 7, and 8 survive termination of this Public\n     License.\n\n\nSection 7 -- Other Terms and Conditions.\n\n  a. The Licensor shall not be bound by any additional or different\n     terms or conditions communicated by You unless expressly agreed.\n\n  b. Any arrangements, understandings, or agreements regarding the\n     Licensed Material not stated herein are separate from and\n     independent of the terms and conditions of this Public License.\n\n\nSection 8 -- Interpretation.\n\n  a. For the avoidance of doubt, this Public License does not, and\n     shall not be interpreted to, reduce, limit, restrict, or impose\n     conditions on any use of the Licensed Material that could lawfully\n     be made without permission under this Public License.\n\n  b. To the extent possible, if any provision of this Public License is\n     deemed unenforceable, it shall be automatically reformed to the\n     minimum extent necessary to make it enforceable. If the provision\n     cannot be reformed, it shall be severed from this Public License\n     without affecting the enforceability of the remaining terms and\n     conditions.\n\n  c. No term or condition of this Public License will be waived and no\n     failure to comply consented to unless expressly agreed to by the\n     Licensor.\n\n  d. Nothing in this Public License constitutes or may be interpreted\n     as a limitation upon, or waiver of, any privileges and immunities\n     that apply to the Licensor or You, including from the legal\n     processes of any jurisdiction or authority.\n\n\n=======================================================================\n\nCreative Commons is not a party to its public\nlicenses. Notwithstanding, Creative Commons may elect to apply one of\nits public licenses to material it publishes and in those instances\nwill be considered the “Licensor.” The text of the Creative Commons\npublic licenses is dedicated to the public domain under the CC0 Public\nDomain Dedication. Except for the limited purpose of indicating that\nmaterial is shared under a Creative Commons public license or as\notherwise permitted by the Creative Commons policies published at\ncreativecommons.org/policies, Creative Commons does not authorize the\nuse of the trademark \"Creative Commons\" or any other trademark or logo\nof Creative Commons without its prior written consent including,\nwithout limitation, in connection with any unauthorized modifications\nto any of its public licenses or any other arrangements,\nunderstandings, or agreements concerning use of licensed material. For\nthe avoidance of doubt, this paragraph does not form part of the\npublic licenses.\n\nCreative Commons may be contacted at creativecommons.org.\n"
  },
  {
    "path": "README.md",
    "content": "**An awesome list with only the links is found on [awesome-malware-persistence](https://github.com/Karneades/awesome-malware-persistence).**\n\n---\n\n# Collection of malware persistence information\n\nThis repository collects various currently scattered information regarding the\ndetection, the response and the log collection of malware persistence\nmechanisms.\n\nIn short, we look for one of the things which is so common between different\nmalware families: the ability to persist on a target host. Also malware\nassociated with the misleading term \"fileless\" often persists on the target\ntoo, though not through regular files on the file system but through changes\nin configuration files like Windows Registry or cron jobs.\n\nUnfortunately, many malware blog posts include all the various IP and hash\ninformation but only a few highlight the persistence mechanism from an attack,\ndespite that it's one of the more static and more difficult to change\ninformation from an attacker's perspective. Using the persistence mechanism to\nhunt for malware is more robust than the more frequently changed IP addresses\nor hashes.\n\nIf you're only looking for an overview about persistence techniques and some\nlinks to useful resources then see [Overview of commonly used persistence mechanisms](#overview-of-commonly-used-persistence-mechanisms) and [links and resources for detection](#links-and-resources-for-detection). See section [tools](#tools) for some well-known persistence collection tools.\n\nThis repository is regularly updated with new detection resources and tools.\nIf you have inputs then [pull requests](https://github.com/Karneades/malware-persistence/pulls) are more then welcome!\n\n<!-- vim-markdown-toc GFM -->\n\n* [Why bothering with malware persistence?](#why-bothering-with-malware-persistence)\n* [Detection](#detection)\n    * [Approach](#approach)\n    * [Overview of commonly used persistence mechanisms](#overview-of-commonly-used-persistence-mechanisms)\n        * [Linux](#linux)\n        * [MacOS](#macos)\n        * [Windows](#windows)\n        * [Cloud](#cloud)\n        * [All OSes and developer specific changes](#all-oses-and-developer-specific-changes)\n    * [Overview of difficult to detect persistence mechanisms](#overview-of-difficult-to-detect-persistence-mechanisms)\n    * [Persistence through UEFI malware and bootkits](#persistence-through-uefi-malware-and-bootkits)\n    * [Links and resources for detection](#links-and-resources-for-detection)\n    * [Examples](#examples)\n* [Detection Evasion](#detection-evasion)\n* [Testing](#testing)\n* [Response](#response)\n* [Prevention](#prevention)\n* [Tools](#tools)\n    * [Linux](#linux-1)\n    * [MacOS](#macos-1)\n    * [Windows](#windows-1)\n* [Acknowledgement](#acknowledgement)\n\n<!-- vim-markdown-toc -->\n\n## Why bothering with malware persistence?\n\nIf you are an incident responder and have to analyze compromised hosts, do a\ngeneric compromise assessment or if you do threat hunting activities in your\ninfrastructure, then you should get into the topic of persistence mechanisms as\none way to detect known or unknown malware. It's one of the pieces for looking\nfor during IR activities.\n\nLet's start with the [persistence\ntechnique](https://attack.mitre.org/tactics/TA0003/) description used by\n[MITRE](https://attack.mitre.org/):\n>  The adversary is trying to maintain their foothold.\n>\n> Persistence consists of techniques that adversaries use to keep \n> access to systems across restarts, changed credentials, and other \n> interruptions that could cut off their access. Techniques used for \n> persistence include any access, action, or configuration changes that \n> let them maintain their foothold on systems, such as replacing or \n> hijacking legitimate code or adding startup code. \n\nOne thing in common between different malware families is that they \n(mostly) try to persist on the target host. Malware associated with the\nmisleading term \"fileless\" often persists on the target too, though not through\nregular files on the file system but through changes in configuration files\nlike Windows Registry or cron jobs.\n\nWhy use the word _mostly_ above? Because there is rare malware which omit\nsetting persistence mechanism on the victim's host itself but reinfect the host\nafter reboot from another system (e.g. DC, where the system is running longtime\non which no persistence is needed at all).\n\nThis gold mine of malware persistence information is a fraction of what other\nlog sources produce. Tens to hundreds of events depending of what you looking\nfor versus thousand to ten thousands of entries for process information.\nTherefore, the analysis of these events reduce the time and the effort\ncompared to other log sources considerably. The signal to noise ratio is also\nmuch lower.\n\nSo, by becoming and being a persistent persistence hunter, you can make use of\nthis treasury. Though not that kind of persistence hunting described in\n[Wikipedia](https://en.wikipedia.org/wiki/Persistence_hunting)...\n> Persistence hunting (sometimes called endurance hunting) is a hunting\n> technique in which hunters, who may be slower than their prey over short\n> distances, use a combination of running, walking, and tracking to pursue prey\n> until it is exhausted. A persistence hunter must be able to run a long\n> distance over an extended period of time. \n\n## Detection\n\nWhile there are many ways how malware can persist on a host, malware authors\nrely mostly on a handful of techniques. Beside these often used techniques\nsome malware families and more targeted attacks use more advanced mechanisms\nto stay hidden on the system.\n\nKeep in mind that for some persistence techniques escalated privileges are\nrequired and therefore malware running under normal users (and privilege\nescalation left out of consideration) can only set \"user mode\" persistence. So\nif the user on the infected host only use a normal user account then first\nfocus on the user level persistence and secondly look for system level\ntechniques.\n\n### Approach\n\nThe analysis process could involve these steps, as with other incident\nresponse and threat hunting procedures:\n1. Collect the persistence mechanisms using single commands for specific\n   techniques (see [links and resources for\n   detection](#links-and-resources-for-detection)) or use tools for collection\n   of a bunch of them at the same time, see [tools](#tools).\n2. Analyse the command, file hash, file signer and file path information and\n   enrich the information with more information from external services (AV\n   detection rate, correlation with other files, reputation, signer\n   information, known-bad hash check).\n3. If the output doesn't help, check the information against other clients in your\n   infrastructure: Is this entry found on other hosts too?\n4. Look for anomalies, e.g. an exe file in startup folder where normally only\n   .lnk files should be placed is suspicious or look for IP addresses or web\n   request in cronjobs. See the links below for detection ideas.\n5. In the process of the analysis it is important to note too what is NOT found\n   (evidence of absence) and not only what is found, e.g. no cron jobs were\n   found at all.\n\n### Overview of commonly used persistence mechanisms\n\nThe used techniques varies from user land persistence mechanisms, to system\nlevel persistence, from hiding behind common binary names, to putting malware\nat unusual but lesser known places. Sometimes only a proxy or other network\nconfiguration (i.a. DNS settings) changes were found after infection. Retefe used\nthe latter.\n\nUse the information from section [links and resources for\ndetection](#links-and-resources-for-detection) for specific information for\nthese techniques.\n\n#### Linux\n* Often used techniques: startup, rc and init scripts, cron jobs, shell scripts, shell profiles.\n* In-depth analysis should further include less frequently used techniques:\n  malicious libraries, loadable kernal modules (LKM), binary replacements or network scripts.\n\n#### MacOS\n* Often used techniques: launch daemons and agents, startup items, shell scripts, shell profiles.\n* In-depth analysis should further include less frequently used techniques: Dylib hijacking.\n\n#### Windows\n* Often used techniques: registry run keys, scheduled tasks, services, startup folder.\n* In-depth analysis should further include less frequently used techniques: \n  e.g. file handler hijacking (check both HKLM and HKCU), WMI implants, DLL side loading, malicious\n  drivers, LNK files, sneaky way to get persistence through RDP\n  connections on Windows is the use of image hijacks, sometimes known as\n  \"sticky keys hijacking\" or known as technique \"Accessibility Features\" in\n  the ATT&CK Matrix, COM Hijacking (check both HKLM and HKCU).\n\n#### Cloud\n* [Shadow Linking: The Persistence Vector of SaaS Identity Threat](https://www.obsidiansecurity.com/blog/shadow-linking-the-persistence-vector-of-saas-identity-threat/)\n* [Persisting on Entra ID applications and User Managed Identities with Federated Credentials](https://dirkjanm.io/persisting-with-federated-credentials-entra-apps-managed-identities/)\n* Mapping storage volumes to external storage providers.\n* [AWSDoor: Persistence on AWS](https://github.com/OtterHacker/AWSDoor) - Access persistence tool for AWS. The [corresponding article](https://www.riskinsight-wavestone.com/en/2025/09/awsdoor-persistence-on-aws/) describes the techniques adversaries can use to hide themselves within a cloud environment and its AWSDoor implementation to simplify and automate the deployment of persistence techniques in AWS environments.\n\n#### All OSes and developer specific changes\n* Proxy and other network configuration changes, backdoor accounts\n      and shortcut modifications.\n* Developer workstations: e.g. modified IDE software and git hook scripts.\n\n### Overview of difficult to detect persistence mechanisms\n\n* Malware which omit setting persistence at all on the victim's host but\n  reinfect the host after reboot from another system, e.g. from a DC (a\n  system which is running long time and no persistence is needed at all).\n* Persistence, e.g. through registry run keys, is only set shortly before\n  the shutdown command (shutdown command is hooked). Used in Dridex malware\n  in the past. Cool thing, if you knew that, you could cold boot the\n  computer and \"deactivate\" Dridex.\n* Abuse of hooked file handler.\n* DLL side loading (file can be anywhere on the system).\n* Legitimate binary replacement.\n* Firmware changes preventing getting rid of malware by normal patching. [Example](https://krebsonsecurity.com/2023/06/barracuda-urges-replacing-not-patching-its-email-security-gateways/).\n* Database triggers preventing getting rid of malicious access by restoring a backup: [The Attack Vector: Database Triggers as Persistence Mechanisms](https://www.trustwave.com/en-us/resources/blogs/spiderlabs-blog/the-attack-vector-database-triggers-as-persistence-mechanisms/).\n\n### Persistence through UEFI malware and bootkits\n\n* (UEFI) firmware malware, bootkits or modified kernel images. These can be \n  detected by checking the signed binaries from the client (Secure Boot). See\n  [MoonBounce: the dark side of UEFI\n  firmware](https://securelist.com/moonbounce-the-dark-side-of-uefi-firmware/105468)\n  for a in depth write up about one particular UEFI bootkit.\n   * _Analysis has shown that a single component within the inspected\n     firmware’s image was modified by attackers in a way that allowed them to\n     intercept the original execution flow of the machine’s boot sequence and\n     introduce a sophisticated infection chain._\n   * See section \"Revisiting the current state of the art in persistent\n     attacks\" for a brief history of UEFI malware. From this section: _In the\n     last year, there have been several public accounts on the ongoing trend of\n     UEFI threats. Notable examples include the UEFI bootkit used as part of\n     the FinSpy surveillance toolset that we reported on, the work of our\n     colleagues from ESET on the ESPectre bootkit, and a little-known threat\n     activity that was discovered within government organisations in the Middle\n     East, using a UEFI bootkit of its own [...] MoonBounce is notable for\n     being the third publicly revealed case of an implant from the latter class\n     of firmware-based rootkits. Previous cases included LoJax and\n     MosaicRegressor, which we reported on during October 2020._\n\n### Links and resources for detection\n\nThe following resources cover a lot of persistence techniques and more\ninformation on how to detect these specific mechanisms.\n\n#### MITRE ATT&CK tactic \"TA0003 - Persistence\"\n\nOne of the most comprehensive lists of persistence techniques is the list\nfound in [MITRE ATT&CK tactic \"TA0003 - Persistence\"](https://attack.mitre.org/tactics/TA0003/).\nBesides a description, different mitigations and a detection section is provided. Furthermore, \nthe involved actors using these techniques are listed on the page.\n\nURL: https://attack.mitre.org/tactics/TA0003/\n\n#### Hexacorn's blog persistence category\n\nA second gold mine for persistence information is found on [Hexacorn's\nblog](http://www.hexacorn.com/blog/category/autostart-persistence/) where\nregularly and since long time new techniques and blog posts about persistence\nmechanisms are published, crazy stuff. You'll also find there the legendary\nseries \"Beyond good ol’ Run key\".\n\nURL: http://www.hexacorn.com/blog/category/autostart-persistence/\n\n#### theevilbit's series \"Beyond the good ol' LaunchAgents\"\n\nSeries about persistence on macOS beyond just the LaunchDaemons or \nLaunchAgents directories. In the [introduction](https://theevilbit.github.io/beyond/beyond_intro/) \nit's also refered to Pasquale Stirparo's posts ([here](https://isc.sans.edu/forums/diary/Beyond+good+ol+LaunchAgent+part+0/24230/) and [here](https://isc.sans.edu/forums/diary/Beyond+good+ol+LaunchAgent+part+1/24274/)) with the name\n*Beyond the good ol' LaunchAgent* from 2018.\n\nURL: https://theevilbit.github.io/tags/beyond/\n\n#### Forensic artifact repository\n\nThe [forensic artifact\nrepository](https://github.com/ForensicArtifacts/artifacts) covers different\nartifacts regarding persistence for different OSes. See yaml files for MacOS,\nLinux and Windows in the\n[data](https://github.com/ForensicArtifacts/artifacts/tree/master/data)\ndirectory.\n\nURL: https://github.com/ForensicArtifacts/artifacts\n\n#### Sigma rules\n\n[Sigma rules](https://github.com/Neo23x0/sigma/tree/master/rules) also include\nvarious rules regarding persistence. [Search for persistence rules in Sigma\nrepository](https://github.com/Neo23x0/sigma/search?q=persistence&unscoped_q=persistence)\nor use the filter options of Sigma for either MITRE ATT&CK persistence\ncategory itself or for one specific technique:\n\n```\nsigmac --recurse --filter tag=attack.persistence --target splunk --config config/splunk-windows.yml rules\n\nsigmac --recurse --filter tag=attack.t1084 --target splunk --config config/splunk-windows.yml rules\n```\n\nURL: https://github.com/Neo23x0/sigma/search?q=persistence&unscoped_q=persistence\n\n#### Autoruns\n\nYou can learn which Windows persistence mechanisms are possible by looking at\nthe output of Autoruns on your own client (see also [tools](#tools)). In the\noutput you see the categories and the different locations where things were\nfound. To see which entries Autoruns scans at all, you can start a\ndisassembler and look at the strings found in the binary, this covers only a\nsubset.\n\nURL: http://technet.microsoft.com/en-us/sysinternals/bb963902\n\nAnother way to find Windows persistence information is to look at the [PowerShell implementation of Autoruns, where the\nlocations are found in the source code]( https://github.com/p0w3rsh3ll/AutoRuns/blob/master/AutoRuns.psm1). Bonus: A [history of the covered persistence locations for each version](https://github.com/p0w3rsh3ll/AutoRuns/blob/master/AutoRuns.psm1#L2824) is found there too, which is awesome!\n\nURL:  https://github.com/p0w3rsh3ll/AutoRuns/blob/master/AutoRuns.psm1\n\n#### KnockKnock\n\nFor macOS there's the KnockKnock persistence tool to look for persistence mechanisms: https://github.com/objective-see/KnockKnock. Specific persistence locations are found in the [plugins](https://github.com/objective-see/KnockKnock/tree/main/Plugins) folder, e.g. [LaunchItems](https://github.com/objective-see/KnockKnock/blob/main/Plugins/LaunchItems.m#L21) or [StartupScripts](https://github.com/objective-see/KnockKnock/blob/main/Plugins/StartupScripts.m#L22).\n\n#### PoisonApple\n\n[PoisonApple](https://github.com/CyborgSecurity/PoisonApple/) is a command-line tool to perform various persistence mechanism techniques on macOS. This tool was designed to be used by threat hunters for cyber threat emulation purposes. Learn about various macOS persistence techniques by looking at the [source code of PoisonApple](https://github.com/CyborgSecurity/PoisonApple/blob/master/poisonapple/techniques.py).\n\n#### PANIX\n\n[Panix- Persistence Against *NIX - Features](https://github.com/Aegrah/PANIX?tab=readme-ov-file#features) is a highly customizable Linux persistence tool and includes various persistence techniques.\n\n#### Various blog posts\n\nVarious blog posts write about persistence mechanisms, some specific for one\ntechnique, others for a broader set of techniques. Here are some for the past\nyears as an inspiration what to look for.\n \nSee [How malware persists on macOS](https://www.sentinelone.com/blog/how-malware-persists-on-macos/) for macOS persistence locations, General persistence mechanisms: [Common malware persistence mechanisms](https://resources.infosecinstitute.com/common-malware-persistence-mechanisms/), [Malware persistence techniques](https://www.andreafortuna.org/2017/07/06/malware-persistence-techniques/), WMI: [Detecting & Removing an Attacker’s WMI Persistence](https://medium.com/threatpunter/detecting-removing-wmi-persistence-60ccbb7dff96), Winlogon: [Windows Persistence using WinLogon](https://www.hackingarticles.in/windows-persistence-using-winlogon/), Kovter: [Untangling Kovter’s persistence methods](https://blog.malwarebytes.com/threat-analysis/2016/07/untangling-kovter/), [Threat Spotlight: Kovter Malware Fileless Persistence Mechanism](https://threatvector.cylance.com/en_us/home/threat-spotlight-kovter-malware-fileless-persistence-mechanism.html), GlobalFlags in Image File Execution Hijacks: [Persistence using GlobalFlags in Image File Execution Options – Hidden from Autoruns.exe](https://oddvar.moe/2018/04/10/persistence-using-globalflags-in-image-file-execution-options-hidden-from-autoruns-exe/), Bootloader persistence: [Uncovering a MyKings Variant With Bootloader Persistence via Managed Detection and Response](https://blog.trendmicro.com/trendlabs-security-intelligence/uncovering-a-mykings-variant-with-bootloader-persistence-via-managed-detection-and-response/), COM hijacking / CLSID hijacking: [gdatasoftware writeup from 2014](https://www.gdatasoftware.com/blog/2014/10/23941-com-object-hijacking-the-discreet-way-of-persistence) or [pentestlab writeup from 2020](https://pentestlab.blog/2020/05/20/persistence-com-hijacking/) or [Enigma0x3 / Matt Nelson's writeup from 2016 abusing com hijacking in combination with scheduled tasks](https://enigma0x3.net/2016/05/25/userland-persistence-with-scheduled-tasks-and-com-handler-hijacking/), Linux cron: [Linux Malware Persistence with Cron](https://www.sandflysecurity.com/blog/linux-malware-persistence-with-cron/), Microsoft Exchange and Outlook: [Hunting for persistence via Microsoft Exchange Server or Outlook](https://speakerdeck.com/heirhabarov/hunting-for-persistence-via-microsoft-exchange-server-or-outlook), [Shadow Linking: The Persistence Vector of SaaS Identity Threat](https://www.obsidiansecurity.com/blog/shadow-linking-the-persistence-vector-of-saas-identity-threat/), [Linux Detection Engineering -  A primer on persistence mechanisms](https://www.elastic.co/security-labs/primer-on-persistence-mechanisms), [Linux LKM Persistence - Rootkit leveraging Linux loadable kernel module (LKM)](https://righteousit.com/2024/11/18/linux-lkm-persistence/), [AWSDoor: Persistence on AWS](https://github.com/OtterHacker/AWSDoor), [Access persistence for AWS](https://www.riskinsight-wavestone.com/en/2025/09/awsdoor-persistence-on-aws/).\n\n### Examples\n\n#### MITRE ATT&CK persistence technique called Local Job Scheduling\n\nIn the list from the [tactic's\npage](https://attack.mitre.org/tactics/TA0003/), we can navigate to the\ntechnique itself, namely [T1168 - local job\nscheduling](https://attack.mitre.org/techniques/T1168/) and get the\ndescription and the needed information about the involved tools and files:\n\n> On Linux and macOS systems, multiple methods are supported for creating pre-scheduled and periodic background jobs: cron, at, and launchd.\n>\n> [...]\n>\n> System-wide cron jobs are installed by modifying /etc/crontab file, /etc/cron.d/ directory or other locations supported by the Cron daemon, while per-user cron jobs are installed using crontab with specifically formatted crontab files.\n\nFurther below the detection ideas are provided. Besides the process monitoring\nwe can spot malicious jobs by comparing the cron files and commands against other hosts or\njust search for unusual commands.\n\n```\n% grep -r http /etc/cron.daily/*\n```\n\nA writeup on bleepingcomputer regarding a [cryptominer on Linux](https://www.bleepingcomputer.com/news/security/cryptominer-uses-cron-to-reinfect-linux-host-after-removal/) shows an example of such a cron entry. IP changes but the persistence technique using the crontab and a web request stays. So hunt them down!\n\n#### (Ab)use of Rundll32\n\nA second example is the (ab)use of rundll32.exe to load a library through\nregistery keys or other means ([T1085 - Rundll32](https://attack.mitre.org/techniques/T1085/)). \nUrsnif is one of the malware families which use a specific rundll32 command\nline since long time. Therefore, searching for registry keys containing\n\"rundll32\" and \"DllRegisterServer\" in the command line would catch it or just\nuse \"rundll32\" as a more generic search pattern.\n\nExample taken from Trendmicro's [URSNIF threat encyclopedia](https://www.trendmicro.com/vinfo/us/threat-encyclopedia/malware/trojanspy.win32.ursnif.tiaboecq)\n\n```\nIn HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Run\n    dminsenh = \"rundll32 \"%Application Data%\\Microsoft\\Appislad\\devrusic.dll\",DllRegisterServer\"\n```\n\n#### File handler manipulation\n\nSneaky persistence through manipulation of exefile file handler. [MITRE ATT&CK T1546.001 - Event Triggered Execution: Change Default File Association](https://attack.mitre.org/techniques/T1546/001/). [Lokibot sample from Nov 2021](https://tria.ge/211119-gs7rtshcfr/behavioral2). Check both HKLM and HKCU.\n\n```\n\\REGISTRY\\MACHINE\\SOFTWARE\\Classes\\exefile\\shell\\open\\command\\ = \"C:\\\\Windows\\\\svchost.com \\\"%1\\\" %*\"\n```\n\nand malware was dropped to `C:\\Windows\\svchost.com`.\n\n## Detection Evasion\n\nMalware authors abuse different techniques to hide their malware persistence\nor make the detection more difficult:\n* Rootkits hide files or hook registry queries\n* Use similar or typosquatted names to OS default binary names \n* Hidding entries by abusing program bugs, like the one with the null byte in registry keys which results in error while collection or just missing entries in the output of tools\n* [Abusing ADS (alternate data streams) in windows](https://argonsys.com/microsoft-cloud/library/latest-astaroth-living-off-the-land-attacks-are-even-more-invisible-but-not-less-observable/)\n* Using DLL side-loading for well-known binaries\n* Using signed binaries which then gets filtered out (depending on the analysis)\n* Hidden services when special permissions were set at service creation. Seen in section _Installation stealth and persistence_ in Talos' blog post [Threat hunting in large datasets by clustering security events](https://blog.talosintelligence.com/2021/10/threat-hunting-in-large-datasets-by.html). This blog post references another one from SANS, [Red Team Tactics: Hiding Windows Services](https://www.sans.org/blog/red-team-tactics-hiding-windows-services/).\n   * _In the following steps, the script deletes PowerShell logs and registers the final payload as a Windows service using a long command line with some strange permission settings. A quick Google search reveals that these are used to make the service hidden and unremovable using the regular Windows administration tools, without some additional actions. [Talos]_\n   * _A little known feature of Windows allows the red team or an attacker to hide services from view, creating an opportunity to evade detection from common host-based threat hunting techniques. [SANS]_\n\n## Testing\n\nUse the descriptions and information from the resources in section\n[detection](#detection) to simulate the persistence.\n\nFurthermore, different tools provide checks to verify if detections work. \n\n[Atomic Red Team](https://github.com/redcanaryco/atomic-red-team) test suite\nallows checking for specific MITRE ATT&CK persistence techniques, see e.g. [T1044 \"File\nSystem Permissions\nWeakness\"](https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1044/T1044.yaml).\n\n[hasherezade published demos](https://github.com/hasherezade/persistence_demos) of various \n(also non standard) persistence methods used by malware, like COM hijacking.\n\nUse [PoisonApple](https://github.com/CyborgSecurity/PoisonApple) to perform various persistence techniques on macOS.\n\nUse [PANIX](https://github.com/Aegrah/PANIX) to perform various persistence techniques against Linux systems, among others Debian and RHEL.\n\nUse [Diamorphine](https://github.com/m0nad/Diamorphine), a loadable kernel module (LKM) rootkit for Linux Kernels (x86/x86_64 and ARM64), to test the detection of LKMs.\n\nUse [AWSDoor: Persistence on AWS](https://github.com/OtterHacker/AWSDoor) for adding access persistence on AWS. The [corresponding article](https://www.riskinsight-wavestone.com/en/2025/09/awsdoor-persistence-on-aws/) describes the techniques adversaries can use to hide themselves within a cloud environment and its AWSDoor implementation to simplify and automate the deployment of persistence techniques in AWS environments.\n\n### Example\n\nAs an example we use the technique [T1183 - \"Image File Execution Options Injection\"](https://attack.mitre.org/techniques/T1183/) and abuse the \"sticky keys\" feature for executing a command shell. This would also be triggered before a login.\n\nTo test your collection tools, the prevention mechanisms in place and\nyour awesome detections, execute the following for adding a debugger value for the\ncorresponding registry key:\n\n```\nREG ADD \"HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Image File Execution Options\\sethc.exe\" /v Debugger /t REG_SZ /d \"cmd /c tasklist\"\n```\n\nNow you can click multiple times on the shift-key on your keyboard to trigger\nthe execution of cmd.\n\n## Response\n\nIf you respond to an incident and need to clean up malware persistence as a\ntemporary countermeasure, you just have to remove the given information. For\nfiles and configuration changes it's mostly done using standard OS commands.\nUse your EDR or some other frameworks (e.g. for Windows, see [PowerSponse](https://github.com/swisscom/PowerSponse)).\n\nIn special cases like WMI the cleanup is not as straightforward as with\nother mechanisms, see blog post [Removing Backdoors – Powershell Empire Edition](https://www.n00py.io/2017/01/removing-backdoors-powershell-empire-edition/):\n1. remove the binding using `Get-WmiObject __FilterToConsumerBinding -Namespace root\\subscription | Where-Object { $_.filter -match 'evil'} | Remove-WmiObject;`\n1. remove the event consumer using `Get-WmiObject CommandLineEventConsumer -Namespace root\\subscription -Filter \"name='evil'\" | Remove-WmiObject`\n1. remove the event filter using `Get-WMIObject -Namespace root\\Subscription -Class __EventFilter -Filter \"Name='evil'\" | Remove-WmiObject -Verbose`\n\nThen there were issues with null byte values in the Windows registry and\nattackers abused that to hide entries in e.g. run keys. Custom tools or the\n[RegDelNull](https://docs.microsoft.com/en-us/sysinternals/downloads/regdelnull)\ncan be used to remove these entries.\n\n## Prevention\n\nThis list is in no way comprehensive and just lists some possibilities to prevent malware persistence. The most important thing would be of course to prevent the execution of unknown programs.\n* Block file writes to unusual places if possible, e.g. public user\n    profile in Windows.\n* Block file types on specific folders where only limited file types are used\n    (e.g. .exe in startup folder where only .lnk files should be placed).\n* Use file integrity checking on important config files (e.g. cronjobs).\n* Reduce privileges so more advanced persistence techniques would fail due to\n    missing privileges.\n* File system permissions should be checked regularly and be as restricted as\n    possible.\n* Lock down configuration files (read-only) and on Windows put ACLs on\n    specific registry keys (like for the accessibility features keys).\n* Prevent the abuse of third party identity providers, see [Shadow Linking: The Persistence Vector of SaaS Identity Threat](https://www.obsidiansecurity.com/blog/shadow-linking-the-persistence-vector-of-saas-identity-threat/).\n    \nFor macOS there's the BlockBlock tool by Patrick Wardle which provides protection by monitoring persistence locations: https://github.com/objective-see/BlockBlock.\n\n## Tools\n\nYou can either collect the needed information once on a (remote) host in case of an incident or\ncollect the information on a regular basis for baselining and threat hunting.\n\nOne thing as a reminder and thanks to Harlan Carvey over at windowsir for\npointing out similar points too in various blog posts, see [Deep Knowledge,\nand the Pursuit Thereof ](https://windowsir.blogspot.com/2019/05/deep-knowledge-and-pursuit-thereof.html)\nand [Troubleshooting and Deep\nKnowledge](https://windowsir.blogspot.com/2019/05/troubleshooting-and-deep-knowledge.html):\nBe cautious of the results of tools and try to cross check with different\ntools or check things by hand. Tools only provide you the information in their\nway and sometimes miss the malicious entry or some options were turned off\netc. Autoruns for example can hide Microsoft signed entries, but than some\nLOLbin (living-of-the-land, abusing system tools so to say) commands were\nmissing. Use it to reduce the amount of entries, but know the limits. There\nwas a null byte issue with the registry and the entries were\nmissing too in the collection. New version fixed the issue. One more: [Persistence using\nGlobalFlags in Image File Execution Options – Hidden from Autoruns.exe](https://oddvar.moe/2018/04/10/persistence-using-globalflags-in-image-file-execution-options-hidden-from-autoruns-exe/).\n\nFor collection of specific techniques see [links and resources for\ndetection](#links-and-resources-for-detection) which cover detailed\ninformation about the location of different persistence mechanisms.\n\n### Linux\n\n* I'm not aware of a public available tool to get a bunch of persistence mechanisms. But\n    there are different commands which can be put into a script for easier\n    usage. Depending on the distribution use the corresponding commands for\n    `crontab`, `cat`, `grep`, `md5sum`, `sha1sum`, `sha256sum`, `somethingsum`\n    and directory listings for most of the techniques.\n* [Linux Security and Monitoring Scripts](https://github.com/sqall01/LSMS) - Security and monitoring scripts you can use to monitor your Linux installation\nfor security-related events or for an investigation. Among other finding systemd unit files used for malware persistence.\n* For regular collection of persistence mechanisms you can look into [osquery](https://osquery.readthedocs.io) or [OSSEC](https://github.com/ossec/ossec-hids).\n\n### MacOS\n\n* [KnockKnock](https://www.objective-see.com/products/knockknock.html)\n  uncovers persistently installed software in order to generically\n  reveal such malware. See [Github repository too for the source code](https://github.com/objective-see/KnockKnock).\n* [BlockBlock](https://github.com/objective-see/BlockBlock) provides continual protection by monitoring persistence locations.\n* [Dylib Hijack Scanner or DHS](https://www.objective-see.com/products/dhs.html), is a \n  simple utility that will scan your computer for applications that are either \n  susceptible to dylib hijacking or have been hijacked. See [Github repository too for the source code](https://github.com/objective-see/DylibHijackScanner).\n* Besides the UI tool KnockKnock, I'm not aware of a public available command line tool\n  to get a bunch of persistence mechanisms. But there are different commands which can be put\n  into a script for easier usage. Use the corresponding commands for\n  `crontab`, `cat`, `grep`, `md5sum`, `sha1sum`, `sha256sum`, `somethingsum`\n  and directory listings for most of the techniques.\n* For regular collection of persistence mechanisms you can look into\n  [osquery](https://osquery.readthedocs.io) or\n  [OSSEC](https://github.com/ossec/ossec-hids).\n\n### Windows\n\n* A powerful persistence collection tool on Windows is\n  [Autoruns](http://technet.microsoft.com/en-us/sysinternals/bb963902). It\n  collects different categories and persistence information from a live system and [in\n  limited ways from offline images](https://www.sans.org/blog/offline-autoruns-revisited-auditing-malware-persistence/). There is a UI and a command line program\n  and the output format can be set to CSV which can then be imported into your\n  log collection system of choice.\n* Instead of using CSV output and copy these file to the server, you can use\n  the script [AutorunsToWinEventLog.ps1](https://github.com/palantir/windows-event-forwarding/blob/master/AutorunsToWinEventLog/AutorunsToWinEventLog.ps1) to convert the Autoruns output to Windows event\n  logs and rely on standard Windows event log forwarding.\n* PowerShell version of [Autoruns](https://github.com/p0w3rsh3ll/AutoRuns).\n* [PersistenceSniper](https://github.com/last-byte/PersistenceSniper) is a Powershell module to hunt for persistence implanted in Windows machines.\n* [RegRipper](https://github.com/keydet89/RegRipper2.8) does also extracts\n  various persistence mechanisms from the registry files directly.\n* [RECmd](https://github.com/EricZimmerman/RECmd) using the config file [UserClassesASEPs](https://github.com/EricZimmerman/RECmd/blob/master/BatchExamples/UserClassesASEPs.reb) extracts user's CLSID information.\n* [KAPE](https://www.kroll.com/en/insights/publications/cyber/kroll-artifact-parser-extractor-kape) has different targets and modules, see [KapeFiles](https://github.com/EricZimmerman/KapeFiles) which include persistence mechanisms, among others there's a collection of [LNK files](https://github.com/EricZimmerman/KapeFiles/blob/master/Targets/Windows/LNKFilesAndJumpLists.tkape), [scheduled task files](https://github.com/EricZimmerman/KapeFiles/blob/master/Targets/Windows/ScheduledTasks.tkape) and [scheduled task listing](https://github.com/EricZimmerman/KapeFiles/blob/master/Modules/LiveResponse/schtasks.mkape) or a [WMI repository auditing](https://github.com/EricZimmerman/KapeFiles/blob/master/Modules/LiveResponse/WMI-Repository-Auditing.mkape) module.\n* [PyrsistenceSniper](https://github.com/Hexastrike/PyrsistenceSniper) is a Python-based offline Windows persistence detection tool. Point it at a KAPE dump, a Velociraptor collection, or a mounted disk image and get offline Windows persistence detection. Runs on Windows, Linux, and macOS.\n* Different AVs and EDR tools also include the detection and prevention of persistence mechanisms.\n\n### Cloud\n\n* [AWSDoor: Persistence on AWS](https://github.com/OtterHacker/AWSDoor) for adding access persistence on AWS. The [corresponding article](https://www.riskinsight-wavestone.com/en/2025/09/awsdoor-persistence-on-aws/) describes the techniques adversaries can use to hide themselves within a cloud environment and its AWSDoor implementation to simplify and automate the deployment of persistence techniques in AWS environments.\n\n### Github topic search for persistence\n\nCurrently not many things are found with these topics, but if you search for #malware and #persistence the matched repositories are listed: https://github.com/search?q=%23malware+%23persistence&type=\n\n## Acknowledgement\n\nThanks to my previous employer [Swisscom](https://www.swisscom.ch)\n([Github](https://github.com/swisscom)) for allowing me to publish the\ninformation which was inspired by my work in the past few years at the\n[@swisscom_csirt](https://twitter.com/swisscom_csirt).\n"
  }
]