Nmap was used to scan a Windows machine and found that port 445 SMB port was open, allowing file sharing access. The EternalBlue exploit was located to take advantage of this vulnerability. Msfvenom was used to generate an encoded payload that could bypass firewalls and be difficult to detect, allowing remote code execution on the vulnerable system through the SMB port. The encoded payload would leverage the EternalBlue exploit to compromise the Windows machine.