Diamorphine は Linux カーネル 2.6.x/3.x/4.x/5.x/6.x (x86/x86_64 および ARM64) 向けの LKM ルートキットです。
カーネルが 2.6.x/3.x/4.x/5.x/6.x であることを確認します。
uname -r
リポジトリをクローンします。
git clone https://github.com/m0nad/Diamorphine
フォルダに入ります。
cd Diamorphine
コンパイルします。
make
モジュールをロードします(root 権限で)。
insmod diamorphine.ko
モジュールは最初は不可視状態です。削除するには可視にする必要があります。
kill -63 0
その後、モジュールを削除します(root 権限で)。
rmmod diamorphine
Wikipedia ルートキット https://en.wikipedia.org/wiki/Rootkit
Linux デバイスドライバ http://lwn.net/Kernel/LDD3/
LKM HACKING https://web.archive.org/web/20140701183221/https://www.thc.org/papers/LKM_HACKING.html
Memset のブログ http://memset.wordpress.com/
LKM を使わない Linux カーネルのオンザフライパッチ http://phrack.org/issues/58/7.html
Linux 向けシンプルなルートキットの書き方 https://web.archive.org/web/20160620231623/http://big-daddy.fr/repository/Documentation/Hacking/Security/Malware/Rootkits/writing-rootkit.txt
Linux クロスリファレンス http://lxr.free-electrons.com/
zizzu0 の LinuxKernelModules https://github.com/zizzu0/LinuxKernelModules/
Linux ルートキット: カーネル 5.7+ 向けの新しい手法 https://xcellerator.github.io/posts/linux_rootkits_11/
FlipSwitch: 新しいシステムコールフッキング手法 https://www.elastic.co/security-labs/flipswitch-linux-rootkit