cmd.exe "cmd.exe" /c "mkdir .\tmp\victim-files &amp; cd .\tmp\victim-files &amp; echo "This file will be encrypted" &gt; .\encrypted_file.txt &amp; "%%programfiles%%/WinRAR/Rar.exe" a -hp"blue" hello.rar &amp; dir" powershell.exe ar-win-dc.attackrange.local