In an increasingly technology based world, securing your privacy is more important than ever. W̶e̶ ̶c̶h̶o̶s̶e̶ ̶t̶h̶i̶s̶ ̶p̶r̶o̶j̶e̶c̶t̶ ̶t̶o̶ ̶s̶t̶e̶a̶l̶ ̶p̶e̶o̶p̶l̶e̶’̶s̶ ̶d̶a̶t̶a̶ ̶a̶n̶d̶ ̶h̶a̶c̶k̶ ̶t̶h̶e̶i̶r̶ ̶c̶o̶m̶p̶u̶t̶e̶r̶s̶.̶ We chose this project to show that running any of kind of executable can be harmful for your computer.
What it does
This project features several “malicious” programs such as a prank mode, a fork bomb, and a keylogger. Each mode is in some way malicious to Windows PC users, whether annoying, scary, or dangerous. The prank mode rotates the user’s entire screen, moves the mouse randomly, continuously changes the background, opens windows, and displays a message. The fork bomb infinitely creates python processes which use as much CPU as possible, eventually freezing the entire system, and the keylogger collects data about the keys the user presses and sends it to an external server.
How I built it
The prank mode uses the ctypes module to access C code and change the background, the Win32 API is used to move about the mouse and rotate the screen, and a combination of subprocess and js to launch the windows. Subprocess is generally used to create child processes, but with some extra arguments, can be used to spawn completely independent and harder to kill independent processes, used especially in the fork bomb and malware controller. Keyboard was used as an alternative to pyHook for the keylogger to hook all user input and the requests module to send the data to a server.
Challenges I ran into
G̶̶̶r̶̶̶e̶̶̶g̶̶̶ ̶̶̶h̶̶̶a̶̶̶d̶̶̶ ̶̶̶a̶̶̶ ̶̶̶m̶̶̶e̶̶̶n̶̶̶t̶̶̶a̶̶̶l̶̶̶ ̶̶̶b̶̶̶r̶̶̶e̶̶̶a̶̶̶k̶̶̶d̶̶̶o̶̶̶w̶̶̶n̶̶̶ ̶̶̶a̶̶̶r̶̶̶o̶̶̶u̶̶̶n̶̶̶d̶̶̶ ̶̶̶4̶̶̶:̶̶̶3̶̶̶7̶̶̶. We had struggles with learning how to use new APIs and modules to implement several features. The first issue was due to the use of pyHook, but alleviated by switch to a module named keyboard. The other issue was that of interprocess communication between independent processes. We attempted several approaches, such as creating an internal server or using a module like rpyc. The solution would have been to use win32pipe to create named pipes between all processes, but couldn’t be implemented due to time constraints.
Accomplishments that I'm proud of
Creating three different types of viruses that simulate real malicious programs. We hope to spread awareness about cybersecurity and being safe online. We managed to learn and use several APIs in a short timespan, such as the win32api and keyboard.
What I learned
We spent the entire weekend learning how to use the Win32API within python to manipulate many of Windows’ core features since we only had knowledge of IntroCS. Additionally, we used and learned other modules, such as subprocess, keyboard, requests, and os.
What's next for Losing Ctrl
We hope to use this project to bring awareness to cybersecurity and show how easy it can be for your computer to be infected if you’re not careful. It’s so easy that 15 year olds did it :-) some general safety tips!:
- Don’t reuse passwords or have a predictable password like ilovebts or 1234
- Watch what you click: don’t click that link that a Nigerian prince is emailing you
- Get an anti-virus protection thingy, some are free, but you also have to consistently update it: You can’t just keep clicking “remind me later” or “don’t remind me” forever