LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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


Reply
  Search this Thread
Old 05-04-2015, 10:53 AM   #1
danmartinj
Member
 
Registered: Oct 2009
Posts: 117

Rep: Reputation: 1
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
 
Old 05-04-2015, 01:02 PM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
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.
 
Old 05-04-2015, 01:05 PM   #3
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by danmartinj View Post
(..) 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.
Old 05-04-2015, 04:24 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,980

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
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?
 
Old 05-11-2015, 11:48 AM   #5
danmartinj
Member
 
Registered: Oct 2009
Posts: 117

Original Poster
Rep: Reputation: 1
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
 
Old 05-12-2015, 10:17 AM   #6
fatmac
LQ Guru
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: Mainly Devuan, antiX, & Void, with Tiny Core, Fatdog, & BSD thrown in.
Posts: 5,490

Rep: Reputation: Disabled
Agree, that just looks like any other Linux disk so using dd should work.
(.ecryptfsrc looks like it may be an encryption resource file.)
 
Old 05-21-2015, 09:58 AM   #7
danmartinj
Member
 
Registered: Oct 2009
Posts: 117

Original Poster
Rep: Reputation: 1
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
 
  


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
linux cron job duplicate job question cpthk Linux - Newbie 4 09-11-2009 08:52 PM
Streaming Video - Best Tool(s) For The Job? shadoxx428 Linux - Software 3 04-08-2009 01:48 AM
looking for a linux image & backup tool / offline / RAID zerobane Linux - Software 2 03-17-2006 02:48 PM
best tool for the job or how to tell what distro is best for me Desidarius Linux - Distributions 1 10-08-2004 09:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:36 AM.

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