A Virus Program to Disable USB Ports
In this post I will show how to create a simple virus that disables/blocks the USB ports on the computer (PC). As usual I use my favorite C programming language to create this virus. Anyone with a basic knowledge of C language should be able to understand the working of this virus program.
Once this virus is executed it will immediately disable all the USB ports on the computer. As a result the you’ll will not be able to use your pen drive or any other USB peripheral on the computer. The source code for this virus is available for download. You can test this virus on your own computer without any worries since I have also given a program to re-enable all the USB ports.
1. Download the USB_Block.rar file on to your computer.
2. It contains the following 4 files.
- block_usb.c (source code)
- unblock_usb.c (source code)
3. You need to compile them before you can run it. A step-by-step procedure to compile C programs is given in my post - How to Compile C Programs.
3. Upon compilation of block_usb.c you get block_usb.exe which is a simple virus that will block (disable) all the USB ports on the computer upon execution (double click).
4. To test this virus, just run the block_usb.exe file and insert a USB pen drive (thumb drive). Now you can see that your pen drive will never get detected. To re-enable the USB ports just run the unblock_usb.exe (you need to compile unblock_usb.c) file. Now insert the pen drive and it should get detected.
5. You can also change the icon of this file to make it look like a legitimate program. For more details on this refer my post - How to Change the ICON of an EXE file (This step is also optional).
I hope you like this post. Please pass your comments.
Popularity: 13% [?]
Visitors who read this post, also read:
By using/following this site you agree to our Legal Disclaimer


it works , thanks
this code is not working on vista….
nice one…
woah!!cool….
it does not have the exe files….. only the 2 source files are present….!!!
Check out…
This is working, is there any way to modify other registry entries using code like that you have written in the above program. I want to modify a registry value which is used when the option “show hidden files and folder” not work.Please give the code in C.
How to execute a bat file from pen drive using autorun.inf “forcefully” i.e. not asking the user to perform certain actions.Just inserting pen drive and executing the file?
Nice one ! Can give me links/resources on advanced topics in C
great it is working
i told u the rar file only shows the source files…..
what is the matter….
hi its nice
boss, you just compile these source files in C compiler that will generate exe file.
its working.. i have a question, how can i enable the usb port on computer.. if that port is being disabled??
i mean.. the administrator disabled it.. can i modify it using only the registry editor?
dude………this is the best website i ever came across in my entire life!!! keep up the good work!!!
Great article but can not do all the things cause I am using a school computer and downloading of some files is not allowed.I cant download the virus
This is awesome!!
This works!!
Thanx!!
Hey Srikanth nice work……….
But can you post some virus programs in java language???????
This is great.Thank you so much.
This virus is amazing.I like it because it disables hardware which to me is pretty neat.I’m a bit new to this site but I really like it.It has alot of useful information.
any one have any code for disable /enable mouse,keyboard and cd-rom . in any code lang.,plz send to me:
id:
[email protected]
this is not a exe files a two note pad files
how can i run it?
@ kanav
You need to compile it before you can run them.
Gud Work Bro!!!
wow great man……….
thanks it’s working….
great work… can u tell give me a c program that will allow to run certain program automatically!!!
good job ………..
there is also one option to disable to Usb Drive
from regedit
start=>run=>regedit
Search Usbstor value And Modify it 3 to 4.
(note :- 3 is default value)
hey man can u get me some tutorials of virus like da full coding nd not da readymade program……plz will b waitin for ur response
this code is not working on my computer apparently… is it because i changed the file name or because i’m using vista?
hi everyone,now who can help me,how to create and use Virus to Disable USB,because i know a little of C++,thank Pls contact this [email protected]
Does this work on windows 7
@ Nedim
Should work most probably. But UAC must be disabled!
hey man its very nice.
i want to learn java for hacking .
is it more powerfull than c or c++?
How will this so-called “virus” infect other computers?
how can i compile this file
Great It is working
Thanks
thanks for the all the lessons, Please I will like to have a complete note on how to be a hack…. please let talk more with email.. thanks a lots
hi srikanth,
I have a doubt regarding usb virus removal programmes.
Recently I have downloaded a free software from a website by name “usb virus scan”.Also I have installed it.
I just wanted if the working of usb virus scan would effect the working of my kaspresky anti virus programme.
@ sandilya
Yes! Installing two antivirus and running them simultaneously can create conflicts and will affect their working
Hi Srikant,
Great to see your effort , I have downloaded the files and compiled it there is no error , exe has also been created but when we run the usb is not getting disabled , I can sense all usb port is it due to Vista I am using. Pl help I need this for demonstration purpose , I think best example of Virus for the beginners, any other similar sample like disable printer or mouse will also be helpful , if you can reply on my email , a copy , this will be a great help to me.
Keep us updating .
Regards,
it’s good!……….
EMAIL SECURITY »
What to Do When Your Email Account is Hacked?
How to Recover Hacked Email Accounts?
It can be a real nightmare if someone hacks and takes control of your email account as it may contain confidential information like bank logins, credit card details and other sensitive data. …
HOW-TO GUIDES »
How to Hack Symbian S60 Phones to Install Unsigned Applications
If you own a Nokia Symbian S60 phone, you will most likely be aware of the fact that it is not possible to install applications on it unless they are signed using a valid certificate. …
INTERNET SECURITY »
4 Ways to Identify Safe Websites on the Internet
On the whole Internet, there are approximately more than 150 million active websites up and running. As a result, it often becomes a real challenge for the users to identify safe websites that are trustworthy …
NETWORK HACKS »
How to Hack an Ethernet ADSL Router
Almost half of the Internet users across the globe use ADSL routers/modems to connect to the Internet however, most of them are unaware of the fact that it has a serious vulnerability which can easily be exploited even by a …
VIRUS CREATION »
How to Test the Working of your Antivirus – EICAR Test
Have you ever wondered how to test your Antivirus software to ensure it’s proper working? Well here is a quick and easy way to test your antivirus. The process is called EICAR test which will …
Categories
Blogroll
Recent Comments
Most Commented
Most Popular
Log In | Entries (RSS) | Comments (RSS) | Sitemap
© 2008-2011 GoHacking.Com. This content is copyrighted to Srikanth and may not be reproduced on other websites.