GithubHelp home page GithubHelp logo

xunillen2 / openbsd-integrity Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 10 KB

Small script to check openbsd system integrity

License: MIT License

Shell 100.00%
integrity-checker openbsd integrity openbsd-scripts

openbsd-integrity's Introduction

openbsd-integrity

integrity is simple script for checking system integrity and generating integrity hash files using mtree

Usage

  • Before starting, set seed value to KEY variable. This can be ~20 digit number.

Generating hash files

./integrity gen <path to directory>

sample command:

./integrity gen /int_sam
  • This will generate hash files hash_bin, hash_sbin, hash_etc and hash_usr in /int_sam directory. This hash files will contain hash of all files contained in /bin,/sbin, /etc and /usr.
  • If integrity is started with gen parameter with folder that already contains hash_bin, hash_sbin, hash_usr, hash_etc. Those files will be moved to folder named old_hash.
  • After every process of generating hash files, integrity will log status activity to /var/log/messages
Dec 11 13:22:14 SampleMachine [Integrity]: Generating new integrity hash files... Hash files location: /int_sam/. hash functions: cksum,md5digest,sha1digest,sha256digest
Dec 11 13:26:01 SampleMachine [Integrity]: Generating new integrity hash files completed!

  • More folders will be added later, or more specifically option to add more folders.
  • Now integrity also checks bsd.rd and bsd.sp hash

Verifying files

./integrity ver <path to directory>

sample command:

./integrity ver /int_sam
  • If folder contains hash files hash_bin, hash_sbin,hash_etc, hash_usr, integrity will check the integrity of all files contained in /bin,/sbin, /etc and /usr, and will report changes and status to root with mail.
  • Same as gen argument, ver will log activity /var/log/messages

On boot verification - broken

  • integrity.sh needs to be in / (root dir) for installation to work
  • Integrity can be started on boot, and verify all files and changes in specified folders.
./integrity install <path to directory>

sample command:

./integrity install /int_sam
  • This will add ./integrity ver /int_sam to rc.local file, which will run verification on every boot

openbsd-integrity's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.