Jump to content











Photo
- - - - -

How to write protect pendrive


  • Please log in to reply
4 replies to this topic

#1 pazhanii

pazhanii

    Member

  • Members
  • 58 posts
  • Location:India
  •  
    India

Posted 14 October 2016 - 08:31 AM

Hai,

       I have been using windows installation windows 7,8,10 all in one iso using rufus from usb. At times the installation files get corrupted by somehow. Can usb write protected in easy way?

 

I googled but can't find a way eay way to do it.

 

 



#2 Chandra-Orbit

Chandra-Orbit

    Member

  • Members
  • 31 posts
  • Location:Jakarta, Indonesia
  • Interests:I am just a person who likes to learn about life and life itself
  •  
    Indonesia

Posted 29 December 2016 - 12:35 PM

you can use the diskpart and run a batch file

 

sorry my english is bad.. :rolleyes:  :rolleyes: iam from indonesian.

 

this sample script with bath command, 

save to bat, and copy to your USB

simple just doble clik for lock and unlock

 

@echo off

TITLE SHADOW DAN LOCK USB DRIVES
::~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
::Put the name of flash drive here... (Case-sensitive)
set "name=Your USB Label"
set /a time=15
::~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
::Detect that Partition drive using DiskPart...
set "disk_num="
for /f "tokens=1-2 delims= " %%A in (
   '^(echo list disk^)^|diskpart^|findstr /ic:"Online"'
) do (
   for /f "tokens=1-4 delims= " %%W in (
      '^(echo select disk %%B^&echo detail disk^)^|diskpart^|findstr /ic:"Partition" /ic:"Removable"'
   ) do (
      if "%%Z"=="%name%" set "disk_num=%%B"
   )
)
if not defined disk_num (
echo.
echo                              ::...WARNING...::
echo                              =================
echo.
echo ERROR...! Maaf '%name%' tidak ditemukan dalam system komputer Anda.
echo.
echo Lakukan Update dan pastikan '%name%' terpasang dengan benar.
echo.
pause & goto :keluar
)
 
::~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
::Get and set the setting...
for /f "tokens=1-2 delims=: " %%F in (
   '^(echo select disk %disk_num%^&echo attribute disk^)^|diskpart^|findstr /bic:"Read-Only"'
) do (
   set "ro_state=%%G"
)
 
if /i "%ro_state%" equ "No" (
   (echo select disk %disk_num%&echo attribute disk set readonly)|diskpart >nul
 
 
:tutup
REM melakukan proteksi terhadap USB Devices
echo.
echo                        ::Shadow and Lock USB Drives::
echo                     ====================================
echo.
echo.
echo CATATAN :
echo.
echo - Jika proses proteksi '%name%' sudah selesai silahkan cabut dari komputer Anda,  dan pasang lagi untuk memaksimalkan hasil. 
echo.
echo - %name% yang terprotek maka semua perubahan data tidak akan berpengaruh.
echo ===============================================================================
echo.
echo.
echo Proteksi '%name%' sedang berjalan. Silahkan tunggu sebentar... %time%.
ping localhost -n 2 >nul
set /a time=%time%-1
if %time%==0 (
goto :keluar
)else goto :tutup
 
) else (
   (echo select disk %disk_num%&echo attribute disk clear readonly)|diskpart >nul
:buka
REM membuka proteksi terhadap USB Devices
echo.
echo                  ::Open Shadow and Open Lock USB Drives::
echo               ==============================================
echo.
echo.
echo CATATAN :
echo.
echo - Jika proses membuka proteksi %name% sudah selesai silahkan cabut dari komputer Anda,  dan pasang lagi untuk memaksimalkan hasil.
echo.
echo - %name% yang sudah tidak terproteksi maka semua perubahan dapat dilakukan.
echo ===================================================================================
echo.
echo.
echo Membuka Proteksi '%name%' sedang berjalan. Silahkan tunggu sebentar... %time%.
ping localhost -n 2 >nul
set /a time=%time%-1
if %time%==0 (
goto :keluar
)else goto :buka
)
 
:keluar
exit /b


#3 Guest_AnonVendetta_*

Guest_AnonVendetta_*
  • Guests

Posted 29 December 2016 - 04:00 PM

There is no software solution that can effectively prevent all other software from writing. If someone really wants to tamper with the contents, they will find a way. Best best, I think, buy a write blocking device, connect your drive to that, and filter everything through it. The write blocker acts as a middle man. Picture say, a nuclear power plant, which is heavily surrounded by all kinds of physical security, to prevent things like outside breaches, terrorist attacks, etc. Or Fort Knox, where a good portion of the US's gold bullion is stored, that backs currency in circulation. Simply put, you'll have to go through the military to get to the gold, a suicide mission.



#4 Elmis

Elmis
  • Members
  • 5 posts
  •  
    Latvia

Posted 30 December 2016 - 09:22 AM

There is no software solution that can effectively prevent all other software from writing.

It’s not truth because I have and use fake USB sticks (with FC8908 chips) with real write protection (with HDD LLF Tool it is impossible to destroy any file on my USB sticks).

Software can be easily downloaded (for my sticks - FC MpTool_D3eD3_v05.02.04).

 USB sticks I reprogrammed with ECC=0 – as result from fake 32GB I have 1.3 to 2.7GB sticks.

For write protection I made few (about three) corrections in FC MpTool.ini, rewrite back USB stick image file with activated write protection in .ini file and that’s all.

For using USB sticks as source for program files I use md5summer.exe - for checking MD5 sums.

Easiest way for write protection is using SDHC card with write protect switch and card reader (I newer have corrupted or rewritten files when I use Transcend 600X card + TS-RDF5) 



#5 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 30 December 2016 - 11:38 AM

It’s not truth because I have and use fake USB sticks (with FC8908 chips) with real write protection (with HDD LLF Tool it is impossible to destroy any file on my USB sticks).

Software can be easily downloaded (for my sticks - FC MpTool_D3eD3_v05.02.04).

 USB sticks I reprogrammed with ECC=0 – as result from fake 32GB I have 1.3 to 2.7GB sticks.

For write protection I made few (about three) corrections in FC MpTool.ini, rewrite back USB stick image file with activated write protection in .ini file and that’s all.

For using USB sticks as source for program files I use md5summer.exe - for checking MD5 sums.

Easiest way for write protection is using SDHC card with write protect switch and card reader (I newer have corrupted or rewritten files when I use Transcend 600X card + TS-RDF5) 

Sure :).

But they are actually firmware mods, you are telling the USB controller to behave as read only :thumbsup: , what syahendra posted is a "higher level" software provision, that doesn't actually work to make the stick "read only", it makes the booted OS believe that the stick is read only, but - say - direct disk access will most probably still work and anyway until you run the batch the USB is R/W, so it is not a "proper solution"..

 

Most controllers have (relatively simple) ways to make two LUN's, the first one being a CD-like device (and thus read-only) and the second a "normal" R/W volume, but actually amking them depends on the specific controller and on the availability of the right "Manufacturer Tool", and it has to be seen how the whole thing would be compatible with the Rufus based setup the OP talked about, I doubt that combining the two falls under the "easy way" category that was requested by the OP.

 

It goes without saying that a USB stick should not get corrupted anyway and that if this happens more often than once in a lifetime (accidentally) the reason why it gets corrupted should be looked for and corrected, besides using the (IMHO non-easy) workaround of write-protecting the stick through the controller firmware settings like you reported.

 

:duff:

Wonko 


  • Chandra-Orbit likes this




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users