Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
06-05-2007, 05:12 AM
|
#1
|
LQ Newbie
Registered: Jan 2007
Distribution: CentOS & Fedora Core
Posts: 25
Rep:
|
debugfs shows 0 deleted inodes found, however there're some...
We have a deleted file on a system which we want to restore, so we tried to use /sbin/debugfs. However doing lsdel in it's command prompt gives us:
Quote:
/sbin/debugfs /dev/sdb1
debugfs 1.35 (28-Feb-2004)
debugfs: lsdel
Inode Owner Mode Size Blocks Time deleted
0 deleted inodes found.
|
We thought file could be overwritten already, but when we tried utility on one recently deleted file, especially for test purposes it also showed 0 deleted inodes found.
Maybe debugfs needs some pre-tuning before usage?
Any help appreciated.
Last edited by jaggy00; 06-05-2007 at 05:13 AM.
|
|
|
06-05-2007, 04:57 PM
|
#2
|
Moderator
Registered: May 2001
Posts: 29,415
|
No tuning possible. If you "grep ext3 /proc/mounts | grep -v bind | while read dev discard; do echo lsdel|/sbin/debugfs $dev; done" you're bound to find *some* residue, but since we're talking journalling FSes the results most likely won't be complete. If the deleted file wasn't backed up (shame!) then the time between deletion and disk freeze should be as short as possible to have a chance to carve it, but that chance gets slimmer each time the disk gets written to.
|
|
|
06-06-2007, 01:33 AM
|
#3
|
LQ Newbie
Registered: Jan 2007
Distribution: CentOS & Fedora Core
Posts: 25
Original Poster
Rep:
|
I get all zeros, seriously
Quote:
grep ext3 /proc/mounts | grep -v bind | while read dev discard; do echo lsdel|/sbin/debugfs $dev; done
debugfs 1.35 (28-Feb-2004)
debugfs: Inode Owner Mode Size Blocks Time deleted
0 deleted inodes found.
debugfs: debugfs 1.35 (28-Feb-2004)
debugfs: Inode Owner Mode Size Blocks Time deleted
0 deleted inodes found.
debugfs: debugfs 1.35 (28-Feb-2004)
debugfs: Inode Owner Mode Size Blocks Time deleted
0 deleted inodes found.
debugfs: debugfs 1.35 (28-Feb-2004)
debugfs: Inode Owner Mode Size Blocks Time deleted
0 deleted inodes found.
debugfs: debugfs 1.35 (28-Feb-2004)
debugfs: Inode Owner Mode Size Blocks Time deleted
0 deleted inodes found.
debugfs: debugfs 1.35 (28-Feb-2004)
debugfs: Inode Owner Mode Size Blocks Time deleted
0 deleted inodes found.
|
It couldn't be, could it?
|
|
|
06-06-2007, 06:52 PM
|
#4
|
Moderator
Registered: May 2001
Posts: 29,415
|
It couldn't be, could it?
Debugfs for sure doesn't see everything deleted, you'll need to carve files out. Tools include F/OSS ones like Foremost or Scalpel, Autopsy, Sleuthkit/CarvFS or PyFLAG (also see HELIX Live CD) or Photorec, and then there's always (the horror... the horror...) commercial SW like X-Ways, FTK or Encase (these don't run on GNU/Linux).
A quick Forensic Toolkit vs Foremost test with a "dd" image of a /var/tmp showed FTK coughing up aprox 70 JPEG files of which 75 percent was readable, while Foremost gave me a mix of TIF, .doc and PNG files weighing in at 10MB each (yeah right). OK, a rather unequal test, but it should illustrate each tool has it's own strenghts and weaknesses and there's no guarantee the carving results are actually usable...
I do hope you made a dd copy of the disk or partition when you found out the files were deleted.
|
|
|
All times are GMT -5. The time now is 07:21 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|