KeyLogging through DLL Injection[The Simplest Way]



Keystroke logging is the action of tracking (or logging) the keys struck on a keyboard.Malwares often use dll injection technique to do malicious activity on a system. Few days back to demonstrate the process of how malwares can inject malicious dll to an existing process to do malicious activity on a system,I have coded a very simple dll which simply logs keystrokes after getting injected into a remote process. Here I am sharing the simplest part.


Please remember this information is for Educational Purpose only and should not be used for malicious purpose.I will not assume any liability or responsibility to any person or entity with respect to loss or damages incurred from information contained in this article.

Generally a keylogger for Win32 platform uses the SetWindowsHookEx API. Here I will also use the same technique to log keystrokes.

The Dll Code is written in C:

After successful injection to any arbitrarily chosen remote process the dll will log all keystrokes to "log.txt" file in the same directory.

Generally I use this python script to quickly inject any dlls to any process. I have added few line in this script for current purpose. Now this script will inject dll to target process and execute the function called "startlog()" which resides in the newly injected dll to start key logging. This script uses python ctype library. So make sure you have it installed with your python installation to make this script work.

Reference: http://thetechnofreak.com/technofreak/keylogger-visual-c/

Comments

  1. Hey man, its Neil. I just saw your comment from last month on my virtualbox kernel debugging blog post at neilscomputerblog.blogspot.com. This is a pretty nice blog you have here too :)

    ReplyDelete
  2. The Uttarakhand Board will release the UK Board tenth model paper 2020-21 at the side of the question papers quickly on its authentic internet site. Students could be capable of download the Uttarakhand Board Class 10 question papers UBSE 10th Question Paper 2021 As quickly as they may be launched, students who can be acting for UK Board Class 10 examinations should guide them as them in getting familiarized with the UK tenth exam pattern in a higher manner.

    ReplyDelete
  3. NCERT 8th Class Books
    NCERT Publish Text Book for Class 1,2, 3, 4, 5, 6, 7, 8, 9, 10 Academic Year 2023 for Primary and High School (Class 1) Students Education Purpose, National Council of Educational Research and Training (NCERT) is an autonomous organisation of the Government of India, NCERT 8th Class Books NCERT Textbooks Provide Prescribed Courses, National Council of Education Board are important for most of the Final Examinations because of High Quality Study Material and resources, NCERT Class 1,2, 3, 4, 5, 6, 7, 8, 9,10 Books 2023 for English, Hindi, Urdu Medium Wise. NCERT Class 1,2, 3, 4, 5, 6, 7, 8, 9, 10 Students get your Text Books in Your School, Students Any Problem NCERT Class 1,2, 3, 4, 5, 6, 7, 8, 9, 10 Books 2023 not Available no Problem Students Visit our Website Download e-textbooks Subject Wise Books.

    ReplyDelete

Post a Comment