Solved

how to wipe a running ubuntu server

Posted on 2011-09-27
4
368 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 87

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

1. Introduction As many people are interested in Linux but not as many are interested or knowledgeable (enough) to install Linux on their system, here is a safe way to try out Linux on your existing (Windows) system. The idea is that you insta…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
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.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

707 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

12 Experts available now in Live!

Get 1:1 Help Now