{"id":1517,"date":"2018-10-16T12:12:13","date_gmt":"2018-10-16T10:12:13","guid":{"rendered":"http:\/\/clark.tipistrani.it\/?p=1517"},"modified":"2021-03-03T10:57:25","modified_gmt":"2021-03-03T09:57:25","slug":"tripwire","status":"publish","type":"post","link":"http:\/\/clark.tipistrani.it\/?p=1517","title":{"rendered":"Tripwire"},"content":{"rendered":"<p><a href=\"https:\/\/www.tripwire.com\/\">Tripwire<\/a> \u00e8 un IDS o meglio un HIDS (host-based intrusion detection system) che sostanzialmente raccoglie in suo DataBase i dettagli su filesystem e configurazione\u00a0 dell&#8217;host su cui \u00e8 installato <span id=\"result_box\" class=\"\" lang=\"it\"><span class=\"\">per fare riferimento e convalidare lo stato corrente del sistema.<\/span> <span class=\"\">Se vengono trovate modifiche tra lo stato noto e lo stato corrente, potrebbe essere un segno che la sicurezza \u00e8 stata compromessa.<br \/>\n<\/span><\/span>Durante l&#8217;installazione viene chiesto di inserire 2 chiavi:<br \/>\n<span id=\"result_box\" class=\"\" lang=\"it\"><span class=\"\">chiave del sito: questa chiave viene utilizzata per proteggere i file di configurazione.<\/span> <span class=\"\">Dobbiamo assicurarci che i file di configurazione non vengano modificati, altrimenti il nostro intero sistema di rilevamento non pu\u00f2 essere considerato affidabile.<\/span> <span class=\"\">Poich\u00e9 gli stessi file di configurazione possono essere utilizzati per pi\u00f9 server, questa chiave pu\u00f2 essere utilizzata su tutti i server.<\/span><\/span><br \/>\n<span id=\"result_box\" class=\"\" lang=\"it\"><span class=\"\">chiave locale: questa chiave viene utilizzata su ogni macchina per eseguire i file binari.<\/span> Questo \u00e8 necessario per garantire che i nostri file binari non vengano eseguiti senza il nostro consenso.<\/span><br \/>\nDato che durante l&#8217;installazione lui genera il suo DB sulla scorta del suo file di configurazione nativo che contiene molti controlli che sono da evitare, nella directory \/etc\/tripwire editiamo il file twpol.txt e commentiamo queste voci:<br \/>\n# \/etc\/rc.boot -&gt; $(SEC_BIN) ;<br \/>\n# \/root\/mail -&gt; $(SEC_CONFIG) ;<br \/>\n# \/root\/Mail -&gt; $(SEC_CONFIG) ;<br \/>\n# \/root\/.xsession-errors -&gt; $(SEC_CONFIG) ;<br \/>\n# \/root\/.xauth -&gt; $(SEC_CONFIG) ;<br \/>\n# \/root\/.tcshrc -&gt; $(SEC_CONFIG) ;<br \/>\n# \/root\/.sawfish -&gt; $(SEC_CONFIG) ;<br \/>\n# \/root\/.pinerc -&gt; $(SEC_CONFIG) ;<br \/>\n# \/root\/.mc -&gt; $(SEC_CONFIG) ;<br \/>\n# \/root\/.gnome_private -&gt; $(SEC_CONFIG) ;<br \/>\n# \/root\/.gnome-desktop -&gt; $(SEC_CONFIG) ;<br \/>\n# \/root\/.gnome -&gt; $(SEC_CONFIG) ;<br \/>\n# \/root\/.esd_auth -&gt; $(SEC_CONFIG) ;<br \/>\n# \/root\/.elm -&gt; $(SEC_CONFIG) ;<br \/>\n# \/root\/.cshrc -&gt; $(SEC_CONFIG) ;<br \/>\n# \/root\/.bash_profile -&gt; $(SEC_CONFIG) ;<br \/>\n# \/root\/.bash_logout -&gt; $(SEC_CONFIG) ;<br \/>\n# \/root\/.amandahosts -&gt; $(SEC_CONFIG) ;<br \/>\n# \/root\/.addressbook.lu -&gt; $(SEC_CONFIG) ;<br \/>\n# \/root\/.addressbook -&gt; $(SEC_CONFIG) ;<br \/>\n# \/root\/.Xresources -&gt; $(SEC_CONFIG) ;<br \/>\n# \/root\/.Xauthority -&gt; $(SEC_CONFIG) -i ; # Changes Inode number on login<br \/>\n# \/root\/.ICEauthority -&gt; $(SEC_CONFIG) ;<\/p>\n<p># \/proc -&gt; $(Device) ;<\/p>\n<p>Quindi aggiorniamo il file di lettura per ricreare il DB con questo comando:<\/p>\n<p>#twadmin -m P \/etc\/tripwire\/twpol.txt ci chieder\u00e0 la site passphrase<\/p>\n<p>e successivamente ricostruiamo il DB con:<br \/>\n#tripwire &#8211;(sono 2 -)init<br \/>\ne qui ci chieder\u00e0 a local passphrase.<br \/>\ncontrolliamo che tutto sia a posto con un:<\/p>\n<p># tripwire &#8211;(sono 2 -)check<br \/>\nParsing policy file: \/etc\/tripwire\/tw.pol<br \/>\n*** Processing Unix File System ***<br \/>\nPerforming integrity check&#8230;<br \/>\nThe object: &#8220;\/dev\/pts&#8221; is on a different file system&#8230;ignoring.<br \/>\nWrote report file: \/var\/lib\/tripwire\/report\/sangiorgio-20181016-121022.twr<\/p>\n<p>Open Source Tripwire(R) 2.4.2.2 Integrity Check Report<\/p>\n<p>Report generated by: root<br \/>\nReport created on: mar 16 ott 2018 12:10:22 CEST<br \/>\nDatabase last updated on: Never<\/p>\n<p>===============================================================================<br \/>\nReport Summary:<br \/>\n===============================================================================<\/p>\n<p>Host name: sangiorgio<br \/>\nHost IP address: 213.215.236.130<br \/>\nHost ID: None<br \/>\nPolicy file used: \/etc\/tripwire\/tw.pol<br \/>\nConfiguration file used: \/etc\/tripwire\/tw.cfg<br \/>\nDatabase file used: \/var\/lib\/tripwire\/sangiorgio.twd<br \/>\nCommand line used: tripwire &#8211;check<\/p>\n<p>===============================================================================<br \/>\nRule Summary:<br \/>\n===============================================================================<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>\nSection: Unix File System<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n<p>Rule Name Severity Level Added Removed Modified<br \/>\n&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8211; &#8212;&#8212;- &#8212;&#8212;&#8211;<br \/>\nOther binaries 66 0 0 0<br \/>\nTripwire Binaries 100 0 0 0<br \/>\nOther libraries 66 0 0 0<br \/>\nRoot file-system executables 100 0 0 0<br \/>\nTripwire Data Files 100 0 0 0<br \/>\nSystem boot changes 100 0 0 0<br \/>\nRoot file-system libraries 100 0 0 0<br \/>\n(\/lib)<br \/>\nCritical system boot files 100 0 0 0<br \/>\nOther configuration files 66 0 0 0<br \/>\n(\/etc)<br \/>\nBoot Scripts 100 0 0 0<br \/>\nSecurity Control 66 0 0 0<br \/>\nRoot config files 100 0 0 0<br \/>\nDevices &amp; Kernel information 100 0 0 0<br \/>\n(\/dev)<br \/>\nInvariant Directories 66 0 0 0<\/p>\n<p>Total objects scanned: 17548<br \/>\nTotal violations found: 0<\/p>\n<p>===============================================================================<br \/>\nObject Summary:<br \/>\n===============================================================================<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>\n# Section: Unix File System<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n<p>No violations.<\/p>\n<p>===============================================================================<br \/>\nError Report:<br \/>\n===============================================================================<\/p>\n<p>No Errors<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>\n*** End of report ***<\/p>\n<p>Open Source Tripwire 2.4 Portions copyright 2000 Tripwire, Inc. Tripwire is a registered<br \/>\ntrademark of Tripwire, Inc. This software comes with ABSOLUTELY NO WARRANTY;<br \/>\nfor details use &#8211;version. This is free software which may be redistributed<br \/>\nor modified only under certain conditions; see COPYING for details.<br \/>\nAll rights reserved.<br \/>\nIntegrity check complete.<br \/>\ne da questo momento in poi tripwire controller\u00e0 che non ci siano variazioni.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Tripwire \u00e8 un IDS o meglio un HIDS (host-based intrusion detection system) che sostanzialmente raccoglie in suo DataBase i dettagli su filesystem e configurazione\u00a0 dell&#8217;host su cui \u00e8 installato per fare riferimento e convalidare lo stato corrente del sistema. Se vengono trovate modifiche tra lo stato noto e lo stato corrente, potrebbe essere un segno [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[110,8,14,6],"tags":[140,112,139],"class_list":["post-1517","post","type-post","status-publish","format-standard","hentry","category-ids","category-linux","category-networking","category-work","tag-hids","tag-ids","tag-tripwire"],"_links":{"self":[{"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=\/wp\/v2\/posts\/1517","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1517"}],"version-history":[{"count":5,"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=\/wp\/v2\/posts\/1517\/revisions"}],"predecessor-version":[{"id":1891,"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=\/wp\/v2\/posts\/1517\/revisions\/1891"}],"wp:attachment":[{"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1517"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1517"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1517"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}