{"id":4022,"date":"2015-11-17T01:10:28","date_gmt":"2015-11-16T17:10:28","guid":{"rendered":"https:\/\/www.darknet.org.uk\/?p=4022"},"modified":"2015-11-17T01:10:48","modified_gmt":"2015-11-16T17:10:48","slug":"keefarce-extract-keepass-passwords-2-x-from-database","status":"publish","type":"post","link":"https:\/\/www.darknet.org.uk\/2015\/11\/keefarce-extract-keepass-passwords-2-x-from-database\/","title":{"rendered":"KeeFarce – Extract KeePass Passwords (2.x) From Database"},"content":{"rendered":"

KeeFarce allows you to extract KeePass passwords (2.x) by using DLL injection to execute code and retrieve the database information from memory. The cleartext information, including usernames, passwords, notes and url’s are dumped into a CSV file in %AppData%.<\/p>\n

\"KeeFarce<\/p>\n

KeeFarce uses DLL injection to execute code within the context of a running KeePass process. C# code execution is achieved by first injecting an architecture-appropriate bootstrap DLL. This spawns an instance of the dot net runtime within the appropriate app domain, subsequently executing KeeFarceDLL.dll (the main C# payload).<\/p>\n

The KeeFarceDLL uses CLRMD to find the necessary object in the KeePass processes heap, locates the pointers to some required sub-objects (using offsets), and uses reflection to call an export method.<\/p>\n

Executing<\/h3>\n

In order to execute on the target host, the following files need to be in the same folder:<\/p>\n