277: Prepping for Linux Doomsday Commands

3 Likes

The server knows you’re piping.

A server can tell you’re piping something directly into bash or sh and change the script it’s sending in realtime to something malicious because it knows you’re not looking at it first:

Make executable just for your user:

Good practice is only making a file executable for your user unless every user needs executable rights:

chmod u+x /path/to/file # Make executable for just your user
chmod +x /path/to/file # Make executable for all users

Better terminal options to Disk Destroyer:

dd may be the official “Disk Destroyer” but cat, tee, pv, tail, ect can all destroy (sorry) clone or write partitions usually better than dd. ‘dd’'s sort of been grandfathered in as THE standard but it’s options and defaults are antiquated and designed for old disks which makes it needlessly confusing and slower when stuff like buffer size really should be automated.

Example using cat:

lsblk # Triple check you're choosing a partition you don't mind destroying.
sudo cat /dev/sdX > myclone.iso # Clone a drive
sudo cat myclone.iso > /dev/sdX # Restore from clone (or write any iso)

To get a progress bar, install pv and use it with it’s -p option, example:

sudo apt install pv
sudo pv -p ./ubuntu-22.04-desktop-amd64.iso > /dev/sdX
# Example Output: [>>>>>>>        ]  50%

Now you can accidentally wipe your main partition the modern way.

2 Likes

A prank I enjoyed playing on my Windows buddies, was not that hard to fix, but it was fun to see them turn their heads.

If you press CTRL+SHIFT+Arrow Up, when on the windows desktop, it would change the orientation of the display to upside-down. Most of my “victims” did not know to just to do it with Arrow Down to fix it, so they all try to go to Windows Display Settings to fix it.

3 Likes

So what you’re saying is I should remove

alias neofetch='curl -sSL https://github.com/dylanaraps/neofetch/raw/master/neofetch | /bin/bash'

from my .bashrc?

2 Likes

dude… lol

just why.

You may enjoy this one for putting your Github OTP in your clipboard for login:

alias gitotp='oathtool -b --totp "$(curl -sS https://raw.githubusercontent.com/<YourAccount>/Public/master/HERES_MY_KEY)" | xclip -selection clipboard'
1 Like

Things I used to prank people with (Mostly Windows related stuff because school had only Windows)

  • We had hallroom computers with some software that reset them to clean state whenever rebooted, so I often made stupid vbs -scripts that would show error messages that wouldn’t go away. Then I made batch scripts that would open those error messages indefinitely. And finally, I made a shortcut to some game people played there direct to the batch script instead. Hilarity ensued.

  • Screenshot of BSOD, set it as wallpaper, then hide icons and everything, detach mouse and keyboard.

  • If you have a rotating screen, turn it upside down, then use driver software to turn the desktop 180 degrees. Makes the mouse move wrong direction. 90 degrees also work lol.

PS. Thanks for reading my mail, made my day :slight_smile:

2 Likes

Simple and fun pranks especially for someone using a dock, or a tower where they can’t see all their USB ports easily, plug a wireless mouse dongle in where they can’t see the dongle and wiggle their mouse in annoying ways. (This works best if you can see their screen)

1 Like

Great article on how a sort of mythos has evolved and been normalized around dd despite it being no more sophisticated or dangerous than pv, cp, cat, ect when just writing to a disk.

https://www.vidarholen.net/contents/blog/?p=479

1 Like

Thanks everyone lol! I’m about five months behind and either this was an exceptionally funny episode or I’ve just forgotten how fun DL is :slight_smile:

So much going in in here - looking forward to the next one already though!