1

Is standalone Git protocol susceptible to MITM where an attacker impersonates the server?

According to https://git-scm.com/book/en/v2/Git-on-the-Server-The-Protocols

There are 3 main protocols to use with a git server: HTTP, SSH and Git.

For HTTPS and SSH it sounds like it's possible to use some kind of binding to ensure we are connecting to the right server and protect against MITM attacks.

What about Git by itself?

The above link says that

The downside of the Git protocol is the lack of authentication. It’s generally undesirable for the Git protocol to be the only access to your project.

I think they are talking about authentication of the users here though and not the servers. Having said that, there doesn't seem to be any mention of server authentication.

Does anyone know? Thanks!

  • Git is so infrequently used not via ssh or https (or across a local file system) that I'm not sure if anyone has ever bothered writing up an attack. – Xiong Chiamiov Jun 17 '17 at 16:07
  • If your underlying question is "should I use the git protocol without any extra encryption layer", the answer is no. – Xiong Chiamiov Jun 17 '17 at 16:07
  • I do understand that git is better served over SSH and HTTPS (which provides both encryption and authentication, which is more my concern). My question is more theoretical to see if there is a clear indication of what security git protocol provides and what is missing and needs to be supplemented by an overlaying protocol (in particular, with respect to server authenticity). Thank you! – channel Jun 19 '17 at 18:26
  • @XiongChiamiov it all depends on your threat model don't you think? what if someone has the ability to decrypt that extra layer? – Sajuuk Apr 18 at 11:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.