Executing script on Meterpreter in Msfconsole

The goal of my task is to run a Ruby script that executes the key-logger exe file and starts running on the remote machine. I manage to connect successfully by the apache2 server (i.e. my other VM enters the link in the browser and the counter starts working) with PAYLOAD php/meterpreter/reverse_tcp

. So when the meter starts working, Im trying to run the script:run ruby.rb

https://i.stack.imgur.com/pVEDI.jpg


ruby.rb (with content)

exec("/root/Desktop/time/time/bin/Debug/time.exe")

      


However, an error occurs and I don't understand why ? When I try to execute the time.exe file in WINDOWS it works fine . Keylogger is written in C #, in case anyone is interested to see the code: https://ufile.io/y9n3z

Can anyone give me some advice or workaround?

+3


source to share





All Articles