劫持系统进程禁止打开任何进程(5)

body
{
font-family: 微软雅黑,"Microsoft YaHei", Georgia,Helvetica,Arial,sans-serif,宋体, PMingLiU,serif;
font-size: 10.5pt;
line-height: 1.5;
}
html, body
{

}
h1 {
font-size:1.5em;
font-weight:bold;
}
h2 {
font-size:1.4em;
font-weight:bold;
}
h3 {
font-size:1.3em;
font-weight:bold;
}
h4 {
font-size:1.2em;
font-weight:bold;
}
h5 {
font-size:1.1em;
font-weight:bold;
}
h6 {
font-size:1.0em;
font-weight:bold;
}
img {
border:0;
max-width: 100%;
height: auto !important;
}
blockquote {
margin-top:0px;
margin-bottom:0px;
}
table {
border-collapse:collapse;
border:1px solid #bbbbbb;
}
td {
border-collapse:collapse;
border:1px solid #bbbbbb;
}

windows创建进程的函数:

把这个函数劫持之后注射到 explore.exe进程中即可。

现在注射到印象笔记中测试:

#include<stdio.h>

#include<windows.h>

#include<string.h>

#include"detours.h"

#pragma comment (lib ,"detours.lib" )

BOOL(WINAPI * oldCreateProcessW)(

LPCWSTR lpApplicationName,

LPWSTR lpCommandLine,

LPSECURITY_ATTRIBUTES lpProcessAttributes,

LPSECURITY_ATTRIBUTES lpThreadAttributes,

BOOL bInheritHandles,

DWORD dwCreationFlags,

LPVOID lpEnvironment,

LPCWSTR lpCurrentDirectory,

LPSTARTUPINFOW lpStartupInfo,

LPPROCESS_INFORMATION lpProcessInformation

) = CreateProcessW;

BOOL WINAPI newCreateProcessW(

LPCWSTR lpApplicationName,

LPWSTR lpCommandLine,

LPSECURITY_ATTRIBUTES lpProcessAttributes ,

LPSECURITY_ATTRIBUTES lpThreadAttributes ,

BOOL bInheritHandles,

DWORD dwCreationFlags,

LPVOID lpEnvironment,

LPCWSTR lpCurrentDirectory,

LPSTARTUPINFOW lpStartupInfo ,

LPPROCESS_INFORMATION lpProcessInformation

) {

MessageBoxA(0, "系统进程已被劫持!" , "系统警告" , 0);

return 0;

}

void Hook()

{

DetourRestoreAfterWith(); //恢复原来状态,

DetourTransactionBegin(); //拦截开始

DetourUpdateThread(GetCurrentThread()); //刷新当前线程

DetourAttach(( void **)&oldCreateProcessW, newCreateProcessW); //实现函数拦截

DetourTransactionCommit(); //拦截生效

}

void UnHook()

{

DetourTransactionBegin(); //拦截开始

DetourUpdateThread(GetCurrentThread()); //刷新当前线程

DetourDetach(( void **)&oldCreateProcessW, newCreateProcessW); //撤销拦截函数

DetourTransactionCommit(); //拦截生效

}

_declspec(dllexport ) void go(){

MessageBoxA(0, "系统进程劫持成功!" , "系统信息" , 0);

int i = 0;

while (i++ < 60){

Hook();

Sleep(1000);

}

UnHook();

}

劫持成功:

打开帮助的入门指南的时候:

来自为知笔记(Wiz)

时间: 2024-08-06 16:01:06

劫持系统进程禁止打开任何进程(5)的相关文章

劫持系统进程禁止创建文件

body { font-family: 微软雅黑,"Microsoft YaHei", Georgia,Helvetica,Arial,sans-serif,宋体, PMingLiU,serif; font-size: 10.5pt; line-height: 1.5; } html, body { } h1 { font-size:1.5em; font-weight:bold; } h2 { font-size:1.4em; font-weight:bold; } h3 { fon

在程序中使用命令打开一个进程和记录该进程执行日志

//在需要的程序中调用ExcutedCmd函数来打开执行dos命令 //cmd 命令  args 命令参数 private static void ExcutedCmd(string cmd, string args) { using (Process p = new Process()) { ProcessStartInfo psi = new ProcessStartInfo(cmd, args); psi.CreateNoWindow = true; psi.UseShellExecute

WinForm 应用程序禁止多个进程运行

方法一: 禁止多个进程运行 using System; using System.Collections.Generic; using System.Linq; using System.Windows.Forms; namespace 开启新的进程 { static class Program { /// <summary> /// 应用程序的主入口点. /// </summary> [STAThread] static void Main() { bool flag; Syst

AIR打开创建进程的两种方式

写在这里,方便查阅 NativeApplication.nativeApplication.autoExit = true;// 主窗体关闭也跟着关闭 Debug.trace('ToursLocalConnection :: appExePath = ' + appExePath);currFile = new File(appExePath);//currFile = new File("C:/Users/lenovo/Desktop/LZPC_Test/LZPC/uninstall.exe&

禁止tadb.exe进程的方法 彻底关闭tadb.exe

今天本来想用手机连接一下豌豆夹,总是不成功,提供被tadb.exe控制占用了,火都来了,所以打算把这个tadb.exe进程灭了,又发现网上很多朋友在问,无法解决的,所以跟大家分享一下 tadb.exe是什么?怎么关闭? tadb.exe是腾讯电脑管家或腾讯手机管家PC版之类的腾讯软件的安卓驱动管理软件,常驻进程,受腾讯电脑管家等软件保护,默认无法结束进程和删除禁止等.但只需要简单几款就可以搞定.以腾讯电脑管家为例: 1.不喜欢腾讯电脑管家之类的朋友的朋友直接删除软件即可.如果仅仅需要禁止tadb

winform程序限制只能打开一个进程

今天有幸被召回母校给即将毕业的学弟学妹们讲我这两年的工作史,看了下母校没啥特别的变化,就是寝室都安了空调,学妹们都非常漂亮而已..好了不扯蛋了,说下今天的主题吧.这些天我在深度定制语法高亮功能的同时发现了博客园提供的一些有意思的函数,甚至有几个博客园都没用到,我也不知道怎么才能触发那些功能..打开这个js就可以看到很多好用的东西了,虽然写的不怎么样,但是至少有这些功能. ps: 推荐安装一个代码格式化的插件,否则一坨看着蛋疼.比如第一个就是 log,方便调试. http://www.klxsw.

SHOWMODALDIALOG表单提交时禁止打开新窗口

前提条件:showmodaldialog中有表单form.当action="#"的时候,提交表单,不会打开新窗口,但这种#自提有时不能用,#是本页面完整的带参数的url,如果表单中有参数和url中的参数相同,那么提交后,表单中的这个同名参数会被#中的参数覆盖,造成表单中的这个参数无法取得,除非在表单中重新修改name这个参数: 当actiong="本页面.jsp"的时候,提交时,在IE环境中showmodaldialog会打开新的窗口,设置target="

扫描系统进程和获取某进程的PID

扫描系统的所有进程 1 #include <stdio.h> 2 #include <windows.h> 3 #include <tlhelp32.h> 4 5 int scan() 6 { 7 HANDLE hprocessShap = NULL; 8 PROCESSENTRY32 pe32 = {0}; 9 hprocessShap = CreateToolhelp32Snapshot(TH32CS_SNAPALL, 0); 10 11 if(hprocessSh

android在开启飞行模式的情况下,禁止打开蓝牙

(1)将alps/framework/base/packages/settingsprovider/res/values/defaults.xml里 面airplane_mode_toggleable_radios标签中的"bluetooth"去掉. (2)在packages/apps/settings/src/android/settings/bluetoothangel/BluetoothEnabler.java这支文件里进行如下修改: 1.import 如下两个包: import