RPM Package Security: Cryptographic Verification and Scriptlet Auditing

Installing software packages from untrusted third-party repositories poses substantial security risks. In RPM-based systems (RHEL, CentOS, Fedora), an RPM is not merely an archive of binaries—it contains cryptographic signatures, file digests, and embedded shell scripts (“scriptlets”) that execute with full root privileges during installation and removal. Here is how to audit RPM package integrity and inspect scriptlets prior to execution. 1. Auditing Installed GPG Keys When YUM/DNF installs signed packages, it checks them against GPG public keys registered in the local RPM database. ...

June 30, 2015 · 2 min · 357 words · Ahmad Mahfouz

Encrypting and Decrypting Files with GnuPG (GPG)

GnuPG (GPG) is a complete implementation of the OpenPGP standard (RFC 4880). It allows you to encrypt data either symmetrically (using a shared passphrase) or asymmetrically (using public/private key pairs). When you need to protect sensitive documents (such as financial records, credentials, or backups) before sending them over email or untrusted channels, symmetric GPG encryption provides strong, zero-infrastructure security. Symmetric Encryption with a Passphrase To encrypt a file symmetrically using a password: ...

November 24, 2014 · 1 min · 212 words · Ahmad Mahfouz