How to extract saved password from Remmina?How secure is KeePassX?Unlock all private keys on Ubuntu, entering...

How to approximate rolls for potions of healing using only d6's?

Has the Isbell–Freyd criterion ever been used to check that a category is concretisable?

When was drinking water recognized as crucial in marathon running?

What is this waxed root vegetable?

Where is the fallacy here?

How do I construct an nxn matrix?

Do Hexblade warlocks choose their spells from the Hexblade spell list or the warlock spell list?

Six real numbers so that product of any five is the sixth one

Make me a metasequence

Contradiction with Banach Fixed Point Theorem

What is the difference between throw e and throw new Exception(e)?

Is the set of paths between any two points moving only in units on the plane countable or uncountable?

How to avoid being sexist when trying to employ someone to function in a very sexist environment?

Can you benefit from a Hammer of Thunderbolts’s Strength increase by holding it with something else than your hands?

Is there a German word for “analytics”?

How do you say "powers of ten"?

Reason Why Dimensional Travelling Would be Restricted

Why does the 31P{1H} NMR spectrum of cis-[Mo(CO)2(dppe)2] show two signals?

The change directory (cd) command is not working with a USB drive

What is the wife of a henpecked husband called?

What is better: yes / no radio, or simple checkbox?

How to properly claim credit for peer review?

Accessing something inside the object when you don't know the key

Called into a meeting and told we are being made redundant (laid off) and "not to share outside". Can I tell my partner?



How to extract saved password from Remmina?


How secure is KeePassX?Unlock all private keys on Ubuntu, entering password only once at loginGigolo/gnome password safetyEmail password forgottenManage passwords in Chromium --> security risk?how to prevent kleopatra (or other openpgp tools) from storing your key passphrasesWhere is a passphrase stored when I request “Remember until I logout”?Passwords missing from Seahorse (Passwords and Keys)Remmina 1.2 ssh authentication optionsDisks is saving my password to keychain













27















I don't remember my password for one of my servers. I have a working connection saved and want to get the password from it.



From Remmina faq:




Q: How are my passwords stored? Are they secure?

A: They are encrypted using 3DES with a 256bit randomly generated key. You should keep your key secure.




So where do I get the key and where would the passwords be stored?



EDIT:
Ok found that they are just in your users home folder under .remmina.
both the private key are in base64 and i can't seem to get the password right when decrypting......










share|improve this question





























    27















    I don't remember my password for one of my servers. I have a working connection saved and want to get the password from it.



    From Remmina faq:




    Q: How are my passwords stored? Are they secure?

    A: They are encrypted using 3DES with a 256bit randomly generated key. You should keep your key secure.




    So where do I get the key and where would the passwords be stored?



    EDIT:
    Ok found that they are just in your users home folder under .remmina.
    both the private key are in base64 and i can't seem to get the password right when decrypting......










    share|improve this question



























      27












      27








      27


      12






      I don't remember my password for one of my servers. I have a working connection saved and want to get the password from it.



      From Remmina faq:




      Q: How are my passwords stored? Are they secure?

      A: They are encrypted using 3DES with a 256bit randomly generated key. You should keep your key secure.




      So where do I get the key and where would the passwords be stored?



      EDIT:
      Ok found that they are just in your users home folder under .remmina.
      both the private key are in base64 and i can't seem to get the password right when decrypting......










      share|improve this question
















      I don't remember my password for one of my servers. I have a working connection saved and want to get the password from it.



      From Remmina faq:




      Q: How are my passwords stored? Are they secure?

      A: They are encrypted using 3DES with a 256bit randomly generated key. You should keep your key secure.




      So where do I get the key and where would the passwords be stored?



      EDIT:
      Ok found that they are just in your users home folder under .remmina.
      both the private key are in base64 and i can't seem to get the password right when decrypting......







      password remmina






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited May 8 '13 at 23:23







      linuxnewb

















      asked May 5 '13 at 1:46









      linuxnewblinuxnewb

      136124




      136124






















          6 Answers
          6






          active

          oldest

          votes


















          45














          I was able to use the Go solution by @michaelcochez to decrypt it with 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)





          share|improve this answer





















          • 2





            For reasons that make me hate myself I needed a one-liner :/ : python -c "import base64,sys;from Crypto.Cipher import DES3;pc=open('/home/admalledd/.remmina/remmina.pref').read();pci=pc.index('secret=');secret=pc[pci:pc.index('n',pci)].split('=',1)[1];cc=open(sys.argv[1]).read();cci=cc.index('password');password=cc[cci:cc.index('n',cci)].split('=',1)[1];secret,password=base64.decodestring(secret),base64.decodestring(password); print DES3.new(secret[:24], DES3.MODE_CBC, secret[24:]).decrypt(password)" .remmina/1474332312568.remmina. Left here for the next time I might need it.

            – admalledd
            Dec 17 '16 at 1:46











          • Nice one.. Works just fine

            – user169015
            Feb 23 '17 at 6:57






          • 3





            The latest version of remmina has changed the location of these files. The pref file is now at: $HOME/.config/remmina/ and the connection file is listed at the bottom in remmina when you click on the connection (for example: ~/.local/share/remmina/4823893432523.remmina)

            – Ring
            Sep 8 '17 at 16:28






          • 2





            Thank you past self, slightly updated one-liner that takes two args for the files. python -c "import base64,sys;from Crypto.Cipher import DES3;pc=open(sys.argv[1]).read();pci=pc.index('secret=');secret=pc[pci:pc.index('n',pci)].split('=',1)[1];cc=open(sys.argv[2]).read();cci=cc.index('password');password=cc[cci:cc.index('n',cci)].split('=',1)[1];secret,password=base64.decodestring(secret),base64.decodestring(password); print DES3.new(secret[:24], DES3.MODE_CBC, secret[24:]).decrypt(password)" /tmp/remmina/remmina.pref /tmp/remmina/00000000000.remmina

            – admalledd
            Mar 10 '18 at 1:32











          • @admalledd You really should post that as an answer!

            – Michael
            Nov 21 '18 at 0:50



















          19














          I found the key in a file called ~/.remmina/remmina.prefs and the encrypted passwords are in ~/.remmina/nnnnnnnnnnn.remmina.



          I wrote a code (in Go) which can be used for decryption:



          //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 : %vn", decrypter(base64password))

          }


          The code can be run online, but then you are trusting golang.org.






          share|improve this answer

































            10














            I made a script that automatically decrypt your password files. The most recent version is at 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]





            share|improve this answer

































              8














              They are stored in Gnome-Keyring.



              Dash->type "keys"->Passwords&Keys.



              In newer versions of seahorse (a.k.a. "Passwords and Keys") one has to select "View" -> "Show any" to see the keys. Search for "remmina".






              share|improve this answer





















              • 1





                tried that already..... also i'm using lxde

                – linuxnewb
                May 5 '13 at 10:21






              • 1





                This is true in some cases. Try this if the password listed in ~/.remmina/nnnnnnnnnnn.remmina is just ..

                – Kupiakos
                Apr 27 '15 at 15:05



















              2














              I created a perl script to decode remmina passwords. It extract your key and decode all your saved passwords (locally).



              https://github.com/lepe/scripts/blob/master/decode_remmina.pl (check for updated version)



              #!/usr/bin/perl

              use strict;
              use warnings;
              use Crypt::CBC; #Crypt::DES_EDE3
              use MIME::Base64;
              use File::Slurp;

              my $remmina_dir = $ENV{"HOME"} . "/.remmina";
              my $remmina_cfg = $remmina_dir . "/remmina.pref";

              my $content = read_file($remmina_cfg);
              if($content) {
              my ($secret) = $content =~ /^secret=(.*)/m;
              if($secret) {
              my $secret_bin = decode_base64($secret);
              my ($key, $iv) = ( $secret_bin =~ /.{0,24}/gs );
              my @files = <$remmina_dir/*.remmina>;

              my $des = Crypt::CBC->new(
              -cipher=>'DES_EDE3',
              -key=>$key,
              -iv=>$iv,
              -header=>'none',
              -literal_key=>1,
              -padding=>'null'
              );
              if(@files > 0) {
              foreach my $file (@files) {
              my $config = read_file($file);
              my ($password) = $config =~ /^password=(.*)/m;
              my ($name) = $config =~ /^name=(.*)/m;
              my ($host) = $config =~ /^server=(.*)/m;
              my ($user) = $config =~ /^username=(.*)/m;
              my $pass_bin = decode_base64($password);
              my $pass_plain = $des->decrypt( $pass_bin );
              if($pass_plain) {
              print "$name $host $user $pass_plainn";
              }
              }
              } else {
              print "Unable to find *.remmina files n";
              }
              } else {
              print "No secret key found...n";
              }
              } else {
              print "Unable to read content from remmina.prefn";
              }


              You will need to install these packages (for example, using cpan <PACKAGE>): Crypt::CBC, Crypt::DES_EDE3, MIME::Base64, File::Slurp



              Sample output:



              (Name, host, user, password: tab separated)



              Server1 192.168.1.25    administrator   jM822Azss2fake
              Server2 192.168.1.88:2899 admin JaxHaxFakez90





              share|improve this answer

































                1














                I needed to do the reverse and encrypt passwords for Remmina using a Python script. In case anyone needs it here's the code:



                import base64    
                from Crypto.Cipher import DES3

                REMMINAPREF_SECRET_B64=b'G5XKhImmX+3MaRAWU920B31AtQLDcWEq+Geq4L+7sES='

                def encryptRemminaPass(plain):
                plain = plain.encode('utf-8')
                secret = base64.b64decode(REMMINAPREF_SECRET_B64)
                key = secret[:24]
                iv = secret[24:]
                plain = plain + b"" * (8 - len(plain) % 8)
                cipher = DES3.new(key, DES3.MODE_CBC, iv)
                result = cipher.encrypt(plain)
                result = base64.b64encode(result)
                result = result.decode('utf-8')
                return result





                share|improve this answer

























                  Your Answer








                  StackExchange.ready(function() {
                  var channelOptions = {
                  tags: "".split(" "),
                  id: "89"
                  };
                  initTagRenderer("".split(" "), "".split(" "), channelOptions);

                  StackExchange.using("externalEditor", function() {
                  // Have to fire editor after snippets, if snippets enabled
                  if (StackExchange.settings.snippets.snippetsEnabled) {
                  StackExchange.using("snippets", function() {
                  createEditor();
                  });
                  }
                  else {
                  createEditor();
                  }
                  });

                  function createEditor() {
                  StackExchange.prepareEditor({
                  heartbeatType: 'answer',
                  autoActivateHeartbeat: false,
                  convertImagesToLinks: true,
                  noModals: true,
                  showLowRepImageUploadWarning: true,
                  reputationToPostImages: 10,
                  bindNavPrevention: true,
                  postfix: "",
                  imageUploader: {
                  brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
                  contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
                  allowUrls: true
                  },
                  onDemand: true,
                  discardSelector: ".discard-answer"
                  ,immediatelyShowMarkdownHelp:true
                  });


                  }
                  });














                  draft saved

                  draft discarded


















                  StackExchange.ready(
                  function () {
                  StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f290824%2fhow-to-extract-saved-password-from-remmina%23new-answer', 'question_page');
                  }
                  );

                  Post as a guest















                  Required, but never shown

























                  6 Answers
                  6






                  active

                  oldest

                  votes








                  6 Answers
                  6






                  active

                  oldest

                  votes









                  active

                  oldest

                  votes






                  active

                  oldest

                  votes









                  45














                  I was able to use the Go solution by @michaelcochez to decrypt it with 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)





                  share|improve this answer





















                  • 2





                    For reasons that make me hate myself I needed a one-liner :/ : python -c "import base64,sys;from Crypto.Cipher import DES3;pc=open('/home/admalledd/.remmina/remmina.pref').read();pci=pc.index('secret=');secret=pc[pci:pc.index('n',pci)].split('=',1)[1];cc=open(sys.argv[1]).read();cci=cc.index('password');password=cc[cci:cc.index('n',cci)].split('=',1)[1];secret,password=base64.decodestring(secret),base64.decodestring(password); print DES3.new(secret[:24], DES3.MODE_CBC, secret[24:]).decrypt(password)" .remmina/1474332312568.remmina. Left here for the next time I might need it.

                    – admalledd
                    Dec 17 '16 at 1:46











                  • Nice one.. Works just fine

                    – user169015
                    Feb 23 '17 at 6:57






                  • 3





                    The latest version of remmina has changed the location of these files. The pref file is now at: $HOME/.config/remmina/ and the connection file is listed at the bottom in remmina when you click on the connection (for example: ~/.local/share/remmina/4823893432523.remmina)

                    – Ring
                    Sep 8 '17 at 16:28






                  • 2





                    Thank you past self, slightly updated one-liner that takes two args for the files. python -c "import base64,sys;from Crypto.Cipher import DES3;pc=open(sys.argv[1]).read();pci=pc.index('secret=');secret=pc[pci:pc.index('n',pci)].split('=',1)[1];cc=open(sys.argv[2]).read();cci=cc.index('password');password=cc[cci:cc.index('n',cci)].split('=',1)[1];secret,password=base64.decodestring(secret),base64.decodestring(password); print DES3.new(secret[:24], DES3.MODE_CBC, secret[24:]).decrypt(password)" /tmp/remmina/remmina.pref /tmp/remmina/00000000000.remmina

                    – admalledd
                    Mar 10 '18 at 1:32











                  • @admalledd You really should post that as an answer!

                    – Michael
                    Nov 21 '18 at 0:50
















                  45














                  I was able to use the Go solution by @michaelcochez to decrypt it with 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)





                  share|improve this answer





















                  • 2





                    For reasons that make me hate myself I needed a one-liner :/ : python -c "import base64,sys;from Crypto.Cipher import DES3;pc=open('/home/admalledd/.remmina/remmina.pref').read();pci=pc.index('secret=');secret=pc[pci:pc.index('n',pci)].split('=',1)[1];cc=open(sys.argv[1]).read();cci=cc.index('password');password=cc[cci:cc.index('n',cci)].split('=',1)[1];secret,password=base64.decodestring(secret),base64.decodestring(password); print DES3.new(secret[:24], DES3.MODE_CBC, secret[24:]).decrypt(password)" .remmina/1474332312568.remmina. Left here for the next time I might need it.

                    – admalledd
                    Dec 17 '16 at 1:46











                  • Nice one.. Works just fine

                    – user169015
                    Feb 23 '17 at 6:57






                  • 3





                    The latest version of remmina has changed the location of these files. The pref file is now at: $HOME/.config/remmina/ and the connection file is listed at the bottom in remmina when you click on the connection (for example: ~/.local/share/remmina/4823893432523.remmina)

                    – Ring
                    Sep 8 '17 at 16:28






                  • 2





                    Thank you past self, slightly updated one-liner that takes two args for the files. python -c "import base64,sys;from Crypto.Cipher import DES3;pc=open(sys.argv[1]).read();pci=pc.index('secret=');secret=pc[pci:pc.index('n',pci)].split('=',1)[1];cc=open(sys.argv[2]).read();cci=cc.index('password');password=cc[cci:cc.index('n',cci)].split('=',1)[1];secret,password=base64.decodestring(secret),base64.decodestring(password); print DES3.new(secret[:24], DES3.MODE_CBC, secret[24:]).decrypt(password)" /tmp/remmina/remmina.pref /tmp/remmina/00000000000.remmina

                    – admalledd
                    Mar 10 '18 at 1:32











                  • @admalledd You really should post that as an answer!

                    – Michael
                    Nov 21 '18 at 0:50














                  45












                  45








                  45







                  I was able to use the Go solution by @michaelcochez to decrypt it with 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)





                  share|improve this answer















                  I was able to use the Go solution by @michaelcochez to decrypt it with 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)






                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Jul 22 '17 at 21:18









                  David Foerster

                  28.4k1366111




                  28.4k1366111










                  answered Nov 19 '13 at 21:17









                  Sean ReifschneiderSean Reifschneider

                  56346




                  56346








                  • 2





                    For reasons that make me hate myself I needed a one-liner :/ : python -c "import base64,sys;from Crypto.Cipher import DES3;pc=open('/home/admalledd/.remmina/remmina.pref').read();pci=pc.index('secret=');secret=pc[pci:pc.index('n',pci)].split('=',1)[1];cc=open(sys.argv[1]).read();cci=cc.index('password');password=cc[cci:cc.index('n',cci)].split('=',1)[1];secret,password=base64.decodestring(secret),base64.decodestring(password); print DES3.new(secret[:24], DES3.MODE_CBC, secret[24:]).decrypt(password)" .remmina/1474332312568.remmina. Left here for the next time I might need it.

                    – admalledd
                    Dec 17 '16 at 1:46











                  • Nice one.. Works just fine

                    – user169015
                    Feb 23 '17 at 6:57






                  • 3





                    The latest version of remmina has changed the location of these files. The pref file is now at: $HOME/.config/remmina/ and the connection file is listed at the bottom in remmina when you click on the connection (for example: ~/.local/share/remmina/4823893432523.remmina)

                    – Ring
                    Sep 8 '17 at 16:28






                  • 2





                    Thank you past self, slightly updated one-liner that takes two args for the files. python -c "import base64,sys;from Crypto.Cipher import DES3;pc=open(sys.argv[1]).read();pci=pc.index('secret=');secret=pc[pci:pc.index('n',pci)].split('=',1)[1];cc=open(sys.argv[2]).read();cci=cc.index('password');password=cc[cci:cc.index('n',cci)].split('=',1)[1];secret,password=base64.decodestring(secret),base64.decodestring(password); print DES3.new(secret[:24], DES3.MODE_CBC, secret[24:]).decrypt(password)" /tmp/remmina/remmina.pref /tmp/remmina/00000000000.remmina

                    – admalledd
                    Mar 10 '18 at 1:32











                  • @admalledd You really should post that as an answer!

                    – Michael
                    Nov 21 '18 at 0:50














                  • 2





                    For reasons that make me hate myself I needed a one-liner :/ : python -c "import base64,sys;from Crypto.Cipher import DES3;pc=open('/home/admalledd/.remmina/remmina.pref').read();pci=pc.index('secret=');secret=pc[pci:pc.index('n',pci)].split('=',1)[1];cc=open(sys.argv[1]).read();cci=cc.index('password');password=cc[cci:cc.index('n',cci)].split('=',1)[1];secret,password=base64.decodestring(secret),base64.decodestring(password); print DES3.new(secret[:24], DES3.MODE_CBC, secret[24:]).decrypt(password)" .remmina/1474332312568.remmina. Left here for the next time I might need it.

                    – admalledd
                    Dec 17 '16 at 1:46











                  • Nice one.. Works just fine

                    – user169015
                    Feb 23 '17 at 6:57






                  • 3





                    The latest version of remmina has changed the location of these files. The pref file is now at: $HOME/.config/remmina/ and the connection file is listed at the bottom in remmina when you click on the connection (for example: ~/.local/share/remmina/4823893432523.remmina)

                    – Ring
                    Sep 8 '17 at 16:28






                  • 2





                    Thank you past self, slightly updated one-liner that takes two args for the files. python -c "import base64,sys;from Crypto.Cipher import DES3;pc=open(sys.argv[1]).read();pci=pc.index('secret=');secret=pc[pci:pc.index('n',pci)].split('=',1)[1];cc=open(sys.argv[2]).read();cci=cc.index('password');password=cc[cci:cc.index('n',cci)].split('=',1)[1];secret,password=base64.decodestring(secret),base64.decodestring(password); print DES3.new(secret[:24], DES3.MODE_CBC, secret[24:]).decrypt(password)" /tmp/remmina/remmina.pref /tmp/remmina/00000000000.remmina

                    – admalledd
                    Mar 10 '18 at 1:32











                  • @admalledd You really should post that as an answer!

                    – Michael
                    Nov 21 '18 at 0:50








                  2




                  2





                  For reasons that make me hate myself I needed a one-liner :/ : python -c "import base64,sys;from Crypto.Cipher import DES3;pc=open('/home/admalledd/.remmina/remmina.pref').read();pci=pc.index('secret=');secret=pc[pci:pc.index('n',pci)].split('=',1)[1];cc=open(sys.argv[1]).read();cci=cc.index('password');password=cc[cci:cc.index('n',cci)].split('=',1)[1];secret,password=base64.decodestring(secret),base64.decodestring(password); print DES3.new(secret[:24], DES3.MODE_CBC, secret[24:]).decrypt(password)" .remmina/1474332312568.remmina. Left here for the next time I might need it.

                  – admalledd
                  Dec 17 '16 at 1:46





                  For reasons that make me hate myself I needed a one-liner :/ : python -c "import base64,sys;from Crypto.Cipher import DES3;pc=open('/home/admalledd/.remmina/remmina.pref').read();pci=pc.index('secret=');secret=pc[pci:pc.index('n',pci)].split('=',1)[1];cc=open(sys.argv[1]).read();cci=cc.index('password');password=cc[cci:cc.index('n',cci)].split('=',1)[1];secret,password=base64.decodestring(secret),base64.decodestring(password); print DES3.new(secret[:24], DES3.MODE_CBC, secret[24:]).decrypt(password)" .remmina/1474332312568.remmina. Left here for the next time I might need it.

                  – admalledd
                  Dec 17 '16 at 1:46













                  Nice one.. Works just fine

                  – user169015
                  Feb 23 '17 at 6:57





                  Nice one.. Works just fine

                  – user169015
                  Feb 23 '17 at 6:57




                  3




                  3





                  The latest version of remmina has changed the location of these files. The pref file is now at: $HOME/.config/remmina/ and the connection file is listed at the bottom in remmina when you click on the connection (for example: ~/.local/share/remmina/4823893432523.remmina)

                  – Ring
                  Sep 8 '17 at 16:28





                  The latest version of remmina has changed the location of these files. The pref file is now at: $HOME/.config/remmina/ and the connection file is listed at the bottom in remmina when you click on the connection (for example: ~/.local/share/remmina/4823893432523.remmina)

                  – Ring
                  Sep 8 '17 at 16:28




                  2




                  2





                  Thank you past self, slightly updated one-liner that takes two args for the files. python -c "import base64,sys;from Crypto.Cipher import DES3;pc=open(sys.argv[1]).read();pci=pc.index('secret=');secret=pc[pci:pc.index('n',pci)].split('=',1)[1];cc=open(sys.argv[2]).read();cci=cc.index('password');password=cc[cci:cc.index('n',cci)].split('=',1)[1];secret,password=base64.decodestring(secret),base64.decodestring(password); print DES3.new(secret[:24], DES3.MODE_CBC, secret[24:]).decrypt(password)" /tmp/remmina/remmina.pref /tmp/remmina/00000000000.remmina

                  – admalledd
                  Mar 10 '18 at 1:32





                  Thank you past self, slightly updated one-liner that takes two args for the files. python -c "import base64,sys;from Crypto.Cipher import DES3;pc=open(sys.argv[1]).read();pci=pc.index('secret=');secret=pc[pci:pc.index('n',pci)].split('=',1)[1];cc=open(sys.argv[2]).read();cci=cc.index('password');password=cc[cci:cc.index('n',cci)].split('=',1)[1];secret,password=base64.decodestring(secret),base64.decodestring(password); print DES3.new(secret[:24], DES3.MODE_CBC, secret[24:]).decrypt(password)" /tmp/remmina/remmina.pref /tmp/remmina/00000000000.remmina

                  – admalledd
                  Mar 10 '18 at 1:32













                  @admalledd You really should post that as an answer!

                  – Michael
                  Nov 21 '18 at 0:50





                  @admalledd You really should post that as an answer!

                  – Michael
                  Nov 21 '18 at 0:50













                  19














                  I found the key in a file called ~/.remmina/remmina.prefs and the encrypted passwords are in ~/.remmina/nnnnnnnnnnn.remmina.



                  I wrote a code (in Go) which can be used for decryption:



                  //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 : %vn", decrypter(base64password))

                  }


                  The code can be run online, but then you are trusting golang.org.






                  share|improve this answer






























                    19














                    I found the key in a file called ~/.remmina/remmina.prefs and the encrypted passwords are in ~/.remmina/nnnnnnnnnnn.remmina.



                    I wrote a code (in Go) which can be used for decryption:



                    //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 : %vn", decrypter(base64password))

                    }


                    The code can be run online, but then you are trusting golang.org.






                    share|improve this answer




























                      19












                      19








                      19







                      I found the key in a file called ~/.remmina/remmina.prefs and the encrypted passwords are in ~/.remmina/nnnnnnnnnnn.remmina.



                      I wrote a code (in Go) which can be used for decryption:



                      //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 : %vn", decrypter(base64password))

                      }


                      The code can be run online, but then you are trusting golang.org.






                      share|improve this answer















                      I found the key in a file called ~/.remmina/remmina.prefs and the encrypted passwords are in ~/.remmina/nnnnnnnnnnn.remmina.



                      I wrote a code (in Go) which can be used for decryption:



                      //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 : %vn", decrypter(base64password))

                      }


                      The code can be run online, but then you are trusting golang.org.







                      share|improve this answer














                      share|improve this answer



                      share|improve this answer








                      edited Jul 22 '17 at 21:22









                      David Foerster

                      28.4k1366111




                      28.4k1366111










                      answered Jul 9 '13 at 19:55









                      michaelcochezmichaelcochez

                      19113




                      19113























                          10














                          I made a script that automatically decrypt your password files. The most recent version is at 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]





                          share|improve this answer






























                            10














                            I made a script that automatically decrypt your password files. The most recent version is at 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]





                            share|improve this answer




























                              10












                              10








                              10







                              I made a script that automatically decrypt your password files. The most recent version is at 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]





                              share|improve this answer















                              I made a script that automatically decrypt your password files. The most recent version is at 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]






                              share|improve this answer














                              share|improve this answer



                              share|improve this answer








                              edited Dec 8 '17 at 12:05









                              benjamin button

                              13110




                              13110










                              answered Aug 16 '14 at 9:55









                              peppelinuxpeppelinux

                              10112




                              10112























                                  8














                                  They are stored in Gnome-Keyring.



                                  Dash->type "keys"->Passwords&Keys.



                                  In newer versions of seahorse (a.k.a. "Passwords and Keys") one has to select "View" -> "Show any" to see the keys. Search for "remmina".






                                  share|improve this answer





















                                  • 1





                                    tried that already..... also i'm using lxde

                                    – linuxnewb
                                    May 5 '13 at 10:21






                                  • 1





                                    This is true in some cases. Try this if the password listed in ~/.remmina/nnnnnnnnnnn.remmina is just ..

                                    – Kupiakos
                                    Apr 27 '15 at 15:05
















                                  8














                                  They are stored in Gnome-Keyring.



                                  Dash->type "keys"->Passwords&Keys.



                                  In newer versions of seahorse (a.k.a. "Passwords and Keys") one has to select "View" -> "Show any" to see the keys. Search for "remmina".






                                  share|improve this answer





















                                  • 1





                                    tried that already..... also i'm using lxde

                                    – linuxnewb
                                    May 5 '13 at 10:21






                                  • 1





                                    This is true in some cases. Try this if the password listed in ~/.remmina/nnnnnnnnnnn.remmina is just ..

                                    – Kupiakos
                                    Apr 27 '15 at 15:05














                                  8












                                  8








                                  8







                                  They are stored in Gnome-Keyring.



                                  Dash->type "keys"->Passwords&Keys.



                                  In newer versions of seahorse (a.k.a. "Passwords and Keys") one has to select "View" -> "Show any" to see the keys. Search for "remmina".






                                  share|improve this answer















                                  They are stored in Gnome-Keyring.



                                  Dash->type "keys"->Passwords&Keys.



                                  In newer versions of seahorse (a.k.a. "Passwords and Keys") one has to select "View" -> "Show any" to see the keys. Search for "remmina".







                                  share|improve this answer














                                  share|improve this answer



                                  share|improve this answer








                                  edited 20 mins ago









                                  tudor

                                  2,91151948




                                  2,91151948










                                  answered May 5 '13 at 1:57









                                  RinzwindRinzwind

                                  207k28399529




                                  207k28399529








                                  • 1





                                    tried that already..... also i'm using lxde

                                    – linuxnewb
                                    May 5 '13 at 10:21






                                  • 1





                                    This is true in some cases. Try this if the password listed in ~/.remmina/nnnnnnnnnnn.remmina is just ..

                                    – Kupiakos
                                    Apr 27 '15 at 15:05














                                  • 1





                                    tried that already..... also i'm using lxde

                                    – linuxnewb
                                    May 5 '13 at 10:21






                                  • 1





                                    This is true in some cases. Try this if the password listed in ~/.remmina/nnnnnnnnnnn.remmina is just ..

                                    – Kupiakos
                                    Apr 27 '15 at 15:05








                                  1




                                  1





                                  tried that already..... also i'm using lxde

                                  – linuxnewb
                                  May 5 '13 at 10:21





                                  tried that already..... also i'm using lxde

                                  – linuxnewb
                                  May 5 '13 at 10:21




                                  1




                                  1





                                  This is true in some cases. Try this if the password listed in ~/.remmina/nnnnnnnnnnn.remmina is just ..

                                  – Kupiakos
                                  Apr 27 '15 at 15:05





                                  This is true in some cases. Try this if the password listed in ~/.remmina/nnnnnnnnnnn.remmina is just ..

                                  – Kupiakos
                                  Apr 27 '15 at 15:05











                                  2














                                  I created a perl script to decode remmina passwords. It extract your key and decode all your saved passwords (locally).



                                  https://github.com/lepe/scripts/blob/master/decode_remmina.pl (check for updated version)



                                  #!/usr/bin/perl

                                  use strict;
                                  use warnings;
                                  use Crypt::CBC; #Crypt::DES_EDE3
                                  use MIME::Base64;
                                  use File::Slurp;

                                  my $remmina_dir = $ENV{"HOME"} . "/.remmina";
                                  my $remmina_cfg = $remmina_dir . "/remmina.pref";

                                  my $content = read_file($remmina_cfg);
                                  if($content) {
                                  my ($secret) = $content =~ /^secret=(.*)/m;
                                  if($secret) {
                                  my $secret_bin = decode_base64($secret);
                                  my ($key, $iv) = ( $secret_bin =~ /.{0,24}/gs );
                                  my @files = <$remmina_dir/*.remmina>;

                                  my $des = Crypt::CBC->new(
                                  -cipher=>'DES_EDE3',
                                  -key=>$key,
                                  -iv=>$iv,
                                  -header=>'none',
                                  -literal_key=>1,
                                  -padding=>'null'
                                  );
                                  if(@files > 0) {
                                  foreach my $file (@files) {
                                  my $config = read_file($file);
                                  my ($password) = $config =~ /^password=(.*)/m;
                                  my ($name) = $config =~ /^name=(.*)/m;
                                  my ($host) = $config =~ /^server=(.*)/m;
                                  my ($user) = $config =~ /^username=(.*)/m;
                                  my $pass_bin = decode_base64($password);
                                  my $pass_plain = $des->decrypt( $pass_bin );
                                  if($pass_plain) {
                                  print "$name $host $user $pass_plainn";
                                  }
                                  }
                                  } else {
                                  print "Unable to find *.remmina files n";
                                  }
                                  } else {
                                  print "No secret key found...n";
                                  }
                                  } else {
                                  print "Unable to read content from remmina.prefn";
                                  }


                                  You will need to install these packages (for example, using cpan <PACKAGE>): Crypt::CBC, Crypt::DES_EDE3, MIME::Base64, File::Slurp



                                  Sample output:



                                  (Name, host, user, password: tab separated)



                                  Server1 192.168.1.25    administrator   jM822Azss2fake
                                  Server2 192.168.1.88:2899 admin JaxHaxFakez90





                                  share|improve this answer






























                                    2














                                    I created a perl script to decode remmina passwords. It extract your key and decode all your saved passwords (locally).



                                    https://github.com/lepe/scripts/blob/master/decode_remmina.pl (check for updated version)



                                    #!/usr/bin/perl

                                    use strict;
                                    use warnings;
                                    use Crypt::CBC; #Crypt::DES_EDE3
                                    use MIME::Base64;
                                    use File::Slurp;

                                    my $remmina_dir = $ENV{"HOME"} . "/.remmina";
                                    my $remmina_cfg = $remmina_dir . "/remmina.pref";

                                    my $content = read_file($remmina_cfg);
                                    if($content) {
                                    my ($secret) = $content =~ /^secret=(.*)/m;
                                    if($secret) {
                                    my $secret_bin = decode_base64($secret);
                                    my ($key, $iv) = ( $secret_bin =~ /.{0,24}/gs );
                                    my @files = <$remmina_dir/*.remmina>;

                                    my $des = Crypt::CBC->new(
                                    -cipher=>'DES_EDE3',
                                    -key=>$key,
                                    -iv=>$iv,
                                    -header=>'none',
                                    -literal_key=>1,
                                    -padding=>'null'
                                    );
                                    if(@files > 0) {
                                    foreach my $file (@files) {
                                    my $config = read_file($file);
                                    my ($password) = $config =~ /^password=(.*)/m;
                                    my ($name) = $config =~ /^name=(.*)/m;
                                    my ($host) = $config =~ /^server=(.*)/m;
                                    my ($user) = $config =~ /^username=(.*)/m;
                                    my $pass_bin = decode_base64($password);
                                    my $pass_plain = $des->decrypt( $pass_bin );
                                    if($pass_plain) {
                                    print "$name $host $user $pass_plainn";
                                    }
                                    }
                                    } else {
                                    print "Unable to find *.remmina files n";
                                    }
                                    } else {
                                    print "No secret key found...n";
                                    }
                                    } else {
                                    print "Unable to read content from remmina.prefn";
                                    }


                                    You will need to install these packages (for example, using cpan <PACKAGE>): Crypt::CBC, Crypt::DES_EDE3, MIME::Base64, File::Slurp



                                    Sample output:



                                    (Name, host, user, password: tab separated)



                                    Server1 192.168.1.25    administrator   jM822Azss2fake
                                    Server2 192.168.1.88:2899 admin JaxHaxFakez90





                                    share|improve this answer




























                                      2












                                      2








                                      2







                                      I created a perl script to decode remmina passwords. It extract your key and decode all your saved passwords (locally).



                                      https://github.com/lepe/scripts/blob/master/decode_remmina.pl (check for updated version)



                                      #!/usr/bin/perl

                                      use strict;
                                      use warnings;
                                      use Crypt::CBC; #Crypt::DES_EDE3
                                      use MIME::Base64;
                                      use File::Slurp;

                                      my $remmina_dir = $ENV{"HOME"} . "/.remmina";
                                      my $remmina_cfg = $remmina_dir . "/remmina.pref";

                                      my $content = read_file($remmina_cfg);
                                      if($content) {
                                      my ($secret) = $content =~ /^secret=(.*)/m;
                                      if($secret) {
                                      my $secret_bin = decode_base64($secret);
                                      my ($key, $iv) = ( $secret_bin =~ /.{0,24}/gs );
                                      my @files = <$remmina_dir/*.remmina>;

                                      my $des = Crypt::CBC->new(
                                      -cipher=>'DES_EDE3',
                                      -key=>$key,
                                      -iv=>$iv,
                                      -header=>'none',
                                      -literal_key=>1,
                                      -padding=>'null'
                                      );
                                      if(@files > 0) {
                                      foreach my $file (@files) {
                                      my $config = read_file($file);
                                      my ($password) = $config =~ /^password=(.*)/m;
                                      my ($name) = $config =~ /^name=(.*)/m;
                                      my ($host) = $config =~ /^server=(.*)/m;
                                      my ($user) = $config =~ /^username=(.*)/m;
                                      my $pass_bin = decode_base64($password);
                                      my $pass_plain = $des->decrypt( $pass_bin );
                                      if($pass_plain) {
                                      print "$name $host $user $pass_plainn";
                                      }
                                      }
                                      } else {
                                      print "Unable to find *.remmina files n";
                                      }
                                      } else {
                                      print "No secret key found...n";
                                      }
                                      } else {
                                      print "Unable to read content from remmina.prefn";
                                      }


                                      You will need to install these packages (for example, using cpan <PACKAGE>): Crypt::CBC, Crypt::DES_EDE3, MIME::Base64, File::Slurp



                                      Sample output:



                                      (Name, host, user, password: tab separated)



                                      Server1 192.168.1.25    administrator   jM822Azss2fake
                                      Server2 192.168.1.88:2899 admin JaxHaxFakez90





                                      share|improve this answer















                                      I created a perl script to decode remmina passwords. It extract your key and decode all your saved passwords (locally).



                                      https://github.com/lepe/scripts/blob/master/decode_remmina.pl (check for updated version)



                                      #!/usr/bin/perl

                                      use strict;
                                      use warnings;
                                      use Crypt::CBC; #Crypt::DES_EDE3
                                      use MIME::Base64;
                                      use File::Slurp;

                                      my $remmina_dir = $ENV{"HOME"} . "/.remmina";
                                      my $remmina_cfg = $remmina_dir . "/remmina.pref";

                                      my $content = read_file($remmina_cfg);
                                      if($content) {
                                      my ($secret) = $content =~ /^secret=(.*)/m;
                                      if($secret) {
                                      my $secret_bin = decode_base64($secret);
                                      my ($key, $iv) = ( $secret_bin =~ /.{0,24}/gs );
                                      my @files = <$remmina_dir/*.remmina>;

                                      my $des = Crypt::CBC->new(
                                      -cipher=>'DES_EDE3',
                                      -key=>$key,
                                      -iv=>$iv,
                                      -header=>'none',
                                      -literal_key=>1,
                                      -padding=>'null'
                                      );
                                      if(@files > 0) {
                                      foreach my $file (@files) {
                                      my $config = read_file($file);
                                      my ($password) = $config =~ /^password=(.*)/m;
                                      my ($name) = $config =~ /^name=(.*)/m;
                                      my ($host) = $config =~ /^server=(.*)/m;
                                      my ($user) = $config =~ /^username=(.*)/m;
                                      my $pass_bin = decode_base64($password);
                                      my $pass_plain = $des->decrypt( $pass_bin );
                                      if($pass_plain) {
                                      print "$name $host $user $pass_plainn";
                                      }
                                      }
                                      } else {
                                      print "Unable to find *.remmina files n";
                                      }
                                      } else {
                                      print "No secret key found...n";
                                      }
                                      } else {
                                      print "Unable to read content from remmina.prefn";
                                      }


                                      You will need to install these packages (for example, using cpan <PACKAGE>): Crypt::CBC, Crypt::DES_EDE3, MIME::Base64, File::Slurp



                                      Sample output:



                                      (Name, host, user, password: tab separated)



                                      Server1 192.168.1.25    administrator   jM822Azss2fake
                                      Server2 192.168.1.88:2899 admin JaxHaxFakez90






                                      share|improve this answer














                                      share|improve this answer



                                      share|improve this answer








                                      edited Jul 11 '16 at 3:36

























                                      answered Apr 4 '16 at 2:33









                                      lepelepe

                                      81621430




                                      81621430























                                          1














                                          I needed to do the reverse and encrypt passwords for Remmina using a Python script. In case anyone needs it here's the code:



                                          import base64    
                                          from Crypto.Cipher import DES3

                                          REMMINAPREF_SECRET_B64=b'G5XKhImmX+3MaRAWU920B31AtQLDcWEq+Geq4L+7sES='

                                          def encryptRemminaPass(plain):
                                          plain = plain.encode('utf-8')
                                          secret = base64.b64decode(REMMINAPREF_SECRET_B64)
                                          key = secret[:24]
                                          iv = secret[24:]
                                          plain = plain + b"" * (8 - len(plain) % 8)
                                          cipher = DES3.new(key, DES3.MODE_CBC, iv)
                                          result = cipher.encrypt(plain)
                                          result = base64.b64encode(result)
                                          result = result.decode('utf-8')
                                          return result





                                          share|improve this answer






























                                            1














                                            I needed to do the reverse and encrypt passwords for Remmina using a Python script. In case anyone needs it here's the code:



                                            import base64    
                                            from Crypto.Cipher import DES3

                                            REMMINAPREF_SECRET_B64=b'G5XKhImmX+3MaRAWU920B31AtQLDcWEq+Geq4L+7sES='

                                            def encryptRemminaPass(plain):
                                            plain = plain.encode('utf-8')
                                            secret = base64.b64decode(REMMINAPREF_SECRET_B64)
                                            key = secret[:24]
                                            iv = secret[24:]
                                            plain = plain + b"" * (8 - len(plain) % 8)
                                            cipher = DES3.new(key, DES3.MODE_CBC, iv)
                                            result = cipher.encrypt(plain)
                                            result = base64.b64encode(result)
                                            result = result.decode('utf-8')
                                            return result





                                            share|improve this answer




























                                              1












                                              1








                                              1







                                              I needed to do the reverse and encrypt passwords for Remmina using a Python script. In case anyone needs it here's the code:



                                              import base64    
                                              from Crypto.Cipher import DES3

                                              REMMINAPREF_SECRET_B64=b'G5XKhImmX+3MaRAWU920B31AtQLDcWEq+Geq4L+7sES='

                                              def encryptRemminaPass(plain):
                                              plain = plain.encode('utf-8')
                                              secret = base64.b64decode(REMMINAPREF_SECRET_B64)
                                              key = secret[:24]
                                              iv = secret[24:]
                                              plain = plain + b"" * (8 - len(plain) % 8)
                                              cipher = DES3.new(key, DES3.MODE_CBC, iv)
                                              result = cipher.encrypt(plain)
                                              result = base64.b64encode(result)
                                              result = result.decode('utf-8')
                                              return result





                                              share|improve this answer















                                              I needed to do the reverse and encrypt passwords for Remmina using a Python script. In case anyone needs it here's the code:



                                              import base64    
                                              from Crypto.Cipher import DES3

                                              REMMINAPREF_SECRET_B64=b'G5XKhImmX+3MaRAWU920B31AtQLDcWEq+Geq4L+7sES='

                                              def encryptRemminaPass(plain):
                                              plain = plain.encode('utf-8')
                                              secret = base64.b64decode(REMMINAPREF_SECRET_B64)
                                              key = secret[:24]
                                              iv = secret[24:]
                                              plain = plain + b"" * (8 - len(plain) % 8)
                                              cipher = DES3.new(key, DES3.MODE_CBC, iv)
                                              result = cipher.encrypt(plain)
                                              result = base64.b64encode(result)
                                              result = result.decode('utf-8')
                                              return result






                                              share|improve this answer














                                              share|improve this answer



                                              share|improve this answer








                                              edited Oct 13 '15 at 7:11









                                              kos

                                              25.8k871121




                                              25.8k871121










                                              answered Oct 12 '15 at 10:22









                                              PhilippNPhilippN

                                              111




                                              111






























                                                  draft saved

                                                  draft discarded




















































                                                  Thanks for contributing an answer to Ask Ubuntu!


                                                  • Please be sure to answer the question. Provide details and share your research!

                                                  But avoid



                                                  • Asking for help, clarification, or responding to other answers.

                                                  • Making statements based on opinion; back them up with references or personal experience.


                                                  To learn more, see our tips on writing great answers.




                                                  draft saved


                                                  draft discarded














                                                  StackExchange.ready(
                                                  function () {
                                                  StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f290824%2fhow-to-extract-saved-password-from-remmina%23new-answer', 'question_page');
                                                  }
                                                  );

                                                  Post as a guest















                                                  Required, but never shown





















































                                                  Required, but never shown














                                                  Required, but never shown












                                                  Required, but never shown







                                                  Required, but never shown

































                                                  Required, but never shown














                                                  Required, but never shown












                                                  Required, but never shown







                                                  Required, but never shown







                                                  Popular posts from this blog

                                                  Why do type traits not work with types in namespace scope?What are POD types in C++?Why can templates only be...

                                                  Will tsunami waves travel forever if there was no land?Why do tsunami waves begin with the water flowing away...

                                                  Simple Scan not detecting my scanner (Brother DCP-7055W)Brother MFC-L2700DW printer can print, can't...