Bitcoin Forum
June 17, 2024, 06:47:33 PM *
News: Voting for pizza day contest
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: The plain text password for JSON-RPC connections issue...  (Read 1757 times)
cloverme (OP)
Legendary
*
Offline Offline

Activity: 1512
Merit: 1057


SpacePirate.io


View Profile WWW
January 30, 2015, 02:04:55 PM
 #1

I'm wondering how others are dealing with the bitcoin-qt issue of the password for JSON-RPC connections being stored as plain text in the config file (or command-line). It sort of bothers me from a security perspective, so I was wondering how others are dealing with it or possible solutions to the issue. I know you can limit allowed-ip addresses and change the port, but not a big fan of ptp on disk. Suggestions, workarounds?

Thanks Smiley
bitspill
Legendary
*
Offline Offline

Activity: 2086
Merit: 1015



View Profile
January 30, 2015, 02:30:31 PM
 #2

It's not really what you're looking for, but...

If they can read your plain text rpc password from the config file on the server, your bitcoins are already gone because they likely got the wallet.dat file. (Unless that's encrypted but seeing as how they are on the server now they should be able to lurk in the shadows until it's decrypted)

{ BitSpill }
cloverme (OP)
Legendary
*
Offline Offline

Activity: 1512
Merit: 1057


SpacePirate.io


View Profile WWW
January 30, 2015, 07:58:30 PM
 #3

Yeah, you never know who's a lurking, or if you have other team members helping with administration, support, etc. I was thinking of potentially using a program to at least change the pw automatically and restarting the application/service daily. On a system that has a wallet, I usually have dummy information just in case. I'm probably too paranoid anyway hahaha... thanks though!
Remember remember the 5th of November
Legendary
*
Offline Offline

Activity: 1862
Merit: 1011

Reverse engineer from time to time


View Profile
January 30, 2015, 08:43:31 PM
 #4

Why not specify a password hash instead? And then just check if the hash of the password entered matches the one in the config file? But in the end, if the password is submitted via JSON-RPC/REST as plaintext, packet sniffing on the computer would do the job just as well.

BTC:1AiCRMxgf1ptVQwx6hDuKMu4f7F27QmJC2
welshjf
Newbie
*
Offline Offline

Activity: 6
Merit: 0


View Profile WWW
February 03, 2015, 12:27:08 AM
 #5

Why not specify a password hash instead? And then just check if the hash of the password entered matches the one in the config file? But in the end, if the password is submitted via JSON-RPC/REST as plaintext, packet sniffing on the computer would do the job just as well.

It has to be stored in plain text or equivalent, otherwise the user would have to provide the password every time they ran bitcoin-cli or any other API client. If someone had root access to be able to sniff internal packets, they could also get the password by recording keystrokes.

Authenticating a local service with a shared secret stored in a file with restricted permissions is not uncommon, by the way; for example, the X11 protocol and MySQL (by default) work the same way. On some platforms, including Linux, it's possible to check the peer UID through a Unix-domain socket, but I imagine the developers want to minimize platform-specific code.
ProvablyIO
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
February 09, 2015, 06:16:02 PM
 #6

I'm wondering how others are dealing with the bitcoin-qt issue of the password for JSON-RPC connections being stored as plain text in the config file (or command-line). It sort of bothers me from a security perspective, so I was wondering how others are dealing with it or possible solutions to the issue. I know you can limit allowed-ip addresses and change the port, but not a big fan of ptp on disk. Suggestions, workarounds?

Thanks Smiley

Use micro services. IE, separation of functionality.

A typical application has three states, application, database, and bitcoin service. Generally, following the micro service system design, each one of these states should be located on a separate instance/server with local networking enabled.

In design, the application server should have access to the db server, but not the bitcoin server, the bitcoin server should have access to the db server, but not the application server.

Application >><< DB >><< Bitcoin

The bitcoin server should be configured with a listener to determine incoming transactions. These transactions would then be written to the db for use in the application. Outgoing transactions would be written to the db from the application server and processed via a cron with a set interval.

 Disable external networking on the DB / bitcoin server with the exception of your local ip and key. Make sure that both states that utilize the db have different permission and users. Application can only write to transaction out bitcoin table, while bitcoin can only write to transaction out. Be sure when out processing transactions you can check the flow of bitcoin for a user via a history table.

By configuring the application in this manner, you are removing direct access to your bitcoin server as it is not exactly front facing. This method will not prevent hackers, but it will help to mitigate them and secure your application. Additional steps and monitoring should always be implemented
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!