USB Write Blocker : Makes any USB drive Write protected.


Recommended Posts

Your script works for /bin/bash. By changing a few things that are bashisms (Bash specific), your script would be more portable. I'll post something when I get to a terminal at home.

What's wrong with bashisms? They exist to make shell scripting more convenient. I never intended this script for use outside of a modern GNU/Linux environment, but, honestly, OS X ships with BASH by default and it is easily installable on FreeBSD.

If it's in public domain it doesn't need one. Otherwise what gives? Can I modify and redistribute your code? If so in what terms?

Although I normally license BSD, since I did not give this script a license, you may use it in the public domain. I would appreciate some credit if you make a derivative, however.

That device you've showed there has the same flaw as cheap IDE or SATA drive write blockers, it only catches the most common write codes, so yeah, for the majority of the time you won't be able to write to it.

From doing forensics before, if you're worried about malware, you've just wasted your money.

I suspected this. Even though it claims ot block writes to the drive, it mightn't do a good job at it. Even with the write-blocker, comptuers might be able to overcome the blocker and infect your usb-sticks. You never know. To be really sure that nothing can be written, use a media that actually only have "1 write and that's it". like a CD-R.

I bought too much computer crap like this to know that you actually don't need these. They become dust-collectors after a few uses.

I bought too much computer crap like this to know that you actually don't need these. They become dust-collectors after a few uses.

Hmm... Darn, so much for that then. Well maybe i'll find some use for it. On the plus side, it's deductible :D

Hello,

It will be interesting to read your review on the device when it arrives. Do you think you could test it with a variety of file system formats and capacities of rewriteable media?

Regards,

Aryeh Goretsky

$160 is too much, for that price I could get 32 USB sticks prepared for potentially malware-infested systems and after 32 uses go and re-wipe and re-copy the software.

Or get a U3 device with a virtual CD drive and use a utility to write an ISO file to the USB drive which is read only

I tried finding some USB sticks with the write protect switch to use for installing our software on peoples (often virus filled) laptops in our training sessions. Optical discs are no good as the data it uses can be up to 20 GB. I found only one and it cost a fortune, so in the end we just went with SD cards (which do have write protect switches on them) with a USB card reader.

This thing would be interesting if it were, say, $140 cheaper.

Hello,

I would think of starting with a variety of internal commands and applications (DISKPART, FORMAT, DISKMGMT, Windows Explorer, the various Office applications, file archiving utilities, file management programs, etc.) just to see if there was any common programs behave differently. I'd also be interested to see if things like FAT12, FAT16, FAT32, NTFS, ExFAT make a difference. USB-wise, lots of USB flash drives (including older, smaller capacity ones, if possible), optical drives and even a floppy diskette drive, if you have one.

I know, it's a lot of work, but, it's an interesting subject!

Regards,

Aryeh Goretsky

Does anyone know of some software I can use to test the device which does unusual writes?

Does anyone know of some software I can use to test the device which does unusual writes?

Nope, you'd have to make your own or find malware that does it, normal everyday software isn't made to send spoof commands to bypass write protection bloks.

Nope, you'd have to make your own or find malware that does it, normal everyday software isn't made to send spoof commands to bypass write protection bloks.

I'm very curious as to what that would look like. Could you provide a code snipet that does what you are talking about? I did a quick Google search and couldn't find anything of the sort.

I'm very curious as to what that would look like. Could you provide a code snipet that does what you are talking about? I did a quick Google search and couldn't find anything of the sort.

ya me too

As said I'm no longer at the university so don't have any of the stuff and it's not likely to be just randomly around on the net. Look up spec sheets on USB specs and whatnot for things like 'null' data that the device ignores and if you've got the time and skill, put them into programs and try them.

  • 7 months later...

http://www.neowin.ne...-security-patch

and people wonder why I don't plug in USB drives into my system which are not write protected (Physical switch, and by write protected I mean write protected while inserted into a customers machine) and that I don't have control over. In this case it's modified USB descriptors, which I don't think malware can alter, this has been in windows for quite some time. What else don't we know about.

Hello,

From my reading of the article, it appears this vulnerability occurs at the a USB flash drive is enumerated, e.g., identified by the system. I do not think protecting against writes to USB flash drives would, in this case, have any effect, since the operation occurs when the drive is read from and not written to. What this attack actually reminds me of are similar exploits which were (or are) used against FireWire.

Your point about trusting external media is quite valid, and users with earlier versions of Microsoft Windows should verify AutoRun is turned off and fully patched. While that certainly won't stop all attacks, it will, at least, improve security.

Regards,

Aryeh Goretsky

http://www.neowin.ne...-security-patch

and people wonder why I don't plug in USB drives into my system which are not write protected (Physical switch, and by write protected I mean write protected while inserted into a customers machine) and that I don't have control over. In this case it's modified USB descriptors, which I don't think malware can alter, this has been in windows for quite some time. What else don't we know about.

It's a bit of a call back, but this caught my eye.

lolwut... optical drives? it hurts my brain just thinking about it.

slow burn time... no/slow rewrite... not to mention that many machines now have no optical drives.

That's basically a point, with a CD-R you can't change the disk contents, i.e. malware can never attack it. Get a USB optical drive (I got one for like $20 months back to replace the dead drive in my Mac Mini) and a burnt CD with rescue tools/a live Linux install and work on just about anything (Y)

Hello,

From my reading of the article, it appears this vulnerability occurs at the a USB flash drive is enumerated, e.g., identified by the system. I do not think protecting against writes to USB flash drives would, in this case, have any effect, since the operation occurs when the drive is read from and not written to. What this attack actually reminds me of are similar exploits which were (or are) used against FireWire.

Your point about trusting external media is quite valid, and users with earlier versions of Microsoft Windows should verify AutoRun is turned off and fully patched. While that certainly won't stop all attacks, it will, at least, improve security.

Regards,

Aryeh Goretsky

I know the vulnerability does not care if the USB device is write protected or not. By write protection I meant it would stop the USB device from getting infected on the customers machine in the first place.. if that was possible.

How about a better idea and NOT use USB drives in infected machines. Burn a CD with whatever utilities that you need. ZERO chance of infection.

Better still, buy an ISOStick or Zalman's ZM-VE300 HDD enclosure. Both have write protect switches.

  • Like 2

Better still, buy an ISOStick or Zalman's ZM-VE300 HDD enclosure. Both have write protect switches.

OMG Thank you for letting me know about the ISOstick. It looks AMAZING! Ordered one!

Other way around, the USB device isn't what's being attacked, it's what's doing the attacking, they adjusted what information the chipset sends to the host to exploit a flaw in how it parsed that information.

Correct. I didn't say it was. What I meant was, if it was at all possible for a virus to modify the chips firmware to make a stick which would attack, then a write protection should might be useful on it to stop it from modified.

Hello,

Kanguru is one of the few USB flash drive manufacturers that still makes models with a hardware write-protect switch.

Of course, you could also use an SDHC Card (which has a hardware write-protection switch) in a card reader, but from looking at this Wikipedia article, it's not clear to me how permanent setting the switch is on an SDHC Card, as it appears there may be a way to bypass it. The article is a little ambiguous about the details, though.

There are also several programs one can run which place a "garbled" entry for an AUTORUN.INF file on a USB flash drive. While I do not know for certain how effective this is in the real world, as anything which is done in software can be undone in software, it should prove effective against at least some worms which spread via USB drive in that fashion. Both BitDefender and Panda Security have free programs which perform this operation.

Regards,

Aryeh Goretsky

This topic is now closed to further replies.
  • Posts

    • Good review, and yeah the benchmark breakdown is pretty clear but also a little messy in a good way. It’s kinda interesting to see where the RX 9070 GRE slides in between the 7800 XT and the 9070 XT , especially when it comes to AI tasks and Blender style workloads. The side by side with Nvidia’s RTX 5070 and 4070 makes it feel obvious just how competitive the mid range GPU scene has gotten lately, and that’s great for creators and gamers too since you can pick based on your priorities rather than only chasing one single thing.
    • That's it. I finally uninstalled Firefox because they often keep pushing buggy updates, only to test them later and make users suffer. No longer is it my alternative browser to Edge. What a waste of energy. Firefox is bad for the environment, just like Chrome (wasting RAM/energy).
    • Microsoft Weekly: new Surface, Windows 11 26H2, and more by Taras Buria This week's news recap is here, with Microsoft announcing Windows 11 version 26H2, launching new Surface devices powered by Snapdragon X2 processors, GTA VI preorder date and cover art, fresh Windows 11 preview builds, a quirky phone-sized e-reader with a physical dial, and more. Quick links: Windows 10 and 11 Windows Insider Program Updates are available Reviews are in Gaming news Great deals to check Windows 11 and Windows 10 Here, we talk about everything happening around Microsoft's latest operating system in the Stable channel and preview builds: new features, removed features, controversies, bugs, interesting findings, and more. And, of course, you may find a word or two about older versions. Windows 11 version 26H2 is now official. Alongside Windows 11's new preview builds released this week, Microsoft confirmed version 26H2, which is coming later this year as an enablement package based on the same platform as versions 24H2 and 25H2. A newly published blog post details what IT admins should do to prepare for the upcoming launch. Next, we have new Windows 11 bugs. Users report that this month's security updates for Windows 11 cause all sorts of issues, including BitLocker bugs, OneDrive issues, black screens of death, and third-party integration in Office apps. Microsoft has not confirmed those yet, but it acknowledged other issues with its operating system. What Microsoft has confirmed is a bug where Recycle Bin delete prompts display internal file names instead of actual ones, and a year-old Windows JScript compatibility bug caused by security-focused engine changes. Moving to more positive news, Microsoft and Adobe are working on improving Windows performance in popular creative apps like Photoshop. Thanks to SPGO optimizations, users can expect up to 20% better performance. Finally, we have a few useful articles that can help you recover your PC or make it perform better. For one, we published a guide detailing what to do if your computer cannot boot after a clean Windows 11 install. There are two important steps you can try to get your system back to working in no time. Additionally, there is a more detailed guide on various CPU performance modes that could notably improve performance. Windows Insider Program Here is what Microsoft released for Windows Insiders this week: Builds Canary Channel Builds 28120.2315 and 29613.1000 These two builds include a new built-in audio driver, improvements to audio Settings, and more. Dev Channel Builds 26300.8697 and 26220.8690 Not much is available here. Some File Explorer improvements, Start menu enhancements, bug fixes, and more. However, build 26300.8697 is now officially marked as version 26H2. Updates are available This section covers software, firmware, and other notable updates (released and coming soon) delivering new features, security fixes, improvements, patches, and more from Microsoft and third parties. This week, Microsoft announced its newest Surface devices powered by Qualcomm's latest Snapdragon X2 processors. There is the 12th-gen Surface Pro and the 8th-gen Surface Laptop. Both devices feature little to no visual differences compared to their predecessors from 2024, and most changes hide inside, including a better processor, faster graphics, enhanced NPUs, and more. The Surface Laptop also received a new haptic trackpad. Mozilla is currently working on a major Firefox redesign, and earlier this week, it published a roadmap of upcoming features and highlights of the upcoming "Project Nova" rework. Files, one of the best file managers for Windows 10 and 11, has been updated in the Preview channel with a long-requested feature. Tree View is finally available in version 4.1.4, allowing you to quickly browse deeply nested folders without leaving the main view. In addition, the update improved the Windows Fonts folder, allowing you to preview each font without opening the default viewer. Rufus, another useful Windows 11 utility, also received a notable update. Version 4.15 arrived as beta with important fixes for silent Windows 11 installation. It also includes patches for ARM-based Windows PCs, OneDrive removal improvements, and more. Here are other updates and releases you may find interesting: Microsoft faces shareholder lawsuit over masking AI costs and slowing Azure growth Microsoft now allows you to tweak Visual Studio to new extremes Microsoft brings Planner Agent to all Microsoft 365 Copilot users Microsoft fixes one of Excel Copilot's most frustrating limitations Microsoft will finally let you sign in to Edge with a Google account Here are the latest drivers and firmware updates released this week: NVIDIA 610.62 with support for Empulse and various fixes. Reviews are in Here is the hardware and software we reviewed this week Earlier this week, we reviewed the DuRoBo Krono, a portable, phone-sized e-reader with some interesting physical controls. This device has an Apple Watch-like dial for page turning, frontlight adjustment, and more. Software is simple and no-nonsense, but it also lacks some useful features and customization. Overall, the device proved interesting, but not flawless. On the gaming side Learn about upcoming game releases, Xbox rumors, new hardware, software updates, freebies, deals, discounts, and more. Forza Horizon 6 received two big updates this week. Alongside the Series 2 content update, developers pushed plenty of bug fixes and balancing tweaks. However, they also had to acknowledge the Eliminator CR-farming exploit and shut down the online mode temporarily. Luckily, only a few days later, another fix arrived, which re-enabled Eliminator and patched the exploit. Microsoft announced new games for Game Pass subscribers. Those include EA Sports FC 26, Junkster, Call of Duty: Vanguard, Abyssus, RV There Yet?, and more. Some existing games are leaving the catalog, so be sure to check out the full list here. New games are also available for GeForce NOW subscribers, and they include Embers of the Uncrowned Demo, Aphelion, Megastore Simulator, OPERATOR, Citizen Sleeper, and more. Rockstart Games had plenty of GTA-related news this week. For one, the company gave GTA V players another free update. Those still playing the game on Xbox One and PlayStation 4 are no longer required to pay $40 to upgrade to the latest-gen version. More importantly, Rockstar Games revealed the GTA VI cover art and announced the preorder date. The Epic Games Store is giving away two games: Citizen Sleeper and Roboeat. These two titles are up for grabs until next Thursday, but if they are not up to your taste, you can always check out the latest Weekend PC Game Deal issue, which is usually full of discounts and specials that let you save a lot of money on new games. Great deals to check Every week, we cover many deals on different hardware and software. The following discounts are still available, so check them out. You might find something you want or need. GEEKOM X16 Pro at GEEKOM - $1,119.67 | 17% off Acer 4K Webcam for PC/Mac with All-Metal Unibody Sculpted - $59.99 | 14% off Samsung 990 PRO SSD 2TB - $369.99 | 42% off Nothing Ear Wireless Earbuds Bluetooth - $73.15 | 51% off PowerColor Reaper AMD Radeon RX 9070 16GB - $579.99 | 17% off This link will take you to other issues of the Microsoft Weekly series. You can also support Neowin by registering for a free member account or subscribing for extra member benefits, along with an ad-free tier option.
    • Weekend PC Game Deals: Cyberpunk 2077, Split Fiction, Sonic Racing, and more by Pulasthi Ariyasinghe Weekend PC Game Deals is where the hottest gaming deals from all over the internet are gathered into one place every week for your consumption. So kick back, relax, and hold on to your wallets. The Epic Games store brought along two games from wildly different genres this week for PC gamers to claim. Robobeat is a rhythm-based action game that lets you become a bounty hunter that can wall run, slide, and bunny hop around his opponents. All you have to do is stick to the beat for the built-in or custom songs. Next, Citizen Sleeper is a sci-fi RPG adventure taking place in a ruined space station. It uses tabletop RPG-inspired elements like dice rolls and timers to change up how players approach its activities, factions, and storylines. The Citizen Sleeper and Robobeat giveaways end on June 25. On the same day, RollerCoaster Tycoon 3 and Voidwrought will become the next freebies. The bundle space expanded with two more collections from Humble this week too. The June 2unes bundle is up first, carrying plenty of rhythm games. This carries Kill the Music and Rhythm Witch in the $5 starting tier, followed by Trombone Champ, Spin Rhythm XD, and Thumper in the $7 tier. Paying at least $12 gets you the complete bundle, which adds on Kalpa: Cosmic Symphony, Everhood 2, NOISZ, and Sixtar Gate: StarTrail. The next bundle is for virtual reality fans. This carries Among Us 3D: VR and Zero Caliber VR for $10. The next tier brings in Tactical Assault VR, Ancient Dungeon, and Arizona Sunshine Remake for $15. VTOL VR, Zero Caliber 2 Remastered, Metro Awakening, and Thief VR land to finish things off for $18. Free Events It's a big week for free event fans, as Valve kicked off another one of its Next Fest events. This one carries thousands of gameplay slices from upcoming indie games The promotion is set to run until June 22. Standard free events are also ongoing this weekend. This includes the sci-fi grand strategy experience Stellaris from Paradox and the hit SEGA management game Two Point Museum. Asymmetric multiplayer horror title Dead by Daylight and the hit mech shooter MechWarrior 5: Mercenaries are also free-to-play over the weekend. Big Deals The Steam Summer Sale is a week away from launch, but there are plenty of publishers already putting their wares on sale to prepare for the event. Here's our hand-picked big deals list for this weekend: Battlefield 6 – $34.99 on Steam Sonic Racing: CrossWorlds – $34.99 on Steam Split Fiction – $32.49 on Steam Arma Reforger – $27.99 on Steam Sniper Elite: Resistance – $24.99 on Steam DayZ – $22.49 on Steam Two Point Museum – $20.09 on Steam Atomfall – $19.99 on Steam No More Room in Hell 2 – $19.49 on Steam Cyberpunk 2077 – $17.99 on Steam Sonic Frontiers – $17.99 on Steam Dinkum – $15.99 on Steam Stellaris – $14.99 on Steam Hi-Fi RUSH – $14.99 on Steam My Little Puppy – $14.99 on Steam FINAL FANTASY XII THE ZODIAC AGE – $14.99 on Steam SONIC X SHADOW GENERATIONS – $14.99 on Steam EA SPORTS FC 26 – $13.99 on Steam STAR WARS Jedi: Survivor – $13.99 on Steam FINAL FANTASY VII REMAKE INTERGRADE – $13.99 on Steam FINAL FANTASY XV – $13.99 on Steam It Takes Two – $11.99 on Steam FINAL FANTASY X/X-2 HD Remaster – $11.99 on Steam Axiom Verge 2 – $9.99 on Steam [REDACTED] – $9.99 on Steam Sniper Elite 5 – $9.99 on Steam Holdfast: Nations At War – $9.99 on Steam Arma 3 – $8.99 on Steam The Callisto Protocol – $8.99 on Steam A Way Out – $8.99 on Steam LIGHTNING RETURNS: FINAL FANTASY XIII – $7.99 on Steam MechWarrior 5: Mercenaries – $7.49 on Steam Slackers - Carts of Glory – $7.14 on Steam MIMESIS – $6.99 on Steam Need for Speed Unbound – $6.99 on Steam FINAL FANTASY XIII – $6.39 on Steam Sniper Elite 4 – $5.99 on Steam Tyranny – $5.99 on Steam Immortals of Aveum – $5.99 on Steam Far Cry 3 – $4.99 on Steam Zombie Army 4: Dead War – $4.99 on Steam Sonic & All-Stars Racing Transformed Collection – $4.99 on Steam Mass Effect Legendary Edition – $4.79 on Steam Titanfall 2 – $4.49 on Steam SimCity 4 Deluxe Edition – $3.99 on Steam Far Cry 3 - Blood Dragon – $3.74 on Steam Wreckfest – $2.99 on Steam Crime Boss: Rockay City – $1.99 on Steam theHunter: Call of the Wild – $1.99 on Steam The Saboteur – $1.99 on Steam Battlefield 1 – $1.99 on Steam Sonic Mania – $1.99 on Steam Golf With Your Friends – $1.49 on Steam Sid Meier's Alpha Centauri Planetary Pack – $0.99 on Steam Dungeon Keeper 2 – $0.99 on Steam Populous: The Beginning – $0.99 on Steam Citizen Sleeper – $0 on Epic Store ROBOBEAT – $0 on Epic Store DRM-free Specials The DRM-free store GOG has already kicked off its own summer sale. Here are some highlights: S.T.A.L.K.E.R. 2: Heart of Chornobyl - $41.99 on GOG Indiana Jones and the Great Circle - $41.99 on GOG Cronos: The New Dawn - $35.99 on GOG SILENT HILL 2 - $34.99 on GOG SILENT HILL f - $34.99 on GOG Kingdom Come: Deliverance II - $29.99 on GOG MENACE - $29.99 on GOG Cairn - $23.99 on GOG Frostpunk 2 - $22.49 on GOG The Alters - $20.99 on GOG Resident Evil Classic Bundle - $20.99 on GOG System Shock 2: 25th Anniversary Remaster - $17.99 on GOG Banishers: Ghosts of New Eden - $16.99 on GOG Legacy of Kain: Defiance Remastered - $16.25 on GOG METAL EDEN - $15.99 on GOG REPLACED - $15.99 on GOG Hollow Knight: Silksong - $14.99 on GOG Tomb Raider I-III Remastered Starring Lara Croft - $11.99 on GOG Chants of Sennaar - $11.99 on GOG Alpha Protocol - $9.99 on GOG DREDGE - $9.99 on GOG Crow Country - $9.99 on GOG Warhammer 40,000: Dawn of War - Anniversary Edition - $2.99 on GOG Keep in mind that availability and pricing for some deals could vary depending on the region. That's it for our pick of this weekend's PC game deals, and hopefully, some of you have enough self-restraint not to keep adding to your ever-growing backlogs. As always, there are an enormous number of other deals ready and waiting all over the interwebs, as well as on services you may already subscribe to if you comb through them, so keep your eyes open for those, and have a great weekend.
  • Recent Achievements

    • Week One Done
      Genuinetonerink- Dubai earned a badge
      Week One Done
    • One Month Later
      Genuinetonerink- Dubai earned a badge
      One Month Later
    • One Year In
      hhgygy earned a badge
      One Year In
    • One Month Later
      AMV earned a badge
      One Month Later
    • Week One Done
      AMV earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      514
    2. 2
      +Edouard
      171
    3. 3
      PsYcHoKiLLa
      84
    4. 4
      Steven P.
      74
    5. 5
      Michael Scrip
      72
  • Tell a friend

    Love Neowin? Tell a friend!