Code Monkey home page Code Monkey logo

Comments (2)

kiwings avatar kiwings commented on May 30, 2024

vs2019 下测试得到:
win10 x86运行良好.

win10 x64 无法使用 void* NtCurrentPeb().
需要将 return (void*)__readgsqword(0x30)
改成 return (void*)__readgsqword(0x60)
win10 x64 无法根据dll.def导出文件.需要加"__declspec(dllexport)"进行导出

感谢鸭,但是我测试发现
返回值为0x30时,win10 x64下使用x86编译的程序第一次运行会崩溃,但是之后运行均正常,但是使用x64编译的程序则在调用原始dll的导出函数时就崩溃。
修改返回值为0x60,win10 x64下使用x86编译的程序第一次运行会崩溃,但是之后运行均正常,但是使用x64编译的程序则在程序结束后崩溃。

from superdllhijack.

6769 avatar 6769 commented on May 30, 2024

win7 x64 x86, proved ^_^

What I do :

  • modify export function to automatically add dll export IAT
#define EXPORT __declspec(dllexport)
extern "C" {
	EXPORT
	int TestExport(int a, int b)
	{
		return a + b;
	}
}
  • replace return (void*)__readgsqword(0x30) to return (void*)__readgsqword(0x60)

from superdllhijack.

Related Issues (8)

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.