Giter VIP home page Giter VIP logo

kltroll's Introduction

How I Trolled keyloggers

image

Introduction

  • Keyloggers is an archaic method used by malware authors its basically record everything you type on a keyboard.

Deep analysis

  • the API we are hacking is GetAsyncKeyState , its one of the most common APIs that used by Keyloggers ,it Determines whether a key is up or down at the time the function is called ,it takes int in arguments, and returns SHORT

  • as you can see GetAsyncKeyState is just a wrapper around ntUserGetAsyncKeyState

    image

  • ntUserGetAsyncKeyState

    image

  • if you perform a GetAsyncKeyState the execution will be like this :

    Untitled

    Notes

    • The real code of ntUserGetAsyncKeyState function runs in Kernel Mode.
    • When a user-mode application calls the Nt or Zw version of a native system services routine, the routine always treats the parameters that it receives as values that come from a user-mode source that is not trusted .

Patching GetAsyncKeyState :

  • first thing we do is locate GetAsyncKeyState in memory then we overwrite the first 12 bytes and make it jump to our fake function .

    image

  • if the specified key is down/pressed GetAsyncKeyState returns 0x8001 or -32767 in decimal to abuse it ,we create an array of characters of our choice and return -32767 in every character so the keylogger log it sequentially ,then we returns 0 everytime GetAsyncKeyState get called so the keylogger get blocked from logging .

    unsigned char	msg[] = {
    'T','R','O','L','L','E','D'
    };

    image

  • our function in memory:

    image

Result

20558.mp4

we-do-a-little-trolling

Lastly

  • im planning to make a highly effective program that detect all ( high/low ) level and both direct/indirect syscalls keyloggers and shut them down .

kltroll's People

Contributors

zeromemoryex 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.