Search
Social Media - Mubix
Login
« Intro to RailGun: WIN API for Meterpreter | Main | Get off my lawn! iPhone Geo Blocking »
Monday
Jun282010

Set Wallpaper Meterpreter Script

Certainly nothing to fuss over, but I've had a fascination with setting my target's wallpaper as sort of a calling card for years now. I've been able to set the registry key (HKCU\Control Panel\Desktop\Wallpaper), but until recently I didn't know how to get it to refresh so that it displayed without forcing the user to log out...

First, is the most important part, selection of the wallpaper. This is my first selection:

 

 

 But, it has to be a BMP. So, I created:

metasploit_1024.bmp (2.3 MB)

next run: reg add "HKCU\Control Panel\Desktop" /v Wallpaper /t REG_MULTI_SZ /d "C:\metasploit_1024.bmp"

and finally the magic:

rundll32.exe user32.dll,UpdatePerUserSystemParameters

thats it, run that, and it'll refresh the settings and display the wallpaper in all of it's glory. But I wouldn't be a metasploit dog if I didn't make it into a meterpreter script:

 

download: wallpaper.rb

it's definitely not ready to be in the trunk, but it works, just edit each of the options in the file to point at the bmp you want on the victim's wallpaper and it'll be there.

Todo:

[*] Make each parameter an option so there is no text editing involved

[*] Add  the ability to convert other image types on the fly

[*] Figure out how to get the desktop color to refresh with the wallpaper

 

 

 

 

References (1)

References allow you to track sources for this article, as well as articles that were written in response to this article.

Reader Comments (5)

I've used this technique to refresh the desktop wallpaper (not relating to pen testing) but I've always drawn a blank on refreshing the desktop colour without having the user log out. I'll be interested to see if you or anyone else comes up with a way of doing this.

June 29, 2010 | Unregistered CommenterIain

This looks like a great way to show friends and family how vulnerable they really are and have them understand it cause they can see it.

June 29, 2010 | Unregistered CommenterPi_E

Superb mubix, way to go...

June 30, 2010 | Unregistered Commenterwire[speed]

This looks new to me..But its a great idea..

July 4, 2010 | Unregistered Commenterkissmo

I created a similar meterpreter script a while back, and likewise didn't know how to refresh the screen. Thanks for the info.

July 10, 2010 | Unregistered CommenterChaemelion
Comments for this entry have been disabled. Additional comments may not be added to this entry at this time.