Instantly share code, notes, and snippets.

View Xiaomi.txt
#IPs that attempt to send data from my Xiaomi device to Xiaomi servers hosted on AWS Singapore.
47.74.139.176
52.220.131.242
52.221.18.83
52.77.148.88
13.229.171.142
nmap -p 443 --script ssl-cert 47.74.139.176 |grep ssl-cert
| ssl-cert: Subject: commonName=api.ad.intl.xiaomi.com
----
View lighttpd.conf
apt install apache2-utils
htpasswd -c /etc/lighttpd/.htpasswd <Username> #Replace <Username>, you will be prompted to enter the password.
# Make sure that "mod_auth" is loaded in "server.modules".
nano /etc/lighttpd/lighttpd.conf
#Add the following to lighttpd.conf.
auth.backend = "htpasswd"
auth.backend.htpasswd.userfile= "/etc/lighttpd/.htpasswd"
View gist:0825906230cbbe478faf4d08abe9d11a
sudo dpkg-reconfigure wireshark-common #Select "Yes"
chmod +x /usr/bin/dumpcap
View gist:7abdc4a2f25087604077d3a3a5d791cc
vmrun -T ws start /path/to/vm.vmx nogui #"-T ws" for VMware Workstation
View gist:9d09b30102f0434d5658d2dcff273def
echo -e "\ndeb http://downloads.sourceforge.net/project/ubuntuzilla/mozilla/apt all main" | tee -a /etc/apt/sources.list > /dev/null
apt-key adv --recv-keys --keyserver keyserver.ubuntu.com C1289A29
apt-get update ; apt-get install seamonkey-mozilla-build
View sysctl.conf
#This will spoof FreeBSD fingerprint to be detected as Linux generic.
#Test with p0f or https://browserleaks.com/ip
net.inet.tcp.sack.enable=0 #Turns TCP Selective Acknowledgments (SACK) off
net.inet.tcp.rfc1323=0 #Turns TCP window scaling off
View gist:987b6373baaf96f1cefb64f64324e44f
Boot into single user mode from the boot menu
#Remount root file system to allow write
mount -ruw /
#Change root password
passwd root
View gist:09c870391ad897371c982b9d07e5a3e8
dnscrypt-proxy -a 192.168.1.2 -L /usr/share/dnscrypt-proxy/dnscrypt-resolvers.csv -R ns0.dnscrypt.is
# "-a": The local IP that will listen to other devices DNS requests (by default it listen on DNS port 53),
# can be phones (Since DNSCrypt can't run on non-rooted IOS or android devices),
# where you will manually need to configure WIFI to use 192.168.1.2 for the DNS server.
# For the same local machine that runs this DNSCrypt command, use 192.168.1.2 in /etc/resolv.conf
# "-L": The path to "dnscrypt-resolvers.csv" file where it includes all the servers that can be used with DNSCrypt.
# "-R": The DNS resolver name, copy the server name from "dnscrypt-resolvers.csv" file.
## Verify