Since heap spraying takes advantage of javascript's predictability in allocating heap chunks, does this mean that heap spraying only works for browser applications and not other usual applications?

  • Any language, protocol, etc that accept data, which contains the vulnerabilities, will subject to this exploit. – mootmoot Sep 25 '17 at 16:05
  • JIT spraying (a type of heap spraying) is more common in the context of browsers, though even it isn't unique to them. – forest Dec 7 '17 at 4:40

No, heap spray can be used for any exploit that needs heap data to be aligned a certain way. Example include the ExternalBlue exploit that targets SMB. It heaps sprays a bunch of SMB objects to align the memory, so that the right objects get corrupted.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.