{"id":318,"date":"2014-12-21T02:33:34","date_gmt":"2014-12-20T17:33:34","guid":{"rendered":"http:\/\/yokensaka.com\/centos\/?p=318"},"modified":"2015-01-04T20:43:58","modified_gmt":"2015-01-04T11:43:58","slug":"centos7-tripwire%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab","status":"publish","type":"post","link":"http:\/\/yokensaka.com\/centos\/?p=318","title":{"rendered":"CentOS 7 Tripwire\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb"},"content":{"rendered":"<p>Tripwire\u3092Yum\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/p>\n<p>Tripwire\u3092Yum\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u5834\u5408\u3001<a href=\"http:\/\/yokensaka.com\/centos\/?p=277\" title=\"CentOS7 \u30d1\u30c3\u30b1\u30fc\u30b8\u7ba1\u7406(yum)\">EPEL\u30ea\u30dd\u30b8\u30c8\u30ea<\/a>\u3092\u8ffd\u52a0\u3057\u3066\u304a\u304f\u3002<br \/>\n\u53e4\u3044Tripwire\u304c\u6b8b\u3063\u3066\u308b\u5834\u5408\u306f\u30a2\u30f3\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u304a\u304f<\/p>\n<pre>[root@server1 ~]# yum remove tripwire\r\n\u4e0b\u8a18\u30b3\u30de\u30f3\u30c9\u3067\u691c\u7d22\u3057\u3066\u51fa\u3066\u304d\u305f\u3082\u306e\u306f\u5168\u3066\u524a\u9664\u3057\u3066\u304a\u304f\uff08\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u30fc\u300crm -rf\u300d\u3001\u30d5\u30a1\u30a4\u30eb\u300crm -f\u300d\uff09\r\n[root@server1 ~]# find \/* | grep tripwire<\/pre>\n<p>\u25a0Tripwire\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/p>\n<pre>[root@server1 ~]# yum install tripwire\r\n\u8aad\u307f\u8fbc\u3093\u3060\u30d7\u30e9\u30b0\u30a4\u30f3:fastestmirror, langpacks, priorities\r\nLoading mirror speeds from cached hostfile\r\n * base: mirror.vodien.com\r\n * centosplus: mirror.vodien.com\r\n * epel: mirrors.vinahost.vn\r\n * extras: mirror.vodien.com\r\n * rpmforge: ftp.neowiz.com\r\n * updates: mirror.vodien.com\r\n77 packages excluded due to repository priority protections\r\n\u4f9d\u5b58\u6027\u306e\u89e3\u6c7a\u3092\u3057\u3066\u3044\u307e\u3059\r\n--> \u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u306e\u78ba\u8a8d\u3092\u5b9f\u884c\u3057\u3066\u3044\u307e\u3059\u3002\r\n---> \u30d1\u30c3\u30b1\u30fc\u30b8 tripwire.x86_64 0:2.4.2.2-6.el7 \u3092 \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\r\n--> \u4f9d\u5b58\u6027\u89e3\u6c7a\u3092\u7d42\u4e86\u3057\u307e\u3057\u305f\u3002\r\n\r\n\u4f9d\u5b58\u6027\u3092\u89e3\u6c7a\u3057\u307e\u3057\u305f\r\n\r\n====================================================================================================\r\n Package                \u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u30fc     \u30d0\u30fc\u30b8\u30e7\u30f3                    \u30ea\u30dd\u30b8\u30c8\u30ea\u30fc        \u5bb9\u91cf\r\n====================================================================================================\r\n\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u4e2d:\r\n tripwire               x86_64               2.4.2.2-6.el7                 epel               1.0 M\r\n\r\n\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u306e\u8981\u7d04\r\n====================================================================================================\r\n\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb  1 \u30d1\u30c3\u30b1\u30fc\u30b8\r\n\r\n\u7dcf\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u5bb9\u91cf: 1.0 M\r\n\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5bb9\u91cf: 4.1 M\r\nIs this ok [y\/d\/N]: y\r\nDownloading packages:\r\ntripwire-2.4.2.2-6.el7.x86_64.rpm                                            | 1.0 MB  00:00:01\r\nRunning transaction check\r\nRunning transaction test\r\nTransaction test succeeded\r\nRunning transaction\r\n  \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u4e2d          : tripwire-2.4.2.2-6.el7.x86_64                                       1\/1\r\n  \u691c\u8a3c\u4e2d                  : tripwire-2.4.2.2-6.el7.x86_64                                       1\/1\r\n\r\n\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb:\r\n  tripwire.x86_64 0:2.4.2.2-6.el7\r\n\r\n\u5b8c\u4e86\u3057\u307e\u3057\u305f!<\/pre>\n<p>\u25a0tripwire\u306e\u521d\u671f\u8a2d\u5b9a<\/p>\n<pre>[root@server1 ~]# tripwire-setup-keyfiles\r\n\r\n----------------------------------------------\r\nThe Tripwire site and local passphrases are used to sign a  variety  of\r\nfiles, such as the configuration, policy, and database files.\r\n\r\nPassphrases should be at least 8 characters in length and contain  both\r\nletters and numbers.\r\n\r\nSee the Tripwire manual for more information.\r\n\r\n----------------------------------------------\r\nCreating key files...\r\n\r\n(When selecting a passphrase, keep in mind that good passphrases typically\r\nhave upper and lower case letters, digits and punctuation marks, and are\r\nat least 8 characters in length.)\r\n\r\nEnter the site keyfile passphrase:\u3000\u2190\u3000\u30b5\u30a4\u30c8\u30d1\u30b9\u30d5\u30ec\u30fc\u30ba\u3092\u8a2d\u5b9a\r\nVerify the site keyfile passphrase:\u3000\u2190\u3000\u30b5\u30a4\u30c8\u30d1\u30b9\u30d5\u30ec\u30fc\u30ba\u3092\u518d\u5ea6\u5165\u529b\r\nGenerating key (this may take several minutes)...Key generation complete.\r\n\r\n(When selecting a passphrase, keep in mind that good passphrases typically\r\nhave upper and lower case letters, digits and punctuation marks, and are\r\nat least 8 characters in length.)\r\n\r\nEnter the local keyfile passphrase:\u3000\u2190\u3000\u30ed\u30fc\u30ab\u30eb\u30d1\u30b9\u30d5\u30ec\u30fc\u30ba\u3092\u8a2d\u5b9a\r\nVerify the local keyfile passphrase:\u3000\u2190\u3000\u30ed\u30fc\u30ab\u30eb\u30d1\u30b9\u30d5\u30ec\u30fc\u30ba\u3092\u518d\u5ea6\u5165\u529b\r\nGenerating key (this may take several minutes)...Key generation complete.\r\n\r\n----------------------------------------------\r\nSigning configuration file...\r\nPlease enter your site passphrase:\u3000\u2190\u3000\u30b5\u30a4\u30c8\u30d1\u30b9\u30d5\u30ec\u30fc\u30ba\u3092\u5165\u529b\r\nWrote configuration file: \/etc\/tripwire\/tw.cfg\r\n\r\nA clear-text version of the Tripwire configuration file:\r\n\/etc\/tripwire\/twcfg.txt\r\nhas been preserved for your inspection.  It  is  recommended  that  you\r\nmove this file to a secure location and\/or encrypt it in place (using a\r\ntool such as GPG, for example) after you have examined it.\r\n\r\n\r\n----------------------------------------------\r\nSigning policy file...\r\nPlease enter your site passphrase:\u3000\u2190\u3000\u30b5\u30a4\u30c8\u30d1\u30b9\u30d5\u30ec\u30fc\u30ba\u3092\u5165\u529b\r\nWrote policy file: \/etc\/tripwire\/tw.pol\r\n\r\nA clear-text version of the Tripwire policy file:\r\n\/etc\/tripwire\/twpol.txt\r\nhas been preserved for  your  inspection.  This  implements  a  minimal\r\npolicy, intended only to test  essential  Tripwire  functionality.  You\r\nshould edit the policy file to  describe  your  system,  and  then  use\r\ntwadmin to generate a new signed copy of the Tripwire policy.\r\n\r\nOnce you have a satisfactory Tripwire policy file, you should move  the\r\nclear-text version to a secure location  and\/or  encrypt  it  in  place\r\n(using a tool such as GPG, for example).\r\n\r\nNow run \"tripwire --init\" to enter Database Initialization  Mode.  This\r\nreads the policy file, generates a database based on its contents,  and\r\nthen cryptographically signs the resulting  database.  Options  can  be\r\nentered on the command line to specify which policy, configuration, and\r\nkey files are used  to  create  the  database.  The  filename  for  the\r\ndatabase can be specified as well. If no  options  are  specified,  the\r\ndefault values from the current configuration file are used.<\/pre>\n<p>\u25a0Tripwire\u306e\u8a2d\u5b9a<\/p>\n<pre>[root@server1 ~]# vi \/etc\/tripwire\/twcfg.txt\r\nROOT                   =\/usr\/sbin\r\nPOLFILE                =\/etc\/tripwire\/tw.pol\r\nDBFILE                 =\/var\/lib\/tripwire\/$(HOSTNAME).twd\r\nREPORTFILE             =\/var\/lib\/tripwire\/report\/$(HOSTNAME)-$(DATE).twr\r\nSITEKEYFILE            =\/etc\/tripwire\/site.key\r\nLOCALKEYFILE           =\/etc\/tripwire\/$(HOSTNAME)-local.key\r\nEDITOR                 =\/bin\/vi\r\nLATEPROMPTING          =false\r\nLOOSEDIRECTORYCHECKING =false\r\n\u2193\r\nLOOSEDIRECTORYCHECKING =true\r\nMAILNOVIOLATIONS       =true\r\nEMAILREPORTLEVEL       =3\r\nREPORTLEVEL            =3\r\n\u2193\r\nREPORTLEVEL            =4\r\nMAILMETHOD             =SENDMAIL\r\nSYSLOGREPORTING        =false\r\nMAILPROGRAM            =\/usr\/sbin\/sendmail -oi -t\r\n\r\n\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb(\u30c6\u30ad\u30b9\u30c8\u7248\u21d2\u6697\u53f7\u7f72\u540d\u7248)\u3092\u4f5c\u6210\r\n[root@server1 ~]# twadmin -m F -c \/etc\/tripwire\/tw.cfg -S \/etc\/tripwire\/site.key \/etc\/tripwire\/twcfg.txt\r\nPlease enter your site passphrase:\r\nWrote configuration file: \/etc\/tripwire\/tw.cfg\r\n\r\n\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u78ba\u4fdd\u306e\u305f\u3081\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb(\u30c6\u30ad\u30b9\u30c8\u7248)\u3092\u524a\u9664\r\n[root@server1 ~]# rm -f \/etc\/tripwire\/twcfg.txt\r\n\r\n\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb(\u30c6\u30ad\u30b9\u30c8\u7248)\u3092\u5fa9\u6d3b\u3055\u305b\u308b\u5834\u5408\u306f\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u5fa9\u6d3b\u3067\u304d\u308b\r\n[root@server1 ~]# twadmin --print-cfgfile > \/etc\/tripwire\/twcfg.txt<\/pre>\n<p>\u25a0\u30dd\u30ea\u30b7\u30fc\u30d5\u30a1\u30a4\u30eb\u306e\u8a2d\u5b9a<\/p>\n<p>\u30dd\u30ea\u30b7\u30fc\u30d5\u30a1\u30a4\u30eb\u306e\u6700\u9069\u5316\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4f5c\u6210<\/p>\n<pre>[root@server1 ~]# vi \/etc\/tripwire\/twpolmake.pl\r\n#!\/usr\/bin\/perl\r\n# Tripwire Policy File customize tool\r\n# ----------------------------------------------------------------------\r\n# Copyright (C) 2003 Hiroaki Izumi\r\n# This program is free software; you can redistribute it and\/or\r\n# modify it under the terms of the GNU General Public License\r\n# as published by the Free Software Foundation; either version 2\r\n# of the License, or (at your option) any later version.\r\n# This program is distributed in the hope that it will be useful,\r\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r\n# GNU General Public License for more details.\r\n# You should have received a copy of the GNU General Public License\r\n# along with this program; if not, write to the Free Software\r\n# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\r\n# ----------------------------------------------------------------------\r\n# Usage:\r\n#    perl twpolmake.pl {Pol file}\r\n# ----------------------------------------------------------------------\r\n#\r\n$POLFILE=$ARGV[0];\r\nopen(POL,\"$POLFILE\") or die \"open error: $POLFILE\" ;\r\nmy($myhost,$thost) ;\r\nmy($sharp,$tpath,$cond) ;\r\nmy($INRULE) = 0 ;\r\nwhile (&lt;POL&gt;) {\r\nchomp;\r\nif (($thost) = \/^HOSTNAME\\s*=\\s*(.*)\\s*;\/) {\r\n$myhost = `hostname` ; chomp($myhost) ;\r\nif ($thost ne $myhost) {\r\n$_=\"HOSTNAME=\\\"$myhost\\\";\" ;\r\n}\r\n}\r\nelsif ( \/^{\/ ) {\r\n$INRULE=1 ;\r\n}\r\nelsif ( \/^}\/ ) {\r\n$INRULE=0 ;\r\n}\r\nelsif ($INRULE == 1 and ($sharp,$tpath,$cond) = \/^(\\s*\\#?\\s*)(\\\/\\S+)\\b(\\s+->\\s+.+)$\/) {\r\n$ret = ($sharp =~ s\/\\#\/\/g) ;\r\nif ($tpath eq '\/sbin\/e2fsadm' ) {\r\n$cond =~ s\/;\\s+(tune2fs.*)$\/; \\#$1\/ ;\r\n}\r\nif (! -s $tpath) {\r\n$_ = \"$sharp#$tpath$cond\" if ($ret == 0) ;\r\n}\r\nelse {\r\n$_ = \"$sharp$tpath$cond\" ;\r\n}\r\n}\r\nprint \"$_\\n\" ;\r\n}\r\nclose(POL) ;<\/pre>\n<p>\u30dd\u30ea\u30b7\u30fc\u30d5\u30a1\u30a4\u30eb\u306e\u6700\u9069\u5316<\/p>\n<pre>[root@server1 ~]# perl \/etc\/tripwire\/twpolmake.pl \/etc\/tripwire\/twpol.txt > \/etc\/tripwire\/twpol.txt.new<\/pre>\n<p>\u30dd\u30ea\u30b7\u30fc\u30d5\u30a1\u30a4\u30eb(\u6697\u53f7\u7f72\u540d\u7248)\u3092\u4f5c\u6210<\/p>\n<pre>[root@server1 ~]# twadmin -m P -c \/etc\/tripwire\/tw.cfg -p \/etc\/tripwire\/tw.pol -S \/etc\/tripwire\/site.key \/etc\/tripwire\/twpol.txt.new\r\nPlease enter your site passphrase:\u3000\u2190\u3000\u30b5\u30a4\u30c8\u30d1\u30b9\u30d5\u30ec\u30fc\u30ba\u3092\u5165\u529b\r\nWrote policy file: \/etc\/tripwire\/tw.pol\r\n\r\n\u30dd\u30ea\u30b7\u30fc\u30d5\u30a1\u30a4\u30eb(\u30c6\u30ad\u30b9\u30c8\u7248)\u3092\u524a\u9664\r\n[root@server1 ~]# rm -f \/etc\/tripwire\/twpol.txt*\r\n\r\n\u30dd\u30ea\u30b7\u30fc\u30d5\u30a1\u30a4\u30eb(\u30c6\u30ad\u30b9\u30c8\u7248)\u3092\u5fa9\u6d3b\u3055\u305b\u308b\u5834\u5408\u306f\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u5fa9\u6d3b\u3067\u304d\u308b\r\n[root@server1 ~]# twadmin -m p -c \/etc\/tripwire\/tw.cfg -p \/etc\/tripwire\/tw.pol -S \/etc\/tripwire\/site.key > \/etc\/tripwire\/twpol.txt<\/pre>\n<p>\u25a0Tripwire\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u4f5c\u6210<br \/>\n\u30dd\u30ea\u30b7\u30fc\u30d5\u30a1\u30a4\u30eb\u3088\u308a\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u4f5c\u6210<\/p>\n<pre>[root@server1 ~]# tripwire -m i -s -c \/etc\/tripwire\/tw.cfg\r\nPlease enter your local passphrase:\u3000\u2190\u3000\u30ed\u30fc\u30ab\u30eb\u30d1\u30b9\u30d5\u30ec\u30fc\u30ba\u3092\u5165\u529b\r\n\r\n\u4e0b\u306f\/root\/backup.tar.bz2\u306e\u30d5\u30a1\u30a4\u30eb\u30b5\u30a4\u30ba\u304c2G\u3092\u8d85\u3048\u3066\u3057\u307e\u3063\u305f\u305f\u3081\u3001tripwire\u304c\u30a8\u30e9\u30fc\u3092\u51fa\u3057\u3066\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u4f5c\u6210\u304c\u5931\u6557\u3057\u305f\u6642\u306e\u3082\u306e\u3002\u3053\u306e\u3088\u3046\u306a\u6642\u306f\u3001\/root\/backup.tar.bz2\u3092\u30c1\u30a7\u30c3\u30af\u5bfe\u8c61\u5916\u306b\u3059\u308b\u3053\u3068\u3067\u30a8\u30e9\u30fc\u56de\u907f\u51fa\u6765\u308b\u3002\r\n### Error: File seek failed.\r\n### Filename: \/root\/backup.tar.bz2\r\n### \\xe3\\x81\\x9d\\xe3\\x81\\xae\\xe3\\x82\\x88\\xe3\\x81\\x86\\xe3\\x81\\xaa\\xe3\\x83\\x95\\xe3\\x82\\xa1\\xe3\\x82\\xa4\\xe3\\x83\\xab\\xe3\\x82\\x84\\xe3\\x83\\x87\\xe3\\x82\\xa3\\xe3\\x83\\xac\\xe3\\x82\\xaf\\xe3\\x83\\x88\\xe3\\x83\\xaa\\xe3\\x81\\xaf\\xe3\\x81\\x82\\xe3\\x82\\x8a\\xe3\\x81\\xbe\\xe3\\x81\\x9b\\xe3\\x82\\x93\r\n### Exiting...\r\n\r\n\u30dd\u30ea\u30b7\u30fc\u30d5\u30a1\u30a4\u30eb(\u30c6\u30ad\u30b9\u30c8\u7248)\u3092\u5fa9\u6d3b\r\n[root@server1 ~]# twadmin -m p -c \/etc\/tripwire\/tw.cfg -p \/etc\/tripwire\/tw.pol -S \/etc\/tripwire\/site.key > \/etc\/tripwire\/twpol.txt\r\n\r\n\u30dd\u30ea\u30b7\u30fc\u30d5\u30a1\u30a4\u30eb(\u30c6\u30ad\u30b9\u30c8\u7248)\u306e\u7de8\u96c6\r\n[root@server1 ~]# vi \/etc\/tripwire\/twpol.txt\r\n  rulename = \"Invariant Directories\",\r\n  severity = $(SIG_MED)\r\n)\r\n{\r\n  \/                                    -> $(SEC_INVARIANT) (recurse = 0) ;\r\n  \/home                                -> $(SEC_INVARIANT) (recurse = 0) ;\r\n  \/etc                                 -> $(SEC_INVARIANT) (recurse = 0) ;\r\n!\/root\/backup.tar.bz2;\u3000\u2190\u3000\u5bfe\u8c61\u5916\u30d5\u30a1\u30a4\u30eb\u3092\u8ffd\u52a0\r\n}\r\n\r\n\u30dd\u30ea\u30b7\u30fc\u30d5\u30a1\u30a4\u30eb(\u6697\u53f7\u7f72\u540d\u7248)\u3092\u4f5c\u6210\r\n[root@server1 ~]# twadmin -m P -c \/etc\/tripwire\/tw.cfg -p \/etc\/tripwire\/tw.pol -S \/etc\/tripwire\/site.key \/etc\/tripwire\/twpol.txt\r\nPlease enter your site passphrase:\u3000\u2190\u3000\u30b5\u30a4\u30c8\u30d1\u30b9\u30d5\u30ec\u30fc\u30ba\u3092\u5165\u529b\r\nWrote policy file: \/etc\/tripwire\/tw.pol\r\n\r\n\u30dd\u30ea\u30b7\u30fc\u30d5\u30a1\u30a4\u30eb(\u30c6\u30ad\u30b9\u30c8\u7248)\u3092\u524a\u9664\r\n[root@server1 ~]# rm -f \/etc\/tripwire\/twpol.txt<\/pre>\n<p>\u30dd\u30ea\u30b7\u30fc\u30d5\u30a1\u30a4\u30eb\u3088\u308a\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u4f5c\u6210<\/p>\n<pre>[root@server1 ~]# tripwire -m i -s -c \/etc\/tripwire\/tw.cfg\r\nPlease enter your local passphrase:\u3000\u2190\u3000\u30ed\u30fc\u30ab\u30eb\u30d1\u30b9\u30d5\u30ec\u30fc\u30ba\u3092\u5165\u529b\r\n\u203b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u4f5c\u6210\u3059\u308b\u306b\u306f\u7d50\u69cb\u6642\u9593\u304c\u304b\u304b\u308b<\/pre>\n<p>\u25a0Tripwire\u306e\u78ba\u8a8d<\/p>\n<pre>[root@server1 ~]# tripwire -m c -s -c \/etc\/tripwire\/tw.cfg\r\nOpen Source Tripwire(R) 2.4.2.2 Integrity Check Report\r\n\r\nReport generated by:          root\r\nReport created on:            2014\u5e7412\u670806\u65e5 23\u664208\u520626\u79d2\r\nDatabase last updated on:     Never\r\n\r\n===============================================================================\r\nReport Summary:\r\n===============================================================================\r\n\r\nHost name:                    server1.yokensaka.com\r\nHost IP address:              114.186.88.44\r\nHost ID:                      None\r\nPolicy file used:             \/etc\/tripwire\/tw.pol\r\nConfiguration file used:      \/etc\/tripwire\/tw.cfg\r\nDatabase file used:           \/var\/lib\/tripwire\/server1.yokensaka.com.twd\r\nCommand line used:            tripwire -m c -s -c \/etc\/tripwire\/tw.cfg\r\n\r\n===============================================================================\r\nRule Summary:\r\n===============================================================================\r\n\r\n-------------------------------------------------------------------------------\r\n  Section: Unix File System\r\n-------------------------------------------------------------------------------\r\n\r\n  Rule Name                       Severity Level    Added    Removed  Modified\r\n  ---------                       --------------    -----    -------  --------\r\n  User binaries                   66                0        0        0\r\n  Tripwire Binaries               100               0        0        0\r\n  Libraries                       66                0        0        0\r\n  Operating System Utilities      100               0        0        0\r\n  File System and Disk Administraton Programs\r\n                                  100               0        0        0\r\n  Kernel Administration Programs  100               0        0        0\r\n  Networking Programs             100               0        0        0\r\n  System Administration Programs  100               0        0        0\r\n  Hardware and Device Control Programs\r\n                                  100               0        0        0\r\n  System Information Programs     100               0        0        0\r\n  Application Information Programs\r\n                                  100               0        0        0\r\n  (\/sbin\/rtmon)\r\n  Critical Utility Sym-Links      100               0        0        0\r\n  Shell Binaries                  100               0        0        0\r\n  Critical system boot files      100               0        0        0\r\n* Tripwire Data Files             100               1        0        0\r\n  System boot changes             100               0        0        0\r\n  OS executables and libraries    100               0        0        0\r\n  Critical configuration files    100               0        0        0\r\n  Security Control                100               0        0        0\r\n  Login Scripts                   100               0        0        0\r\n  Root config files               100               0        0        0\r\n  Invariant Directories           66                0        0        0\r\n  Temporary directories           33                0        0        0\r\n  Critical devices                100               0        0        0\r\n  (\/proc\/kcore)\r\n\r\nTotal objects scanned:  52987\r\nTotal violations found:  1\r\n\r\n===============================================================================\r\nObject Summary:\r\n===============================================================================\r\n\r\n-------------------------------------------------------------------------------\r\n# Section: Unix File System\r\n-------------------------------------------------------------------------------\r\n\r\n-------------------------------------------------------------------------------\r\nRule Name: Tripwire Data Files (\/var\/lib\/tripwire)\r\nSeverity Level: 100\r\n-------------------------------------------------------------------------------\r\n\r\nAdded:\r\n\"\/var\/lib\/tripwire\/server1.yokensaka.com.twd\"\u3000\u2190\u3000\u4eca\u56de\u8ffd\u52a0\u3055\u308c\u305fTripwire\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306a\u306e\u3067\u554f\u984c\u7121\u3057\r\n\r\n===============================================================================\r\nError Report:\r\n===============================================================================\r\n\r\nNo Errors\r\n\r\n-------------------------------------------------------------------------------\r\n*** End of report ***\r\n\r\nOpen Source Tripwire 2.4 Portions copyright 2000 Tripwire, Inc. Tripwire is a registered\r\ntrademark of Tripwire, Inc. This software comes with ABSOLUTELY NO WARRANTY;\r\nfor details use --version. This is free software which may be redistributed\r\nor modified only under certain conditions; see COPYING for details.\r\nAll rights reserved.<\/pre>\n<p>\u25a0Tripwire\u306e\u5b9a\u671f\u81ea\u52d5\u5b9f\u884c\u8a2d\u5b9a<\/p>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6642\u306b\u4f5c\u6210\u3055\u308c\u3066\u305fTripwire\u306e\u5b9a\u671f\u5b9f\u884c\u30d5\u30a1\u30a4\u30eb\u3092\u7de8\u96c6<\/p>\n<pre>[root@server1 ~]# vi \/etc\/cron.daily\/tripwire-check\r\n#!\/bin\/sh\r\n# \u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u90e8\u5206\u3092\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\r\n#HOST_NAME=`uname -n`\r\n#if [ ! -e \/var\/lib\/tripwire\/${HOST_NAME}.twd ] ; then\r\n#        echo \"****    Error: Tripwire database for ${HOST_NAME} not found.    ****\"\r\n#        echo \"**** Run \"\/etc\/tripwire\/twinstall.sh\" and\/or \"tripwire --init\". ****\"\r\n#else\r\n#        test -f \/etc\/tripwire\/tw.cfg &&  \/usr\/sbin\/tripwire --check\r\n#fi\r\n# \u30d1\u30b9\u30d5\u30ec\u30fc\u30ba\u8a2d\u5b9a\r\nLOCALPASS=xxxxxxxx # \u30ed\u30fc\u30ab\u30eb\u30d1\u30b9\u30d5\u30ec\u30fc\u30ba\r\nSITEPASS=xxxxxxxx # \u30b5\u30a4\u30c8\u30d1\u30b9\u30d5\u30ec\u30fc\u30ba\r\ncd \/etc\/tripwire\r\n# Tripwire\u30c1\u30a7\u30c3\u30af\u5b9f\u884c\r\ntripwire -m c -s -c tw.cfg|mail -s \"Tripwire(R) Integrity Check Report in `hostname`\" root\r\n# \u30dd\u30ea\u30b7\u30fc\u30d5\u30a1\u30a4\u30eb\u6700\u65b0\u5316\r\ntwadmin -m p -c tw.cfg -p tw.pol -S site.key > twpol.txt\r\nperl twpolmake.pl twpol.txt > twpol.txt.new\r\ntwadmin -m P -c tw.cfg -p tw.pol -S site.key -Q $SITEPASS twpol.txt.new > \/dev\/null\r\nrm -f twpol.txt* *.bak\r\n# \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u66f4\u65b0\r\nrm -f \/usr\/local\/tripwire\/lib\/tripwire\/*.twd*\r\ntripwire -m i -s -c tw.cfg -P $LOCALPASS\r\n\r\n\u30d1\u30fc\u30df\u30c3\u30b7\u30e7\u30f3\u5909\u66f4\r\n[root@server1 ~]# chmod 700 \/etc\/cron.daily\/tripwire-check<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Tripwire\u3092Yum\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb Tripwire\u3092Yum\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059 &hellip; <a href=\"http:\/\/yokensaka.com\/centos\/?p=318\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-318","post","type-post","status-publish","format-standard","hentry","category-tripwire"],"_links":{"self":[{"href":"http:\/\/yokensaka.com\/centos\/index.php?rest_route=\/wp\/v2\/posts\/318","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/yokensaka.com\/centos\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/yokensaka.com\/centos\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/yokensaka.com\/centos\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/yokensaka.com\/centos\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=318"}],"version-history":[{"count":4,"href":"http:\/\/yokensaka.com\/centos\/index.php?rest_route=\/wp\/v2\/posts\/318\/revisions"}],"predecessor-version":[{"id":454,"href":"http:\/\/yokensaka.com\/centos\/index.php?rest_route=\/wp\/v2\/posts\/318\/revisions\/454"}],"wp:attachment":[{"href":"http:\/\/yokensaka.com\/centos\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=318"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/yokensaka.com\/centos\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=318"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/yokensaka.com\/centos\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=318"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}