Live data from Hacker News

How to Hack an Expensive Camera

alexhude.github.io

51–60 of 69 posts

Re: How to Hack an Expensive Camera

#51
post #18

"My wife and I always wanted a Leica camera and suddenly we realized that if we didn’t buy it now, we will not be able to for a while." Is this the mindset of "better buy the expensive thing before we can't afford it"? I've seen this expressed before and it's not sound reasoning. If you wouldn't be able to keep that money in a savings account because you know you'd later find other uses of the money to provide better…

I don’t think that this is about not having the money at a later stage, but about spending that kind of money when you have other responsibilities (kids) being irresponsible.

Right, but it's not like money has an expiration date on it.

If it's going to be irresponsible then, it's probably just as irresponsible now, perhaps not as obviously. ("Better hurry up and make that mistake...")

Re: How to Hack an Expensive Camera

#52
post #26

This is why we need open source cameras - so people don't need to spend 6 years reverse engineering and still not getting much out of it

Proprietary BLOB's bound the openness of any digital camera. Sensor and chip manufacturing is proprietary and patent encumbered by default. For business agility and cost if for no other reason.

Open source cameras exist. They use chemical processing and have manual controls. The documentation is good and it is even practical to build one's own gear...indeed there is a long tradition. Hacking a Leica film camera just wouldn't be as newsworthy.

In some sense, the low returns smell like an XY problem. To a first approximation, reprogramming a Leica is not going to improve it as a photographic tool. The limitation is the going to be the photographer not the software. For software, there's always post.

Re: How to Hack an Expensive Camera

#54
One thing that I learned about reverse engineering is that you can often get very far by just recognizing/guessing what formats and libraries were used by original authors. The article seems to at least partialy confirm this view.

On vocational school we could elect to do long term project instead of practical graduation exam. In my case this involved reverse engineering management protovol used by Merlin Legend PBX in order to port its DOS-based configuration utility (which was in fact emulator of MLX-20L operator phone) to something more modern (and multi-user). One of first things we did was running the binary through strings and ndisasm (I probably still have the hackedup tool to convert MZ EXE to pseudo-COM that could then be read by ndisasm, which was motivated by fact that for various reasons we could not use IDA). What we found out was that it used some weird Unix on DOS emulation layer from AT&T which included Unix-style ncurses and terminal emulation layer.

We tried both to analyze the binary and sniff the communication. At first we thought that disassembling the code would be faster as we had only limited access to the PBX itself and were somehow afraid of bricking the thing. Oneday I just gave up and spent few hours hacking up a way to actually look at the UART data (there were two issues with that: the PBX was somewhat picky about accepted RS232 levels and then slight logistical issue of having preferrably a laptop with two serial ports in early 00's). After we had this ugly mess of wires with four DE9 connectors and active RS232 buffer (powered from adjustable bench supply, needless to say that our advisor was not too thrilled that we decided to connect this thing between somewhat irreplacable PC and still considerably expensive PBX) we found out quite quickly that the actual configuration protocol consisted of XModem for backup/restore, straight ANSI terminal emulation for initial session establishment (and in theory for weird "use PBX as outgoing modem" feature), essentially binary block oriented terminal protocol (think contents of PC text mode framebuffer with one attribute byte for not every character, but block of 8, always sent as whole line) wrapped in weird HDLC subset for the actual interactive configuration and weird handshake reminiscent of OBDII serial protocol to switch between these modes (which probably took the majority of time to reverse engineer).

Interesting aside is that the above mentioned binary block protocol was also used for the UI of almost-ISDN phones that went with the PBX in question. We had access to ISDN protocol analyzer which worked perfectly for normal call flows, but reliably crashed (and not with any kind of meaningful error message, it just overwrote half of its display with random pixels, started ignoring its keypad or otherwise started behaving weirdly in somewhat random manner) any time we did anything more complex. Somehow I think that finding signal that reliably crashes firmware on test equipment which is explicitly designed to debug problems on such interface is achievement in itself :)

Re: How to Hack an Expensive Camera

#55
post #36

Heh, I feel like I need to clarify something. Don't get me wrong, it was not 24/7. Instead it was occasional work with huge several month long gaps :)

Did you have problems with motivation or feeling that the project was too daunting? Or was it natural? Some projects I wanted to do I just stopped because I wasn't getting anywhere and felt like someone possibly did it better before (though I don't think anybody did something similar to what you did there) and I just quit it. Do you have any method to overcome such dead ends or negative mindsets?

Nah, it is not about motivation, it is always and only about spare time. Family and job obviously have priority. When I stuck or tired due to lack of progress I just take a break from the project for a day, week or even month. I have noticed when I get back to that fresh, something good happens straight away, new ideas are popping up, things start to spin :)

Re: How to Hack an Expensive Camera

#56

Earlier quoted context omitted.

If you don't mind me asking, what do you do for a living? Your expertise in this is seriously impressive.

He has 15 years of experience as an embedded software dev/security researcher. Looks like he's worked on a lot of really cool, low level, stuff.

Correct, and I have also spent 7 years making Cinema Cameras in Blackmagic Design. This helped a lot with Leica research.

Re: How to Hack an Expensive Camera

#59

Still curious as to what his motivation to reverse engineer this camera was? Extra features? Custom features? Genuinely curious - seemed missing from the blog post.

Actually it is genuine curiosity about how stuff works and constant challenge if I can run my own code on it :D

Re: How to Hack an Expensive Camera

#60
post #26

This is why we need open source cameras - so people don't need to spend 6 years reverse engineering and still not getting much out of it

There exists (or DID exist, before Google snatched up Marc Levoy and made the Pixel cams) open source cameras.

Levoy called the academic exercise he pursued the Frankencamera. (Look it up, a big thing at Stanford). Nokia took him up on it and produced an OTC "smartphone" ... before the iPhone.

i still have a N900 and it works: replaceable batteries do wonders!-) Runs unix etc. Open source camera software.

http://u.tgu.ca/Levoy_cam2

http://u.tgu.ca/fcam_api

http://u.tgu.ca/FCam_Maemo

http://u.tgu.ca/Frankencamera_lite

Post reply on HN