{"id":13537707,"url":"https://github.com/m0nad/diamorphine","last_synced_at":"2025-05-15T12:04:33.797Z","repository":{"id":11677647,"uuid":"14187797","full_name":"m0nad/Diamorphine","owner":"m0nad","description":"LKM rootkit for Linux Kernels 2.6.x/3.x/4.x/5.x/6.x (x86/x86_64 and ARM64)","archived":false,"fork":false,"pushed_at":"2023-09-20T10:56:06.000Z","size":29,"stargazers_count":1979,"open_issues_count":10,"forks_count":450,"subscribers_count":55,"default_branch":"master","last_synced_at":"2025-04-14T22:18:06.878Z","etag":null,"topics":["advanced-persistent-threat","backdoor","c","hacking","hacking-tool","kernel","kernel-module","linux","linux-kernel","lkm-rootkit","malware","pentest","pentesting","redteam","redteaming","rootkit","security","security-audit","security-tools","stealth"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/m0nad.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2013-11-06T22:38:47.000Z","updated_at":"2025-04-13T11:50:16.000Z","dependencies_parsed_at":"2022-07-10T15:31:09.846Z","dependency_job_id":"e44dfae3-522a-42f6-ae06-e2bc4b306f82","html_url":"https://github.com/m0nad/Diamorphine","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m0nad%2FDiamorphine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m0nad%2FDiamorphine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m0nad%2FDiamorphine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m0nad%2FDiamorphine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/m0nad","download_url":"https://codeload.github.com/m0nad/Diamorphine/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254337612,"owners_count":22054253,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["advanced-persistent-threat","backdoor","c","hacking","hacking-tool","kernel","kernel-module","linux","linux-kernel","lkm-rootkit","malware","pentest","pentesting","redteam","redteaming","rootkit","security","security-audit","security-tools","stealth"],"created_at":"2024-08-01T09:01:02.498Z","updated_at":"2025-05-15T12:04:28.780Z","avatar_url":"https://github.com/m0nad.png","language":"C","funding_links":[],"categories":["\u003ca id=\"9eee96404f868f372a6cbc6769ccb7f8\"\u003e\u003c/a\u003e新添加的","\u003ca id=\"9eee96404f868f372a6cbc6769ccb7f8\"\u003e\u003c/a\u003e工具"],"sub_categories":["\u003ca id=\"31185b925d5152c7469b963809ceb22d\"\u003e\u003c/a\u003e新添加的"],"readme":"Diamorphine\n===========\n\nDiamorphine is a LKM rootkit for Linux Kernels 2.6.x/3.x/4.x/5.x/6.x (x86/x86_64 and ARM64)\n\nFeatures\n--\n\n- When loaded, the module starts invisible;\n\n- Hide/unhide any process by sending a signal 31;\n\n- Sending a signal 63(to any pid) makes the module become (in)visible;\n\n- Sending a signal 64(to any pid) makes the given user become root;\n\n- Files or directories starting with the MAGIC_PREFIX become invisible;\n\n- Source: https://github.com/m0nad/Diamorphine\n\nInstall\n--\n\nVerify if the kernel is 2.6.x/3.x/4.x/5.x\n```\nuname -r\n```\n\nClone the repository\n```\ngit clone https://github.com/m0nad/Diamorphine\n```\n\nEnter the folder\n```\ncd Diamorphine\n```\n\nCompile\n```\nmake\n```\n\nLoad the module(as root)\n```\ninsmod diamorphine.ko\n```\n\nUninstall\n--\n\nThe module starts invisible, to remove you need to make it visible\n```\nkill -63 0\n```\n\nThen remove the module(as root)\n```\nrmmod diamorphine\n```\n\nReferences\n--\nWikipedia Rootkit\nhttps://en.wikipedia.org/wiki/Rootkit\n\nLinux Device Drivers\nhttp://lwn.net/Kernel/LDD3/\n\nLKM HACKING\nhttps://web.archive.org/web/20140701183221/https://www.thc.org/papers/LKM_HACKING.html\n\nMemset's blog\nhttp://memset.wordpress.com/\n\nLinux on-the-fly kernel patching without LKM\nhttp://phrack.org/issues/58/7.html\n\nWRITING A SIMPLE ROOTKIT FOR LINUX\nhttps://web.archive.org/web/20160620231623/http://big-daddy.fr/repository/Documentation/Hacking/Security/Malware/Rootkits/writing-rootkit.txt\n\nLinux Cross Reference\nhttp://lxr.free-electrons.com/\n\nzizzu0 LinuxKernelModules\nhttps://github.com/zizzu0/LinuxKernelModules/\n\nLinux Rootkits: New Methods for Kernel 5.7+\nhttps://xcellerator.github.io/posts/linux_rootkits_11/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm0nad%2Fdiamorphine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fm0nad%2Fdiamorphine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm0nad%2Fdiamorphine/lists"}