Solved

how to wipe a running ubuntu server

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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Delete a folder on a linux computer on a regular basis 10 40
AWS ELB 5 95
Linux mount of Windows Shared Now Fails 8 77
Upgraded from Debian 7 to 8.7 and got black screen 20 69
This article will explain how to establish a SSH connection to Ubuntu through the firewall and using a different port other then 22. I have set up a Ubuntu virtual machine in Virtualbox and I am running a Windows 7 workstation. From the Ubuntu vi…
Fine Tune your automatic Updates for Ubuntu / Debian
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

830 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