2020年4月20日星期一

Install Kali tools into chroot

#Install debootstrap

sudo apt-get install debootstrap

#Install Ubuntu 18.04 into chroot

mkdir chroot_root
sudo debootstrap --arch amd64 bionic ./chroot_root/

#If you run into this error:
#/usr/sbin/debootstrap: cannot create /media/XXXXX/chroot_root/test-dev-null: #Permission denied


#Try to remount or your block device without noexec and nodev options.
#For example:
#sudo mount -t ext4 -o remount,rw,relatime,uhelper=udisks2 /dev/sda1 /media/MOUNT_POINT
#Or adjust your mount options in "disks" 

#Bind nodes:
sudo mount --bind /proc ./chroot_root/proc
sudo mount --bind /dev ./chroot_root/dev
sudo mount --bind /sys ./chroot_root/sys
#ATTENTION: Only run these commands when the dirs are empty.

#Run chroot

sudo chroot ./chroot_root

#Install katoolin

apt update
apt install python git gnupg

git clone https://github.com/LionSec/katoolin.git
cp katoolin/katoolin.py /usr/bin/katoolin
chmod +x /usr/bin/katoolin
katoolin

#Enjoy!


#Backup
sudo tar -czf chroot_root_bak.tar.gz ./chroot_root




2020年4月15日星期三

临时本地解决DNS污染


在本地启动一个DoH的DNS服务器
proxychains sudo cloudflared proxy-dns
nslookup twitter.com 127.0.0.1


如果只是想临时解析一下域名的话,
proxychains dig +tcp @1.1.1.1 twitter.com