News for hackers. Stuff that matters.
Re:Daytripper by jonas21 on Monday September 09, 2019 @02:44PM (#20921014)
I bet Ross Ulbricht wishes he had this.

(context) https://www.businessinsider.com/the-arrest-of-silk-road-mast...

Re:Daytripper by jszymborski on Monday September 09, 2019 @03:09PM (#20921251)
> * Execute a custom script

  rm -rf /*
Re:Daytripper by kempbellt on Monday September 09, 2019 @04:48PM (#20922315)
Reading this written on a screen stresses me out a little bit. Just knowing that you likely typed those letters on your keyboard...
Re:Daytripper by zelly on Monday September 09, 2019 @06:22PM (#20923134)
why? the data is easily recoverable.

    # dd if=/dev/zero of=/dev
now that's more like it.
Re:Daytripper by dan000892 on Monday September 09, 2019 @08:50PM (#20924129)
dd's destruction is gated by the device's write performance and so data may be recoverable if the operation is interrupted.

For those of us with SSDs that transparently leverage AES encryption, the following generates a new keypair and marks all cells as empty instantly nuking it (and restoring the device's write performance to factory-fresh):

  # hdparm --user-master u --security-set-pass p /dev/sdX; hdparm --user-master u --security-erase-enhanced p /dev/sdX
More info on the ATA Secure Erase instruction and how to tell if your storage device supports it can be found here: https://ata.wiki.kernel.org/index.php/ATA_Secure_Erase
Re:Daytripper by komali2 on Monday September 09, 2019 @05:29PM (#20922656)
I read somewhere this doesn't really work anymore on common distros for reasons I don't remember. Not that I'm gonna test it.
Re:Daytripper by scarejunba on Monday September 09, 2019 @05:46PM (#20922810)
Most `rm` impls default to `--preserve-root` now, so you need to `rm --no-preserve-root`.
Re:Daytripper by williamdclt on Monday September 09, 2019 @05:57PM (#20922929)
it prevents against `rm -rf /`, not `rm -rf /*` does it?
Re:Daytripper by snazz on Monday September 09, 2019 @06:02PM (#20922971)
Probably. The star would involve shell globbing. [edit for clarification: I meant that you’re probably right]
Re:Daytripper by solotronics on Monday September 09, 2019 @03:10PM (#20921270)
I have always been curious.. is there a better way of accomplishing this?
Re:Daytripper by tptacek on Monday September 09, 2019 @04:00PM (#20921826)
Start by not relying on Full Disk Encryption, which you should absolutely have enabled but should probably, from an OPSEC perspective, pretend does not exist.

On modern operating systems you can generally mount and unmount virtual encrypted volumes that are open (ideally) only when you're actually using them to do work with their contents. There used to be a great macOS tool, called Knox, that did this graphically.

Re:Daytripper by Fnoord on Monday September 09, 2019 @05:32PM (#20922683)
> On modern operating systems you can generally mount and unmount virtual encrypted volumes that are open (ideally) only when you're actually using them to do work with their contents. There used to be a great macOS tool, called Knox, that did this graphically.

Cryptomator [1], cross-platform as well.

[1] https://cryptomator.org/

Re:Daytripper by tptacek on Monday September 09, 2019 @06:13PM (#20923061)
The nice thing about Knox is that it just wrapped macOS's built in XTS support. XTS sucks, but you didn't have to think much about what Knox itself was doing. Cryptomator implemented their own FUSE filesystem, and it's a strange collection of SIV, CTR, HMAC, and scrypt. I should like it a lot because I generally like filesystem encryption, but I'd have to actually read it carefully before using it.

There's a Cure53 "audit" of it, like for everything else, but to give a sense of how reliable it was, they flagged ECB mode... in the project's implementation of SIV mode.

Re:Daytripper by btrettel on Monday September 09, 2019 @07:47PM (#20923763)
I run Linux and use full disk encryption, but I also have a few encrypted directories using EncFS. https://en.wikipedia.org/wiki/EncFS

Right now it's just for sensitive documents (i.e., anything that could be used to steal my identity). I used to also store my passwords in an encrypted directory, but now I've migrated to a password manager (which of course has an encrypted database).

If someone steals my computer while it's on and the drive is decrypted, they won't be able to obtain the most sensitive information the vast majority of the time.

Re:Daytripper by paxswill on Monday September 09, 2019 @03:24PM (#20921420)
Use an encrypted disk, and overwrite the master keys (something like `cryptsetup luksErase <device>` on Linux, probably a combo of `fdesetup list`, `fdesetup remove` and `fdesetup removerecovery` for macOS) and then force a shutdown.
Re:Daytripper by jszymborski on Monday September 09, 2019 @03:15PM (#20921320)
I suspect you can leverage GNU Parallel to get this faster

EDIT: Yup, looks like a clever person figured this out https://serverfault.com/questions/46852/doing-an-rm-rf-on-a-...

Re:Daytripper by projektfu on Monday September 09, 2019 @03:24PM (#20921429)
Re:Daytripper by projektfu on Monday September 09, 2019 @06:00PM (#20922951)
Re:Daytripper by oasisbob on Monday September 09, 2019 @04:33PM (#20922161)
Haven't tried it, but Google has a "macdestroyer" script in their macops repo which looks interesting:

https://github.com/google/macops/tree/master/macdestroyer

Re:Daytripper by smacktoward on Monday September 09, 2019 @03:22PM (#20921399)
I suppose you could try wiring the receiver up to a USB killer (https://en.wikipedia.org/wiki/USB_Killer)...

Though if you do that, you'll want to be extremely diligent about minding where you step :-D

Re:Daytripper by rtkwe on Monday September 09, 2019 @03:29PM (#20921489)
You'd need to make sure it actually works, on Macbooks for example the USB ports are all fused so it only kills your USB ports but the rest of the computer is unaffected.
Re:Daytripper by fencepost on Monday September 09, 2019 @07:11PM (#20923523)
Not sure I believe that. I've watched Louis Rossmann talking about Apple's fuses.
Re:Daytripper by rtkwe on Monday September 09, 2019 @09:52PM (#20924449)
I swear I saw a video of someone doing it but can't find it on a cursory look and it seems the latest macbook has been killed by one. Or at least it turned off, the person videoing didn't try turning it back on to make sure it wasn't just a safety tripping the whole power system.
Re:Daytripper by evil-olive on Monday September 09, 2019 @03:26PM (#20921449)
Use full-disk encryption (presumably this is table stakes for anyone with this level of paranoia) using two factors - your passphrase decrypts a keyfile, then the keyfile is used to decrypt the partition.

If you destroy the keyfile, then even knowledge of the passphrase won't allow you to decrypt the data. This can be used to defeat a rubber-hose attack [0].

Standard security vs. convenience trade-off applies, of course - if you keep the keyfile on a USB key, then if the USB key fails you lose access to your data. If you keep a backup of the keyfile somewhere else, then access to that backup plus a rubber-hose attack to get your passphrase allows an attacker to decrypt your data.

0: https://xkcd.com/538/

Re:Daytripper by asdfman123 on Monday September 09, 2019 @04:20PM (#20922018)
I believe reading that Ross Ulbrict's computer was completely encrypted and only accessible with a passphrase. The minute he logged out or closed his laptop's lide, the information was completely locked down.

IIRC, they were able to get his information by an elaborate scheme acted out by plainclothes police where they grabbed his PC while his computer was unlocked. Without looking it up, I think someone bumped into him and one officer took his laptop while another one on the other side grabbed his phone.

Re:Daytripper by komali2 on Monday September 09, 2019 @05:35PM (#20922708)
Two plain clothes FBI officers followed him into the Glen Park public library. A third, undercover, agent contacted Ross online and asked him to log into the silk road backend to fix something. The plainclothes engaged in a fake lover's tiff right behind Ross' chair, who then turned around to see what the commotion was. When he did so, the male officer pushed the laptop to the female officer, who took it and began extracting evidence. Ross stood up, and then was arrested without resistance. Evidence gathering happened in the library.
Re:Daytripper by Miner49er on Monday September 09, 2019 @03:33PM (#20921543)
You still need to do something to prevent a cold-boot attack [0].

0: https://en.m.wikipedia.org/wiki/Cold_boot_attack

Re:Daytripper by mises on Monday September 09, 2019 @03:42PM (#20921637)
Maybe try sdmem: http://manpages.ubuntu.com/manpages/trusty/man1/sdmem.1.html

Put it in a bash script with the above luks commands and profit.

Re:Daytripper by kirykl on Monday September 09, 2019 @05:29PM (#20922655)
Rip the drive out and drop it in a strong degausser
Re:Daytripper by davidw on Monday September 09, 2019 @05:44PM (#20922798)
Thermite!
Re:Daytripper by manjana on Monday September 09, 2019 @05:10PM (#20922528)
echo 'Hello World' > /dev/sda

or

mv / /dev/null

Re:Daytripper by eeZah7Ux on Monday September 09, 2019 @08:34PM (#20924053)
No and no.
Re:Daytripper by manjana on Wednesday September 11, 2019 @12:26PM (#20941915)
Oh yeah, you'll need root ofc., add 'sudo !!' and enter pass.

Joke aside: I misunderstood what was asked it appears. Re-reading the original post I'm still unsure what is asked.

But to be clear, you shouldn't use these commands if you wish to erase sensitive information, albeit if you use full disk encryption it will not really remove or add any value I suppose.

If you want to be sure you could overwrite the disk with random random bits or use a degausser which is properly the most complete/sure method of erasure.

Re:Daytripper by thrownaway954 on Monday September 09, 2019 @04:01PM (#20921836)
execute order 6-6