Ask HN: Extracing HP-UX Based HDD Image into BSD or Linux FS
When we got this device the first thing I did was opening the case, get to the HDD and take a backup image.
Eventually I'm going to root the thing, by restoring that image and thereby conveniently replacing the bytes in the blocks carrying /etc/passwd (there's apparently no shadow system on this thing) with a password-less login entry for root. If somebody wants to have a go at brute forcing the password (this seems to be one of the ancient crypt based, easily broken entries), here's the passwd entry:
root:z1sH85tcwYkQg:0:3::/:/sbin/sh
Anyway: Until then I'd really like to extract that HDD image into a filesystem I can traverse using Linux or BSD. What would be your approach of choice on this?
The ultimate goal would be to reverse the drivers talking to the spectrum analyzer hardware and maybe implement my own ones so that I could run Linux or a BSD on it.
10 comments
[ 3.0 ms ] story [ 40.0 ms ] threadWhat does running "file -s /dev/sdX" say?
Since this device is still not rooted I don't have access to a command line... yet. There's a telnet daemon listening on the network interface, but that's it (I didn't crack the passwd entry yet).
$ openssl passwd -salt z1 -crypt wumpus1
z1sH85tcwYkQg
What format is the filesystem in?
(Have you got a write up somewhere?)
VxFS, which (according to Wikipedia) is claimed to be supported by Linux. The HDD is partitioned into several logical volumes. Interestingly enough the LVM utilities have the same command names as Linux LVM2, but I don't know if it follows the same on-disk structure.
It would be really handy if Linux supported something like a loopback virtual disk drive into which you could bind whole disk images (instead of just loop block devices to which you can bind only partition images). Maybe there's some (3rd party) kernel module I don't know about for this.
> Have you got a write up somewhere?
Right now I'm just looking around, what's in the system. There's an ancient C compiler on the system but it does only K&R syntax. All the system utilities apparently have been compiled on an external build system. There's an ancient version of Samba there. For simple file transfers I made me a netcat binary by pasting source code into the terminal and compiling
Used that to HP was nice and left behind source code for the really interesting stuff, i.e. the sources for the userlevel programs and kernel drivers of the nonstandard, proprietary devices that make this thing a measurement instrument. This seemed to be completely unintentional, but this is what you get if your build system can not do out-of-tree builds and the developer just slaps the build directory into a installation tarball. I mean: Who except for the maintenance guy, who's updating the box is going to be able to access that directory? m(Oh, that covers the source code of several revisions of the software, by which I mean the kernel drivers and the user interface.
Thanks HP! :D
This will of course not compile for Linux. But hey, I don't care. The kernel drivers are easy enough to re-write from scratch over the course of a few weekends. The userland stuff takes much more work though.
I wish I had enough spare time to do some computer archaeology - but too much to do already, and barely enough time to fit it all in!