打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
Heap Feng Shui in JavaScript
 FunctionDescriptionfreeList(arg, count)Adds blocks of the specified size to the free list and makes sure they arenot coalesced. The heap must be defragmented before calling this function. Ifthe size of the memory blocks is less than 1024, you have to make sure that thelookaside is full.
Arguments:
  • arg - size of the new block in bytes, or a string to strdup
  • count - how many free blocks to add to the list (defaults to 1)
Example:
heap.freeList("BBBBB", 5) // adds 5 blocks containing the                          // string "BBBBB" to the free list
lookaside()Adds blocks of the specified size to the lookaside. The lookaside must beempty before calling this function.
Arguments:
  • arg - size of the new block in bytes, or a string to strdup
  • count - how many blocks to add to the lookaside (defaults to 1)
Example:
heap.lookaside("BBBBB", 5) // puts 5 blocks containing the                           // string "BBBBB" on the lookaside
lookasideAddr()Return the address of the head of the lookaside linked list for blocks ofa specified size. Uses the heapBase parameter from the heapLib.ieconstructor.
Arguments:
  • arg - size of the new block in bytes, or a string to strdup
Example:
heap.lookasideAddr("BBBBB") // returns 0x150718
vtable(shellcode, jmpecx, size)Returns a fake vtable that contains shellcode. The caller should free thevtable to the lookaside and use the address of the lookaside head as an objectpointer. When the vtable is used, the address of the object must be in eax andthe pointer to the vtable must be in ecx. Any virtual function call through thevtable from ecx+8 to ecx+0x80 will result in shellcode execution. This function uses the heap.
Arguments:
  • shellcode - shellcode string
  • jmpecx - address of a jmp ecx or equivalent instruction
  • size - size of the vtable to generate (defaults to 1008 bytes)
Example:
heap.vtable(shellcode, 0x4058b5) // generates a 1008 byte vtable                                 // with pointers to shellcode
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
Sql Server之旅——第八站 复合索引和include索引到底有多大区别?
windows堆栈溢出利用的七种方式
【CHIP安全】Heap Spray:高危漏洞的垫脚石
字符串shellcode在house of force中的运用
MS06-040源码
消息映射与虚函数
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服