LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 06-05-2007, 05:12 AM   #1
jaggy00
LQ Newbie
 
Registered: Jan 2007
Distribution: CentOS & Fedora Core
Posts: 25

Rep: Reputation: 15
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.
 
Old 06-05-2007, 04:57 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
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.
 
Old 06-06-2007, 01:33 AM   #3
jaggy00
LQ Newbie
 
Registered: Jan 2007
Distribution: CentOS & Fedora Core
Posts: 25

Original Poster
Rep: Reputation: 15
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?
 
Old 06-06-2007, 06:52 PM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
why there're lots of child processes when fork? iclinux Programming 3 01-18-2005 07:09 AM
batch commands to debugfs with a read-only filesystem billhowe Red Hat 1 08-21-2004 11:02 AM
snmp staus shows it running but on trying MRTG, it shows public@ipaddr not giving res swati220781 Linux - Networking 3 07-08-2004 05:32 PM
desktop shows on TV but movie shows black screen litrelord Mandriva 6 07-05-2004 05:10 AM
Using undel command in debugfs chii-chan Linux - Newbie 6 03-01-2004 07:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 09:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration