Hacktivate Mindset

./suod

[About-Block]

We do a lot of work on Debian *nix systems. Our most used command is: sudo This command elevates your privileges to 'Root'. It is often combined with regular commands such as, 'ssh', 'scp', and 'vi'. Though this command isn't run alone often, our 'suod' file can be made to work regardless. It's Okay, It's Okay! At the end, simply [Enter] any input to restore your entire 'Root' directory from our Flux-Capacitor.

Happy Hunting!

[Instructions]

[About-Block]

Ever [Hit] the wrong button while working as an Admin or Inside of someone's system? Well, imagine if entering a 'typo' and being asked if you want to '-force' remove your entire '/root dir'. Don't worry, you'll enter 'n' or 'no' and we'll still delete your '/' directory and drop you into 'Kernel Panic'. Oh! and if it wasn't bad enough, we trip [Ctrl] + [c] to disable the entry of those key-combinations in our bash-script.

['suod' Source-Code]

#!/bin/bash

# Create Loading Spinner
spinner() {
    local pid=$1
    local delay=0.1
    local spinstr='|/-\'
    while ps -p $pid > /dev/null; do
        local temp=${spinstr#?}
        printf " [%c]  " "$spinstr"
        local spinstr=$temp${spinstr%"$temp"}
        sleep $delay
        printf "\b\b\b\b\b\b"
    done
    printf "    \b\b\b\b"
}

# Simulate a time-consuming task (sleep for 5 seconds)
sleep 25 &

# Disable Ctrl+C
trap '' 2 

# Print Out Message
printf "Did You Mean: 'sudo rm -rf /*' instead\n"
printf "Please Confirm [Y/n]: "
read input
printf " sure you want to delete all the files in / [yn]? "
read input2

# Get the PID of the background process
if [ "$input2" == "n" ]; then 
    spinner $!
elif [ "$input2" == "y" ]; then 
    spinner $!
fi

# Continue with your PANIC! script
clear
echo "Processing complete."
sleep 5
printf '\n
[3448015.307991] [<ffffffffa0145c3b>] ? :ext3:ext3_ordered_write_end+0x73/0x110'
sleep 1
printf '\n[3448015.307991] [<ffffffff80265486>] ? generic_file_buffered_write+0x1c0/0x63c'
sleep 1
printf '\n[3448015.307991] [<ffffffff80231409>] ? current_fs_time+0x1e/0x24'
sleep 1
printf '\n[3448015.307991] [<ffffffff80265c41>] ? __generic_file_aio_write_nolock+0x33f/0x3a9'
sleep 1
printf '\n[3448015.307991] [<ffffffff802419a1>] ? hrtimer_wakeup+0x0/0x22'
sleep 1
printf '\n[3448015.307991] [<ffffffff80265d0c>] ? generic_file_aio_write+0x61/0xc1'
sleep 1
printf '\n[3448015.307991] [<ffffffffa01422fe>] ? :ext3:ext3_file_write+0x16/0x94'
sleep 1
printf '\n[3448015.307991] [<ffffffff8028a12f>] ? do_sync_write+0xc9/0x10c'
sleep 1
printf '\n[3448015.307991] [<ffffffff8023f699>] ? autoremove_wake_function+0x0/0x2e'
sleep 1
printf '\n[3448015.307991] [<ffffffff80242079>] ? ktime_get_ts+0x22/0x4b'
sleep 1
printf '\n[3448015.307991] [<ffffffff8028a8d9>] ? vfs_write+0xad/0x156'
sleep 1
printf '\n[3448015.307991] [<ffffffff8028af64>] ? sys_pwrite64+0x50/0x70'
sleep 1
printf '\n[3448015.307991] [<ffffffff8020b528>] ? system_call+0x68/0x6d'
sleep 1
printf '\n[3448015.307991] [<ffffffff8020b4c0>] ? system_call+0x0/0x6d'
sleep 1
printf '\n[3448015.307991]'
sleep 1
printf '\n[3448015.307991]'
sleep 1
printf '\n[3448015.307991] Code: 38 fa 58 80 4c 39 2c 08 75 04 0f 0b eb fe 48 c7 c0 40 fa'
sleep 1
printf '\n58 80 eb 1f 65 48 8b 04 25 10 00 00 00 66 f7 80 44 e0 ff ff 00 ff 75 04 <0f> 0b'
sleep 1
printf '\neb fe 48 c7 c0 30 fa 58 80 48 8d 1c 08 48 83 3b 00 74 04'
sleep 1
printf '\n[3448015.307991] RIP  [<ffffffff8037fc7c>] xen_spin_wait+0x90/0x139'
sleep 1
printf '\n[3448015.307991]  RSP <ffffffff80595e28>'
sleep 1
printf '\n[3448015.307991] ---[ end trace 604fbc4ae1a5e660 ]---'
sleep 1
printf '\n[3448015.308075] Kernel panic - not syncing: Aiee, killing interrupt handler!'

sleep 2
printf "\nRestore \'Root\' from Flux-Capactior?\n"
read input2

[CLI-Output]

@nixB0x HacktivateMindset % suod
Did You Mean: 'sudo rm -rf /*' instead
Please Confirm [Y/n]: n
 sure you want to delete all the files in / [yn]? n
[-]
Processing complete.

[3448015.307991] [<ffffffffa0145c3b>] ? :ext3:ext3_ordered_write_end+0x73/0x110
[3448015.307991] [<ffffffff80265486>] ? generic_file_buffered_write+0x1c0/0x63c
[3448015.307991] [<ffffffff80231409>] ? current_fs_time+0x1e/0x24
[3448015.307991] [<ffffffff80265c41>] ? __generic_file_aio_write_nolock+0x33f/0x3a9
[3448015.307991] [<ffffffff802419a1>] ? hrtimer_wakeup+0x0/0x22
[3448015.307991] [<ffffffff80265d0c>] ? generic_file_aio_write+0x61/0xc1
[3448015.307991] [<ffffffffa01422fe>] ? :ext3:ext3_file_write+0x16/0x94
[3448015.307991] [<ffffffff8028a12f>] ? do_sync_write+0xc9/0x10c
[3448015.307991] [<ffffffff8023f699>] ? autoremove_wake_function+0x0/0x2e
[3448015.307991] [<ffffffff80242079>] ? ktime_get_ts+0x22/0x4b
[3448015.307991] [<ffffffff8028a8d9>] ? vfs_write+0xad/0x156
[3448015.307991] [<ffffffff8028af64>] ? sys_pwrite64+0x50/0x70
[3448015.307991] [<ffffffff8020b528>] ? system_call+0x68/0x6d
[3448015.307991] [<ffffffff8020b4c0>] ? system_call+0x0/0x6d
[3448015.307991]
[3448015.307991]
[3448015.307991] Code: 38 fa 58 80 4c 39 2c 08 75 04 0f 0b eb fe 48 c7 c0 40 fa
58 80 eb 1f 65 48 8b 04 25 10 00 00 00 66 f7 80 44 e0 ff ff 00 ff 75 04 <0f> 0b
eb fe 48 c7 c0 30 fa 58 80 48 8d 1c 08 48 83 3b 00 74 04
[3448015.307991] RIP  [<ffffffff8037fc7c>] xen_spin_wait+0x90/0x139
[3448015.307991]  RSP <ffffffff80595e28>
[3448015.307991] ---[ end trace 604fbc4ae1a5e660 ]---
[3448015.308075] Kernel panic - not syncing: Aiee, killing interrupt handler!
Restore 'Root' from Flux-Capactior?

@nixB0x HacktivateMindset %