Score:0

can not format the USB flash with Trojan ( write protected USB)

cn flag

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.

David avatar
cn flag
I do not see any info in your question that tells me you have a trojan. Please explain why you think you do.
cn flag
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!
David avatar
cn flag
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.
sudodus avatar
jp flag
1. 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](https://askubuntu.com/questions/144852/cant-format-my-usb-drive-i-have-already-tried-with-mkdosfs-and-gparted/933035#933035), and if you are lucky, find a solution.
sudodus avatar
jp flag
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.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.