TRIPWIRE(8)
π¦ TRIPWIRE(8) π¦ β a file integrity checker for UNIX-like systems
okay so bestie, this is the TRIPWIRE(8) page from the System Manager's Manual, and it's lowkey one of those tools that keeps your filesystem from getting absolutely clowned. slay. π«Ά
πΈ NAME πΈ
tripwire β a file integrity checker for UNIX-like systems.
β¨ SYNOPSIS β¨
tripwire { -m i | --init } [ options... ]
tripwire { -m c | --check } [ options... ]
[ object1 [ object2... ]]
tripwire { -m u | --update } [ options... ]
tripwire { -m p | --update-policy } [ options... ]
policyfile.txt
tripwire { -m t | --test } [ options... ]
π DESCRIPTION π
π οΈ Database Initialization Mode π οΈ
Running tripwire in Database Initialization mode is usually one of the first steps in setting up Tripwire for regular operation. This mode creates a baseline database in the location specified by the DBFILE variable in the Tripwire configuration file. The database is essentially a snapshot of the objects residing on the system β it's giving "before" photo energy, fr fr. During later Tripwire integrity checks, this database serves as the basis for comparison. β¨
When run in Database Initialization mode, tripwire reads the policy file, generates a database based on its contents, and then cryptographically signs the resulting database. Options can be entered on the command line to specify which policy, configuration, and key files are used to create the database. The filename for the database can be specified as well. If no options are specified, the default values from the current configuration file are used. π
π Integrity Checking Mode π
After building the Tripwire database, the next step is typically to run tripwire in Integrity Checking mode. This mode scans the system for violations, as specified in the policy file. Using the policy file rules, Tripwire will compare the state of the current file system against the initial baseline database. An integrity checking report is printed to stdout and is saved in the location specified by the REPORTFILE setting in the Tripwire configuration file. π
The generated report describes each policy file violation in detail, depending on whether the specified file system object was added, deleted, or changed. Each report item lists the properties of the object as it currently resides on the file system, and, if appropriate, the old value stored in the database. If there are differences between the database and the current system, the administrator can either fix the problem by replacing the current file with the correct file (e.g., an intruder replaced /bin/login), or update the database to reflect the new file (e.g., a fellow system administrator installed a new version of /usr/local/bin/emacs). The (-I or --interactive) option launches an editor that allows the user to update the database quickly. The Database Update mode of tripwire can also be used. πΈ
π³οΈ Database Update Mode π³οΈ
Running tripwire in Database Update mode allows any differences between the database and the current system to be reconciled. This will prevent the violation from showing up in future reports. If the reported change is unexpected and potentially malicious, then the changed file should be replaced with the original version. If there is a valid reason for the change, the database must be changed to match the current files. π
In Database Update mode, the items to be changed are specified in a "ballot box" in the plain text report that is launched in an editor program. The entries to be updated are specified by leaving the "x" next to each policy violation. After the user exits the editor and provides the correct local passphrase, tripwire will update the database. Options to control this operation include the (-Z or --secure-mode) and (-a or --accept-all) flags. π«Ά
π Policy Update Mode π
Policy update mode is used by tripwire to change or update the policy file and to synchronize an earlier database with new policy file information. The filename of the new clear text version of the policy file is specified on the command line. The new policy file is compared to the existing version, and the database is updated according to the new policy rules. Any changes in the database since the last integrity check will be detected and reported. How these violations are interpreted depends on the security mode specified with the (-Z or --secure-mode) option. In high security mode (the default), Tripwire will print a list of violations and exit without making changes to the database. In low security mode, the violations are still reported, but changes to the database are made automatically. π
Because the policy and database files are binary-encoded and cryptographically signed, the user will be prompted for the site and local passphrases to change the policy settings. After the database is successfully updated, the database and policy files are re-encoded and signed. π
π§ Test Mode π§
Test mode is used to check the operation of the Tripwire email notification system. When run in this mode, Tripwire will use the email notification settings specified in the configuration file to send a test email message. If MAILMETHOD is set to SMTP, the SMTPHOST and SMTPPORT values will be used to send email. If MAILMETHOD is set to SENDMAIL, the MAILPROGRAM value will be used. If email notification is working correctly, the address specified on the command line will receive the following message:
To: user@domain.com
From: user <user@domain.com>
Subject: Test email message from Tripwire
If you receive this message, email notification
from Tripwire is working correctly.
Test mode only tests email notification for the address specified on the command-line, and does not check for errors in the syntax used with the emailto attribute in the policy file. π¦
β¨ OPTIONS β¨
π Database Initialization mode: π
quick cheat sheet, exactly as the page lays it out:
-m i --init
-v --verbose
-s --silent, --quiet
-c cfgfile --cfgfile cfgfile
-p polfile --polfile polfile
-d database --dbfile database
-S sitekey --site-keyfile sitekey
-L localkey --local-keyfile localkey
-P passphrase --local-passphrase passphrase
-e --no-encryption
-m i,--initβ Mode selector.-v,--verboseβ Verbose output mode. Mutually exclusive with (-s).-s,--silent,--quietβ Silent output mode. Mutually exclusive with (-v).-c cfgfile,--cfgfile cfgfileβ Use the specified configuration file.-p polfile,--polfile polfileβ Use the specified policy file.-d database,--dbfile databaseβ Write to the specified database file.-S sitekey,--site-keyfile sitekeyβ Use the specified site key file to read the configuration and policy files.-L localkey,--local-keyfile localkeyβ Use the specified local key file to write the new database file. Mutually exclusive with (-e).-P passphrase,--local-passphrase passphraseβ Specifies passphrase to be used with local key to sign the new database. Mutually exclusive with (-e).-e,--no-encryptionβ Do not sign the database being stored. The database file will still be compressed and will not be human-readable. Mutually exclusive with (-L) and (-P).
π΅οΈββοΈ Integrity Checking mode π΅οΈββοΈ
Integrity Checking mode:
-m c --check
-I --interactive
-v --verbose
-s --silent, --quiet
-c cfgfile --cfgfile cfgfile
-p polfile --polfile polfile
-d database --dbfile database
-r report --twrfile report
-S sitekey --site-keyfile sitekey
-L localkey --local-keyfile localkey
-P passphrase --local-passphrase passphrase
-n --no-tty-output
-V editor --visual editor
-E --signed-report
-i list --ignore list
-l { level | name } --severity { level | name }
-R rule --rule-name rule
-x section --section section
-M --email-report
-t { 0|1|2|3|4 } --email-report-level { 0|1|2|3|4 }
-h --hexadecimal
[ object1 [ object2... ]]
okay so here's the whole check-mode fam, one by one π
-m c,--checkβ the mode selector, babe. this is you telling tripwire "we're doing an integrity check today."-I,--interactiveβ when the integrity check wraps up, the resulting report gets opened in an editor where you can specify database updates, easy-peasy, using the ballot boxes that are included in the report β¨-v,--verboseβ verbose output mode. mutually exclusive with (-s), so pick a lane bestie.-s,--silent,--quietβ silent output mode. mutually exclusive with (-v). the quiet one. the mysterious one. π-ccfgfile,--cfgfilecfgfile β use the specified configuration file.-ppolfile,--polfilepolfile β use the specified policy file.-ddatabase,--dbfiledatabase β use the specified database file.-rreport,--twrfilereport β write the specified report file.-Ssitekey,--site-keyfilesitekey β use the specified site key file to read the configuration and policy files.-Llocalkey,--local-keyfilelocalkey β use the specified local key file to read the database file and, if (-E) is specified, to write the report file.-Ppassphrase,--local-passphrasepassphrase β specifies the passphrase used with the local key to sign the database when (-I) is used, and to sign the report when (-E) is used. valid only with (-I) or (-E) π-n,--no-tty-outputβ suppress the report from being printed at the console. no screen spam. we love that for us.-Veditor,--visualeditor β use the specified editor to edit the update ballot boxes. meaningful only with (-I).-E,--signed-reportβ says the tripwire report will be signed. if no passphrase is specified on the command line, tripwire will prompt for the local passphrase π-ilist,--ignorelist β do not compute or compare the properties specified in list. any of the letter codes (abcdgimnprstulCHMS) specified in property-masks can be excluded. using this option overrides information from the policy file. the format for list is a double-quoted, comma-delimited list of properties (e.g.--ignore "p,c,m").-l { level | name },--severity { level | name }β check only policy rules with severity greater than or equal to the given level. the level may be a number or a name. severity names are defined as follows:
Low 33
Medium 66
High 100
mutually exclusive with (-R).
-Rrule,--rule-namerule β check only the specified policy rule. mutually exclusive with (-l).-xsection,--sectionsection β only check the rules in the specified section of the policy file. for Tripwire 2.4,FSis the only meaningful argument for this flag.-M,--email-reportβ specifies that reports be emailed to the recipient(s) designated in the policy file π§-tlevel,--email-report-levellevel β specifies the detail level of email reports, overriding theEMAILREPORTLEVELvariable in the configuration file. level must be a number from0to4. valid only with (-M).-h,--hexadecimalβ display hash values as hexadecimal in email reports.[ object1 [ object2... ]]β list of files and directories that should be integrity checked. default is all files. if files are specified for checking, the--severityand--rule-nameoptions will be ignored π
π Database Update mode π
Database Update mode:
-m u --update
-v --verbose
-s --silent, --quiet
-c cfgfile --cfgfile cfgfile
-p polfile --polfile polfile
-d database --dbfile database
-r report --twrfile report
-S sitekey --site-keyfile sitekey
-L localkey --local-keyfile localkey
-P passphrase --local-passphrase passphrase
-V editor --visual editor
-a --accept-all
-Z { low | high } --secure-mode { low | high }
-m u,--updateβ mode selector, but make it update era π-v,--verboseβ verbose output mode. mutually exclusive with (-s).-s,--silent,--quietβ silent output mode. mutually exclusive with (-v).-ccfgfile,--cfgfilecfgfile β use the specified configuration file.-ppolfile,--polfilepolfile β use the specified policy file.-ddatabase,--dbfiledatabase β update the specified database file.-rreport,--twrfilereport β read the specified report file.-Ssitekey,--site-keyfilesitekey β use the specified site key file to read the configuration and policy files.-Llocalkey,--local-keyfilelocalkey β use the specified local key file to read the database file and report file, and to re-write the database file.-Ppassphrase,--local-passphrasepassphrase β specifies the passphrase used with the local key to sign the database.-Veditor,--visualeditor β use the specified editor to edit the update ballot boxes. mutually exclusive with (-a).-a,--accept-allβ says all the entries in the report file get updated without prompting. mutually exclusive with (-V). no questions, just vibes ~~and consequences~~ β¨-Z { low | high },--secure-mode { low | high }β specifies the security level, which affects how certain conditions are handled when inconsistent information is found between the report file and the current database:- High: in high security mode, if a file doesn't match the properties in the report file, Tripwire reports the differences as warnings, and exits without changing the database. π
- Low: in low security mode, inconsistencies are reported as warnings, but the changes are still made to the database.
π Policy Update mode π
Policy Update mode:
-m p --update-policy
-v --verbose
-s --silent, --quiet
-c cfgfile --cfgfile cfgfile
-p polfile --polfile polfile
-d database --dbfile database
-S sitekey --site-keyfile sitekey
-L localkey --local-keyfile localkey
-P passphrase --local-passphrase passphrase
-Q passphrase --site-passphrase passphrase
-Z { low | high } --secure-mode { low | high }
policyfile.txt
-m p,--update-policyβ mode selector. policy edition π-v,--verboseβ verbose output mode. mutually exclusive with (-s).-s,--silent,--quietβ silent output mode. mutually exclusive with (-v).-ccfgfile,--cfgfilecfgfile β use the specified configuration file.-ppolfile,--polfilepolfile β write the specified policy file.-ddatabase,--dbfiledatabase β use the specified database file.-Ssitekey,--site-keyfilesitekey β use the specified site key file to read the configuration file, and read and write the policy file.-Llocalkey,--local-keyfilelocalkey β use the specified local key file to read and write the database file.-Ppassphrase,--local-passphrasepassphrase β specifies the passphrase used with the local key to sign the database.-Qpassphrase,--site-passphrasepassphrase β specifies the passphrase used with the site key to sign the new policy file. π-Z { low | high },--secure-mode { low | high }β specifies the security level, which affects how certain conditions are handled when the existing filesystem doesn't match the database information. since the database produced at the end of a policy update becomes the baseline for future integrity checks, this consistency-checking makes sure no substantive filesystem changes have occurred since the last integrity check. like, it's literally protecting future-you π«Ά- High: in high security mode, if a file on the filesystem doesn't match the properties in the database file, Tripwire reports the differences as warnings, and exits without changing the database or the policy file.
- Low: in low security mode, inconsistencies are reported as warnings, but the changes are still made to the database and policy file.
- policyfile.txt β specifies the text policy file that will become the new policy file.
π§ͺ Test mode π§ͺ
Test mode:
-m t --test
-e user@domain.com --email user@domain.com
-m t,--testβ mode selector. just a lil test run, nbd πΈ-euser@domain.com,--emailuser@domain.com β use the specified email address. this parameter must be supplied when test mode is used. only one address may be specified. one. single. address. don't push it π€
π¦ EXIT STATUS π¦
Integrity Checking Mode
tripwire exits 0 if no changes are detected. otherwise the exit value is a bit mask:
1β at least one file or directory has been added.2β at least one file or directory has been modified.4β at least one file or directory has been modified.8β error(s) occurred during the check.
(yes, 2 and 4 say the same thing β that's literally what the page says, i'm just the messenger π)
All Other Modes
tripwire exits 0 on success, 8 on error.
π VERSION INFORMATION π
this man page describes tripwire version 2.4 β
π AUTHORS π
Tripwire, Inc.
π COPYING PERMISSIONS π
okay so legal stuff, but make it cute π β the short version is: share this page around all you want, just don't strip the credits. Here's the actual tea, fr fr:
- You're totally allowed to make and hand out verbatim copies of this man page, as long as the copyright notice and this permission notice stay preserved on all copies. Like, don't crop out the watermark bestie π
- You're also allowed to copy and distribute modified versions of this man page, under the same conditions as verbatim copying β provided that the whole resulting derived work gets distributed under the terms of a permission notice identical to this one. Same vibe, same rules, no cap π«Ά
- And yes, you can copy and distribute translations of this man page into another language, under those same conditions for modified versions β with one lil exception: that permission notice may be stated in a translation approved by Tripwire, Inc. π
β¨ Copyright 2000-2018 Tripwire, Inc. Tripwire is a registered trademark of Tripwire, Inc. in the United States and other countries. All rights reserved. β¨
That's it, that's the whole legal saga β iconic of them honestly π
π SEE ALSO π
go read your sisters, they're all main characters too π:
And if you want the lore β the deep origin-story backstory of this whole thing πΈ β there's this absolutely legendary read:
The Design and Implementation of Tripwire: A UNIX File Integrity Checker by Gene Kim and Eugene Spafford. Purdue Technical Report CSD-TR-93-071.
literally required reading if you wanna understand why any of this slaps πβ¨
aaaand that's the whole page bestie, you made it to the end ππ¦ This lil masterpiece is Open Source Tripwire 2.4, dated 04 Jan 2018 β go forth and verify those file integrity checks, you absolute icon ππ periodt.
π¦ where this page comes from
- epel 10: tripwire 2.4.3.7-20.el10_2 Β· GPL-2.0-or-later
- epel 9: tripwire 2.4.3.7-16.el9 Β· GPL-2.0-or-later
- fedora 43: tripwire 2.4.3.7-20.fc43 Β· GPL-2.0-or-later
- fedora 44: tripwire 2.4.3.7-21.fc44 Β· GPL-2.0-or-later
- opensuse-leap 16.0: tripwire 2.4.3.7-bp160.1.12 Β· GPL-2.0-or-later
- opensuse-leap 16.0: tripwire 2.4.3.7-bp160.1.12 Β· GPL-2.0-or-later
- opensuse-leap 16.0: tripwire 2.4.3.7-bp160.1.12 Β· GPL-2.0-or-later
- opensuse-leap 16.0: tripwire 2.4.3.7-bp160.1.12 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms