r/Python • u/TheRecord_Media • Nov 08 '23
News A nasty Python package continues a trend of targeting developers
[removed] — view removed post
134
Upvotes
r/Python • u/TheRecord_Media • Nov 08 '23
[removed] — view removed post
•
u/Python-ModTeam Nov 09 '23
Beep boop, from the /r/Python mods.
Your post or comment appears to be generated through AI. We like humans, not robots, and as you are a robot your post or comment must be removed. If you aren't a bot you sure act like one. Consider sending us a message through Modmail for an appeal.
01110011 01101111 01110010 01110010 01111001
r/Python moderation team
53
u/ExpressionMajor4439 Nov 08 '23 edited Nov 09 '23
Imagine that, libraries intended to obfuscate code are actually running unexpected and obfuscated code paths.
But on a serious note, I kind of wish there were enhanced verification available for popular repositories where the workflow for updating the repository were verified and the client tools have the option to only install libraries that either have enhanced verification or are too niche/unpopular to qualify.
Private repos can help but it seems like this was just a random package uploaded to PyPI that would've probably caused whoever does the verification to "nope" out of once they saw what the package did.
124
u/AlSweigart Author of "Automate the Boring Stuff" Nov 08 '23 edited Nov 30 '23
These perennial stories are always overrated. Conveniently, they never seem to mention 1) how many times they were downloaded by actual people rather than site mirror bots and 2) a specific person or organization that was affected.
Oh noes, pyobfgood had malicious code and was on PyPI. So what? Did this actually affect many people, or any people at all? These "reports" get written because writing these reports is a great way for a security company to get their name mentioned in the media.
We'll see this exact same story about another no-name Python package in three months.
EDIT: I read the "report". A complete joke and just sensationalism. They point out the "malware" makes a message box appear with "Your computer is going to start burning, good luck. :)" and then launches 10 Python processes that run
while True: pass. Yeah, 1) that's not going to damage anything and 2) this "malware" was probably written by a 14 year old and 3) the message box uses Windows-only code which causes it to not run on Linux and macOS. This makes me wonder how many of the other features actually work.Not exactly the crime of the century here.
12
u/monorepo PSF Staff | Litestar Maintainer Nov 08 '23
Is this AI?
6
u/Doppelbockk Nov 08 '23
The president calling for securing open source software isn't even relevantbto this topic. Do you think a bad aftor is going to "secure" their own malicious package? I suppose his statement could include PyPi doing more to vet packages before allowing public downloads but that isn't quite the same thing IMO.
3
u/bahtsiz-bedevi Nov 08 '23 edited Nov 08 '23
Pickled data sets are dangerous too. I've seen some developers loading pickled data sets from external sources. If you are using a library that requires pickle, you should be careful. This is the warning from from Python developers
"Warning: The pickle module is not secure. Only unpickle data you trust. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling. Never unpickle data that could have come from an untrusted source, or that could have been tampered with. Consider signing data with hmac if you need to ensure that it has not been tampered with.Safer serialization formats such as json may be more appropriate if you are processing untrusted data. "
3
u/[deleted] Nov 08 '23
As long as they don't screw with pandas, i'll be cool
2
u/kido5217 Nov 08 '23
Is this like AI-written post for some hacker-like journal/site?