git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Question about scm security holes

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Mar 5, 2010, 09:25 UTC
Message-ID
<alpine.DEB.1.00.1003050953580.20986@pacific.mpi-cbg.de>
In-Reply-To
<32541b131003041803q9abf6baq4cf9ffcca990b51c@mail.gmail.com>
Hi,
On Thu, 4 Mar 2010, Avery Pennarun wrote:
> An attack in which someone untraceably modified the repo to contain 
> modified code would be a little more interesting.

I disagree that stealing the code in this particular case is uninteresting. You know that there are billions in the business how to manipulate Google's search results. If you can see how Google rates websites, you can prepare your xxx sites for it, and nobody would be able to know, let alone prove, that you "reverse-engineered" the system.

> git makes this sort of thing pretty much impossible to do without it 
> being *noticeable* at least.
That is not true in all cases.

If you're talking about a workflow as git.git has it, you're right, there is a maintainer, and a refused push would ring all kinds of alarm bells there.

Except, of course, when the maintainer happens to work on different machines, and is likely to pull from her main repository quite often. Think "get something compiling on an obscure platform while developing something different on your main computer, then do a criss-cross merge at the end".

It gets even much, much worse in the common setup of companies: a central repository. (The two main reasons why a central repository is used are: tradition (we did it with Subversion, too), and bottleneck problems: a single maintainer reviewing all changes is often deemed too expensive and slow.)

So in the regular case, it is _very_ easy to sneak in a code-change unnoticedly.

The trick now is to craft the commit in such a manner that it will not be noticed retro-actively. This is a simple case of social engineering: you have to imitate the style of the committer/author you are impersonating. The commit message must look like the usual ones (typos, preferred words, grammar, length of paragraphs, comprehensibility, etc)

Likewise, the code has to be analyzed for style, and obviously for most likely targets of a backdoor (both in terms of "it is a perfect spot for a backdoor" and "it is not uncommon for the author to touch that part of the code").

Crafting the commit message and the backdoor needs some time, and it needs to be done _after_ succeeding with the break-in, as you can only then start analyzing style (and most likely workflow -- whether there is a single maintainer or whether everybody pushes to a single repository).

The most likely route, therefore is to have _two_ break-ins. One for reconaissance, the second for the actual change.

Conclusion: there are no technical reasons why Git should be better than 
Perforce when it comes to a break-in.
Short version: it's a social problem, so it needs a social solution.

Ciao, Dscho

P.S.: Sorry for the overly long mail. I did not have time to make it short.

Previous: Andreas KreyNext: Jakub Narebski
Message 9 of 13 in “Question about scm security holes”
  1. waltMar 4, 2010
  2. Avery PennarunMar 5, 2010
  3. John TapsellMar 5, 2010
  4. Avery PennarunMar 5, 2010
  5. John TapsellMar 5, 2010
  6. waltMar 5, 2010
  7. Avery PennarunMar 5, 2010
  8. Andreas KreyMar 5, 2010
  9. Johannes SchindelinMar 5, 2010
  10. Jakub NarebskiMar 5, 2010
  11. Avery PennarunMar 5, 2010
  12. Johannes SchindelinMar 5, 2010
  13. Daniel BarkalowMar 5, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.