I'm developing a plugin to automate some post exploitation tasks. Two days ago all methods that interact with the client (from the client_core and stdapi) simply don't return anything, like if in a while(true) loop. Although when I'm in irb mode with the same session everything works fine. I've tried changing the victim machine and created a dummy plugin, which presented the same problem. What could it be? This is the dummy code:

module Msf

class Plugin::Automigrate < Msf::Plugin

include Msf::SessionEvent

def initialize(framework, opts)


def on_session_open(session)
    print_status("Session Opened")
        print_good("stdapi loaded")
    puts "#{session.sys}"
    t = session.sys.config.getuid


def name


And the only thing it returns is the "Session Opened" status.

  • I'm not sure how we could possibly be able to answer your question. At best, this is a programming question and you might get traction on SO if tagged as ruby. – schroeder Feb 3 '16 at 21:42
  • Wait - so the code worked 2 days ago, and now it's not? Did you update MSF? – schroeder Feb 3 '16 at 23:22
  • No, I haven't. What is puzzling me is the fact the all the above commands work fine through irb on the same meterpreter session. – Vinicius Feb 4 '16 at 16:20
  • I've also restored a snapshot of my kali linux and ran the plugin there, same problem presented. So I think it's something wrong on my code. – Vinicius Feb 4 '16 at 17:05
  • I've also tested a plugin that ships with metasploit (session_tagger), and is presenting the same problem. – Vinicius Feb 4 '16 at 17:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.