Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

how to wipe a running ubuntu server

Posted on 2011-09-27
4
Medium Priority
?
385 Views
Last Modified: 2012-05-12
Have a weird situation.  Have some servers that are deployed that have sensitive (I.P.) data on them, as well as vpn keyfiles.  I do not have physical access to them, but I do have root login over ssh.  Is there a way to shred or wipe the mounted filesystems while the box is running?  Would shred blow up partway through and cause the filesystem to be recoverable?
They are running various versions of Ubuntu server 10.04 and up.

Please, no lectures on proper security protocols, etc.  Hindsight is 20/20 and new servers are properly secured.  However, we need a way to handle this situation, in the event of a compromise, until we can get these old servers replaced.
0
Comment
Question by:Digital_Skream
  • 2
4 Comments
 
LVL 21

Accepted Solution

by:
Papertrip earned 1000 total points
ID: 36714883
So at first I was going to just give an example using dd like at http://how-to.wikia.com/wiki/How_to_wipe_a_hard_drive_clean_in_Linux

But then I saw some references to a utility called shred, and was a bit surprised to see it on my CentOS box.
Check these links out:
http://linuxhelp.blogspot.com/2006/06/how-to-securely-erase-hard-disk-before.html
http://www.fsckin.com/2008/01/09/using-shred-to-wipe-hard-drives-dod-uses-it-you-should-too/


I never had the need to do this, so thanks for this question because I learned something new :)
0
 
LVL 21

Expert Comment

by:Papertrip
ID: 36714900
I was curious what package installed it on my minimal-install CentOS 6 server.  If you were concerned about the validity of this tool, as I was at first, you should feel a lot better now knowing that it is a part of coreutils.  I do at least.

[root@broken ~]# yum provides */shred
<snip>
coreutils-8.4-9.el6.x86_64 : A set of basic GNU tools commonly used in shell scripts
Repo        : base
Matched from:
Filename    : /usr/bin/shred

Open in new window

[root@broken ~]# yum info coreutils
<snip>
URL        : http://www.gnu.org/software/coreutils/
Description: These are the GNU core utilities.  This package is the combination of
           : the old GNU fileutils, sh-utils, and textutils packages.

Open in new window


0
 
LVL 88

Assisted Solution

by:rindi
rindi earned 1000 total points
ID: 36714954
You can't securely wipe mounted partitions, but there may be workarounds you could use. First check the Link below and install the "secure-delete" package:

http://superuser.com/questions/19326/how-to-wipe-free-disk-space-in-linux

Then use srm to manually delete sensitive files, and maybe after that to make double sure there is nothing sensitive left, use sfill to wipe the empty space on the HD. You can use sswap to wipe your swap partition.

Make sure you don't prematurely delete important OS system files or you may have to get physical access to the server to end your project.
0
 
LVL 1

Author Closing Comment

by:Digital_Skream
ID: 36717347
So, I first downloaded secure-delete and used srm to remove Ip containing files and sensitive data.  Then i wiped the free space and swap.  Finally, i used DD to render the whole mess unusable.  Figure its the best I could do at this point.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Fine Tune your automatic Updates for Ubuntu / Debian
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month8 days, 4 hours left to enroll

824 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question