This is just another very short usage guide for one of my little helper for pentesters and the like. During some assessments with social engineering I want to get informed by my server, if a session is opened. After some time of research i didn’t find any good solution in the internet, so i decided to write my own one 😉 Unfortunately ruby needs a GEM for TLS connections which is not in the MSF repo. My solution is a post explotation modul, which only calls my python script to send an email. You can find the code here.

0x01 Download Files

At first you should copy my repo to your favourit location via

git clone

0x02 Age Files

Afterwards you find two files named email-notify.rb &&

At first we have to configure our email settings for our server in the file.

Now you have to change one line in the email-notify.rb file which should point to your altered file.

0x03 Copy to Position

The last step is to copy the mail-notify.rb file into your metasploit directory

cp email-notify.rb /usr/share/metasploit-framework/modules/post/multi/manage/.

0x04 Have Fun

Start metasploit and look at your new post explotation tool 😉 Now you can use the set autorunscript option of your mutli/handler and the email will be send for every new session.

Flo @HanseSecure