In the new package-base world, what replaces freebsd-update IDS?

Have to get back on this, pkg-check(8) really only checks meta data, dependency chains, that sort of thing. What you really want to know is, does /usr/bin/something on disk match with the executable that came from the package that installed it. In other words, is it still the same file, i.e. not modified.

Had a look through pkg-query(8) because I was certain a list of files contained within a package is recorded. And it certainly is, including a hash of the file. You'll need to script something around that info but something like pkg query -a '%Fp;%Fs' will get you a list of files with their checksum from all your installed packages. Then have a script read it and check each file on disk and compare the checksums.

List will look like this:
Code:
/usr/local/bin/bash;2$8p4etf4zhq79gi3y6xmyx5sjsgj4wp6c7gbc334jjtewmxxwp6szkxfaqsj5ibgouy6n7du6se3618n51zbpw4qk1xdn4rxkj13y7un
/usr/local/bin/bashbug;2$7mztxboct7kirj7q3c3whymur3yrysnj8mhd4dq1fb9rnhofhjsa58hb56rtuqdjry5n6zeyf14tfnwmn3kwpz4n8ew3yrsfrym47nn
/usr/local/bin/rbash;2$3ggrwechxir3pfbcucrbnjuzap3gixqf975tsobdqwdnfjah8hd3tj53ok9dh3bq3waqzent9dgu8cnp8db3c7wkcic5h96din3zpkb
/usr/local/include/bash/alias.h;2$fikmhcmfwuok4scksodjn7agkwcnbch7enbuw97975xxs1bhetxhy6n7txr8mjgiyjwxybr4x4bupujx3pxghuj1ybxezoozehhjt3y
/usr/local/include/bash/array.h;2$9fm56w6j1r17wi87yjjxt75ykpiegkruj3hmdyd8xm9xmsw9qjos3ops3cw6ker9bsjj6u9sfh3j1ij1ygiey5rfrod7q3n5bnp3ghy
/usr/local/include/bash/arrayfunc.h;2$6z3azr98nesoxp4ir7w9xexbjyy8n9xbmgnxduxoek1ahodt85sh3fumypn7ntz3mz9wtizrf9jae9d7d4dpkxtx8yt83673p14kjun
/usr/local/include/bash/assoc.h;2$ujqd43oxno68io8e6gshiaxnk6edf9sfshrujuhgawkw41r4wyxhuw5ru1n1uehozd65mb1g3bqibtgy6d19bnzhgp9pweuyiiowtad
 
No, this is not an Intrusion Detection System like tripwire - it would be very easy for someone with root access to modify freebsd-update to not highlight malicious files or changes. It is simply a comparison of the whole filesystem against a known copy of a FreeBSD installation (with system updates) before any changes have been made. So it's useful for seeing what changes you have made over the years, identifying any files you left around that are no longer needed, etc. If you were doing a reinstall of FreeBSD you would then know which system files to alter.
 
Back
Top