Set Wallpaper Meterpreter Script
Monday, June 28, 2010 at 4:34PM 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
metasploit,
meterpreter,
script
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.
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.
Superb mubix, way to go...
This looks new to me..But its a great idea..
I created a similar meterpreter script a while back, and likewise didn't know how to refresh the screen. Thanks for the info.