Slashdot Mirror


How Device Drivers Are Reverse Engineered

An anonymous reader writes: Linux Voice magazine has published a long article about how people go about reverse engineering drivers for hardware peripherals. They use Python and a USB radio-controlled car to demonstrate, walking us through the entire process. It's a cool, easy-to-follow insight into what often seems to be a rather opaque process.

27 comments

  1. How Database errors by invictusvoyd · · Score: 4, Funny

    are reverse engineered ?

    1. Re:How Database errors by Anonymous Coward · · Score: 0

      are reverse engineered ?

      Well reversed sir..well reversed

    2. Re:How Database errors by sjames · · Score: 1

      Based on their current status they seem pretty good at it. They should publish an artic...OH WELL.

  2. Great Knowledge Sharing! by Anonymous Coward · · Score: 5, Informative

    Nice article, I used a similar technique, and found a reference where someone reverse engineered a usb missile launcher toy. I used that knowledge to buld the USB driver for the Antec Kuhler 920 water cooler, my small contribution to the open source community.

    Of course, the Kuhler Windows App was rather poor quality, as well as the USB implementation. But at least they didn't do anything esoteric, like use USB interrupt transfers, etc. Thank goodness for simple USB transfers.

    Sharing knowledge like this is what the open source community is all about.

    Check me out on sourceforge, kuhler_ctl.

    1. Re:Great Knowledge Sharing! by Anonymous Coward · · Score: 1

      Usually when I need to reverse engineer software, I fire up the disassembler and debugger and start poking through the code.

    2. Re:Great Knowledge Sharing! by davester666 · · Score: 1

      Course, there are companies like, for instance, Autel, which sell ODB readers for cars for only $100 to over $1000, but are too cheap to implement and/or license a signed Windows driver. And it's only a stupid USB serial device, dumping text data from the memory card to the computer. And it SHOULD be more complicated, because it also has software on the memory card that can be updated [to update the firmware, you have to remove the memory card and put it in a normal card reader, which their software will then update].

      --
      Sleep your way to a whiter smile...date a dentist!
    3. Re:Great Knowledge Sharing! by Anonymous Coward · · Score: 1

      Tsk tsk, reverse engineering or decompiling the executable would violate the license agreement. I decided to use "black box" reverse engineering to protect myself from silly American laws. Besides, the Windows app was crap. It used polling based on wait loops instead of timers/interrupts, and other stupid techniques. Analyzing that code would have been painful.

      Analyzing the USB packets was faster, provided the same or better data, and means some stupid American firm can't sue me [doesn't mean they can't try] for violating their "Intellectual Property".

      Besides, this is reverse engineering hardware technically, not software. It's a lower level of abstraction.

    4. Re:Great Knowledge Sharing! by Anonymous Coward · · Score: 0

      OBD tools sell for like $8 on ebay, or $35 if you buy an "official" chip. The datasheets can be downloaded for free, and contain all the ODB commands you ever wanted to know.

      Since it's a silly USB to serial to ODB bridge, it should be trivial to sniff the connection and roll your own.

  3. Error establishing a database connection by Anonymous Coward · · Score: 0

    Or is that how they do it?

  4. Wow, slashdoted before a comment by Anonymous Coward · · Score: 0

    good going

  5. Wow. by Anonymous Coward · · Score: 0

    ./'ed in 5...4...3..

  6. Nice database error... by Lunix+Nutcase · · Score: 2

    Maybe Linux Voice needs to learn to engineer a working database?

    1. Re:Nice database error... by Anonymous Coward · · Score: 0

      slashdot effect

    2. Re:Nice database error... by Lunix+Nutcase · · Score: 2

      The Slashdot effect is pretty weak these days. It's just a poorly configured webserver.

    3. Re: Nice database error... by Anonymous Coward · · Score: 2, Interesting

      No kidding. 18 comments on this article. I miss the days when an article like this would have been flooded. Guess that's why I'm only on here a few times a week at most anymore instead of a dozen times a day. Never thought I'd say it...but I miss Rob.

  7. Highly ILLEGAL by Anonymous Coward · · Score: 0

    Venture to watch at your own risk. Is this worth a year in the pokey?

    1. Re:Highly ILLEGAL by Anonymous Coward · · Score: 0

      stfu. this is perfectly legal.

  8. Slashdotted by Ichijo · · Score: 3
    --
    Any sufficiently unpopular but cohesive argument is indistinguishable from trolling.
  9. Are there any stable, complex drivers... by Anonymous Coward · · Score: 0

    ...created completely through reverse engineering?

    I've found it to be useful for getting over a single hurdle, but after that you're meeting diminishing returns, as you don't know really what you're doing with the device and things never seem to quite work right. This problem plagued the first decade of Linux as so many unofficial drivers of obscure hardware never quite worked right.

    1. Re:Are there any stable, complex drivers... by Darinbob · · Score: 2

      It's hard to call this sort of thing a "driver" since it's so high level. They're basically just decoding the protocol that is used over USB. If they could do the same thing if it used network packets over a wifi connection I doubt they'd call it a device driver.

    2. Re:Are there any stable, complex drivers... by Anonymous Coward · · Score: 0

      i used to do the same thing with a logic analyzer or a vme bus monitor

      those were drivers. memory references instead of packets.

      same thing

    3. Re:Are there any stable, complex drivers... by dgatwood · · Score: 3, Insightful

      Fundamentally, the only any driver really does is send commands to a device over a bus and handle the responses. What other kind of driver were you hoping for? :-)

      --

      Check out my sci-fi/humor trilogy at PatriotsBooks.

    4. Re:Are there any stable, complex drivers... by dgatwood · · Score: 1

      Err.. the only thing any driver really does....

      --

      Check out my sci-fi/humor trilogy at PatriotsBooks.

    5. Re:Are there any stable, complex drivers... by Anonymous Coward · · Score: 0

      Some of the USB DVB-T/T2 TV adapters have been. Even better than that, in the case of that one, it added the ability to do DVB-C. (The Windows version didn't)

  10. Simple. by jpellino · · Score: 1

    Ben Affleck. Problem Solved.

    --
    "Win treats sysadmins better than users. Mac treats users better than sysadmins. Linux treats everyone like sysadmins."
  11. FTFA by Anonymous Coward · · Score: 0

    "A simpler alternative would be PyUSB, which is a simpler alternative"

    Simpler alternative is simpler.