Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Libsodium sodium support for sha256 filehashes #1381

Open
wants to merge 113 commits into
base: master
Choose a base branch
from

Commits on Dec 19, 2017

  1. Configuration menu
    Copy the full SHA
    523acdb View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e1468ea View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    201bc61 View commit details
    Browse the repository at this point in the history
  4. Silence a clang warning.

    ddpbsd committed Dec 19, 2017
    Configuration menu
    Copy the full SHA
    1fa3d1e View commit details
    Browse the repository at this point in the history
  5. Make sure msg is initialized.

    ddpbsd committed Dec 19, 2017
    Configuration menu
    Copy the full SHA
    26c27e1 View commit details
    Browse the repository at this point in the history

Commits on Jan 15, 2018

  1. Configuration menu
    Copy the full SHA
    a9e725b View commit details
    Browse the repository at this point in the history
  2. Try to use libsodium to allow us to check sha256 hashes.

    It will switch from running OS_md5_sha1_File to OS_algorithm_File
    The output will be different. Enable with LIBSODIUM_ENABLED=y
    !! Incomplete and untested !!
    ddpbsd committed Jan 15, 2018
    Configuration menu
    Copy the full SHA
    a5452f9 View commit details
    Browse the repository at this point in the history

Commits on Jan 17, 2018

  1. Fix a typo

    ddpbsd committed Jan 17, 2018
    Configuration menu
    Copy the full SHA
    882058b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    09b44ce View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    fbcd126 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    7e91526 View commit details
    Browse the repository at this point in the history
  5. Merged into md5_sha1_op.c.

    ddpbsd committed Jan 17, 2018
    Configuration menu
    Copy the full SHA
    a556191 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    bd9fa4d View commit details
    Browse the repository at this point in the history

Commits on Feb 11, 2018

  1. Add some more libsodium bits.

    ddpbsd committed Feb 11, 2018
    Configuration menu
    Copy the full SHA
    fb1ac49 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ce552d3 View commit details
    Browse the repository at this point in the history

Commits on Feb 14, 2018

  1. alg_output -> hash_output

    ddpbsd committed Feb 14, 2018
    Configuration menu
    Copy the full SHA
    765b499 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9b339f8 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a978513 View commit details
    Browse the repository at this point in the history
  4. sprintf->snprintf

    ddpbsd committed Feb 14, 2018
    Configuration menu
    Copy the full SHA
    b728cf5 View commit details
    Browse the repository at this point in the history

Commits on Feb 15, 2018

  1. Configuration menu
    Copy the full SHA
    da38953 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3dbaf31 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c75e255 View commit details
    Browse the repository at this point in the history
  4. Closer to supporting sha256

    ddpbsd committed Feb 15, 2018
    Configuration menu
    Copy the full SHA
    98b4e64 View commit details
    Browse the repository at this point in the history
  5. The basic idea is to have hash1 and hash2. Then the hash strings

    will be prepended with the hash type followed by an '='.
    This will cause changes in analysisd, I think. It will have to handle
    the different hash strings and types. I can probably either change to
    a generic signature for "HASH changed," and maybe add the hash type
    into a field in the alert (like src_ip). Or continue with the way rules
    are currently written and add rules for the new hash types.
    ddpbsd committed Feb 15, 2018
    Configuration menu
    Copy the full SHA
    54cdbd4 View commit details
    Browse the repository at this point in the history

Commits on Mar 6, 2018

  1. Configuration menu
    Copy the full SHA
    1134eaa View commit details
    Browse the repository at this point in the history

Commits on Mar 7, 2018

  1. I think sha256 is working.

    lots of devug left in, need to free file_sums or change how it's being handled
    plenty of other cleanups available. sleep now. code later
    ddpbsd committed Mar 7, 2018
    Configuration menu
    Copy the full SHA
    9b1b3eb View commit details
    Browse the repository at this point in the history
  2. Remove some debugging printfs

    ddpbsd committed Mar 7, 2018
    Configuration menu
    Copy the full SHA
    e7e4b1a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a166003 View commit details
    Browse the repository at this point in the history

Commits on Mar 11, 2018

  1. Make this actually compile.

    ddpbsd committed Mar 11, 2018
    Configuration menu
    Copy the full SHA
    2dfc8d6 View commit details
    Browse the repository at this point in the history

Commits on Mar 13, 2018

  1. sqlite

    ddpbsd committed Mar 13, 2018
    Configuration menu
    Copy the full SHA
    4910ca6 View commit details
    Browse the repository at this point in the history
  2. Add some explicit nul terminators

    Add some debug messages
    ddpbsd committed Mar 13, 2018
    Configuration menu
    Copy the full SHA
    80a960a View commit details
    Browse the repository at this point in the history

Commits on Mar 14, 2018

  1. Configuration menu
    Copy the full SHA
    d0b0050 View commit details
    Browse the repository at this point in the history
  2. Remove some debugging.

    ddpbsd committed Mar 14, 2018
    Configuration menu
    Copy the full SHA
    69945bd View commit details
    Browse the repository at this point in the history
  3. Get rid of some debug stuff.

    ddpbsd committed Mar 14, 2018
    Configuration menu
    Copy the full SHA
    de70834 View commit details
    Browse the repository at this point in the history
  4. More debugging

    ddpbsd committed Mar 14, 2018
    Configuration menu
    Copy the full SHA
    17470fd View commit details
    Browse the repository at this point in the history

Commits on Mar 15, 2018

  1. Configuration menu
    Copy the full SHA
    2d488e1 View commit details
    Browse the repository at this point in the history
  2. Oops, I prefer -ggdb to -g, so I often change it and switch back before

    pushing. This one snuck through
    ddpbsd committed Mar 15, 2018
    Configuration menu
    Copy the full SHA
    6fe831a View commit details
    Browse the repository at this point in the history
  3. Linux didn't like writing a variable to itself with snprintf, so

    complicate this a bit to make it work.
    ddp committed Mar 15, 2018
    Configuration menu
    Copy the full SHA
    40815a3 View commit details
    Browse the repository at this point in the history
  4. Spacing

    ddpbsd committed Mar 15, 2018
    Configuration menu
    Copy the full SHA
    8e5401c View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    241817e View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    c323f46 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    fd65186 View commit details
    Browse the repository at this point in the history

Commits on Mar 23, 2018

  1. Configuration menu
    Copy the full SHA
    d1ca9f3 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    869d653 View commit details
    Browse the repository at this point in the history

Commits on Apr 11, 2018

  1. CID 166736: Ignoring number of bytes read

    CID 166735: String not null terminated
    ddpbsd committed Apr 11, 2018
    Configuration menu
    Copy the full SHA
    54b5df1 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1df3fb7 View commit details
    Browse the repository at this point in the history
  3. CID 28500: Resource leak

    ddpbsd committed Apr 11, 2018
    Configuration menu
    Copy the full SHA
    01a28e7 View commit details
    Browse the repository at this point in the history
  4. CID 28511: Resource leak

    ddpbsd committed Apr 11, 2018
    Configuration menu
    Copy the full SHA
    53c586c View commit details
    Browse the repository at this point in the history

Commits on Apr 17, 2018

  1. Configuration menu
    Copy the full SHA
    e053db8 View commit details
    Browse the repository at this point in the history
  2. spaces -> tabs

    ddpbsd committed Apr 17, 2018
    Configuration menu
    Copy the full SHA
    a451d8e View commit details
    Browse the repository at this point in the history

Commits on Apr 23, 2018

  1. Configuration menu
    Copy the full SHA
    efe31a5 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    258fe5d View commit details
    Browse the repository at this point in the history

Commits on Apr 30, 2018

  1. Configuration menu
    Copy the full SHA
    9d74ff7 View commit details
    Browse the repository at this point in the history
  2. Close fp before leaving GetRandomNoise()

    Spotted by Codacy
    ddpbsd committed Apr 30, 2018
    Configuration menu
    Copy the full SHA
    4f044a3 View commit details
    Browse the repository at this point in the history
  3. Clarify calculation precedence for '&' and '?'.

    From codacy. More to come if this seems to work.
    ddpbsd committed Apr 30, 2018
    1 Configuration menu
    Copy the full SHA
    e16624b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    e98f71c View commit details
    Browse the repository at this point in the history

Commits on May 1, 2018

  1. Configuration menu
    Copy the full SHA
    02ff1ba View commit details
    Browse the repository at this point in the history

Commits on May 25, 2018

  1. md5->sha256

    ddpbsd committed May 25, 2018
    Configuration menu
    Copy the full SHA
    274b56b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7990e9e View commit details
    Browse the repository at this point in the history

Commits on May 30, 2018

  1. Configuration menu
    Copy the full SHA
    4df6e64 View commit details
    Browse the repository at this point in the history
  2. From codacy

    ddpbsd committed May 30, 2018
    Configuration menu
    Copy the full SHA
    7a9f8a8 View commit details
    Browse the repository at this point in the history

Commits on May 31, 2018

  1. Get rid of hash1, hash2.

    Introduce the blake2b hash output
    ddpbsd committed May 31, 2018
    Configuration menu
    Copy the full SHA
    fc54a34 View commit details
    Browse the repository at this point in the history

Commits on Jun 5, 2018

  1. Adjust

    ddpbsd committed Jun 5, 2018
    Configuration menu
    Copy the full SHA
    cd7831c View commit details
    Browse the repository at this point in the history

Commits on Jun 6, 2018

  1. Configuration menu
    Copy the full SHA
    6dfc111 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    827a62a View commit details
    Browse the repository at this point in the history
  3. Try this again.

    ddpbsd committed Jun 6, 2018
    Configuration menu
    Copy the full SHA
    a157c31 View commit details
    Browse the repository at this point in the history
  4. Makes testing easier

    ddpbsd committed Jun 6, 2018
    Configuration menu
    Copy the full SHA
    db2c5b7 View commit details
    Browse the repository at this point in the history

Commits on Jun 8, 2018

  1. Don't mention blake2b in case libsodium changes their generic algorithm.

    Make room for the libsodium generic hash algorithm.
    Make it easier to see which hashes will be checked.
    ddpbsd committed Jun 8, 2018
    Configuration menu
    Copy the full SHA
    e8d7873 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b2923f6 View commit details
    Browse the repository at this point in the history

Commits on Jun 9, 2018

  1. Start to add blake2b

    ddpbsd committed Jun 9, 2018
    Configuration menu
    Copy the full SHA
    bb3a7e7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    51f61ee View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    1edbff1 View commit details
    Browse the repository at this point in the history

Commits on Jun 22, 2018

  1. Caused a crash in reportd

    ddpbsd committed Jun 22, 2018
    Configuration menu
    Copy the full SHA
    028ac28 View commit details
    Browse the repository at this point in the history
  2. I need these right now

    ddpbsd committed Jun 22, 2018
    Configuration menu
    Copy the full SHA
    992f532 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    bd7cf0a View commit details
    Browse the repository at this point in the history
  4. Looks like I was previously truncating the SHA256 and GENERIC hash

    outputs, oops. Make sure to traverse the entire hash to translate from
    unsigned char to signed char.
    ddpbsd committed Jun 22, 2018
    Configuration menu
    Copy the full SHA
    fdadbef View commit details
    Browse the repository at this point in the history
  5. Generichash wasn't named in the log output.

    simplify some of the ifdefs.
    ddpbsd committed Jun 22, 2018
    Configuration menu
    Copy the full SHA
    b3088db View commit details
    Browse the repository at this point in the history
  6. Make sure the generic hash is written to new_hashes.

    LOTS of debugging stuff that will be removed shortly.
    ddpbsd committed Jun 22, 2018
    Configuration menu
    Copy the full SHA
    50aa923 View commit details
    Browse the repository at this point in the history
  7. Remove my debug stuff.

    ddpbsd committed Jun 22, 2018
    Configuration menu
    Copy the full SHA
    4347d84 View commit details
    Browse the repository at this point in the history
  8. Remove some debugging stuff.

    ddpbsd committed Jun 22, 2018
    Configuration menu
    Copy the full SHA
    3a230d7 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    a36f047 View commit details
    Browse the repository at this point in the history

Commits on Jun 26, 2018

  1. Configuration menu
    Copy the full SHA
    1682c31 View commit details
    Browse the repository at this point in the history

Commits on Jun 27, 2018

  1. Configuration menu
    Copy the full SHA
    80381a0 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e63681a View commit details
    Browse the repository at this point in the history

Commits on Jun 28, 2018

  1. Increase the alert_msg size from 916 to 2048 in some places.

    The instances that are MAC_PATH stayed the same.
    ddpbsd committed Jun 28, 2018
    Configuration menu
    Copy the full SHA
    ae89927 View commit details
    Browse the repository at this point in the history

Commits on Jul 12, 2018

  1. Configuration menu
    Copy the full SHA
    6835e83 View commit details
    Browse the repository at this point in the history
  2. Add some more debugging.

    Get rid of a free that was apparently not ok.
    ddpbsd committed Jul 12, 2018
    Configuration menu
    Copy the full SHA
    a5244f9 View commit details
    Browse the repository at this point in the history
  3. Instead of passing syscheck_opts around (which I didn't do correctly)

    pass the opts in the function.
    ddpbsd committed Jul 12, 2018
    Configuration menu
    Copy the full SHA
    16effe5 View commit details
    Browse the repository at this point in the history

Commits on Jul 13, 2018

  1. I forgot to copy new_hashes_tmp to new_hashes like a moron.

    Also remove some debugging.
    ddpbsd committed Jul 13, 2018
    Configuration menu
    Copy the full SHA
    72d0ffb View commit details
    Browse the repository at this point in the history
  2. Remove the poorly done syscheck_opts idea. I switched to passing

    the opts to the functions that needed it instead. Much cleaner.
    ddpbsd committed Jul 13, 2018
    Configuration menu
    Copy the full SHA
    6252474 View commit details
    Browse the repository at this point in the history
  3. Remove more debugging stuff.

    ddpbsd committed Jul 13, 2018
    Configuration menu
    Copy the full SHA
    6302c1c View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    792dea6 View commit details
    Browse the repository at this point in the history

Commits on Jul 19, 2018

  1. Add the hash names into the hash output so that we know what we're

    looking at when investigating later. I'm not sure if I should use
    GENERIC or BLAKE2B for the "generic" hash. It's set to GENERIC for now.
    
    Hopefully correct some ifdef/else/endif LIBSODIUM stuff. I think alert_msg
    was being overwritten in a few places making my actual hashes to be written
    as "xxx:xxx" (no value, basically) instead of the actual computed hashes.
    
    Also a bunch of debugging stuff that will be removed later.
    ddpbsd committed Jul 19, 2018
    Configuration menu
    Copy the full SHA
    5d5e806 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b2af210 View commit details
    Browse the repository at this point in the history

Commits on Jul 25, 2018

  1. Get rid of some debugging.

    ddpbsd committed Jul 25, 2018
    Configuration menu
    Copy the full SHA
    a38f439 View commit details
    Browse the repository at this point in the history

Commits on Jul 31, 2018

  1. Configuration menu
    Copy the full SHA
    c02f109 View commit details
    Browse the repository at this point in the history

Commits on Aug 6, 2018

  1. Configuration menu
    Copy the full SHA
    ab95af3 View commit details
    Browse the repository at this point in the history

Commits on Oct 12, 2018

  1. Configuration menu
    Copy the full SHA
    e6f2fd5 View commit details
    Browse the repository at this point in the history

Commits on Oct 15, 2018

  1. Configuration menu
    Copy the full SHA
    00b6de1 View commit details
    Browse the repository at this point in the history

Commits on Oct 16, 2018

  1. Missed a conflict.

    ddpbsd committed Oct 16, 2018
    Configuration menu
    Copy the full SHA
    9b5ddc7 View commit details
    Browse the repository at this point in the history

Commits on Oct 23, 2018

  1. Configuration menu
    Copy the full SHA
    f803934 View commit details
    Browse the repository at this point in the history

Commits on Oct 29, 2018

  1. Configuration menu
    Copy the full SHA
    4e2b2bf View commit details
    Browse the repository at this point in the history

Commits on Nov 5, 2018

  1. Fix this reference.

    ddpbsd committed Nov 5, 2018
    Configuration menu
    Copy the full SHA
    5b6f673 View commit details
    Browse the repository at this point in the history
  2. Handle the different hash types better.

    Also try not to truncate the hashes when reporting changes.
    ddpbsd committed Nov 5, 2018
    Configuration menu
    Copy the full SHA
    fe1dd8f View commit details
    Browse the repository at this point in the history
  3. Remove some debugging

    ddpbsd committed Nov 5, 2018
    Configuration menu
    Copy the full SHA
    bd5cc78 View commit details
    Browse the repository at this point in the history

Commits on Jan 2, 2019

  1. Update the hash sizes

    ddpbsd committed Jan 2, 2019
    Configuration menu
    Copy the full SHA
    136e7f3 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5092227 View commit details
    Browse the repository at this point in the history

Commits on Feb 19, 2019

  1. Configuration menu
    Copy the full SHA
    823a0e4 View commit details
    Browse the repository at this point in the history

Commits on Apr 18, 2019

  1. Configuration menu
    Copy the full SHA
    86f23ff View commit details
    Browse the repository at this point in the history
  2. I'm not sure there is enough space for the blake2b hash, so default

    to SHA256 and MD5. SHA256 should be good enough for integrity
    checking for now, and MD5 can be used with services (if necessary,
    and sha256 isn't an option).
    ddpbsd committed Apr 18, 2019
    Configuration menu
    Copy the full SHA
    425391c View commit details
    Browse the repository at this point in the history

Commits on Apr 29, 2019

  1. Configuration menu
    Copy the full SHA
    0cc90b4 View commit details
    Browse the repository at this point in the history
  2. Missed a white->allow change.

    ddpbsd committed Apr 29, 2019
    Configuration menu
    Copy the full SHA
    3082ed5 View commit details
    Browse the repository at this point in the history

Commits on Oct 6, 2019

  1. Configuration menu
    Copy the full SHA
    17e2a2b View commit details
    Browse the repository at this point in the history