Wipe a USB stick with LUKS encryption - no passphrase

Anything related to hardware (CPU/MoBo/Video/FSB/BIOS, etc.), hardware settings, overclocking, cooling, cool cases, case mods, hardware mods, post pics of your unique creations here.
Post Reply
User avatar
Norm
SG VIP
Posts: 14195
Joined: Tue Mar 27, 2001 12:00 pm

Wipe a USB stick with LUKS encryption - no passphrase

Post by Norm »

I'm stumped.

I have 2 64gb USB sticks that are a few years old and I want to use them with my new raspberry pi 4b 8gb.
Building a mobile PC with onboard power for use travelling on my bike.

The problem is, I encrypted them both using LUKS when installing Linux long ago.
I tried every password I may have used (and variations), no luck.
I've tried off and on for the last 2 years to search for answers. Got many, tried them all, no luck.
Once LUKS is used, the sticks are unreadable, or writeable without the passphrase.
Super security
Not sure it's even possible. But I never give up...

I don't need any of the data, files etc. I just want use of the usb sticks again.

Anyone know of a sure fire method to clean these sticks, and use them again?
User avatar
Philip
SG VIP
Posts: 11527
Joined: Sat May 08, 1999 5:00 am
Location: Jacksonville, Florida

Post by Philip »

I don't know that much about LUKS, but I think you should still be able to delete partitions, and reformat the drive, provided the sticks are not corrupt ? There are many small third-party programs for Windows that repartition flash drives (other than the obvious windows tools and diskpart), what have you tried as far as partitioning/formatting?
User avatar
Norm
SG VIP
Posts: 14195
Joined: Tue Mar 27, 2001 12:00 pm

Post by Norm »

Philip wrote:I don't know that much about LUKS, but I think you should still be able to delete partitions, and reformat the drive, provided the sticks are not corrupt ? There are many small third-party programs for Windows that repartition flash drives (other than the obvious windows tools and diskpart), what have you tried as far as partitioning/formatting?
I'd like to say I've tried "everything" Philip, because it sure feels that way.
Here's the main ones. Diskpart, Gparted, Udisks, Fdisk and many other Linux partitioning and usb disk wiping tools.
I have tried from boot disks, from Linux, and from Windows.
I even had a boot disk whose sole purpose was for this very reason, can't remember the name now.
It even showed how it was checking file system, finding bad sectors, and fixing them as it wiped out ALL the partitions.
When I placed the usb sticks in the PC later, not one partition had been removed, let alone fix anything.

Every partitioning tool I tried locked up.
If I try to write a Linux ISO to them, the writer locks up.
If I try to install Linux to them as an OS, instead of a boot disk, the installer locks up.

I've tried dd, cryptsetup. I even found a hacker's article on how to use hash to bruteforce the header. No luck for me there, though it does work for some and beats the encryption by trying variations of possible passwords from a list you provide.
It kind of mixes up the letters to form alternate passwords, but in my case it couldn't get past the first try, let alone run for days trying.

You may be right, as I've also suspected, they could be corrupt, but both at the exact same time not only seems odd, but improbable as well.

Hey, thanks for giving it a shot Philip. I appreciate your help.
I've done far far more than described above, but memory of all of it is dimming :)

If I can't use them again, no big deal really. USB sticks aren't all that expensive in the 64gb range now, but I just hate when something beats me when it's computer related lol rarely do I ask for help other than searches.
So when I say "everything, I believe everything was tried, but was hoping I missed the one thing someone else knows about that I missed.

Thanks again my friend. If I do find a way, I'll post back here how it was done.
User avatar
Norm
SG VIP
Posts: 14195
Joined: Tue Mar 27, 2001 12:00 pm

Post by Norm »

BTW -

It's also good to know that when you encrypt a drive with LUKS (which is what many Linux distros do if chosen while installing)
You can rest assured your data is safe from prying eyes. Even your own eyes if you forget your passphrase :D
User avatar
Mark
Posts: 13232
Joined: Wed Apr 11, 2001 12:00 am
Location: .

Post by Mark »

what about using something like dban to wipe the thumbdrive, not sure if that works on them ??
User avatar
Mark
Posts: 13232
Joined: Wed Apr 11, 2001 12:00 am
Location: .

Post by Mark »

or something like killdisk

https://www.killdisk.com/eraser.html
7950x~64GBGskill6000~asusx670e~rx6800~2TBNvme-OS drive~4TB-Nvme-scratch~500GB-SSD-thrash~10TB storage~Windows 10
User avatar
Norm
SG VIP
Posts: 14195
Joined: Tue Mar 27, 2001 12:00 pm

Post by Norm »

Mark wrote:or something like killdisk

https://www.killdisk.com/eraser.html
I hadn't tried dban until you posted it, but then I did try it, and without luck.
It didn't work at all. I made two different boot usb sticks using 2 different disk writers, and couldn't find a bootable device when booted. Not sure why, maybe it's x86 not amd64. I've tried many like it though Mark, and still no luck with anything.
Even from many bootable Linux repair disks and no luck.
It is as though a hardware switch has been set to disallow any reading or writing.
It really has me stumped. Maybe it is corrupt, who knows.
I did get one more clue last night using a boot repair disk. The information in the MFT doesn't match the header.
maybe someday I'll go at it again. I'm a bit pissed right now because(my fault) while attempting to delete partitions on the usb I missed an entry, and deleted my Win 10 partition and lost a lot of new work with no backups made yet.

Thanks for trying though my friend.
btw - I know I know you from many moons ago, but I think you changed your name during the name change craze and I lost track of Who you were along with many other members. Who were you before Mark?
User avatar
Philip
SG VIP
Posts: 11527
Joined: Sat May 08, 1999 5:00 am
Location: Jacksonville, Florida

Post by Philip »

Sorry to hear you wiped a wrong partition Norm, ouch :/

Name changes --> ;) showthread.php?128100-Name-Changes
Linux is user friendly, it's just picky about its friends...
Disclaimer: Please use caution when opening messages, my grasp on reality may have shaken loose during transmission (going on rusty memory circuits). I also eat whatever crayons are put in front of me.
๑۩۞۩๑
User avatar
Philip
SG VIP
Posts: 11527
Joined: Sat May 08, 1999 5:00 am
Location: Jacksonville, Florida

Post by Philip »

Just overwriting the first few megabytes of the stick with random data should render LUKS useless, even if it is preventing formatting tools.

Theoretically, in Linux you should be able to do a few dirfferent things, first try wiping it clean with:
wipefs -a /dev/sdXMYUSBDRIVE
and then partition+format it.

Also, you can write random data to the USB to nuke LUKS with something like:
dd if=/dev/urandom of=/dev/sdXMYUSBDRIVE bs=1M count=10
Linux is user friendly, it's just picky about its friends...
Disclaimer: Please use caution when opening messages, my grasp on reality may have shaken loose during transmission (going on rusty memory circuits). I also eat whatever crayons are put in front of me.
๑۩۞۩๑
User avatar
Norm
SG VIP
Posts: 14195
Joined: Tue Mar 27, 2001 12:00 pm

Post by Norm »

Thanks for the link. Bookmarked!

I lost track of all the name changes and gave up trying as people kept changing.

The data loss was bad, but most of my best work is on my Linux box. I used Win 10 for testing, but some of the code I wrote with JB is there, gone. I can re-write it though. Mostly experimental stuff anyway.

When I saw your name change link at first I thought you were telling me I needed a name change lol
cluts :D
User avatar
Norm
SG VIP
Posts: 14195
Joined: Tue Mar 27, 2001 12:00 pm

Post by Norm »

Philip wrote:Just overwriting the first few megabytes of the stick with random data should render LUKS useless, even if it is preventing formatting tools.

Theoretically, in Linux you should be able to do a few dirfferent things, first try wiping it clean with:
wipefs -a /dev/sdXMYUSBDRIVE
and then partition+format it.

Also, you can write random data to the USB to nuke LUKS with something like:
dd if=/dev/urandom of=/dev/sdXMYUSBDRIVE bs=1M count=10
I've tried both methods more than once and variations too, no luck. Sometimes some methods "seem" to work as they go about trying, even reporting everything went smooth. But in the end the sticks don't change at all. I can mount the first partition, but I may have (early on) wiped the files that held the passphrases. I'm going to let it go for now. if/when I get the urge to wipe Windows I'll go at it again :D
User avatar
Philip
SG VIP
Posts: 11527
Joined: Sat May 08, 1999 5:00 am
Location: Jacksonville, Florida

Post by Philip »

Wiping Windows is a pain if you lost files :/

You can always destroy them by throwing them in the microwave for 30 seconds, or lightly sauté them in a frying pan (if you only plan to use them as doorstops) ;)
User avatar
Easto
SG Elite
Posts: 5755
Joined: Sat Dec 02, 2000 12:00 am
Location: So. California

Post by Easto »

Would passing a very strong magnet over them accomplish anything?
User avatar
Norm
SG VIP
Posts: 14195
Joined: Tue Mar 27, 2001 12:00 pm

Post by Norm »

No, it wouldn't Easto. That may have worked with older spinning HD's

In fact I tried it to be sure when I read your post.

Thanks for taking the time to think of something that may help my friend.

I'm looking into sulphuric and hydrochloriic acid to see which one is faster :)
Post Reply