-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Robert Connolly wrote:
> On June 21, 2005 10:07 am, Carlos Martin wrote:
>>
>>mount -o loop -t ext2 $HOME/hda2-part /mnt/2
>>
>> Just make sure you have enough size on your hard drive.
>>
>>About the dissapearing file I don't know. Maybe because the first one
>>is mounted on a loop device, but it shouldn't happen, methinks.
> 
> 
> This might work, but its not very elegant, and its slow. I'll think about it.

Hi Robert,

I had an idea that may sound strange, but it might work (and is probably
fast):

- - You first create a partition table on the device (using e.g. fdisk),
with this setup (supposing the bootable device is /dev/hda:

/dev/hda1 (decoy system)
/dev/hda2 (actual system)

- - After that, save the HDD's 1st sector (MBR + Partition table) to a file:

dd if=/dev/hda of=actual_mbr.bin bs=512 count=1

- - Format /dev/hda1 and install the decoy system. Do whatever crypto
stuff you want with /dev/hda2 (e.g. mount is as crypto loop and install
the actual system there).

- - Go back again to fdisk. remove both partitions, and setup it as
/dev/hda1 were the only partition there:

/dev/hda1 (using the entire disk)

Note that only the partition table is modified here, the data stays intact.

- - Save this new "decoy partition table" to a file:

dd if=/dev/hda of=decoy_mbr.bin bs=512 count=1

Now comes the trick:

- - Put the decoy partition table back to /dev/hda:

dd if=decoy_mbr.bin of=/dev/hda

- - Setup the initrd to run this command before mounting the HDD:

dd if=actual_mbr.bin of=/dev/hda

- - And, finally, setup a bootscript on the actual system to cleanup its
trace from the 1st sector:

dd if=decoy_mbr.bin of=/dev/hda

You can, when on the actual system, access the decoy one by just
mounting /dev/hda1.

If I understand correctly, when not booting with the initrd, this decoy
system is made to simply ignore (even overwriting data) the crypted data
as it never existed, right? Then I suppose the above scheme will do
exacly that ;-)

PS: I used a similar scheme to "hide" a Linux system behind a supposedly
Windows-only PC, but I used a slightly different "decoy partition table"
where I left the space used by windows as "unused space" on fdisk, so
Windows would not overwrite my stealth Linux :). It was by no means a
security measure, but just a way to hide an entire OS from unawarew
- --
Anderson Lizardo
[EMAIL PROTECTED]
http://www.linuxfromscratch.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)

iD8DBQFCuNWpkzNmn+NRHHoRApn3AJ9ERO8mR0T+y0wu7Pvifg0CMGAhYgCeKiWF
2ZBSIT6aYJWQtS4BBxAIOkg=
=kAfB
-----END PGP SIGNATURE-----

        
        
                
_______________________________________________________ 
Yahoo! Acesso Grátis - Internet rápida e grátis. 
Instale o discador agora! http://br.acesso.yahoo.com/
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-chat
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to