Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. [Solved] Safe way to insert USB-drive.

[Solved] Safe way to insert USB-drive.

Scheduled Pinned Locked Moved C#
questionwindows-admintools
6 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Acuena
    wrote on last edited by
    #1

    Hi! Long time lurker here with a question. I am thinkig of making a software that temporarily disables windows from auto-running a application when inserting a cd or usb. To do this, I need to edit a key in the registry, that is no hard to do. What I want to know if this is enughe to stop malware from getting on my pc if I insert a usb-drive or cd, or if I am still risking getting a virus/malware on my pc. If I understand it enughe, for a virus or other malicius software to infect my pc, dosen't it have to run some kind of script or app for it? Would doing the above prevent that from happening or is it still dangerus to insert unknown usb drives into my pc, even with the auto run feature turned off?

    Have a nice day Acuena

    Richard DeemingR OriginalGriffO 2 Replies Last reply
    0
    • A Acuena

      Hi! Long time lurker here with a question. I am thinkig of making a software that temporarily disables windows from auto-running a application when inserting a cd or usb. To do this, I need to edit a key in the registry, that is no hard to do. What I want to know if this is enughe to stop malware from getting on my pc if I insert a usb-drive or cd, or if I am still risking getting a virus/malware on my pc. If I understand it enughe, for a virus or other malicius software to infect my pc, dosen't it have to run some kind of script or app for it? Would doing the above prevent that from happening or is it still dangerus to insert unknown usb drives into my pc, even with the auto run feature turned off?

      Have a nice day Acuena

      Richard DeemingR Offline
      Richard DeemingR Offline
      Richard Deeming
      wrote on last edited by
      #2

      Disabling autoplay won't be enough to protect you from a malicious USB drive. An attacker can manipulate the firmware[^] so that the drive pretends to be a keyboard or a network adapter. They can then send commands to your computer, or extract data, without having to run any software. You can even purchase a "USB Killer" drive[^], which can completely destroy your hardware as soon as you plug it in.


      "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

      "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

      A 1 Reply Last reply
      0
      • A Acuena

        Hi! Long time lurker here with a question. I am thinkig of making a software that temporarily disables windows from auto-running a application when inserting a cd or usb. To do this, I need to edit a key in the registry, that is no hard to do. What I want to know if this is enughe to stop malware from getting on my pc if I insert a usb-drive or cd, or if I am still risking getting a virus/malware on my pc. If I understand it enughe, for a virus or other malicius software to infect my pc, dosen't it have to run some kind of script or app for it? Would doing the above prevent that from happening or is it still dangerus to insert unknown usb drives into my pc, even with the auto run feature turned off?

        Have a nice day Acuena

        OriginalGriffO Offline
        OriginalGriffO Offline
        OriginalGriff
        wrote on last edited by
        #3

        To add to what Richard says, you get no real protection with a basic software solution: many computers are configured to allow "boot from USB" for recovery purposes, and even if disabling it in Windows works, if it has a bootable partition it stands a good chance of taking over the PC completely the next time it is turned on as that is part of the BIOS and before Windows even starts to load. The same problem exists with CD's (where fitted) - they can also be selected as a bootable device.

        "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony AntiTwitter: @DalekDave is now a follower!

        "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
        "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

        A 1 Reply Last reply
        0
        • Richard DeemingR Richard Deeming

          Disabling autoplay won't be enough to protect you from a malicious USB drive. An attacker can manipulate the firmware[^] so that the drive pretends to be a keyboard or a network adapter. They can then send commands to your computer, or extract data, without having to run any software. You can even purchase a "USB Killer" drive[^], which can completely destroy your hardware as soon as you plug it in.


          "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

          A Offline
          A Offline
          Acuena
          wrote on last edited by
          #4

          Ow ya, did not think about the USB-killers and the modified firmware thing. That makes it much more harder to protect against bad USB with a software, it would make it impossible for the USB killer part. Guess you could protect against the USB-Killer attack by having a external device you can use as a sacrifice thing between the PC and the USB, it must be able to handle the surge though. Guess we have to stick to not allow it then unfortunately.

          1 Reply Last reply
          0
          • OriginalGriffO OriginalGriff

            To add to what Richard says, you get no real protection with a basic software solution: many computers are configured to allow "boot from USB" for recovery purposes, and even if disabling it in Windows works, if it has a bootable partition it stands a good chance of taking over the PC completely the next time it is turned on as that is part of the BIOS and before Windows even starts to load. The same problem exists with CD's (where fitted) - they can also be selected as a bootable device.

            "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony AntiTwitter: @DalekDave is now a follower!

            A Offline
            A Offline
            Acuena
            wrote on last edited by
            #5

            Yes, this is another problem I did not think off. Thanks for that :)

            OriginalGriffO 1 Reply Last reply
            0
            • A Acuena

              Yes, this is another problem I did not think off. Thanks for that :)

              OriginalGriffO Offline
              OriginalGriffO Offline
              OriginalGriff
              wrote on last edited by
              #6

              You're welcome!

              "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony AntiTwitter: @DalekDave is now a follower!

              "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
              "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups