Metasploit Play Wav On New Session

Update

Now with added verbosity, load with

load sounds verbose=true

and the plug-in will now read the IP address and port of the client you are connected to.

Download it here.

Update - This patch is no longer needed! Within about 4 hours of me releasing it HD Moore had integrated it into the current Metasploit trunk. With the additions he made while doing it I'm going to work on adding more sound support which will hopefully also make it into the main trunk.

I've never used Core Impact but I've regularly heard about its ability to play the "Agent Deployed" audio when a new agent is created. I thought it would cool if Metasploit could do the same so I've created a basic patch so Metasploit plays a wav when a new session is created.

As Metasploit is constantly changing the patch will probably be out of date soon but as it only adds a few lines I'm sure most users will be able to work out how to patch any updated version. This was developed against the subversion revision 8211.

When a new session is created the patch looks for the file data/session_created.wav and plays it with aplay in Linux or in Windows with the Win32 sound library. I haven't tried the Windows version but from what I've read it should work and most people will have the required gem installed by default. If you don't you can install it with:

gem install win32-sound

If it doesn't work let me know and I'll put together a Windows install and fix it.

The patch also now contains an OSX player thanks to Matias Brutti and Ricardo Teixeira for their OSX code.

The patch is easy to install, simply untar the download and copy new_session.wav to metasploit/data then change to the metasploit directory and apply the patch with:

patch -p0 < <path to patch>/session_created.patch

Obviously you can replace the wav with any wav of your choosing.

For those who aren't likely to be poping shells but want to hear the audio you can get it here.

Download

Download the patch.

Project Categories

Support The Site

I don't get paid for any of the projects on this site so if you'd like to support my work please use the link below when buying from Amazon and I will receive a small commission on all purchases.