> For the complete documentation index, see [llms.txt](https://notes.shashwatshah.me/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://notes.shashwatshah.me/windows/active-directory/weaponizing-windows.md).

# Weaponizing Windows

1\) Install Commando VM\
2\) Connect windows VM with Linux VM.\
3\) Start Attacking

### Connecting Windows VM with Linux VM

On Windows VM, set `Default Gateway` to the `IP` of the Linux VM.<br>

![Setup for Default Gateway](/files/xZxum6Dq8RbJ6fqWutEW)

Get the Linux VM `IP` and add to `Default Gateway`.

![Linux VM IP](/files/JnCQ8v8gvD24dheFGWhY)

After this setup, all Windows traffic will flow from Windows to Linux. \
On the Linux machine start forwarding the traffic.

```
sudo sysctl -w net.ipv4.ip_forward=1
sudo /sbin/iptables -t nat -A POSTROUTING -o tun0 -j MASQUERADE
sudo /sbin/iptables -A FORWARD -i tun0 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT
sudo /sbin/iptables -A FORWARD -i eth0 -o tun0 -j ACCEPT
```

Make sure to change the port, here I am connected to a VPN, `tun0` interface. And my local network `eth0`interface.
