Metasploit-framework: Feature Request: Confirmation request for closing meterpreter session

Created on 4 Apr 2020  路  6Comments  路  Source: rapid7/metasploit-framework

When we are in a meterpreter prompt and type exit,
there should be a confirmation to close the meterpreter session.

It happened to me, that instead to background I typed exit, and the session died. Had to exploit the machine again to gain access.

suggestion

Most helpful comment

I'd prob go with a captcha or other random math problem to solve 馃槈

All 6 comments

I was under the impression everyone hated the "Do you really want to do the thing you just asked to do" questions?

I was under the impression everyone hated the "Do you really want to do the thing you just asked to do" questions?

Please also implement confirmation on the CTRL+C exit confirmation. I do not want Metasploit to do what I tell it.

^C
Are you sure wish to close this session (y/N) ?
y
Are you really sure (y/N) ?
y

I'd prob go with a captcha or other random math problem to solve 馃槈

I'd prob go with a captcha or other random math problem to solve wink

That seems a bit much, but I do like the idea of randomness.

def handle_input
  # ...
  q = [
    'Are you sure? (Y/n)',
    'Super duper sure? (Y/n)',
    "Don't lie to me - is what you really want? (N/y)",
    'Does this action spark joy? (Y/n)',
    "Are you sure not to not exit? (N/y)",
    'For guts and glory press N. For work and worry press Y.'
  ]
rescue => Interrupt
  if prompt(q.sample).downcase == 'Y'
    `reboot`
  end
end

Edit: It appears I'm outvoted in favor of a random math puzzle or CAPTCHA. Perhaps the best of both worlds: at random, drop the session shell into a hacking mini-game, and the session dies upon failure.

Seconding CAPTCHA!

OK, in seriousness, I would not be opposed to adding a -i option to exit so it checks, but I think we'd break lots of workflows and scripts changing the behavior of exit. I am going to close this, though.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Acidical picture Acidical  路  3Comments

bugshere picture bugshere  路  3Comments

handsomebeast picture handsomebeast  路  3Comments

adrianmihalko picture adrianmihalko  路  3Comments

0x27 picture 0x27  路  3Comments