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

Introducing "integrity" feature #422

Open
creativeprojects opened this issue Oct 22, 2024 · 0 comments
Open

Introducing "integrity" feature #422

creativeprojects opened this issue Oct 22, 2024 · 0 comments

Comments

@creativeprojects
Copy link
Owner

I was thinking about a new feature that could help identify if your repository is gradually being encrypted by ransomware.

Depending on your backup medium, it could take some time for ransomware to encrypt your files to make sure all previous versions of your files are also encrypted (with a medium providing file versioning).

The idea is to define a file that shouldn't change much (like /etc/hosts something like that) and resticprofile could pick a random (preferably older) snapshot and compare the files. It could allow for some changes but not the whole file.

An alert could be triggered if the files are too different.

Eventually, if the attacker can rewrite files in your repo, it would have access to the configuration, so it could leave this file intact.
It would only work if you're using a completely different honeypot file from another machine which hopefully hasn't been compromised (yet).

That makes for a lot of if right?
Do you think that would be a useful feature?

I would see the configuration like that:

profile:

  backup:
    source: /

  integrity:
    - source: /etc/hosts
      target: /etc/hosts
      snapshot:
        from: 1 month old
        to: 1 week old
      allow-diff: 2 lines

    - source-from-command: /bin/load another/file
      target: /another/file
      snapshot: last sunday
      contains: "some text"

    - target: /big/file
      snapshot: 3 weeks ago
      contains: "some important text"
  • we could have multiple files for checking integrity
  • the reference file could be a local file or a stream from stdin.
  • the snapshot could be fixed or selected randomly between a range.
  • a diff could be done on text files, otherwise byte by byte comparison on binary files
  • we could check for some string inside the file instead

Would that actually help?
Am I missing something?

@creativeprojects creativeprojects pinned this issue Oct 22, 2024
@creativeprojects creativeprojects unpinned this issue Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant