Methods To prevent SWF from being extracted by memory extraction tools

Source: Internet
Author: User

The Memory tool captures SWF from the memory by looking for the first seven bytes of SwF (the three SWF files must mark the byte "FWS" or "CWS" or "zws" + four records the length of the SWF file ), therefore, to avoid being extracted, we only need to modify the first seven bytes after loading the SWF to the memory (modifying these seven bytes after the SWF is loaded does not affect the running of the SWF ).

 

So where are the SWF bytes in the memory?

1. For document classes:

 
1 This. Loaderinfo. bytes;

2. For the loaded SWF:

 
1Loader. contentloaderinfo. bytes;

 

Therefore, we only need to modify the byte array and set the first seven bytes to random Bytes:

1 Public FunctionHideswf (Bytes: bytearray ):Void2 {3For(VaRI: Int = 0; I <7; I ++)4 {5Bytes [I] = int (0xff *Math. Random ());6 }7}

 

Example:

1Hideswf (This. Loaderinfo. bytes );2Hideswf (loader. contentloaderinfo. bytes );

 

Methods To prevent SWF from being extracted by memory extraction tools

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.