Giter Club home page Giter Club logo

powerful99_hook's Introduction

0X00 Ring3 Inline Hook 思路

探究Inline Hook中的函数调用过程 实现思路比较简单,主要**:

1、构造跳转指令。

2、在内存中找到欲HOOK函数地址,并保存欲HOOK位置处的前5个字节。(但其实并不一定就是5个字节,像是MessageBox就是6个字节)

3、将构造的跳转指令写入需HOOK的位置处。

4、当被HOOK位置被执行时会转到我们的流程执行。

5、如果要执行原来的流程,那么恢复HOOK,也就是还原被修改的字节。

6、执行函数原来的流程。

在这过程中,主要涉及到几个问题:

1、如何定位自己要hook的地址?

2、如何处理函数开头要替换的字节?

3、如何跳转以及跳转地址如何计算?

4、自己的函数执行完成后,如何跳转回来?

那么带着这几个问题,我们开始尝试实现Inline hook。

powerful99_hook's People

Contributors

powerful99 avatar

Watchers

 avatar

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.