-
Notifications
You must be signed in to change notification settings - Fork 573
Create exploit_patch.sh, code execution exploit! critical! #2304
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
Conversation
the pickle exploit for code execution is still active, i guess.
|
To follow this PR, thanks @jon1enforce! |
|
Thank you for this AI assisted report. This isn't really an issue because although But even then this is only exploitable if you already have write access to the attack target's config files, so the scenarios where it can be used are very limited. |
|
Yes, this is a AI generated report, and patch. Ok, let us make it more professional, try out an exploit code: malicious_pickle = b"""cos This should delete data from your machine... The pickle exploit is known very long time, it is also on wikipedia.org... it is not a secret. |
|
"Thank you for this AI assisted report. This isn't really an issue because although pickle.load is used on the knownnodes.dat file inside pickle_deserialize_old_knownnodes, the output is then filtered and invalid data is discarded." -> -> ->
Here an exploit code to pass the filter: import io vulnerable_function(fd) # Exploit just implement int() in the file descriptor to pass this filter..the object will be executed, like "rm -rf ./*" and all your data is corrupted. It is very clear and well documentated, that this issue is critical... pickle is very like "all or nothing", it is a big mistake, except for offline applikations. use json... |
A data format like this cannot be transmitted remotely, there is no space for it in the protocol. It needs to be generated locally, so an attacker needs to have write access to the file.
It's right after |
|
ok, PeterSurda let us find out, if it is critical or not - i have any exploits here, please add me to your account and write a message, i will try out something, if you agree - it is legal ;-) In fact, i don't know if this works well, but we will know it after the exploit trial on you. |
|
Ok I ran some tests and apparently you can cause a code execution during |
|
i made a repository for a pen-test: https://github.com/jon1enforce/exploits/tree/main I don't believe in this exploits, but we can make it. I must find out more "weaked or undefined" points in the protocol.py, because remote code exectution is not as easy than people think, it needs compromised dependencies, and also weakness in the protocol, for example a message that generates an error. Never try never know. the protocol.py is the heart of bitmessage it is the entry point, MAGIC !!! error payload negative values: |
|
Well I still don't see it. |
|
The project has made good progress by addressing the original remote code execution vulnerability - replacing the eval() call was definitely the right move! However, I noticed the current implementation might still benefit from further hardening. The dynamic import approach, while better than eval(), still processes untrusted data directly. Original code (fixed): Current approach: Wouldn't implementing a strict whitelist of allowed message types be a great next step? This would provide deterministic security and prevent any potential edge cases with the dynamic loading. Just thinking out loud about how we can make this already good project even more secure! What do you all think?" Reference: ./messagetypes/init.py This simple approach makes this "harder": msg_type = data.get("", "").lower() |
There already is a whitelist. I'm closing this because it's 99% useless AI nonsense. |
|
ok, close it. Iam not native english, i let AI assist on translations, but the issue is not non-sense... Maybe it is a misconception. |
the pickle exploit for code execution is still active, i guess.
Repository contributions to the PyBitmessage project
Code
Documentation
Use
tox -e py27-docto build a local copy of the documentation.Tests
toxor./run-tests-in-docker.shTranslations
Gitiquette
addresses #123orfixes #234in your commit messages