Giter VIP home page Giter VIP logo

winkernel's Introduction

WinKernel

Lightweight library to interfere with windows kernel written in .net 6

Features :

  • Binaries Reading in big endian (see WinMemory\WinMemoryReader.cs)
  • Binaries Reading in litle endian (see WinMemory\WinMemoryReader.cs)
  • Binaries Writing in big endian (see WinMemory\WinMemoryWriter.cs)
  • Binaries Writing in little endian (see WinMemory\WinMemoryWriter.cs)
  • Native dll injection (see WinProcess\WinProcess.cs) for x86 and x64 processes

Example of Dll Injection

   var dllPath = "path_to_my_dll";
   
   var targetedProcessName = "process_name";
   
   var process = Process.GetProcesses().FirstOrDefault(x => x.ProcessName == targetedProcessName);
     
   using WinProcess winProcess = new(process); 

   Console.WriteLine(winProcess.InjectDll(dllPath)? "Injectaion dll succeed" : "An error has occured during the dll injection.");

Example Reading and Writing in Memory

   var process = Process.GetProcesses().FirstOrDefault(x => x.ProcessName == "ac_client"); /* assault_cube.exe x86 */

   using WinProcess winProcess = new(process);
   var processModule = winProcess.FetchProcessModule("ac_client.exe");


   IntPtr playerPtr = new(winProcess.ProcessReader.ReadInt32(processModule.BaseAddress + 0x10F4F4, EndiannessEnum.LittleEndian));

   var playerHealth = winProcess.ProcessReader.ReadInt32(playerPtr + 0xF8, EndiannessEnum.LittleEndian);
   var playerAmmo = winProcess.ProcessReader.ReadInt32(playerPtr + 0x150, EndiannessEnum.LittleEndian);
   var playerPosX = winProcess.ProcessReader.ReadFloat(playerPtr + 0x4, EndiannessEnum.LittleEndian);
   var playerPosY = winProcess.ProcessReader.ReadFloat(playerPtr + 0x8, EndiannessEnum.LittleEndian);
   var playerPosZ = winProcess.ProcessReader.ReadFloat(playerPtr + 0xC, EndiannessEnum.LittleEndian);

   playerHealth = 5000;
   playerAmmo = 999;
   playerPosX = 200.05f;
   playerPosY = 180.541f;
   playerPosZ = 400.00f;

   winProcess.ProcessWriter.WriteInt32(playerPtr + 0xF8, playerHealth, EndiannessEnum.LittleEndian);
   winProcess.ProcessWriter.WriteInt32(playerPtr + 0x150, playerAmmo, EndiannessEnum.LittleEndian);
   winProcess.ProcessWriter.WriteFloat(playerPtr + 0x4, playerPosX, EndiannessEnum.LittleEndian);
   winProcess.ProcessWriter.WriteFloat(playerPtr + 0x8, playerPosY, EndiannessEnum.LittleEndian);
   winProcess.ProcessWriter.WriteFloat(playerPtr + 0xC, playerPosZ, EndiannessEnum.LittleEndian);

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.