Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
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.
|
|
05-04-2015, 11:53 AM
|
#1
|
Member
Registered: Oct 2009
Posts: 117
Rep:
|
Best Linux Image Tool For Job Question
Hello,
I have acquired a linux commercial penetration test appliance which runs a debian based operating system. I am trying to create an image of the system so I can place it on other identical appliances but it looks like the OS is encrypted. I have asked the manufacturers for support but they said they do not provide any documentation or help for what I am trying to do. I have already tried to run clonezilla Live CD on the appliance but it appears clonezilla does not see the disk and I could try dd but I know that tool can be pretty dangerous so my question is does anyone have any suggestions or advice for me?
Thanks,
Joe
|
|
|
05-04-2015, 02:02 PM
|
#2
|
Moderator
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,914
|
How can the OS be encrypted? This would mean a custom bootloader?
I've written this a few ways. Basically you can "try" to copy using the dd command, but you'd need to be able to copy "to" a place, such as an added secondary storage medium, be that microSD, SD, USB stick, etc. If you have no secondary storage capability, then really you won't be able to do this.
I first started with you'd have to boot off a secondary media. That started to fall apart because you'd need a comparable Linux to run on that system, likely a non-standard processor situation. So that's problem #1.
If you manage to copy the OS to a secondary medium, you could then try to boot using that secondary medium on a target system. If that works, great, you then would need to copy the entire image from a secondary medium to the internal flash of the target, to make the target a duplicate.
There's a ton of pitfalls. This is the general gist of what to do, however it's not going to be easy because the manufacturer didn't intend it to be easy. And if it's illegal, then don't do it at all.
|
|
|
05-04-2015, 02:05 PM
|
#3
|
Moderator
Registered: May 2001
Posts: 29,415
|
Quote:
Originally Posted by danmartinj
(..) so my question is does anyone have any suggestions or advice for me?
|
Yes: don't. That may not be the answer that you are looking for but AFAIK this is about you honoring commercially licensing agreement, which I am pretty sure says something about reverse engineering and similar activities, and anything that reeks of circumvention is not a topic for LQ. Please see the LQ Rules.
|
|
1 members found this post helpful.
|
05-04-2015, 05:24 PM
|
#4
|
Moderator
Registered: Mar 2008
Posts: 22,176
|
Since you say appliance then we'd have to know more about this. Some laptops can have some unique ways to protect data.
What is this device?
|
|
|
05-11-2015, 12:48 PM
|
#5
|
Member
Registered: Oct 2009
Posts: 117
Original Poster
Rep:
|
rtmistler and everyone else,
Thanks for your reply. I have contacted the manufacturer and confirmed they are OK with me doing this just to let everyone know. The processor is a 1.8GHZ Intel i3 with 32GB SSD.
I have done additional research and it seems what I am trying to do should not be that hard. Running
Code:
fdisk -l
Disk /dev/sda: 32.0 GB, 32017047552 bytes
255 heads, 63 sectors/track, 3892 cylinders, total 62533296 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0001f807
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 62531583 31264768 83 Linux
and
Code:
blkid
/dev/sda1: UUID="bd92adb0-100d-4a9d-ae24-ff704c34c1f5" TYPE="ext4"
and
Code:
df -h
Filesystem Size Used Avail Use% Mounted on
rootfs 30G 5.8G 22G 21% /
udev 10M 0 10M 0% /dev
tmpfs 390M 264K 390M 1% /run
/dev/disk/by-uuid/bd92adb0-100d-4a9d-ae24-ff704c34c1f5 30G 5.8G 22G 21% /
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 780M 0 780M 0% /run/shm
tmpfs 2.0G 0 2.0G 0% /tmp
and
Code:
ls -lA /root
....
-rw-r--r-- 1 root root 112 Apr 30 15:59 .ecryptfsrc
So, I am not exactly sure what .ecryptfsrc means but the more I look into this it seems like this device might not be encrypted at all so I think I will try what rtmistler said and try to use dd and put the img onto an external USB drive unless anyone out there sees something I am missing? Thanks for your help again in advance.
Joe
|
|
|
05-12-2015, 11:17 AM
|
#6
|
LQ Guru
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: One main distro, & some smaller ones casually.
Posts: 5,702
Rep:
|
Agree, that just looks like any other Linux disk so using dd should work.
(.ecryptfsrc looks like it may be an encryption resource file.)
|
|
|
05-21-2015, 10:58 AM
|
#7
|
Member
Registered: Oct 2009
Posts: 117
Original Poster
Rep:
|
Thanks for the feedback everyone,
Just to close this thread out the procedure we used was:
1. Boot into Live Ubuntu CD disto
4. ssh into the device by ifconfig for the ip and then get into it from host computer
5. type fdisk -l to make sure sdc is external with the device folder and sda is the device image
6. Ensure Proper Drives are Connected
7. Perform dd operation
dd "if=source" "of=destination"
To create an image of sda,
-
Code:
dd if=/dev/sda of=/media/location/backup.img
To restore a backup image you already have,
-
Code:
dd if=/media/location/backup.img of=/dev/sda
I still don't understand why clonezilla did not see the proper drives. We might yet still try to get that tool to work for image creating and restoration but now dd works fine as always.
Thanks,
Joe
|
|
|
All times are GMT -5. The time now is 03:24 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
|
|