Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decrypt passwords manually #1314

Closed
imusmanmalik opened this issue Jun 1, 2016 · 3 comments
Closed

Decrypt passwords manually #1314

imusmanmalik opened this issue Jun 1, 2016 · 3 comments

Comments

@imusmanmalik
Copy link

Hi Nils,

First of all congrats for a great work and contributions from people.

I would like to know to find a way to be able to decrypt passwords manually as its one of the key things not to be dependent and to be able to restore in case of disasters etc.

I tried few things using the decrypt() function however unable to do so.

i also tried using the salt key on server so lets say

echo "8QYR33E8kZqv5Q6lIM4ol8uSiq6vS3Y1+c+H9U6+GTpMzA6G75rJh53gDu/k1q+EBnqjHGRVy8ofSh799dy9ag==" | base64 -d | openssl aes-256-ecb -d -salt

I am able to extract list of items and encrypted passwords using below query:

select teampass_items.id, teampass_items.label, teampass_items.pw FROM teampass_items

Can you please help point in right direction or how its encrypted? Like i think first using mcrypt + base64 + aes 256 cbc then salt ?

Thanks!

@nilsteampassnet
Copy link
Owner

Hello,

Thanks for this ;)

Concerning your request, it is mandatory to use the library that is used by Teampass which is curently PHPCrypt.
Do some retro-engineering on it to know exactely the commands to run.
Passwords are encoded using the SALT and the IV.

Now don't spend to much time on it because I will move to another library "PHP-Encryption" in next 2.1.27. Notice that this next release will be iso feature, only a (big) change for encryption security.

@pkoevesdi
Copy link

I have the same question: How can I decrypt single passwords I have in a database backup?
I have the backup.sql and the teampass-seckey.txt . Is that all I need?
(Or: How can I reimport the items only from a database backup and the teampass-seckey.txt file? I don't want the whole database back, because I think it was defective.)
It' Teampass 2.1.27.10

@pkoevesdi
Copy link

The solution is in
#848 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants