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

A tool to replace local environment info in binaries #361

Open
3 tasks done
KOLANICH opened this issue May 22, 2023 · 0 comments
Open
3 tasks done

A tool to replace local environment info in binaries #361

KOLANICH opened this issue May 22, 2023 · 0 comments
Labels
Beginner Simple projects that can be done by people relatively new to programming. Developer tooling Help your fellow developers out by making their job a bit more enjoyable with good tooling. Little work This project takes little time to complete. (ETA couple of days)

Comments

@KOLANICH
Copy link

Project description

Sometimes when one compiles software, it turns out the libs built capture various sorts of local environment information, like paths. It especially happens in software in Rust, where the compiler put this info into panic messages, and there is no way to disable it for third-party crates, but it also happens in software in C++ since the compiler has macros like FILE.

Presence of such kind of info causes builds being non-deterministic and also causes leaks of sensitive information like local paths, including user names and parent directories, which can give insight into private life of the developer and facilitate reverse engineering of a module.

So it is proposed to create a software which will scan binaries on strings looking like paths and replace them to the ones relatively to the base dir. It is a shortening operation, so can be done in-place, while the rest of the string can be replaced with neutral padding, like zeros and whitespaces.

Relevant Technology

  • strings command line utility
  • C++/Rust, also it is possible to implement it in bash and any other scripting language, since strings returns offsets.
  • memory mapping
  • std::filesystem

Complexity and required time

Complexity

  • Beginner - This project requires no or little prior knowledge of the technolog(y|ies) specified to contribute to the project

Required time (ETA)

  • Little work - A couple of days

Categories

  • Developer Tooling
@FredrikAugust FredrikAugust added Little work This project takes little time to complete. (ETA couple of days) Beginner Simple projects that can be done by people relatively new to programming. Developer tooling Help your fellow developers out by making their job a bit more enjoyable with good tooling. labels May 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Beginner Simple projects that can be done by people relatively new to programming. Developer tooling Help your fellow developers out by making their job a bit more enjoyable with good tooling. Little work This project takes little time to complete. (ETA couple of days)
Projects
None yet
Development

No branches or pull requests

2 participants