Solved

how to wipe a running ubuntu server

Posted on 2011-09-27
4
371 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 250 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 250 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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
If you use Debian 6 Squeeze and you are tired of looking at the childish graphical GDM login screen that is used by default, here's an easy way to change it. If you've already tried to change it you've probably discovered that none of the old met…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

910 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now