Code Monkey home page Code Monkey logo

self-remapping-code's People

Contributors

changeofpace avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

self-remapping-code's Issues

how to make it work for x86 ?

i tested it working well in x64 mode but i need x86, it always crash here:
status = fpRemapRoutine(pRemapRegion);

VM

Is this code compatible with VMProtect / Themida?

Why map a view of the entire section and copy image there?

Step 4 of the implementation says "The remap routine maps a view of the entire section and copies the contents of the image to the view. This view is then unmapped.".

Why is this necessary? I took out this logic in the code and the program crashed with a memory access violation.

Could you explain what this step accomplishes? I'm a beginner at this. Thank you very much.

Code is not working out of the box

I've just compiled the sample under VS 2017 x64 and I get the following error:

=================================================================
Section       Base Address       Size    Rva
-----------------------------------------------------------------
.text            7FF75AA91000    DA91    1000
.rdata           7FF75AA9F000    FD40    F000
.data            7FF75AAAF000    6D8     1F000
=================================================================
Error: .rdata or .data are not aligned to system allocation granularity.

What would I need to change to make it work under VS 2017 Compiler?

By section name is bad.

As the title is, do you consider that:

#define SCNVIEW_MASK_READ	0x1
#define SCNVIEW_MASK_WRITE	0x2
#define SCNVIEW_MASK_EXECUTE	0x4 
		if (pSectionHeader->Characteristics & IMAGE_SCN_MEM_READ) mask |= SCNVIEW_MASK_READ;
		if (pSectionHeader->Characteristics & IMAGE_SCN_MEM_WRITE) mask |= SCNVIEW_MASK_WRITE;
		if (pSectionHeader->Characteristics & IMAGE_SCN_MEM_EXECUTE) mask |= SCNVIEW_MASK_EXECUTE; 
// then map `mask` to `PAGE_*`

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.