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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hash ip and metadata of bruteforce attempts #23162

Closed
J0WI opened this issue Oct 3, 2020 · 5 comments
Closed

Hash ip and metadata of bruteforce attempts #23162

J0WI opened this issue Oct 3, 2020 · 5 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap enhancement

Comments

@J0WI
Copy link
Contributor

J0WI commented Oct 3, 2020

How to use GitHub

  • Please use the 馃憤 reaction to show that you are interested into the same feature.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Is your feature request related to a problem? Please describe.
oc_bruteforce_attempts table leaks a lot of personal data like IP addresses combined with usernames and timestamps.

Describe the solution you'd like
Hash the IP and username with a oneway function before inserting it. This still allows Nextcloud to detect and block bruteforce attempts, while not storing any additional information.

Describe alternatives you've considered

@J0WI J0WI added enhancement 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels Oct 3, 2020
@rullzer
Copy link
Member

rullzer commented Oct 8, 2020

Nope. The plan is still to use subnets as fallback at some point. Which we can't do if they are hashed.
Also it is only hiding the symptones. MD5-ing the ipv4 for example. You can still reverse it because your initial space is so small.

@rullzer
Copy link
Member

rullzer commented Oct 8, 2020

But we should indeed cleanup old entries and only keep for how long we need them. Let me have a look at that

@rullzer
Copy link
Member

rullzer commented Oct 8, 2020

See #23287

@J0WI
Copy link
Contributor Author

J0WI commented Oct 8, 2020

The plan is still to use subnets as fallback at some point.

We can also compare hashes of subnets.

You can still reverse it because your initial space is so small.

Sure, but it raises the costs to do so. At least if not just plain MD5 is used.
It's easy to exclude IP addresses from logs but here the smallest possible needs to be stored to provide the functionality. The full address gives you more information than required.

@J0WI
Copy link
Contributor Author

J0WI commented Oct 9, 2020

Closing due #23287

@J0WI J0WI closed this as completed Oct 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap enhancement
Projects
None yet
Development

No branches or pull requests

2 participants