Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #232379

Re: [OFFTOPIC] Re: Trusting trust [was: PARTIAL DIAGNOSIS of Installation problems]

From David Christensen <dpchrist@holgerdanske.com>
Newsgroups linux.debian.user
Subject Re: [OFFTOPIC] Re: Trusting trust [was: PARTIAL DIAGNOSIS of Installation problems]
Date 2021-03-05 06:30 +0100
Message-ID <BPbce-7Xi-3@gated-at.bofh.it> (permalink)
References (3 earlier) <BOHHc-5VT-3@gated-at.bofh.it> <BOLhM-8mE-5@gated-at.bofh.it> <BORQd-3YF-1@gated-at.bofh.it> <BP4DL-3LZ-1@gated-at.bofh.it> <BP8R3-6jY-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 3/4/21 6:50 PM, Stefan Monnier wrote:
>> The abstract states:
>> 
>> "In the DDC technique, source code is compiled twice: once with a 
>> second (trusted) compiler (using the source code of the compiler’s 
>> parent), and then the compiler source code is compiled using the 
>> result of the first compilation. If the result is bit-for-bit 
>> identical with the untrusted executable, then the source code 
>> accurately represents the executable."
>> 
>> 
>> I find the above to be unclear:
> 
> Of course, it's an abstract.  You can read the paper for more
> details. Basically:
> 
> Take an existing untrusted compiler whose source code is A and binary
> is cA.  You check that:
> 
> cA == cA(A)
> 
> if it's not the case (or if you don't have access to the source code
> A), the DDC technique can't be used.  If it is the case, you have
> just checked that `A` is indeed the source code for `cA`.


You have checked that 'cA' can reproduce itself given 'A' as input. 
This is the key feature of the TT attack -- the machine code executable 
'cA' contains a backdoor, but the source code 'A' does not.


The backdoor source code was removed from 'A' once the backdoor machine 
code injection was working in 'cA'.  The backdoor machine code injection 
in 'cA' is what perpetuates the TT attack whenever 'cA' is recompiled 
from 'A'.


> Then take a trusted compiler whose source code is T. Now compile it
> with `cA`:
> 
> cT = cA(T)
> 
> and then use this new compiler binary `cT` to compile `A` a second
> time:
> 
> cA2 = cT(A)
> 
> finally compare `cA` and `cA2`. If they're bit-for-bit identical,
> then you're good: `cA` doesn't seem to have any hidden trojan horse.

> You need to not only trust that [T] does what you think it does, but 
> also that any attacker who may have infected `cA` hasn't seen [T]
> and can't have guessed enough of its content to be able to properly
> infect `cT`.

Thanks for the explanation.


AIUI compilers have been studied so extensively that their production is
largely automated.  Create an EBNF specification, feed it through a tool
chain (lex, yacc, cc, as, ld, etc.), and you end up with a compiler.
The process is known and the results are predictable; especially with
standards-based languages such as C.  So, a skilled attacker will know
what you're doing, how you are doing it, and may be able to produce a
'cA' that infects both 'A' and 'T'.


If you are going to produce source code for a trusted compiler 'T', then 
you should also produce an executable 'cT'.  AIUI this can be done by 
writing a simplified compiler in some other language 'a', using that to 
create an intermediate compiler 'aT = a(T)', and using that to produce 
the compiler 'cT = aT(T)'.  (One more step of 'cT = cT(a)' may be 
required to obtain a fixed point binary.)  Now you can compare 'cA' to 
'cT(A)' and see the back door directly.


David

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Installation problems Richard Owlett <rowlett@cloud85.net> - 2021-03-02 21:10 +0100
  Re: Installation problems Brian <ad44@cityscape.co.uk> - 2021-03-02 21:40 +0100
    Re: Installation problems Weaver <weaver@riseup.net> - 2021-03-02 22:20 +0100
      Re: Installation problems <tomas@tuxteam.de> - 2021-03-02 22:30 +0100
        Re: Installation problems Brian <ad44@cityscape.co.uk> - 2021-03-03 00:10 +0100
    Re: Installation problems Richard Owlett <rowlett@cloud85.net> - 2021-03-02 22:50 +0100
      Re: Installation problems "Andrew M.A. Cater" <amacater@einval.com> - 2021-03-02 23:20 +0100
        Re: Installation problems Richard Owlett <rowlett@cloud85.net> - 2021-03-03 02:40 +0100
          Re: Installation problems Richard Owlett <rowlett@cloud85.net> - 2021-03-03 02:50 +0100
      Re: Installation problems Keith Bainbridge <ke1thozgroups@gmx.com> - 2021-03-03 00:00 +0100
        Re: Installation problems Richard Owlett <rowlett@cloud85.net> - 2021-03-03 10:30 +0100
          Re: Installation problems David Christensen <dpchrist@holgerdanske.com> - 2021-03-03 15:40 +0100
            Re: Installation problems Celejar <celejar@gmail.com> - 2021-03-03 16:40 +0100
            Re: Installation problems Richard Owlett <rowlett@cloud85.net> - 2021-03-03 16:40 +0100
              Re: Installation problems David Christensen <dpchrist@holgerdanske.com> - 2021-03-03 22:40 +0100
                Re: Installation problems Joe <joe@jretrading.com> - 2021-03-03 23:00 +0100
                Re: Installation problems Richard Owlett <rowlett@cloud85.net> - 2021-03-04 13:00 +0100
                Re: Installation problems Tixy <tixy@yxit.co.uk> - 2021-03-04 13:30 +0100
                Re: Installation problems Richard Owlett <rowlett@cloud85.net> - 2021-03-04 14:00 +0100
                Re: Installation problems Felix Miata <mrmazda@earthlink.net> - 2021-03-04 17:30 +0100
    Re: Installation problems Keith Bainbridge <ke1thozgroups@gmx.com> - 2021-03-02 23:50 +0100
      Re: Installation problems David Wright <deblis@lionunicorn.co.uk> - 2021-03-03 03:50 +0100
        Re: Installation problems Richard Owlett <rowlett@cloud85.net> - 2021-03-03 10:50 +0100
          Re: Installation problems Richard Owlett <rowlett@cloud85.net> - 2021-03-03 11:20 +0100
    Re: Installation problems Keith Bainbridge <ke1thozgroups@gmx.com> - 2021-03-03 00:00 +0100
  PARTIAL DIAGNOSIS of Installation problems Richard Owlett <rowlett@cloud85.net> - 2021-03-03 16:30 +0100
    Re: PARTIAL DIAGNOSIS of Installation problems David Christensen <dpchrist@holgerdanske.com> - 2021-03-03 22:30 +0100
      Re: PARTIAL DIAGNOSIS of Installation problems Stefan Monnier <monnier@iro.umontreal.ca> - 2021-03-03 23:00 +0100
        Re: PARTIAL DIAGNOSIS of Installation problems David Christensen <dpchrist@holgerdanske.com> - 2021-03-04 02:50 +0100
          Re: PARTIAL DIAGNOSIS of Installation problems Stefan Monnier <monnier@iro.umontreal.ca> - 2021-03-04 03:50 +0100
            Re: PARTIAL DIAGNOSIS of Installation problems David Christensen <dpchrist@holgerdanske.com> - 2021-03-04 04:20 +0100
              Re: PARTIAL DIAGNOSIS of Installation problems Stefan Monnier <monnier@iro.umontreal.ca> - 2021-03-04 05:10 +0100
                Re: PARTIAL DIAGNOSIS of Installation problems <tomas@tuxteam.de> - 2021-03-04 10:00 +0100
          Trusting trust [was: PARTIAL DIAGNOSIS of Installation problems] <tomas@tuxteam.de> - 2021-03-04 09:50 +0100
            Re: Trusting trust [was: PARTIAL DIAGNOSIS of Installation  problems] Joe <joe@jretrading.com> - 2021-03-04 10:50 +0100
              Re: Trusting trust [was: PARTIAL DIAGNOSIS of Installation problems] <tomas@tuxteam.de> - 2021-03-04 14:20 +0100
                Re: Trusting trust [was: PARTIAL DIAGNOSIS of Installation  problems] Celejar <celejar@gmail.com> - 2021-03-04 15:30 +0100
                Re: Trusting trust [was: PARTIAL DIAGNOSIS of Installation problems] tomas@tuxteam.de - 2021-03-04 16:20 +0100
                Re: Trusting trust [was: PARTIAL DIAGNOSIS of Installation  problems] Celejar <celejar@gmail.com> - 2021-03-04 17:20 +0100
                Re: Trusting trust [was: PARTIAL DIAGNOSIS of Installation problems] tomas@tuxteam.de - 2021-03-04 19:10 +0100
                Re: Trusting trust [was: PARTIAL DIAGNOSIS of Installation  problems] Celejar <celejar@gmail.com> - 2021-03-04 19:30 +0100
                Re: Trusting trust [was: PARTIAL DIAGNOSIS of Installation problems] Stefan Monnier <monnier@iro.umontreal.ca> - 2021-03-04 23:20 +0100
                Re: Trusting trust [was: PARTIAL DIAGNOSIS of Installation problems] <tomas@tuxteam.de> - 2021-03-04 23:40 +0100
                Re: Trusting trust [was: PARTIAL DIAGNOSIS of Installation  problems] Joe <joe@jretrading.com> - 2021-03-04 23:50 +0100
                Re: Trusting trust [was: PARTIAL DIAGNOSIS of Installation  problems] Celejar <celejar@gmail.com> - 2021-03-04 15:30 +0100
              Re: Trusting trust [was: PARTIAL DIAGNOSIS of Installation  problems] Celejar <celejar@gmail.com> - 2021-03-04 14:20 +0100
                Re: Trusting trust [was: PARTIAL DIAGNOSIS of Installation  problems] Joe <joe@jretrading.com> - 2021-03-04 16:10 +0100
                Re: Trusting trust [was: PARTIAL DIAGNOSIS of Installation  problems] Celejar <celejar@gmail.com> - 2021-03-04 17:20 +0100
                OT: Bathroom scales (was: Re: Trusting trust [was: PARTIAL DIAGNOSIS of Installation problems]) rhkramer@gmail.com - 2021-03-04 17:40 +0100
            Re: Trusting trust [was: PARTIAL DIAGNOSIS of Installation problems] David Christensen <dpchrist@holgerdanske.com> - 2021-03-04 23:30 +0100
              [OFFTOPIC] Re: Trusting trust [was: PARTIAL DIAGNOSIS of Installation problems] Stefan Monnier <monnier@iro.umontreal.ca> - 2021-03-05 04:00 +0100
                Re: [OFFTOPIC] Re: Trusting trust [was: PARTIAL DIAGNOSIS of  Installation problems] David Christensen <dpchrist@holgerdanske.com> - 2021-03-05 06:30 +0100
                Re: [OFFTOPIC] Re: Trusting trust [was: PARTIAL DIAGNOSIS of  Installation problems] David Christensen <dpchrist@holgerdanske.com> - 2021-03-05 06:40 +0100
                Re: [OFFTOPIC] Re: Trusting trust [was: PARTIAL DIAGNOSIS of Installation problems] Stefan Monnier <monnier@iro.umontreal.ca> - 2021-03-05 07:40 +0100
                Re: [OFFTOPIC] Re: Trusting trust [was: PARTIAL DIAGNOSIS of  Installation problems] <tomas@tuxteam.de> - 2021-03-05 09:20 +0100
                Re: [OFFTOPIC] Re: Trusting trust [was: PARTIAL DIAGNOSIS of Installation problems] Gene Heskett <gheskett@shentel.net> - 2021-03-05 15:10 +0100
    Re: PARTIAL DIAGNOSIS of Installation problems Richard Owlett <rowlett@cloud85.net> - 2021-03-04 13:30 +0100
      Re: PARTIAL DIAGNOSIS of Installation problems David Wright <deblis@lionunicorn.co.uk> - 2021-03-04 18:50 +0100
      Re: PARTIAL DIAGNOSIS of Installation problems David Christensen <dpchrist@holgerdanske.com> - 2021-03-04 23:50 +0100
        Re: PARTIAL DIAGNOSIS of Installation problems Richard Owlett <rowlett@cloud85.net> - 2021-03-05 13:20 +0100
          Re: PARTIAL DIAGNOSIS of Installation problems David Christensen <dpchrist@holgerdanske.com> - 2021-03-05 21:30 +0100
            Re: PARTIAL DIAGNOSIS of Installation problems Richard Owlett <rowlett@cloud85.net> - 2021-03-05 22:20 +0100
              Re: PARTIAL DIAGNOSIS of Installation problems Joe <joe@jretrading.com> - 2021-03-05 22:50 +0100
                Re: PARTIAL DIAGNOSIS of Installation problems Richard Owlett <rowlett@cloud85.net> - 2021-03-05 23:30 +0100
                Re: PARTIAL DIAGNOSIS of Installation problems Charles Curley <charlescurley@charlescurley.com> - 2021-03-06 00:40 +0100
                Re: PARTIAL DIAGNOSIS of Installation problems Celejar <celejar@gmail.com> - 2021-03-07 01:40 +0100
    Re: PARTIAL DIAGNOSIS of Installation problems David Wright <deblis@lionunicorn.co.uk> - 2021-03-06 02:50 +0100
    Status update {Re: PARTIAL DIAGNOSIS of Installation problems} Richard Owlett <rowlett@cloud85.net> - 2021-03-08 13:10 +0100
      Re: Status update {Re: PARTIAL DIAGNOSIS of Installation problems} "Andrew M.A. Cater" <amacater@einval.com> - 2021-03-08 13:30 +0100
      Re: Status update {Re: PARTIAL DIAGNOSIS of Installation problems} songbird <songbird@anthive.com> - 2021-03-08 17:30 +0100
        Re: Status update {Re: PARTIAL DIAGNOSIS of Installation problems} Richard Owlett <rowlett@cloud85.net> - 2021-03-08 20:20 +0100
          Re: Status update {Re: PARTIAL DIAGNOSIS of Installation problems} songbird <songbird@anthive.com> - 2021-03-09 02:10 +0100
        Re: Status update {Re: PARTIAL DIAGNOSIS of Installation problems} Richard Owlett <rowlett@cloud85.net> - 2021-03-09 13:40 +0100
          Re: Status update {Re: PARTIAL DIAGNOSIS of Installation problems} Anssi Saari <as@sci.fi> - 2021-03-09 14:00 +0100
            Re: Status update {Re: PARTIAL DIAGNOSIS of Installation problems} Joe <joe@jretrading.com> - 2021-03-09 14:20 +0100
          Re: Status update {Re: PARTIAL DIAGNOSIS of Installation problems} Andrei POPESCU <andreimpopescu@gmail.com> - 2021-03-09 14:10 +0100
            Re: Status update {Re: PARTIAL DIAGNOSIS of Installation problems} Joe <joe@jretrading.com> - 2021-03-09 14:20 +0100
            Re: Status update {Re: PARTIAL DIAGNOSIS of Installation problems} Richard Owlett <rowlett@cloud85.net> - 2021-03-09 21:40 +0100
              Re: Status update {Re: PARTIAL DIAGNOSIS of Installation problems} Andrei POPESCU <andreimpopescu@gmail.com> - 2021-03-10 10:50 +0100
                Re: Status update {Re: PARTIAL DIAGNOSIS of Installation problems} Richard Owlett <rowlett@cloud85.net> - 2021-03-10 11:30 +0100
                Re: Status update {Re: PARTIAL DIAGNOSIS of Installation problems} Andrei POPESCU <andreimpopescu@gmail.com> - 2021-03-10 14:40 +0100
                Re: Status update {Re: PARTIAL DIAGNOSIS of Installation problems} Richard Owlett <rowlett@cloud85.net> - 2021-03-10 15:50 +0100
                Re: Status update {Re: PARTIAL DIAGNOSIS of Installation problems} Andrei POPESCU <andreimpopescu@gmail.com> - 2021-03-10 21:50 +0100
                Re: Status update {Re: PARTIAL DIAGNOSIS of Installation problems} "Andrew M.A. Cater" <amacater@einval.com> - 2021-03-11 00:20 +0100

csiph-web