0

My USB have had many files with write protected permission and those are some Trojan, so I have tried the belewo methods :

sudo hdparm -r0 /dev/sdb1

/dev/sdb1: setting readonly to 0 (off) readonly = 0 (off)

enter image description here

and tried this instruction:

sudo fsck -n /dev/sdb1

And get the below result which is taking many minutes for ending and I stopped it by pressing ctrl+shift+z, which could be seen at here with more details:

enter image description here

So I asked here for finding some way to format this strange USB drive.

Update 1:

Base of the first comments, I added the reason for thinking I have one some Trojan in my USB flash Storage :

Node32 in windows said it have had some Trojan which I don't remember its name, another reason for thinking it has some Trojan it's Chinese strange file name because I don't have any chines file on my USB flash storage!

Update 2:

based of 4th comment, I have tried to use the mkusb as said at here:

enter image description here

But it has been failed and get the below errors (more information could be seen here):

enter image description here

Also, the mkusb has failed in formatting the USB flash by selecting the first option, as you can see below: enter image description here Thanks.

Soheil Paper
  • 1,417
  • I do not see any info in your question that tells me you have a trojan. Please explain why you think you do. – David Sep 29 '21 at 10:14
  • Node32 in windows said it have had some Trojan which I don't remember its name, another reason for thinking it has some Trojan it's Chinese strange file name because I don't have any chines file on my USB flash storage! – Soheil Paper Sep 29 '21 at 10:19
  • I would not believe any thing a Windows program said about files in a Ubuntu system. Also this comment should be in the question not afterwards as a comment. – David Sep 29 '21 at 10:21
  • In the future, please avoid using hdparm on USB drives. It can cause severe problems; 2. When you are afraid of malware, you can try to overwrite the whole drive with zeros, 'wipe the drive'. If the drive is still seen as a mass storage device, it can be done with mkusb. You can analyze the problem according to this link, and if you are lucky, find a solution.
  • – sudodus Sep 29 '21 at 10:39
  • This output to the mkusb console: "dd: failed to open '/dev/sdc': Read-only file system Warning: Unable to open /dev/sdc read-write (Read-only file system)." makes me think that the USB pendrive might be 'gridlocked', damaged beyond repair. But there are still things to do: The link in my previous comment has a list of tips, that you can try when the drive is read-only: mechanical switch, reboot, disconnect other USB devices, try other USB ports, try another computer, try another operating system. If still no luck, your USB pendrive is probably damaged beyond repair. – sudodus Sep 29 '21 at 14:57