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

Log obfuscator #765

Open
swishkin opened this issue Nov 23, 2023 · 4 comments · May be fixed by #1182
Open

Log obfuscator #765

swishkin opened this issue Nov 23, 2023 · 4 comments · May be fixed by #1182
Assignees
Labels

Comments

@swishkin
Copy link
Contributor

What tool do you want?

Log obfuscator.

Describe the solution you'd like

Tool should take log output containing private or personally identifying information and obfuscate, replace, or remove it. This will allow people to share log content on the internet more easily without exposing their domains, IPs, location, etc.

Tool could identify fully qualified domain names (it-tools.example.com with or without http(s):// prefix), email addresses ([email protected]), public IP addresses (addresses outside the ranges specified here), MAC addresses (both "-" and ":" separated), as well as user-specified strings, such as given names, device names, etc.

I imagine a field allowing for pasting the log content, then multi-choice dropdowns allowing a user to select from automatically located FQDNs, emails, public IPs, geolocation, and MAC addresses in the log, then a text field which would accept comma-separated strings to perform a given action on.

The action to be performed should be selected per type (obfuscate IPs, replace FQDN, remove MAC addresses, for example).

  1. Obfuscate (any public IP found looks more like 10*.*.*.10)
  2. Replace (107.98.4.110 would be replaced with an example IP such as 203.5.113.5)
  3. Remove the manually specified or selected string type(s) entirely

The tool could automatically search for other sensitive data, such as

  • ID numbers, i.e. US SSN (123-45-6789), US Passport, state IDs, other national IDs
  • Phone numbers in the various formats possible (+1 123-456-7890, (123) 456-7890, 123-456-7890, 1234567890)
  • Credit card numbers in their various formats, including 4321-5678-9876-2345 and 4321567898762345

And warn that particularly sensitive data is included in the log, and default to replacing each of these more sensitive data types with dummy data like the examples shown.

Then, the tool would present the sanitized log.

Finally, the tool could present simple Good/Bad icons for each type of known sensitive information, indicating whether there is any detected in the output from the tool.

Example icons: Portainer's icons for showing whether images are up to date or outdated:

image
image

An icon indicating PII is included in the resulting log should probably be red to emphasize the risk in sharing the tool's output.

A disclaimer should probably be included to indicate that pasting logs into a web-based tool runs the risk of an attacker seeing all the information included in it, especially if the tools site is being accessed without SSL/TLS encryption.

Is their example of this tool in the wild?

This is an obfuscator focused on preventing code from being copied; perhaps the JS library could be used for this as well?

Logback seems to be a tool with a similar end-goal, but I don't know if if it could integrate with your current code or how it would do so.

Additional context

Helpful reference with some Regex expressions to identify a variety of the details.

@sharevb
Copy link
Contributor

sharevb commented May 10, 2024

Will probably make a PR

sharevb added a commit to sharevb/it-tools that referenced this issue Jun 25, 2024
@sharevb sharevb linked a pull request Jun 26, 2024 that will close this issue
sharevb added a commit to sharevb/it-tools that referenced this issue Jul 7, 2024
@sharevb
Copy link
Contributor

sharevb commented Jul 7, 2024

Hi @swishkin (and @CorentinTh), made a simpler version in #1182, letting a field to set custom regex to add more cleaning.

@swishkin
Copy link
Contributor Author

swishkin commented Jul 8, 2024

Thanks for your work on this, @sharevb!

@sharevb
Copy link
Contributor

sharevb commented Jul 12, 2024

Hi @swishkin, added ability to exclude some buitin regex

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants