Live data from Hacker News

PyPI: Python packets steal AWS keys from users

blog.sonatype.com

101–104 of 104 posts

Re: PyPI: Python packets steal AWS keys from users

#101

We need the GPG feature in pip to be finished. We can currently upload signed packages, but pip won't check if you thrust the keys. Pip should include a keyring system and prevent people from installing packages without a signature that has a certain thrust level without explicit whitelist or interactivity.

Unbelievable that a major packaging ecosystem still has no mechanism for end-to-end signature verification!

Re: PyPI: Python packets steal AWS keys from users

#102

Earlier quoted context omitted.

Any access to resolve global dns lets you exfiltrate even if you’re locked to a local resolver. Just blocking connections to the internet directly is not enough.

Sure, but again, parent said "Network access" which I assume includes internet (global), local network or any other type of sockets/connections, not just "internet" ones.

Not all OSes’ resolver libraries use the network. Solaris/Illumos uses door IPC.

Re: PyPI: Python packets steal AWS keys from users

#103
post #25

Earlier quoted context omitted.

Source code has issues with obfuscation methodologies that can defeat a lot of techniques. It’s why companies are trying to build more analysis down into the kernel such as via EBPF. For example, concatenating a series of strings and characters that wind up reading from .AWS/credentials in the end is surprisingly tough to catch based upon simple pattern recognition alone, especially if it’s done in a subtle way such…

Right, code analysis to try to detect places where it reads from ~/.aws/credentials is never going to be reliable. The correct approach is not to run untrusted code in an environment where it can read your AWS credentials.

Another approach is to only run credentials that are ephemeral, which is sort of what most SSO systems will do for cloud IAM. Instance profiles using IDMSv2 work as well, too. However some malware out there only needs a few seconds of dwell time to wreak some serious havoc so even ephemeral credentials may as well be the same as static credentials potentially, especially if your credentials are used to do permanent privilege escalation. All it really can do then is provide a time window of usage and make filtering through a SIEM much more accurate, which is certainly valuable for forensics at the very least and even more important in terms of law (chain of custody, irrefutability, etc).

Re: PyPI: Python packets steal AWS keys from users

#104
post #101

We need the GPG feature in pip to be finished. We can currently upload signed packages, but pip won't check if you thrust the keys. Pip should include a keyring system and prevent people from installing packages without a signature that has a certain thrust level without explicit whitelist or interactivity.

Unbelievable that a major packaging ecosystem still has no mechanism for end-to-end signature verification!

Apparently they are working on it in PEP-480
Post reply on HN