What would happen if I where to cat /dev/mem > /dev/null
Hi all,
I was reading the "Can root harm my computer" thread and I have a quick question. What would happen if I did a cat /dev/mem > /dev/null and cat /dev/null > /dev/mem? Thank You -Joey |
The first wouldn't do anything but eat a few
CPU cycles ... the second would probably (if run as root) crash your box ... give it a try ;} Cheers, Tink |
Heh, please try second one. I am also interested in the result...;)
|
yeah the second would do damage...
but i think its great in linux how you cannot damage the system without root.... try delete C:/windows/System/* under windows ;) |
K, I tried it ...
cat /dev/null > /dev/mem does NOTHING as well :/ ... (as user you get permission denied, as root nothing happens). Wonder what cat /dev/null > /proc/kcore would do? :D Cheers, Tink |
Deleted b/c the question was answered in the above post.
-Joey |
So, has any one actually tried the second one? I'm a little bit curious myself.
In the meantime, if you have win on your machine, you can try the DOS command in my sig. (Course, I'm not liable for the results ;) ) |
Hey....
since cat /dev/null outputs nothing, i dont think memory is being over written... how about cat /dev/urandom > /dev/mem as root maybe that would skrew up your system. cat /dev/urandom > /dev/hdb BOOOOM no more partiton table ;) (or anything else for that matter) |
ok i tryed cat /dev/random > /dev/mem all its doing is making the little lite that says when the CPU is being used blink every once in a while, but its not crashing, altho ic ant use my system as cat wont let go of my system!, ok i need to reboot as i have no way to kill cat or close cat, , thats seee what happens after reboot
note: im runing as super user (user 0, root , what name you want to use) ok rebooted and everyhting normal, /dev/mem is still ther, every acts and looks like it should besides making my system unusedable it did nothing to hurt it (note:, if i was able to switch terminals then i coulda probly killed cat and got outa that) so i think it was just a waste of time |
okay.....
i bet you cant get out of this one.... as root cat /dev/urandom > /dev/mouse cat /dev/urandom > /dev/keyboard (substitute your keyboard and mouse device) bad thngs happen... ive had the mouse mouving and clicking all over the scrren, secising, drag and dropping... everything... and once the mouse opened a second terminal, and gave it focus. then the keyboard was entering all commands... most of which gave a "oidjfgsoindgjsb unknown command" |
I always wondered why someone said cat /dev/null > /dev/mem would do damage that one would have to reinstall: it would just blank the RAM no? And the RAM gets reset every reboot? Unless of course someone was writing to the filesystem and had to copy it from the RAM...
What is /dev/mem actually? Does it count the swap file? Is it just the RAM or more? The BIOS or CMOS? |
I think it's:
cat /dev/zero > /dev/mem that would do what people are expecting /dev/null to do. |
All times are GMT -5. The time now is 10:28 AM. |