156
submitted 2 months ago by lemmyreader@lemmy.ml to c/opensource@lemmy.ml
you are viewing a single comment's thread
view the rest of the comments
[-] Cube6392@beehaw.org 1 points 2 months ago

A deb is just a zip file that gets unpacked to where your binaries go. A shell script you curl pipe into shell could contain literally any instructions

[-] gomp@lemmy.ml 2 points 2 months ago* (last edited 2 months ago)

Binary packages have scripts (IIRC for .deb they are preinst/postinst to be run before/after installation and prerm/postrm before/after removal) that are run as root.

BTW the "unzip" part is also run as root, and a binary package can typically place stuff anywhere in your system (that's their job after all)... even if you used literal zip files they could still install a script in ways that would cause the OS to execute it.

[-] Cube6392@beehaw.org 1 points 2 months ago

Yeah I'm over simplifying on purpose here. The bottom line is piping into sh is dangerous

this post was submitted on 13 Jul 2024
156 points (90.6% liked)

Open Source

30274 readers
305 users here now

All about open source! Feel free to ask questions, and share news, and interesting stuff!

Useful Links

Rules

Related Communities

Community icon from opensource.org, but we are not affiliated with them.

founded 5 years ago
MODERATORS