Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Last revisionBoth sides next revision
public:wipeliveserver [2019/03/13 16:58] – created Nicopublic:wipeliveserver [2019/03/14 11:01] – don't mess with host's files Nico
Line 1: Line 1:
-<note important>WIP</note>Wipe a living server. Tested on Debian 7.x+====== Wipe/shred/nuke a living server ======
  
-<pre>+<note important>WIP. Only tested on Debian 7.x</note>  
 + 
 +<code>
 mkdir /tmp/tmproot mkdir /tmp/tmproot
 mount -t tmpfs none /tmp/tmproot mount -t tmpfs none /tmp/tmproot
Line 31: Line 33:
 #cp -vrp /etc/passwd* /etc/shadow* /etc/group* /etc/shells /tmp/tmproot/etc/ #cp -vrp /etc/passwd* /etc/shadow* /etc/group* /etc/shells /tmp/tmproot/etc/
 cp -vrp /etc/* /tmp/tmproot/etc/ cp -vrp /etc/* /tmp/tmproot/etc/
-echo "" > /root/.bash_history +echo ""/tmp/tmproot/root/.bash_history 
-echo "TERM=xterm-16color" >>.profile+echo "TERM=xterm-16color" >>/tmp/tmproot/root/.profile
 mount --make-rprivate / # necessary for pivot_root to work mount --make-rprivate / # necessary for pivot_root to work
 pivot_root /tmp/tmproot /tmp/tmproot/oldroot pivot_root /tmp/tmproot /tmp/tmproot/oldroot
Line 45: Line 47:
 #tmux a -t shred #tmux a -t shred
 #echo "o" > /proc/sysrq-trigger #echo "o" > /proc/sysrq-trigger
-</pre>+</code>