r/programming • • Jul 14 '19

Australian programmers could be fired by their companies for implementing government backdoors

https://tendaily.com.au/amp/news/australia/a181206zli/if-encryption-laws-go-through-australia-may-lose-apple-20181206
3.6k Upvotes

414 comments sorted by

View all comments

207

u/Murcho Jul 14 '19

Australian developer here. I've been thinking about this a lot since it came into action, and beyond the legal issues and putting developers between a rock and a hard place, there is a real practical issue here.

How is a developer, as part of team that has code reviews from multiple peers, going to be able to get this alleged back door through said code review? Are they going to force the entire team to add the back door? I see entire teams quitting at that point.

198

u/hkf57 Jul 14 '19

"I reviewed your pull request this morning John"

"Oh cool, any major issues?"

"Well actually, yes, there was one"

"Did I not cover all use cases?"

"Oh no, actually, you pointed out one that was missed"

"Performance?"

"Never seen code this fast"

"Readability? It looks messy?"

"Look, if Michelangelo could have painted code in his time, it would not have looked half as beautiful as what I saw this morning"

"Then what?"

"You installed a fucking backdoor in the system without telling anyone John. That's the fucking problem right there"

52

u/GuybrushLightman Jul 15 '19

Somhow in my head that read in Gordon Ramsay's voice...

A backdoor, you fucking donut!

13

u/hkf57 Jul 15 '19

I'd totally listen to all code review comments TTS'd to his voice.

11

u/leixiaotie Jul 15 '19

This is your last chance. After this, there is no turning back.

You take the blue pill—you don't comply with government, and you get jailed for that

You take the red pill—you try to install the backdoor, found out by the company, get fired and sued. The worst possibility is you get jailed for that

Remember: all I'm offering is the truth. Nothing more.

5

u/bulldog_swag Jul 15 '19

This is obviously made up. I can tell because there's zero instances of the word "cunt".

0

u/[deleted] Jul 14 '19

[deleted]

57

u/Nadock Jul 15 '19

Congratulations, you’re now in prison for telling anyone that you’ve been asked to implement the backdoor.

29

u/[deleted] Jul 15 '19

Just add "Reviewed-by: Scott Morrison" in the checkin. Adding "Totally not a backdoor that I'm prohibited by law from revealing to anyone. Nothing to see here" will probably help to conceal the backdoor, too.

13

u/[deleted] Jul 15 '19

Google the law, call your boss over and cough loudly at the screen.

7

u/MyUsrNameWasTaken Jul 15 '19

/*** Code for Government back door. Do not delete or change ***/

24

u/sturmeh Jul 15 '19

The real answer is the law is being misinterpreted, but it's also vaguely written (which is the fucked up part).

That could not be asked of you, and never was the intention. Realistically they'll be approaching the company to do this.

27

u/evil-teddy Jul 15 '19

Laws are vaguely written for a reason.

15

u/Togusa09 Jul 15 '19

In this case, one of the reasons is that they didn't bother doing industry consultation.

→ More replies (1)

9

u/[deleted] Jul 15 '19

@ts-ignore-backdoor

5

u/bulldog_swag Jul 15 '19

Why put a backdoor directly in your code when you can just add a dependency that imports the backdoor as a subdependency of a subdependency?

7

u/ve0m Jul 14 '19

Yeah and this is why the government / police are going to have to be involved with the company to some level. They also have to pay the company for certain implementations. Hopefully they never contact a developer individually

4

u/50dollarstofuckoff Jul 15 '19

Let’s say I’m the devops or someone with access to the production servers. I can just put my program in the server itself, instead of the code base.

I don’t know if that’s how back doors work. Just guessing.

3

u/Ma1eficent Jul 15 '19

Or just edit the package on the machine :P

2

u/m50d Jul 15 '19

At a company following ops best-practice you wouldn't get away with that. At least one big internet-oriented company marks any server/VM that ops manually SSHes into as "tainted" and requires it to be regenerated (from puppet) within the next week or so.

5

u/manuscelerdei Jul 15 '19

It is entirely possible to design a back door that survives code review. There's even an entire contest to do exactly that: the Underhanded C Contest.

I know that this is Reddit, and open source is the cure for all ills because "I can audit it", and proprietary software is therefore evil because "I cannot audit it", but that's just not reality. Back doors can be installed which look completely benign on code inspection, especially given how absurdly complex modern software stacks are. Even if you catch them, it looks like a dumb goof that the team will collectively laugh about while saying "Well that's why we have code review!" Meantime, your malicious insider takes notes on how better to avoid scrutiny for his next attempt.

All these amateur security engineers out there seem to think that code review is a mitigation against an insider threat. It's not. Code review is there to catch use-after-free errors, basic OOP pattern violations, and maybe a missing space between the if and the (. It's not going to catch a determined insider who has already gotten through your hiring process trying to install a backdoor. The threat you're talking about isn't just some dude who has commit privileges; it's someone who almost certainly has a false identity, some amount of proficiency in spy tradecraft, and who has studied the patterns of the people who will be reviewing his commits.

This is not some schmuck who's going to put an if (backdoor_lol) line and call it a day. This is a person who'll spend weeks or months designing this thing for the express purpose of being invisible to reviewers and (probably) binary decompilation. This person has way more skill and time to achieve their goal (install a backdoor) than their adversary has to achieve their goal (review all commits to ensure that no bugs get in).

Defending against a malicious insider is really, really fucking hard, and to my knowledge, no one has figured out how to do it. Saying "Well code review will catch it just open source everything!" is just online posturing from people who've never had to seriously consider this threat.

8

u/m50d Jul 15 '19

It is entirely possible to design a back door that survives code review. There's even an entire contest to do exactly that: the Underhanded C Contest.

Sure. In a contest where programmers from around the world try to put an invisible backdoor in a notoriously error-prone language, some of them succeed some of the time. None of the entries I've seen are something that I'd want to stake national security, and an insider who's spent months or years getting into their position, on getting away with. Programming languages are designed to clearly communicate what the code is doing, and code review tools are designed to help understand that; no these processes aren't designed to defend against malice, but that doesn't matter, because these processes are designed to defend against human error and human error and malice have the same effect here.

2

u/BlueAdmir Jul 15 '19

and maybe a missing space between the if and the (

The one that escaped the autoformatters and linter?

→ More replies (2)

1

u/canicutitoff Jul 15 '19

A sufficiently advanced programmer can hide rather malicious code under seemingly innocent code.. The best example is the classic underhanded C contest. http://www.underhanded-c.org/

But hell, this is like if government can force restaurant workers to secretly put poison in the food they serve to certain customers.

→ More replies (8)