https://github.com/hadi77ir/nativemessagingproxy
Simple proxy for Native Messaging Hosts in Chrome extensions, allowing for executing MITM on them
https://github.com/hadi77ir/nativemessagingproxy
chrome-extension chrome-native-messaging mitm mitm-attacks mitmproxy native-messaging native-messaging-host
Last synced: 2 months ago
JSON representation
Simple proxy for Native Messaging Hosts in Chrome extensions, allowing for executing MITM on them
- Host: GitHub
- URL: https://github.com/hadi77ir/nativemessagingproxy
- Owner: hadi77ir
- License: mit
- Created: 2025-03-27T02:11:48.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-28T17:14:41.000Z (about 1 year ago)
- Last Synced: 2025-03-28T17:38:57.761Z (about 1 year ago)
- Topics: chrome-extension, chrome-native-messaging, mitm, mitm-attacks, mitmproxy, native-messaging, native-messaging-host
- Language: Go
- Homepage:
- Size: 15.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# NativeMessagingProxy
This is a simple proxy that sends messages received and sent by both parties through a proxy, allowing meddling ability
for debugging and reverse-engineering.
So far only HTTP proxy and SOCKS5 proxies are supported.
## Features
- Sends messages through a proxy
- Supports injection of messages
## Usage
1. Open the manifest and look for `path`. In Linux and macOS, manifests can be found in `NativeMessagingHosts` directory under Chrome/Chromium configs directory (in Linux: `/home/USER/.config/chromium/NativeMessagingHosts`).
2. Copy its value and write the config file in your config directory. (default in Linux: `/home/USER/.config/nmproxy.cfg`):
```
command: '/home/USER/.bin/myextension_host'
proxy: socks5://127.0.0.1:1080/
log: /home/USER/nmproxy.log
```
3. Now change the `path` in manifest to point to NativeMessagingProxy.
4. Start a `mitmproxy` instance on the address that you specified in the config.
5. Run Chrome/Chromium.
### Valid values
- `command`: full path to single executable without args.
- `proxy`: proxy URI with these protocols: `socks5`, `socks5h`, `http`, `https`. for example: `socks5://127.0.0.1:1080`
- `log`: file path and `stderr`.
### Custom Config Path
You may specify custom configuration file path through `NMPROXY_CONFIG` environment variable.
## Credits
Code from [miku](https://gist.github.com/miku/bda33de6b0a005c1d71406581649b693)'s gist has been used to enable usage of
HTTP(S) proxies.
## License
MIT