https://github.com/notryanb/exectuable-exploration
Playing around with manipulating compiled exectables on different OSes
https://github.com/notryanb/exectuable-exploration
Last synced: 8 months ago
JSON representation
Playing around with manipulating compiled exectables on different OSes
- Host: GitHub
- URL: https://github.com/notryanb/exectuable-exploration
- Owner: notryanb
- License: unlicense
- Created: 2021-03-20T15:15:11.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-03-20T16:00:30.000Z (about 5 years ago)
- Last Synced: 2025-02-15T14:17:19.225Z (over 1 year ago)
- Language: Rust
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Messing around with executables
This is meant for exploring what happens when the bytes of an executable are manipulated (after the program has been compiled).
I'm using the default rust binary project to get started and trying out varying manipulations on the different OSes I have access to.
All executables are compiled as `cargo build --release`, then modified, then run as `cargo run` or the file itself is directly called.
## Windows
### Simple text find and replace
- When using nvim, `:%s/world!/hacked` and saving will result in an executable binary that prints `hello, hacked` instead of `hello, world!`.
- Adding an extra character such as `:s/world!/hacked!` will result in an error when running `(exit code: 0xc0000005, STATUS_ACCESS_VIOLATION)`
- Removing a character such as `%s/world!/hacke` will result in an error when running `(exit code: 0xc000007b)`
- So far, `cargo run --release` will reveal the error codes in terminal, while running the `.exe` directly will cause an OS modal to pop up.
## MacOS (Catalina)
- When using vim, `:%s/world!/hacked` and saving will result in an executable binary that prints `hello, hacked` instead of `hello, world!`.
- Adding an extra character such as `:s/world!/hacked!` resulted in nothing printing out and no errors being observed.
- Removing a character such as `%s/world!/hacke` resulted in nothing printing out and no errors being observed.
- `cargo run --release` vs running the executable resulted in the same output.