SlideShare a Scribd company logo
1 of 10
USB DRIVE DISABLER
By
Aashiq Ahamed N
“USB Drive Disabler
CHAPTER - 1
ABSTRACT
USB Drive Disabler is an application developed in C#.net framework which allows you to
block all USB storage devices from accessing your computer.
Instead of blocking the USB devices with Registry command, we can use this application
which can make less time requirement, avoid unwanted doubts and sometimes it can also
cause data loss in pen drive.
It has a very simple interface and in just one click, your device is protected. This software is
portable and can be used on any Windows PC.
When run, you will be asked either to enable or disable the drive and it has one additional
option which is to make the USB Device Read-Only or Read-Write and adds more security
for the application.
Need of the project:
1. Disgruntled employees can easily steal data using USB drives
2. Booby-trapped USB drives can destroy your network.
3. Unidentified devices can wreak havoc in your organization.
4. Encrypting USB drives isn’t enough to effectively secure them.
5. The ability to block and unblock USB devices improves USB security.
CHAPTER - 2
PROJECT DESCRIPTION
OBJECTIVE OF THE PROJECT
1) The USB drive disabler provides protection against any malicious programs trying
to attack via USB drive.
2) It delivers high level of protection against theft and accidental disclosure of
confidential data, and prevents unauthorized persons from stealing your data.
When the application is opened with Administrator privileges, it shows two options -
1. To enable or disable the USB Port in the computer.
2. Read only or Read and Write option.
If we choose the disable option it will disable all USB Ports in the computer by
changing the Registry settings automatically and does not allow any USB devices to
access the computer. In this mode we cannot select the options like Read-only and
Read - Write.
If we choose the enable option it will allow all USB Ports in the computer by
changing the Registry settings automatically and allow any USB devices to access
the computer. In this mode we can select Read-only and Read-Write.
1. In the Read-only mode we can able to access the data in the USB Device but
cannot be able modify or delete the data present in the USB Device.
2. In the Read and Write mode we can access the data in the USB Device and can
perform all kind of operations like delete, modify.
CHAPTER - 3
SOFTWARE DESCRIPTION
For this project we have used the Microsoft Visual Studio. Microsoft Visual Studio is
an Integrated Development Environment (IDE) from Microsoft. It is used to develop
computer programs, websites, web apps, web services and mobile apps. Visual Studio
uses Microsoft software development platforms such as Windows API, Windows
Forms, Windows Presentation Foundation, Windows Store and Microsoft Silverlight.
Visual Studio does not support any programming language, solution or tool
intrinsically; instead, it allows the plugging of functionality coded as a VS Package.
In Visual Studio we use .net framework in C#. C# is an elegant and type-safe object-
oriented language that enables developers to build a variety of secure and robust
applications that run on the .NET Framework.
You can use C# to create Windows client applications, XML Web services, distributed
components, client-server applications, database applications, and much, much more.
Visual C# provides an advanced code editor, convenient user interface designers,
integrated debugger, and many other tools to make it easier to develop applications
based on the C# language and the .NET Framework.
MINIMUM HARDWARE / SOFTWARE REQUIREMENTS
• Any Pentium IV or higher Computers
• Any Windows OS
• Require administrative rights
SOURCE CODE OF USB DRIVE PROTECTOR
using System;
using System.Collections.Generic; using
System.ComponentModel; using System.Data; using
System.Drawing; using System.Linq; using System.Text;
using System.Runtime.InteropServices; using
Microsoft.Win32; using System.Threading; using
System.Windows.Forms;
namespace Aashiq123 {
public partial class Form1 : Form {
public Form1()
{
InitializeComponent();
}
RegistryKey Regkey, RegKey2;
Int32 rValue,rsvalue,Gvalue,tvalue;
//setting the registry path to enable and disable
automatically string Regpath =
"SystemCurrentControlSetServicesUSBSTOR"; string
ReadAndWriteRegPath2 =
"SystemCurrentControlSetControl"; string
ReadAndWriteRegPath =
"SystemCurrentControlSetControlStorageDevicePolicies"
;
//when cancel button is clicked private void
ButtonCancel_Click(object sender, EventArgs e)
{
Close();
}
//when ok button is clicked
private void ButtonOk_Click(object sender, EventArgs e)
{
Regkey = Registry.LocalMachine.OpenSubKey(Regpath, true);
Regkey.SetValue("Start", rValue); if (GroupBox2.Enabled ==
true)
{RegKey2 =
Registry.LocalMachine.OpenSubKey(ReadAndWriteRegPath2, true);
RegKey2.CreateSubKey("StorageDevicePolicies");
RegKey2 =
Registry.LocalMachine.OpenSubKey(ReadAndWriteRegPath, true);
RegKey2.SetValue("WriteProtect", rsvalue);
}//to set the values to perform
if ((rValue == 3) && (rsvalue == 1))
{MessageBox.Show ("USB Port were enable and Read only is
enabled");
}else if ((rValue == 3) && (rsvalue == 0))
{MessageBox.Show ("USB Port were enable and Read and write is
enabled");
}else
{MessageBox.Show ("USB Port were disable");
}}private void RadioButtondisable_CheckedChanged(object
sender, EventArgs e)
{GroupBox2.Enabled = false; rValue = 4;
}private void RadioButtonenable_CheckedChanged(object sender,
EventArgs e){
GroupBox2.Enabled = true; rValue = 3;
}private void RadioButtonreadonly_CheckedChanged(object
sender, EventArgs e)
{rsvalue = 1;
}private void RadioButtonreadwrite_CheckedChanged(object
sender, EventArgs e) {
rsvalue = 0;}
bool isAdmin;
[DllImport ("shell32")]
static extern bool IsUserAnAdmin();
private void Form1_Load(object sender, EventArgs e)
{
//to check user is in admin mode or in guest mode
isAdmin = IsUserAnAdmin(); if (isAdmin == false)
//to display compilation error {
MessageBox.Show("You don't have proper privileges level to
make changes, administrators privileges are required",
"Error", MessageBoxButtons.OK,
MessageBoxIcon.Error);
Close();
}else
{Regkey = Registry.LocalMachine.OpenSubKey(Regpath, true);
Gvalue = Convert .ToInt32 (Regkey.GetValue("Start"));
//check the current state of the usb/whether is enabled or
disabled if (Gvalue == 3)
{RadioButtonenable.Checked = true;
}else if (Gvalue == 4)
{RadioButtondisable.Checked = true;
}RegKey2 =
Registry.LocalMachine.OpenSubKey(ReadAndWriteRegPath, true);
try {
tvalue = Convert.ToInt32(RegKey2.GetValue("WriteProtect")); if
(tvalue == 1)
{RadioButtonreadonly.Checked = true;
}else if (tvalue == 0)
{RadioButtonreadwrite.Checked = true;
}}
catch (NullReferenceException) { }
}
}
}
}
CHAPTER - 4
SCREEN SHOTS
How to run the application with Administrator rights
The application must be selected with Administrator privilege for proper functioning of the
application otherwise it will show a compilation error.
After selecting with Administrator privilege it will show a User Account Control dialog box
press YES option to open the next window otherwise it will be terminated.
CHAPTER - 5
FUTURE ENHANCEMENTS
• In the future days we are planning to modify this project by extra futures like when an pen
drive is inserted to the port the alert message will be sent to the administrator.
• The login history about the inserted USB devices in to the computer will be stored in the
computer.
CHAPTER - 6
CONCLUSION
USB Drive Protector Tool is a great tool for adding some additional security to your USB drives.
The powerful write protection included in the application prevents the unauthorized altering of
files saved on your USB devices.
In addition to this, the application offers registry protection as well as disabling of USB ports on
your computer.
CHAPTER - 7
REFERENCES
https://docs.microsoft.com/en-us/visualstudio/productinfo/vs2013-sysrequirements-vs
CHAPTER - 5
FUTURE ENHANCEMENTS
• In the future days we are planning to modify this project by extra futures like when an pen
drive is inserted to the port the alert message will be sent to the administrator.
• The login history about the inserted USB devices in to the computer will be stored in the
computer.
CHAPTER - 6
CONCLUSION
USB Drive Protector Tool is a great tool for adding some additional security to your USB drives.
The powerful write protection included in the application prevents the unauthorized altering of
files saved on your USB devices.
In addition to this, the application offers registry protection as well as disabling of USB ports on
your computer.
CHAPTER - 7
REFERENCES
https://docs.microsoft.com/en-us/visualstudio/productinfo/vs2013-sysrequirements-vs

More Related Content

Similar to Usb Drive Protector

Portable storage device management
Portable storage device managementPortable storage device management
Portable storage device managementcseij
 
Programming objects with android
Programming objects with androidProgramming objects with android
Programming objects with androidfirenze-gtug
 
Implementation of sql server based on sqlite engine on
Implementation of sql server based on sqlite engine onImplementation of sql server based on sqlite engine on
Implementation of sql server based on sqlite engine oneSAT Publishing House
 
开放原码手机操作系统 Ubuntu Phone 架构、移植与刷机
开放原码手机操作系统 Ubuntu Phone 架构、移植与刷机开放原码手机操作系统 Ubuntu Phone 架构、移植与刷机
开放原码手机操作系统 Ubuntu Phone 架构、移植与刷机Rex Tsai
 
Joxean Koret - Database Security Paradise [Rooted CON 2011]
Joxean Koret - Database Security Paradise [Rooted CON 2011]Joxean Koret - Database Security Paradise [Rooted CON 2011]
Joxean Koret - Database Security Paradise [Rooted CON 2011]RootedCON
 
Introduction to Mobile Operating System.pptx
Introduction to Mobile Operating System.pptxIntroduction to Mobile Operating System.pptx
Introduction to Mobile Operating System.pptxaparna14patil
 
Remote control system (rcs)
Remote control system (rcs)Remote control system (rcs)
Remote control system (rcs)Mehedi Hasan
 
I Want More Ninja – iOS Security Testing
I Want More Ninja – iOS Security TestingI Want More Ninja – iOS Security Testing
I Want More Ninja – iOS Security TestingJason Haddix
 
Ubuntu phone engineering
Ubuntu phone engineeringUbuntu phone engineering
Ubuntu phone engineeringRex Tsai
 
Manish Chasta - Securing Android Applications
Manish Chasta - Securing Android ApplicationsManish Chasta - Securing Android Applications
Manish Chasta - Securing Android ApplicationsPositive Hack Days
 
Android task manager project presentation
Android task manager project presentationAndroid task manager project presentation
Android task manager project presentationAkhilesh Jaiswal
 
Cold front - bridging the web and the physical world
Cold front - bridging the web and the physical worldCold front - bridging the web and the physical world
Cold front - bridging the web and the physical worldKenneth Rohde Christiansen
 
Google android white paper
Google android white paperGoogle android white paper
Google android white paperSravan Reddy
 
Oss the freedom dpm 2018
Oss the freedom dpm 2018Oss the freedom dpm 2018
Oss the freedom dpm 2018BIT DURG
 

Similar to Usb Drive Protector (20)

Portable storage device management
Portable storage device managementPortable storage device management
Portable storage device management
 
Programming objects with android
Programming objects with androidProgramming objects with android
Programming objects with android
 
Implementation of sql server based on sqlite engine on
Implementation of sql server based on sqlite engine onImplementation of sql server based on sqlite engine on
Implementation of sql server based on sqlite engine on
 
What's new in p2 (2009)?
What's new in p2 (2009)?What's new in p2 (2009)?
What's new in p2 (2009)?
 
开放原码手机操作系统 Ubuntu Phone 架构、移植与刷机
开放原码手机操作系统 Ubuntu Phone 架构、移植与刷机开放原码手机操作系统 Ubuntu Phone 架构、移植与刷机
开放原码手机操作系统 Ubuntu Phone 架构、移植与刷机
 
Joxean Koret - Database Security Paradise [Rooted CON 2011]
Joxean Koret - Database Security Paradise [Rooted CON 2011]Joxean Koret - Database Security Paradise [Rooted CON 2011]
Joxean Koret - Database Security Paradise [Rooted CON 2011]
 
Introduction to Mobile Operating System.pptx
Introduction to Mobile Operating System.pptxIntroduction to Mobile Operating System.pptx
Introduction to Mobile Operating System.pptx
 
Android Anatomy
Android  AnatomyAndroid  Anatomy
Android Anatomy
 
Android OS
Android OSAndroid OS
Android OS
 
Remote control system (rcs)
Remote control system (rcs)Remote control system (rcs)
Remote control system (rcs)
 
I Want More Ninja – iOS Security Testing
I Want More Ninja – iOS Security TestingI Want More Ninja – iOS Security Testing
I Want More Ninja – iOS Security Testing
 
Ubuntu phone engineering
Ubuntu phone engineeringUbuntu phone engineering
Ubuntu phone engineering
 
Manish Chasta - Securing Android Applications
Manish Chasta - Securing Android ApplicationsManish Chasta - Securing Android Applications
Manish Chasta - Securing Android Applications
 
Android task manager project presentation
Android task manager project presentationAndroid task manager project presentation
Android task manager project presentation
 
Cold front - bridging the web and the physical world
Cold front - bridging the web and the physical worldCold front - bridging the web and the physical world
Cold front - bridging the web and the physical world
 
Google android white paper
Google android white paperGoogle android white paper
Google android white paper
 
Android My Seminar
Android My SeminarAndroid My Seminar
Android My Seminar
 
Pentesting iOS Apps
Pentesting iOS AppsPentesting iOS Apps
Pentesting iOS Apps
 
Computer software and computer network
Computer software and computer networkComputer software and computer network
Computer software and computer network
 
Oss the freedom dpm 2018
Oss the freedom dpm 2018Oss the freedom dpm 2018
Oss the freedom dpm 2018
 

More from Aashiq Ahamed N

More from Aashiq Ahamed N (7)

Zero day exploit
Zero day exploitZero day exploit
Zero day exploit
 
E-AEGIS
E-AEGISE-AEGIS
E-AEGIS
 
Gas leakage detection system
Gas leakage detection systemGas leakage detection system
Gas leakage detection system
 
Components of IOT Implementation
Components of IOT ImplementationComponents of IOT Implementation
Components of IOT Implementation
 
IOT
IOTIOT
IOT
 
5G
5G5G
5G
 
Steganography
SteganographySteganography
Steganography
 

Recently uploaded

Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 

Recently uploaded (20)

Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 

Usb Drive Protector

  • 2. “USB Drive Disabler CHAPTER - 1 ABSTRACT USB Drive Disabler is an application developed in C#.net framework which allows you to block all USB storage devices from accessing your computer. Instead of blocking the USB devices with Registry command, we can use this application which can make less time requirement, avoid unwanted doubts and sometimes it can also cause data loss in pen drive. It has a very simple interface and in just one click, your device is protected. This software is portable and can be used on any Windows PC. When run, you will be asked either to enable or disable the drive and it has one additional option which is to make the USB Device Read-Only or Read-Write and adds more security for the application. Need of the project: 1. Disgruntled employees can easily steal data using USB drives 2. Booby-trapped USB drives can destroy your network. 3. Unidentified devices can wreak havoc in your organization. 4. Encrypting USB drives isn’t enough to effectively secure them. 5. The ability to block and unblock USB devices improves USB security.
  • 3. CHAPTER - 2 PROJECT DESCRIPTION OBJECTIVE OF THE PROJECT 1) The USB drive disabler provides protection against any malicious programs trying to attack via USB drive. 2) It delivers high level of protection against theft and accidental disclosure of confidential data, and prevents unauthorized persons from stealing your data. When the application is opened with Administrator privileges, it shows two options - 1. To enable or disable the USB Port in the computer. 2. Read only or Read and Write option. If we choose the disable option it will disable all USB Ports in the computer by changing the Registry settings automatically and does not allow any USB devices to access the computer. In this mode we cannot select the options like Read-only and Read - Write.
  • 4. If we choose the enable option it will allow all USB Ports in the computer by changing the Registry settings automatically and allow any USB devices to access the computer. In this mode we can select Read-only and Read-Write. 1. In the Read-only mode we can able to access the data in the USB Device but cannot be able modify or delete the data present in the USB Device. 2. In the Read and Write mode we can access the data in the USB Device and can perform all kind of operations like delete, modify. CHAPTER - 3 SOFTWARE DESCRIPTION For this project we have used the Microsoft Visual Studio. Microsoft Visual Studio is an Integrated Development Environment (IDE) from Microsoft. It is used to develop computer programs, websites, web apps, web services and mobile apps. Visual Studio uses Microsoft software development platforms such as Windows API, Windows Forms, Windows Presentation Foundation, Windows Store and Microsoft Silverlight. Visual Studio does not support any programming language, solution or tool intrinsically; instead, it allows the plugging of functionality coded as a VS Package. In Visual Studio we use .net framework in C#. C# is an elegant and type-safe object- oriented language that enables developers to build a variety of secure and robust applications that run on the .NET Framework. You can use C# to create Windows client applications, XML Web services, distributed components, client-server applications, database applications, and much, much more. Visual C# provides an advanced code editor, convenient user interface designers, integrated debugger, and many other tools to make it easier to develop applications based on the C# language and the .NET Framework.
  • 5. MINIMUM HARDWARE / SOFTWARE REQUIREMENTS • Any Pentium IV or higher Computers • Any Windows OS • Require administrative rights SOURCE CODE OF USB DRIVE PROTECTOR using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Runtime.InteropServices; using Microsoft.Win32; using System.Threading; using System.Windows.Forms; namespace Aashiq123 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } RegistryKey Regkey, RegKey2; Int32 rValue,rsvalue,Gvalue,tvalue; //setting the registry path to enable and disable automatically string Regpath = "SystemCurrentControlSetServicesUSBSTOR"; string ReadAndWriteRegPath2 = "SystemCurrentControlSetControl"; string ReadAndWriteRegPath = "SystemCurrentControlSetControlStorageDevicePolicies" ; //when cancel button is clicked private void ButtonCancel_Click(object sender, EventArgs e) { Close(); }
  • 6. //when ok button is clicked private void ButtonOk_Click(object sender, EventArgs e) { Regkey = Registry.LocalMachine.OpenSubKey(Regpath, true); Regkey.SetValue("Start", rValue); if (GroupBox2.Enabled == true) {RegKey2 = Registry.LocalMachine.OpenSubKey(ReadAndWriteRegPath2, true); RegKey2.CreateSubKey("StorageDevicePolicies"); RegKey2 = Registry.LocalMachine.OpenSubKey(ReadAndWriteRegPath, true); RegKey2.SetValue("WriteProtect", rsvalue); }//to set the values to perform if ((rValue == 3) && (rsvalue == 1)) {MessageBox.Show ("USB Port were enable and Read only is enabled"); }else if ((rValue == 3) && (rsvalue == 0)) {MessageBox.Show ("USB Port were enable and Read and write is enabled"); }else {MessageBox.Show ("USB Port were disable"); }}private void RadioButtondisable_CheckedChanged(object sender, EventArgs e) {GroupBox2.Enabled = false; rValue = 4; }private void RadioButtonenable_CheckedChanged(object sender, EventArgs e){ GroupBox2.Enabled = true; rValue = 3; }private void RadioButtonreadonly_CheckedChanged(object sender, EventArgs e) {rsvalue = 1; }private void RadioButtonreadwrite_CheckedChanged(object sender, EventArgs e) { rsvalue = 0;}
  • 7. bool isAdmin; [DllImport ("shell32")] static extern bool IsUserAnAdmin(); private void Form1_Load(object sender, EventArgs e) { //to check user is in admin mode or in guest mode isAdmin = IsUserAnAdmin(); if (isAdmin == false) //to display compilation error { MessageBox.Show("You don't have proper privileges level to make changes, administrators privileges are required", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); Close(); }else {Regkey = Registry.LocalMachine.OpenSubKey(Regpath, true); Gvalue = Convert .ToInt32 (Regkey.GetValue("Start")); //check the current state of the usb/whether is enabled or disabled if (Gvalue == 3) {RadioButtonenable.Checked = true; }else if (Gvalue == 4) {RadioButtondisable.Checked = true; }RegKey2 = Registry.LocalMachine.OpenSubKey(ReadAndWriteRegPath, true); try { tvalue = Convert.ToInt32(RegKey2.GetValue("WriteProtect")); if (tvalue == 1) {RadioButtonreadonly.Checked = true; }else if (tvalue == 0) {RadioButtonreadwrite.Checked = true; }} catch (NullReferenceException) { } } } } }
  • 8. CHAPTER - 4 SCREEN SHOTS How to run the application with Administrator rights The application must be selected with Administrator privilege for proper functioning of the application otherwise it will show a compilation error. After selecting with Administrator privilege it will show a User Account Control dialog box press YES option to open the next window otherwise it will be terminated.
  • 9. CHAPTER - 5 FUTURE ENHANCEMENTS • In the future days we are planning to modify this project by extra futures like when an pen drive is inserted to the port the alert message will be sent to the administrator. • The login history about the inserted USB devices in to the computer will be stored in the computer. CHAPTER - 6 CONCLUSION USB Drive Protector Tool is a great tool for adding some additional security to your USB drives. The powerful write protection included in the application prevents the unauthorized altering of files saved on your USB devices. In addition to this, the application offers registry protection as well as disabling of USB ports on your computer. CHAPTER - 7 REFERENCES https://docs.microsoft.com/en-us/visualstudio/productinfo/vs2013-sysrequirements-vs
  • 10. CHAPTER - 5 FUTURE ENHANCEMENTS • In the future days we are planning to modify this project by extra futures like when an pen drive is inserted to the port the alert message will be sent to the administrator. • The login history about the inserted USB devices in to the computer will be stored in the computer. CHAPTER - 6 CONCLUSION USB Drive Protector Tool is a great tool for adding some additional security to your USB drives. The powerful write protection included in the application prevents the unauthorized altering of files saved on your USB devices. In addition to this, the application offers registry protection as well as disabling of USB ports on your computer. CHAPTER - 7 REFERENCES https://docs.microsoft.com/en-us/visualstudio/productinfo/vs2013-sysrequirements-vs