Forum Thread: How to Create a Python Remote Keylogger for Facebook

How to Create a Python Remote Keylogger for Facebook

Hi guys, I am back. And as I promised I will be bringing you a way to hack someone's facebook. You can use it for any other thing as well, not just facebook. Let's get started.

Step 1: Importing and Persistence

Image via tinypic.com

So if you have seen my bind shell program you will understand the persistence part
pythoncom & pyHook - for the keylogger functionality. pyHook allows us to hook the keyboard and mouse.
win32gui - is a Windows module for creating and doing other stuff with windows gui
mechanize - is so you can simulate browser functionality
subprocess - so we can execute command line commands...lol

Step 2: Sending the Keystrokes

This part I won't really explain because it is the same as my anonymous email sending program. Just check that one out for this part of the explanation if you are confused. :D

Image via tinypic.com

The last part though just makes sure the email has been sent successfully and then deletes the logs(evidence)....

Step 3: The Main Configuration

Image via tinypic.com

the fbkmain function is where the keylogger functionality is..it creates a file and then hook the keyboard and stuff....

Also first of all, it checks if the opened window to see if it is facebook and then it starts logging...

Step 4: The Keylogging

This is the function called when we hook the keyboard...it checks what key was pressed and saves it in our log file...and checks if the length of the file is 500 characters or more...then it sends the contents of the file to our email address....you can add more email addresses if you want just in case....

Image via tinypic.com

And now the stop function is just so it doesn't run forever and send us logs everytime...lol...so after 30 mins it closes itself...

Image via tinypic.com

Now the Deploy!! Muhahaha!!!

Okay, so our victim might not have all these fancy modules and python installed, so we are gonna use pyinstaller to convert it to an exe so we can easily run it on their computer

python pyinstaller.py --onefile --noconsole --ico=anyimage.ico keylogger.py

--onefile - to make it just a single executable
--noconsole - to prevent a console window from popping up
--ico - .ico image to make it more convincing

Conclusion

Thanks for taking the time to read this tutorial... I hope you enjoyed it. And I will see you next time. And I also don't take responsibility for all the stuff you do with this. It is completely up to you.

Here is the code(The pastebin paste was removed. So this is the updated link) : https://ghostbin.com/paste/nfwg2

Happy hacking!!

Wuzi out!!! :D

23 Responses

I am must say I am impressed! And I am certainly gonna test this out. If I understand correctly all keys in that 500 character window will be recorded right? This could be anything pressed in that time window?

Not exactly...what ever is typed after facebook is opened will be recorded. ..so if the person closes the window...it will still be recording

-1 for the false hyping (this is TOTALLY NOT a "new way" to hack facebook & other social media accounts), and just the TERRIBLE moral of this article.

-Phoenix750

Please watch your language within your articles. This is supposed to be a professional evironment.

-Defalt

I've edited it guys.

Thanks

Thanks for the notification. ..I will paste it again and update the link later

Please do, appreciate your work <3

And do i need to start a listener to be able to get the "keylogged" information back then? Or how do i recieve the recorded keys?

p.s.
Error no module named pythoncom...
Where can I get pytoncom?
U didnt explain that much, but nice keylogger by the way :)

I Hope u are able to help me...

for the pythoncom you will need to download pywin32 and install it...you can google it...it's pretty easy to find.

And it will be sent to the email you provided....you do not need to start any listener of some kind...so you can say your email server is kinda like a listener...lol....

Thanks tho...I hope this helps you

Wuzi out!!

Alright i found one who matched my python version 2.7....

but when i tried installing it this error appeared, do you know what i shall do to handle it?

The script cant find pythoncom, the error prevended it?!

I don't really understand your question. But installing the pywin32 module will get you everything you need. So check to make sure you have the right one for your python installation

Hi August...did it work for you??

Okay, so our victim might not have all these fancy modules and python installed, so we are gonna use pyinstaller to convert it to an exe so we can easily run it on their computer

python pyinstaller.py --onefile --noconsole --ico=anyimage.ico keylogger.py

--onefile - to make it just a single executable
--noconsole - to prevent a console window from popping up
--ico - .ico image to make it more convincing

i dont really understand this part, can u explain me how to use pyinstaller to set up the last part ?
and do the victim has to start the exe so it can work ?

Pyinstaller is just a tool that was written to convert py scripts to exe(for windows) or another platforms. Since our victim might not have python installed on their computers we won't be able to run the script on their pc, so we need to convert it to an exe so that it can be run like a normal executable on windows. So we use pyinstaller to convert the py script to exe. And we can just run it to execute.

And yes, the victim has to run the exe for it to work.
The --options are just additional options needed to make the exe.

I hope you understand.

Do I need Admin Access in order to execute the file?

How to auto start the keylogger whenever the PC is turned on ?? And I want the key logger to record indefinitely so should i only remove 60x30 or the whole stop def??

Hello
I want o create a keylogger for android cell phone
Pleas Help me

Hi there

Just wanted to know if this method works if target is on a mac device?
Thanks

Share Your Thoughts

  • Hot
  • Active