Author

Topic: Man in the middle (mitm) on Bticoin Core? (Read 254 times)

legendary
Activity: 3122
Merit: 2178
Playgram - The Telegram Casino
July 10, 2019, 10:28:27 AM
#10
I think we both have a different understand of the term 'implementation'.

If i write python code which uses a well known libary to implement AES encryption before sending it via the internet and the server receives it and uses the same libary to decrypt it... that's my 'own' implementation (in my terms).

Ah, gotcha. Fair enough.


By the way.. if you follow the specification properly, your cipher text won't be vulnerable to attacks.

Except even the most competent developers make mistakes and even the most trusted implementation can have vulnerabilities (see Heartbleed for example -- not exactly a MITM attack but I think you get my point). We're all just human after all (presumably).
legendary
Activity: 3346
Merit: 3125
Thanks for the reply guys, especially to the HeRetiK and bob123 answers, i think about this attack because i was reading the Jetcash thread about sync the node on public places (https://bitcointalksearch.org/topic/man-in-the-middle-mitm-on-bticoin-core-5163058).

So, is good to know that can be secure on a public network only if we don't have RPC calls configured with any wrapper.
legendary
Activity: 1624
Merit: 2481
Please note that most crypto systems fail due to a flaw in the implementation rather than its formal specification.

So for all intents and purposes, that:

[...] own encryption implementation, or anything..

...is pretty much as bad as that:

Of course you have to use proven concepts / algorithms and not create your own crypto protocol  Roll Eyes
But i thought this was obvious.

Just sayin' Smiley


I think we both have a different understand of the term 'implementation'.

If i write python code which uses a well known libary to implement AES encryption before sending it via the internet and the server receives it and uses the same libary to decrypt it... that's my 'own' implementation (in my terms).

This doesn't make it unsecure.


I did not intend to talk about implementing the encryption process itself from scratch.
But about implementing encryption at all (e.g. in an own small application).



By the way.. if you follow the specification properly, your cipher text won't be vulnerable to attacks.
Own implementation of the encryption process often leads to side effects which can be abused.

But in a MITM scenario, those side effects (e.g. CPU time) won't have any effect and therefore won't be an attack surface at all.

If you actually can read and actually can type, you should be able to create your own encryption algorithm (based on a given specification) without being vulnerable to MITM (only talking about MITM here).


P.s. Note that AES is just an example. Pure AES is not suitable for this case (missing replay protection etc.)
legendary
Activity: 3122
Merit: 2178
Playgram - The Telegram Casino
Please note that most crypto systems fail due to a flaw in the implementation rather than its formal specification.

So for all intents and purposes, that:

[...] own encryption implementation, or anything..

...is pretty much as bad as that:

Of course you have to use proven concepts / algorithms and not create your own crypto protocol  Roll Eyes
But i thought this was obvious.

Just sayin' Smiley
legendary
Activity: 1624
Merit: 2481
Don't use RPC in an untrusted network or build something around it (e.g. simple encryption).

Don't use RPC in an untrusted network. Period. Set up a VPN tunnel between your node and the client accessing the RPC interface, if you must.

"Building something around it" may only provide you with a false sense of security rather than offering actual protection.


I was referring to situations where the communications has to go via a network you are not in full control of (e.g. internet).
If 2 server have to communicate with each other via the internet, not using it is not an option.

'Building something around it' can be using TLS certificates, VPN, own encryption implementation, or anything..


Of course you have to use proven concepts / algorithms and not create your own crypto protocol  Roll Eyes
But i thought this was obvious.
legendary
Activity: 3122
Merit: 2178
Playgram - The Telegram Casino
Don't use RPC in an untrusted network or build something around it (e.g. simple encryption).

Don't use RPC in an untrusted network. Period. Set up a VPN tunnel between your node and the client accessing the RPC interface, if you must.

"Building something around it" may only provide you with a false sense of security rather than offering actual protection.
legendary
Activity: 1624
Merit: 2481
[...] even while people feel secure behind https connections the attacker can avoid that encryption with a tool called sslstrip (https://github.com/moxie0/sslstrip).

That's dangerous sciolism.

You can either
1) Strip off https completely, which is visible because you are connected via http then. And not every website allows http access. Any half-way attentive user should notice that or
2) Use a faked certificate. Your browser will show a warning in this case. The only way to do that without a warning is by installing a new CA on the targets machine (with access to a targets machine you have more trouble than just a fake certificate)



Now, the question is, what can a MITM attack do on a Bitcoin Core?

Let's suppose we are on the same network and we start spoofing all data from the Core machine, since the transactions are signed on the computer and then broadcasted to the network the information the attacker could get is the signed transaction, so, in that part, there is no risk at all. But what happens if the node is connected with rpc, when we connect bitcoin node with some language like JS we need a user and password to make rpc calls, if someone spoof that data and gets that username and password, he could get access to bitcoin-cli calls and steal all the balance.

So, this was just theory, what do you think guys, is possible to affect bitcoin with this kind of attack?

Yes.
RPC calls are not encrypted, afaik.

Don't use RPC in an untrusted network or build something around it (e.g. simple encryption).
legendary
Activity: 1610
Merit: 1183
You are supposed to sign tx's on offline devices which are airgapped, and whose access it's blocked, this way even physical access isn't a problem. The node runs separately on another device. The tx is to be transported in a safe medium, namely a QR code reader. Pretty hard to compromise that... MITM doesn't apply there.
legendary
Activity: 1946
Merit: 1427
Yes attacks similar to this are (correct me if i'm wrong) possible which is why i think there is a warning displayed when you're trying to use RPC with Bitcoin core;

Code: (https://github.com/bitcoin/bitcoin/blob/master/doc/release-notes/release-notes-0.18.0.md)
Listening for RPC commands over a public network connection is insecure and should be disabled, so a warning is now printed if a user selects such a configuration.
legendary
Activity: 3346
Merit: 3125
The MITM attack is one of the most effective ways to hack today because with this attack we can easily filter logins from users on almost any website and the sad part is it doesn't care if you use Linux, Mac, Windows, or a phone. The only problem about this attack is the network, it only runs on a local network. The attack is now specialized in web browsers, even while people feel secure behind https connections the attacker can avoid that encryption with a tool called sslstrip (https://github.com/moxie0/sslstrip).

Now, the question is, what can a MITM attack do on a Bitcoin Core?

Let's suppose we are on the same network and we start spoofing all data from the Core machine, since the transactions are signed on the computer and then broadcasted to the network the information the attacker could get is the signed transaction, so, in that part, there is no risk at all. But what happens if the node is connected with rpc, when we connect bitcoin node with some language like JS we need a user and password to make rpc calls, if someone spoof that data and gets that username and password, he could get access to bitcoin-cli calls and steal all the balance.

So, this was just theory, what do you think guys, is possible to affect bitcoin with this kind of attack?

Jump to: