News for hackers. Stuff that matters.
Re:Transmission BitTorrent app contained malware by iam-TJ on Sunday March 06, 2016 @02:31PM (#11235143)
In Debian and Ubuntu at least, all published files containing binary executable files (ISOs, .deb packages, etc.) are hashed and the hash signed by a well-known system pre-installed PGP key.

Given trust in the protection of the private key used to sign the hash list file the integrity of the executable content can be proved (assuming useful SHA1 collision creation is prohibitively expensive).

Coincidentally I was writing a Bash script this weekend to auto-install (Ubuntu) releases into LVM volumes and it includes the following code to verify the download:

  set -e
  # ...
  ISO="${NEW_DIST}-desktop-${ARCH}.iso"
  for F in SHA1SUMS SHA1SUMS.gpg ${ISO}; do
    if [ ! -r $F ]; then
      wget http://cdimage.ubuntu.com/${FLAVOUR}/daily-live/current/$F
    fi
  done

  if ! gpg --verify --keyring /etc/apt/trusted.gpg SHA1SUMS.gpg SHA1SUMS; then
    echo "Error: failed to verify the hash file list signature; files may have been tampered with"
    exit 2
  fi
  if ! grep ${ISO} SHA1SUMS | sha1sum -c; then
    echo "${ISO} is corrupted; please try again"
    exit 1
  fi
Re:Transmission BitTorrent app contained malware by voltagex_ on Sunday March 06, 2016 @08:10PM (#11236470)
Shouldn't you be using HTTPS for all downloads and grabbing the sha1s and image from different mirrors?
Re:Transmission BitTorrent app contained malware by acdha on Sunday March 06, 2016 @08:22PM (#11236508)
That is a good idea but note the use of GPG - if you aren't able to forge that signature, the verification step will fail.
Re:Transmission BitTorrent app contained malware by voltagex_ on Monday March 07, 2016 @02:00AM (#11237531)
Right, I missed that.
Re:Transmission BitTorrent app contained malware by nowprovision on Sunday March 06, 2016 @08:19PM (#11236498)
Great idea.