我不记得我的一台服务器的密码。我保存了一个工作连接并想从中获取密码。
来自 Remmina 常见问题解答:
问:我的密码是如何存储的?他们安全吗?
答:它们是使用 3DES 和 256 位随机生成的密钥加密的。您应该确保您的密钥安全。
那么我从哪里获得密钥以及密码将存储在哪里?
编辑:好的,发现它们只是在 .remmina 下的用户主文件夹中。两个私钥都在base64中,解密时我似乎无法正确获取密码......
小智 57
我能够使用@michaelcochez 的 Go 解决方案用 Python 解密它:
import base64
from Crypto.Cipher import DES3
secret = base64.decodestring('<STRING FROM remmina.prefs>')
password = base64.decodestring('<STRING FROM XXXXXXX.remmina>')
print DES3.new(secret[:24], DES3.MODE_CBC, secret[24:]).decrypt(password)
Run Code Online (Sandbox Code Playgroud)
Rin*_*ind 27
它们存储在 Gnome-Keyring 中。
破折号-> 键入“密钥”-> 密码和密钥。
在较新版本的海马(又名“密码和密钥”)中,必须选择“查看”->“显示任何”以查看密钥。搜索“remmina”。
小智 20
我在一个名为的文件中找到了密钥,~/.remmina/remmina.prefs
加密的密码在~/.remmina/nnnnnnnnnnn.remmina
.
我写了一个可用于解密的代码(在 Go 中):
//Decrypts obfuscated passwords by Remmina - The GTK+ Remote Desktop Client
//written by Michael Cochez
package main
import (
"crypto/cipher"
"crypto/des"
"encoding/base64"
"fmt"
"log"
)
//set the variables here
var base64secret = "yoursecret"
var base64password = "theconnectionpassword"
//The secret is used for encrypting the passwords. This can typically be found from ~/.remmina/remmina.pref on the line containing 'secret='.
//"The encrypted password used for the connection. This can typically be found from /.remmina/dddddddddddd.remmina " on the line containing 'password='.
//Copy everything after the '=' sign. Also include final '=' signs if they happen to be there.
//returns a function which can be used for decrypting passwords
func makeRemminaDecrypter(base64secret string) func(string) string {
//decode the secret
secret, err := base64.StdEncoding.DecodeString(base64secret)
if err != nil {
log.Fatal("Base 64 decoding failed:", err)
}
if len(secret) != 32 {
log.Fatal("the secret is not 32 bytes long")
}
//the key is the 24 first bits of the secret
key := secret[:24]
//3DES cipher
block, err := des.NewTripleDESCipher(key)
if err != nil {
log.Fatal("Failed creating the 3Des cipher block", err)
}
//the rest of the secret is the iv
iv := secret[24:]
decrypter := cipher.NewCBCDecrypter(block, iv)
return func(encodedEncryptedPassword string) string {
encryptedPassword, err := base64.StdEncoding.DecodeString(encodedEncryptedPassword)
if err != nil {
log.Fatal("Base 64 decoding failed:", err)
}
//in place decryption
decrypter.CryptBlocks(encryptedPassword, encryptedPassword)
return string(encryptedPassword)
}
}
func main() {
if base64secret == "yoursecret" || base64password == "theconnectionpassword" {
log.Fatal("both base64secret and base64password variables must be set")
}
decrypter := makeRemminaDecrypter(base64secret)
fmt.Printf("Passwd : %v\n", decrypter(base64password))
}
Run Code Online (Sandbox Code Playgroud)
该代码可以在线运行,但是您信任 golang.org。
小智 17
Remmina (1.3.3) 存储密码感谢libsecret
,该libsecret-tools
包可以帮助您检索存储的密码。
我正在寻找已保存用户密码的 Windows RDP 连接的密码;我终于用命令找到了密码
secret-tool search key password
Run Code Online (Sandbox Code Playgroud)
小智 12
我制作了一个脚本来自动解密你的密码文件。最新版本位于https://github.com/peppelinux/remmina_password_exposer。
#!/usr/bin/python
from Crypto.Cipher import DES3
import base64
import os
import re
from os.path import expanduser
home = expanduser("~")
# costanti :)
REMMINA_FOLDER = os.getenv('REMMINA_FOLDER', home+'/'+'.remmina/')
REMMINA_PREF = 'remmina.pref'
REGEXP_ACCOUNTS = r'[0-9]{13}\.remmina(.swp)?'
REGEXP_PREF = r'remmina.pref'
diz = {}
fs = open(REMMINA_FOLDER+REMMINA_PREF)
fso = fs.readlines()
fs.close()
for i in fso:
if re.findall(r'secret=', i):
r_secret = i[len(r'secret='):][:-1]
print 'found secret', r_secret
for f in os.listdir(REMMINA_FOLDER):
if re.findall(REGEXP_ACCOUNTS, f):
o = open( REMMINA_FOLDER+f, 'r')
fo = o.readlines()
o.close()
for i in fo:
if re.findall(r'password=', i):
r_password = i[len(r'password='):][:-1]
if re.findall(r'^name=', i):
r_name = i.split('=')[1][:-1]
if re.findall(r'username=', i):
r_username = i.split('=')[1][:-1]
#~ print fo
#~ print 'found', f
password = base64.decodestring(r_password)
secret = base64.decodestring(r_secret)
diz[r_name] = DES3.new(secret[:24], DES3.MODE_CBC, secret[24:]).decrypt(password)
# print the username and password of the last decryption
print r_name, r_username, diz[r_name]
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
38709 次 |
最近记录: |