-
Notifications
You must be signed in to change notification settings - Fork 676
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
Diskussion about the possibility of Heap-Spray in JerryScript: #2677
Comments
Could you please elaborate a bit on what has lead you to this conclusion? |
I tried Heap-Spraying in JerryScript. I have analyzed the memory of the heap of JerryScript in run-time. After inserting hexadecimal representation of the Shell Code NOP (which is 0x90), I noticed that JerryScript has automatically added the value 0xc2 after each byte. |
What you are seeing in the memory is the UTF-8/CESU-8 encoding of U+0090. |
UTF-8 And CESU-8 are different. So which encoding do you mean exactly? I am writing an encoded value in memory, so it should write it as it is, specially that I am using the unescape() function. And if your statement was true, then the following program: I thank you so much for your collaboration, and I would gladly take your reply as a confirmation of my conclusion. |
First, please refer to the following links
CESU-8/UTF-8 are a variable length encoding:
I.e., for code points 0..127 CESU-8/UTF-8 is just like 7-bit ASCII. U+0011 gets encoded as 0x11. As for U+0090: hex 90 is bin 10010000. Please, take my reply, but I cannot confirm your conclusion. |
Oh OK. Thank you very much again for your kind answer, it was very helpful. |
Hello everyone,
Heap Spray is a widely used payload-delivery technique, most JS engines nowadays integrate special mechanisms to mitigate it. Such as nozzle, bubble, etc. I recently came to conclusion that in JerryScript there are also a kind of mitigation to Heap-Spray, can you guys maybe confirm this and tell me what are the mechanisms being used in JerryScript to mitigate Heap-Spray?
If you refer me to any documentation that I can read considering this issue, I will also be very thankful.
Thank you so much.
The text was updated successfully, but these errors were encountered: