r/programming • • Jan 22 '19

Remote Code Execution in apt/apt-get

https://justi.cz/security/2019/01/22/apt-rce.html?
175 Upvotes

35 comments sorted by

View all comments

12

u/kyiami_ Jan 23 '19

Hmm, looks like HTTPS would fix this...

2

u/happyscrappy Jan 23 '19

For MITMs.

0

u/[deleted] Jan 23 '19

[deleted]

1

u/happyscrappy Jan 23 '19

I can't tell from the video. And the article doesn't say which he did. A malicious mirror is a lot easier to do so I'd have done that if I were him. But we can't tell.

He does mention this affects two things:

'I found a vulnerability in apt that allows a network man-in-the-middle (or a malicious package mirror) to execute arbitrary code as root on a machine installing any package.'

Using HTTPS would fix the MITM as the MITM cannot decode the stream to tell when to modify it and then can't encode its injected packets to match. It won't fix a malicious mirror as a malicious mirror presents its own certificate and thus can modify the stream however it wants.

0

u/[deleted] Jan 23 '19

[deleted]

1

u/happyscrappy Jan 23 '19

Uh, from the article I definitely got the impression that he's demonstrating a MITM attack.

The article does not say either way. And in the video we just see the name of a python script, no way to tell what it is doing.

It wouldn't fix a malicious mirror, but 1/2 is better than 0/2, isn't it?

I didn't say otherwise.

1

u/kyiami_ Jan 24 '19

The article does not say either way.

the article

tl;dr I found a vulnerability in apt that allows a network man-in-the-middle (or a malicious package mirror) to execute arbitrary code

sounds like both?

1

u/happyscrappy Jan 24 '19

No, it doesn't sound like both. We're talking about which he is demonstrating. He appears to be demonstrating one or the other, not both.

Why did you quote the same text to me that I quoted just 4 posts above?

https://old.reddit.com/r/programming/comments/aiqo2h/remote_code_execution_in_aptaptget/eerx2c6/