资源简介
在x64下实现内嵌汇编,不是采用OBJ的模式,直接把汇编转换成机器代码,让后内嵌机器代码,参数传递按照x64约定。
代码片段和文件信息
#include “ntddk.h“
#include
#include
#include “dbghelp.h“
#include “Win7x64Drv.h“
typedef UINT64 (__fastcall *SCFN)(UINT64UINT64UINT64UINT64);
NTSTATUS DriverEntry(PDRIVER_object pDriverObj PUNICODE_STRING pRegistryString);
NTSTATUS DispatchCreate(PDEVICE_object pDevObj PIRP pIrp);
NTSTATUS DispatchClose(PDEVICE_object pDevObj PIRP pIrp);
VOID DriverUnload(PDRIVER_object pDriverObj);
NTSTATUS DispatchIoctl(PDEVICE_object pDevObj PIRP pIrp);
VOID test()
{
SCFN scfn;
UINT64 ret;
UCHAR strShellCode[14]=“\x48\x03\xCA\x49\x03\xC8\x49\x03\xC9\x48\x8B\xC1\xC3“;
/*
add rcxrdx
add rcxr8
add rcxr9
mov raxrcx
ret
*/
scfn=ExAllocatePool(NonPagedPool14);
memcpy(scfnstrShellCode14);
ret=scfn(11223344);
DbgPrint(“[x64Drv] Inline ASM return: %lld“ret);
ExFreePool(scfn);
}
NTSTATUS DriverEntry(PDRIVER_object pDriverObj PUNICODE_STRING pRegistryString)
{
NTSTATUS status = STATUS_SUCCESS;
UNICODE_STRING ustrlinkName;
UNICODE_STRING ustrDevName;
PDEVICE_object pDevObj;
dprintf(“[x64Drv] DriverEntry: %S\n“pRegistryString->Buffer);
//Create dispatch points for device control create close.
pDriverObj->MajorFunction[IRP_MJ_CREATE] = DispatchCreate;
pDriverObj->MajorFunction[IRP_MJ_CLOSE] = DispatchClose;
pDriverObj->MajorFunction[IRP_MJ_DEVICE_CONTROL] = DispatchIoctl;
pDriverObj->DriverUnload = DriverUnload;
RtlInitUnicodeString(&ustrDevName DEVICE_NAME);
status = IoCreateDevice(pDriverObj 0&ustrDevName FILE_DEVICE_UNKNOWN0FALSE&pDevObj);
dprintf(“[x64Drv] Device Name %S“ustrDevName.Buffer);
if(!NT_SUCCESS(status))
{
dprintf(“[x64Drv] IoCreateDevice = 0x%x\n“ status);
return status;
}
RtlInitUnicodeString(&ustrlinkName link_NAME);
status = IoCreateSymboliclink(&ustrlinkName &ustrDevName);
if(!NT_SUCCESS(status))
{
dprintf(“[x64Drv] IoCreateSymboliclink = 0x%x\n“ status);
IoDeleteDevice(pDevObj);
return status;
}
dprintf(“[x64Drv] Symboliclink:%S“ustrlinkName.Buffer);
//test Begin
test();
//test End
return STATUS_SUCCESS;
}
VOID DriverUnload(PDRIVER_object pDriverObj)
{
UNICODE_STRING strlink;
RtlInitUnicodeString(&strlink link_NAME);
IoDeleteSymboliclink(&strlink);
IoDeleteDevice(pDriverObj->Deviceobject);
dprintf(“[x64Drv] Unloaded\n“);
}
NTSTATUS DispatchCreate(PDEVICE_object pDevObj PIRP pIrp)
{
pIrp->IoStatus.Status = STATUS_SUCCESS;
pIrp->IoStatus.Information = 0;
dprintf(“[x64Drv] IRP_MJ_CREATE\n“);
IoCompleteRequest(pIrp IO_NO_INCREMENT);
return STATUS_SUCCESS;
}
NTSTATUS DispatchClose(PDEVICE_object pDevObj PIRP pIrp)
{
pIrp->IoStatus.Status = STATUS_SUCCESS;
pIrp->IoStatus.Information = 0;
dprintf(“[x64Drv] IRP_MJ_CLOSE\n“);
IoCompleteRequest(pIrp IO_NO_INCREMENT);
return STATUS_SUCCESS;
}
NTSTATUS DispatchIoctl(PDEVICE_object pDevObj PIRP pIrp)
{
NTSTATUS status = STATUS_INVALID_DEVICE_REQUEST;
PIO_STACK_LOCATION
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2014-05-04 17:19 src\
文件 231 2010-08-10 19:19 src\dbghelp.h
文件 247 2002-12-08 22:34 src\makefile
目录 0 2014-05-04 17:19 src\objfre_win7_amd64\
目录 0 2013-12-22 01:44 src\objfre_win7_amd64\amd64\
文件 103 2011-02-21 02:00 src\sources
文件 3648 2011-02-21 02:25 src\Win7x64Drv.c
文件 717 2011-02-21 02:00 src\Win7x64Drv.h
- 上一篇:河北专技1.0.0.3.zip
- 下一篇:Keil uVision4 STC库文件
相关资源
- shapelib_VS2015_X64
- Crack_QII_10.0_SP1_x64.rar
- jansson windows 下使用的x64和x86的lib库
- tc8 x64 openssl库文件补丁
- windows evtsys_x64
- eCognition Developer 9.01 x64(含crack
- Microsoft Loopback Adapter Cracked x64 AMD64
- MATROX_G200eR 64位驱动 for windows2003 x64
- Yale_64x64.mat
- ISAPI_Rewrite3_0112_x64 iis10 下破解64位
- jdk-10.0.2_windows-x64_bin.exe
- QuartusSetup-13.1.0.162_x64破解器.rar
- cudnn-9.0-linux-x64-v7 百度网盘地址
- X64位最新读写驱动 win10 win7 可用
- jacob-1.18-x64
- Quartus_12.0_x64破解器.rar
- 百度云 win10 深度学习环境 cuda_9.0.17
- jdk1.8 64位官方正式版 jdk-8u162-linux-x6
- 倍福TwinCAT_x64_Engineering_R3_2.11.2302 兼容
- ANSYS Electronics 19.0 Suite x64 Crack
- DELLR720 H310 h710 阵列卡驱动 (win200
- SAP PowerDesigner v16.6.1.0.5066. x64 破解文件
- MbrFix64(含32位和64位)
- rdpwrap_10.0.18362.267_x64.zip
- x64注入源码.zip
- TechSmith_Camtasia_2019.0.1_Build_4626_x64_Cra
- WMVCore(WindowsServer2008R2 x64能用的版本
- Quartus_II_13.1_x64破解器.rar
- lz4格式解压软件 x86和x64三星线刷包里
- 已数字签名的cfadisk_X64
评论
共有 条评论