# exe2hex

**Copy nc.exe to the current directory**

```
locate nc.exe | grep binaries
cp /usr/share/windows-resources/binaries/nc.exe .
```

**Use the executable packer upx to compress nc.exe**

```
upx -9 nc.exe
```

Convert the compressed file into a windows script that will convert the file to hex and reassemble it in binary form using powershell

```
exe2hex -x nc.exe -p nc.cmd
```

**Paste the output directly into Windows remote shell to reassemble nc.exe**
