Re: Overriding U3 CD-ROM sr driver with sd driver to enable write access

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 29 Dec 2008, Andrew Hoog wrote:

> Good morning,
> 
> For some time, I've tried to figure out how to treat the virtual
> CD-ROM on a U3 drive as a direct-access device (SCSI type 0) instead
> of a read-only direct-access device (SCSI cd-rom, type 5)

In theory this is possible.  In practice, what makes you think the 
device will work when you send it disk-type commands instead of the
CD-ROM-type commands it expects?

> so that
> users can overwrite the data in that area and use as they wish.  There
> is quite a bit of discussion on the web about this device however most
> centers around removing the "partition" or hiding it in Linux (the
> autorun and .exe on the CD-ROM are for Windows only).
> 
> I've posted my analysis to date at
> http://chicago-ediscovery.com/computer-forensic-howtos/forensic-acquisition-analysis-u3-usb-drive.html
> which is focused on the forensics side.  There is a U3 removal utility
> as well as a program (Universal Customizer) that will overwrite the
> iso9660 filesystem (in Windows) using a .dll supplied by the U3 group
> (u3dapi10.dll).  However, I would like to be able to accomplish this
> in Linux using standard utilities.

Your best bet is to reverse engineer the Universal Customizer program, 
say by using a program like SnoopyPro to see what commands it sends to 
the device.  Then you can figure out how to send the equivalent data
yourself in Linux.

> I've looked into udev rules but I cannot find a way to change the
> device driver.  Also, I tried the sg3_utils but sg_dd on the generic
> device fails (device not ready (w)) as it still just sees a read-only
> CD-ROM.  Does anyone have advise on how to change the device driver
> for the endpoint from "sr" to "sd"?

The only way is to fool the kernel into thinking the device is Type 0
instead of Type 5.  You would have to hack the kernel, which probably
is not what you had in mind.

>  Is there a better work around?
> Thank you.

If you don't like the reverse-engineering approach, you can use 
programs like sg-utils to send your own WRITE commands to the device.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux