Menu

#2389 Search in history

KeePass_2.x
closed
nobody
None
5
2021-02-26
2018-09-18
No

KeePass 1.x didn't have history, instead changed entries were copied to the Backup group which could be searched as usual. KeePass 2.x has special per-entry history but no means to search it.

Is it possible to add a checkbox to the search dialog so it would include all history records as well as regular entries? For example, to look for a password possibly used in the past (and changed since then).

Discussion

  • Paul

    Paul - 2018-09-18
     
    • David Putman

      David Putman - 2018-09-19

      If you read both posts carefully, you will notice they are different. That post refers to searching excluded entries, this feature request - to searching history of entries.

      Should I create another feature request about searching excluded entries?

       
  • Dominik Reichl

    Dominik Reichl - 2018-09-18
    • summary: Search history --> Search in history
    • Group: KeePass --> KeePass_2.x
     
  • Dark Titan

    Dark Titan - 2019-06-25

    I just wanted to add my support to this request.
    I would be very interested in this search as a way to allow users to figure out, if they appear on 'have i been pwed', exactly which account on which website a breach came from. It would also allow users to create new passwords that have never been used anywhere, ever.

     
  • Paul

    Paul - 2019-06-26

    There are two plug-ins for that.
    https://keepass.info/plugins.html#hibp

    Unique passwords can be generated using the password generator. No need to check against old passwords.

    cheers, Paul

     
  • Glyph

    Glyph - 2020-01-24

    +1 for this.
    Retrieving old entries by searching in the history would be way better than having to paste the old data in the comments field (which currently is the only way to make the old data searchable). I have my history set to 'limitless' so this would be a more decent and secure way than to overload the textfield with old stuff.

     
  • Paul

    Paul - 2020-01-25

    What do you search for that is no longer in the live entry?

    cheers, Paul

     
  • Glyph

    Glyph - 2020-01-25

    Examples:
    • When it comes to banking there are credit cards and debit cards where it often comes to changes: e.g. the bank informs me that my credit card has been compromised, therefore I get a new one with a new number.
    Later I check my account turnovers and wonder which card created that turnover; the number of the card is not in my KeePass (well, it is, but it hides in the history)
    • I read about a vulnerability and note the old and new password I have set. Later I find the note and wonder what site that might have been. If, in the meantime, I changed the password again there's no way to find it.

    Those are things that happen to me regularily. Blame me for not being more organized but those things could be handled more easily when there were a way to search the KeePass history.
    Keeping all the information in the comment field instead makes it more confusing to spot the relevant comment data.

     
  • Dominik Reichl

    Dominik Reichl - 2020-10-29
    • status: open --> closed
     
  • Dominik Reichl

    Dominik Reichl - 2020-10-29

    I've added a 'History' option in the 'Find' dialog.

    A development snapshot for testing can be found in this thread:
    https://sourceforge.net/p/keepass/discussion/329220/thread/2958134263/

    Thanks and best regards,
    Dominik

     
  • TWRBox

    TWRBox - 2020-12-17

    I'm researching a possible leak of credentials, and I would like to research whether a certain password is in the history of any of the entries. However, it appears that the search is no longer finding passwords for history entries. I changed a password as a test, and the search stops working for the password that went into history, only finds the "current" password.

     
  • Dominik Reichl

    Dominik Reichl - 2020-12-17

    For this task, you have to turn on the options 'Password' and 'History' in the 'Find' dialog (Ctrl+F).

    Here's the latest development snapshot for testing:
    https://keepass.info/filepool/KeePass_201210_2.zip

    Thanks and best regards,
    Dominik

     
    👍
    1
    • TWRBox

      TWRBox - 2020-12-17

      Thanks for the quick response!

      The version you sent really has this option, but the one I'm using (2.46) doesn't. I just noticed that the 2.46 release date is 2020-09-10, that is, before the topic

      https://sourceforge.net/p/keepass/discussion/329220/thread/2958134263/

      which is 2020-10-29.

      Sorry, my fault.

       
    • Todd Powers

      Todd Powers - 2021-02-25

      Thanks for this feature Dominik!

      I recently got a notice that a specific username/password combination had been found in a "dark web scan" and none of my current entries had a matching password. So I was very pleased to find this feature request and that that the most recent update included the ability to search history!

      When I search on the password, I get a lot of entries (way before I learned to use different passwords for each login) Is there a way to search on username=xxxxx AND password=yyyyy?

      I looked at the XPath search and that looks capable, but the only reference to KeePass 2.x XML structure, was the simple file you referenced in this comment, but it doesn't reference any list of Keys that exist under the <Entry /> element, in order to know the correct XPath to target.

      Based on one of your examples in the documentation, I tried //Entry/String[(Key = 'Username') and contains(Value, 'user@domain.com')]/.. just to see if I could find an entry and it didn't return any results.

       

      Last edit: Todd Powers 2021-02-25
  • Paul

    Paul - 2021-02-25

    XPath is case sensitive. (Key = 'UserName')

    Better to search by password and then sort by user name.

    cheers, Paul

     
  • Dominik Reichl

    Dominik Reichl - 2021-02-25

    In order to see your database in the KeePass 2.x XML format, you can export it (via 'File' → 'Export') to a 'KeePass XML (2.x)' file.

    The following XPath expression finds all entries whose user name contains "AB" and whose password contains "CD" (case-sensitive):
    //Entry/String[(Key = 'UserName') and contains(Value, 'AB')]/../String[(Key = 'Password') and contains(Value, 'CD')]/..
    (the options for searching in user names and in passwords must be turned on).

    Best regards,
    Dominik

     
    • Todd Powers

      Todd Powers - 2021-02-25

      Thanks @dreichl. That is what I was trying, I just didn't have the UserName key cased properly.

      In regards to exporting my database, I did do that, but it was terribly large and hard to navigate. I also wasn't necessarily excited about exporting all my real usernames and passwords in readable format, to a file on my hard drive.

      It would be handy to have way to export Keys, but not Values. That would make the exported "schema" much smaller, easier to parse through, and more secure than dumping everything on my hard drive.

      I realize that with custom strings, everyone's schema might be slightly different, so I tried using the Microsoft.NET tool (XSD.exe) to spit out the schema for my exported XML, but it gave the following error:

      Microsoft (R) Xml Schemas/DataTypes support utility
      [Microsoft (R) .NET Framework, Version 4.8.3928.0]
      Copyright (C) Microsoft Corporation. All rights reserved.
      Error: There was an error processing 'KeePassExport.xml'.
        - Cannot add a nested relation or an element column to
        a table containing a SimpleContent column.
      

      It doesn't specify a row/column for the error, so I'm not exactly sure what it's referring to.

      I also found a good reference on using .NET to load the XML into a DataSet and use the

      `MyDataSet.WriteXmlSchema(@"MySchema.xsd");`
      

      method, to output a schema. I'm not sure if your chosen development platform has anything similar in its object model, but if it does (and it works), you could always add a menu item to generate the schema for a given user's KeePass database and dump it into an xsd file.

       
  • Paul

    Paul - 2021-02-26

    You could export a single entry.
    Select the entry
    Entry > Data Exchange > Export Entry

    cheers, Paul

     

Log in to post a comment.