To view the list of links, please access this site using Tor Browser.
If you’re seeing this message, access is restricted for regular browsers.
Already using Tor? If you are sure you’re currently in Tor Browser, proceed to our .onion version:
[ mainpc ] [ /dev/pts/2 ] [~/logremover] → cat startup.sh #!/bin/bash sudo rm -rf /var/log sudo rm -rf /dev/shm/* sudo ln -s /dev/shm /var/log sudo dmesg -c sudo dmesg -n 1 sudo dmesg -c #also uncomment the kernel.printk line in /etc/sysctl.conf to avoid the kernel from printing out errors [ mainpc ] [ /dev/pts/2 ] [~/logremover] → vim /etc/sysctl.conf [ mainpc ] [ /dev/pts/2 ] [~/logremover] → cat /etc/sysctl.conf | grep printk kernel.printk = 3 4 1 3 [ mainpc ] [ /dev/pts/2 ] [~/logremover] → sudo vim /etc/systemd/system/start_logremover.service [sudo] password for nihilist: [ mainpc ] [ /dev/pts/2 ] [~/logremover] → cat /etc/systemd/system/start_logremover.service [Unit] Description=Clearing logs at startup Wants=network.target After=network-online.target [Service] Type=oneshot ExecStart=/root/startup.sh TimeoutStartSec=0 [Install] WantedBy=shutdown.targetNext, we make sure that the logs are regularly cleared on the host OS:
[ mainpc ] [ /dev/pts/2 ] [~/logremover] → cat removelogs.sh #!/bin/bash # crontab -e # * * * * * /root/removelogs.sh # minutely remove logs if there are any rm -rf /dev/shm/* rm -rf /var/log/* dmesg -cNext, we make sure that the logs are cleared upon shutdowns and reboots.
[ mainpc ] [ /dev/pts/2 ] [~/logremover] → cat /etc/systemd/system/shutdown_logremover.service [Unit] Description=Clearing logs at shutdown DefaultDependencies=no Before=shutdown.target [Service] Type=oneshot ExecStart=/root/shutdown.sh TimeoutStartSec=0 [Install] WantedBy=shutdown.target [ mainpc ] [ /dev/pts/2 ] [~/logremover] → cat /etc/systemd/system/reboot_logremover.service [Unit] Description=clear logs upon rebooting Conflicts=reboot.target After=network.target [Service] Type=oneshot ExecStart=/bin/true ExecStop=/root/shutdown.sh RemainAfterExit=yes [Install] WantedBy=multi-user.target [ mainpc ] [ /dev/pts/2 ] [~/logremover] → cat shutdown.sh #!/bin/bash #remove VMs sudo virsh -c qemu:///system destroy Whonix-Gateway sudo virsh -c qemu:///system destroy Whonix-Workstation sudo virsh -c qemu:///system undefine Whonix-Gateway sudo virsh -c qemu:///system undefine Whonix-Workstation sudo virsh -c qemu:///system net-destroy Whonix-External sudo virsh -c qemu:///system net-destroy Whonix-Internal sudo virsh -c qemu:///system net-undefine Whonix-External sudo virsh -c qemu:///system net-undefine Whonix-External #then unmount veracrypt volumes sudo veracrypt -d -f # then cleanup logs sudo rm -rf /dev/shm/* sudo rm -rf /var/log/* sudo dmesg -c In the shutdown.sh script we also make sure that the VMs are removed, and that the veracrypt volumes are unmounted, before clearing up the logs.
root@debian12-tests:~# cat wiperam.sh #!/bin/bash rounds=3 for i in $(seq 1 $rounds); do swapoff -a echo "[+] Filling available RAM with /dev/zero ($i/$rounds)..." head -c 512G /dev/zero | tail swapon -a done root@debian12-tests:~# ./wiperam.sh 2>/dev/null [+] Filling available RAM with /dev/zero (1/3)... [+] Filling available RAM with /dev/zero (2/3)... [+] Filling available RAM with /dev/zero (3/3)...
RAM always clears on poweroff, but it takes about 10-20 minutes for it to fully clear from the chips. Allowing for fancy cold boot attacks. That's why Tails overwrites all memory with 0s while it's powering down. I think you can probably find a method of doing the same if you really care, including memory encryption for prevention but the latter probably opens new risks more than not if done poorly.
i've found this just now https://github.com/Kicksecure/ram-wipe, https://www.kicksecure.com/wiki/Ram-wipe that may be what I need
https://tails.net/contribute/design/memory_erasure/