Quantcast
Channel: Fun Over IP
Viewing all articles
Browse latest Browse all 20

Metasploit plugin: notify_mail.rb (email notification)

$
0
0

1. Introduction

Here is a Metasploit plug-in which allows you to get e-mail notifications when new sessions open. The usage of this plug-in makes sense during Social Engineering attacks, or during client-side exploitations since you don’t always know when the payload will be executed on the victim computer.

In order to use this plug-in:

  • Copy the Ruby script (notify_mail.rb) into the “/plugin/” folder of Metasploit.
  • Load an exploit module (or multi/handler) and activate the plug-in by typing “load notify_mail“.
  • Setup your sender/recipient email addresses and the SMTP server you want to use.

Note that you may need to set up a valid sender email address (at least a valid domain name) depending on the configuration of the SMTP server you use.

2. Usage example

msf exploit(handler) > load notify_mail
[*] Successfully loaded plugin: notify_mail
msf exploit(handler) > help

notify_mail Commands
====================

    Command               Description
    -------               -----------
    notify_mail_load      Load settings from configuration file
    notify_mail_mailfrom  Set sender e-mail address
    notify_mail_mailto    Set recipient e-mail address
    notify_mail_save      Save settings to configuration file
    notify_mail_show      Show current settings
    notify_mail_smtpport  Set SMTP server port
    notify_mail_smtpsrv   Set SMTP server hostname/IP

....

msf exploit(handler) > notify_mail_mailfrom me@domain.com
MAILFROM => me@domain.com
msf exploit(handler) > notify_mail_mailto me@domain.com
MAILTO => me@domain.com
msf exploit(handler) > notify_mail_smtpsrv 127.0.0.1
SMTPSRV => 127.0.0.1
msf exploit(handler) > notify_mail_smtpport 25
SMTPPORT => 25
msf exploit(handler) > notify_mail_show
MAILFROM : me@domain.com
MAILTO   : me@domain.com
SMTPSRV  : 127.0.0.1
SMTPPORT : 25
msf exploit(handler) > notify_mail_save
[*] Saving paramters to config file
[+] All parameters saved to /root/.msf4/notify_mail.yaml
msf exploit(handler) >

3. Download

Save the following file into <msf>/plugins/ folder

Source: notify_mail.rb.gz

4. Other suggested plugins

Note: There is a rating embedded within this post, please visit this post to rate it.

© 2012, foip. All rights reserved.


Viewing all articles
Browse latest Browse all 20

Trending Articles