Can you extract the switching code from a microprocessor?

Started by Nocaster Cat, August 09, 2013, 06:17:25 PM

Previous topic - Next topic

Nocaster Cat

Obviously you can program it in but can you extract it via the same interface? Thanks.

R.G.

#1
Quote from: Nocaster Cat on August 09, 2013, 06:17:25 PM
Obviously you can program it in but can you extract it via the same interface? Thanks.
Relays is electromechanical devices. They don'ts gots code.

[N.B. - the original title was "Can you extract the switching code from a relay?", no mention of uCs]
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

Nocaster Cat

Sorry, can the code be extracted from the microprocessor used to drive the relay?

R.G.

Quote from: Nocaster Cat on August 09, 2013, 08:12:20 PM
Sorry, can the code be extracted from the microprocessor used to drive the relay?
Depends. It is, of course, a violation of copyright law to do that and use it. There are court cases on the re-use of someone else's code, and also cases that hold that code is copyrightable, and copyright exists from its creation, and cases upholding that derivative works from pre-existing code are covered by the original copyright. It's much clearer than the issues that keep coming up over and over and over and over with schematics.

In practice, all the commercial uCs have internal code protection mechanisms to prevent exactly what you're proposing to do. So if the person programming the uC knows what they are doing, they blow the code-protect fuse when the device is programmed, and you effectively can't get the code out by the normal programming pins.

It did prove possible for hackers to copy the protection schemes in the European TV encryption stuff to remove the top of the IC package, exposing the chip, and to use red fuming nitric acid to dissolve away just the right amount of passivation oxides to probe the chips internally, away from the pins, and abuse the power supplies enough to read the contents, but that was some years ago, and I suspect the chips are harder to break into these days. But I don't really know.

The answer if you don't have a wafer probing station that's rated for red fuming nitric acid fumes is "yes, but only if the person didn't set it up to NOT be readable when it was programmed."
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

R.G.

Forgot: the code to operate a relay from a uC is really, really trivial. Probably easiest to simply program your own.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

J0K3RX

Depends on if they had "Code Protection" off or on when they wrote to the PIC chip. It's good to keep it off when you are developing so you can re-write to the chip and test changes. If your code doesn't work you can blank the chip and re-write over and over... Once you get it perfected and you want to put it in your project then you can turn on "Code Protection" especially if you plan to sell it... It would be kinda stupid if you didn't and by the time you get done coding and writing to the chip a thousand times in the testing process you most likely will have figured out what that function is for. With it on when writing to the chip makes it nearly impossible to read again and you can't blank the chip and write to again either... It's done! There are methods/hacks used to un-protect the code but good damn luck! Not worth the time and effort, easier to learn how to make your own code...

Doesn't matter what you did to get it... If it sounds good, then it is good!

J0K3RX

By the way, I only know PIC but I assume AVR is the same way..?
Doesn't matter what you did to get it... If it sounds good, then it is good!

R.G.

Locking for code protection is pretty standard. I would be surprised at any uC that doesn't have it, but I don't know them all intimately. A casual web search shows AVR does.

Nothing is 100% safe from being read, but the requirements to be able to read a protected uC are pretty steep, as I mentioned.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

R.G.

R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

J0K3RX

Doesn't matter what you did to get it... If it sounds good, then it is good!

R.G.

Could be. I've done the same function in the 12F Microchip series - the 12F508 as I remember. It's been a while. The 12F508 costs about $0.65 in ones.

I really think the 10F series would do it, but you'd probably need to do the programming in assembler. I've gotten lazy in my old age. I do everything in something higher than assembler to avoid having to learn yet another instruction set.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

J0K3RX

Yup... it's been quite a while for me. I used 12f683 mainly and MPLAB for programming/modding xbox controllers :icon_lol: double shot - rapid fire, fast reload etc.. So, you would push one button and it would perform a sequence of button and trigger presses very quickly otherwise impossible for human hands to do and it would perform an exploit and cause a pistol for example to become a fully auto machine gun.. Was when Halo 2 was HOT and full of glitches and every little kid had to win and have the edge. Then Halo 3 came out and all the glitches were gone... :icon_sad: Worked in a few other games also but the demand for the modded controllers dropped off and I quit selling them on ebay. Was a nice little biz while it lasted.. not bad for $200 to $250 a controller! Damn Microsoft for fixing the glitches :icon_evil: By the way, I wrote my own code AND protected it! :icon_wink:

Might have to revisit it someday for stomps, shouldn't be hard at all, not nearly as much going on there!
Doesn't matter what you did to get it... If it sounds good, then it is good!

tyronethebig

I'd love to have a metalzone modded for autoshred...  ;D
I'm not, not licking toads!
-Homer

Nocaster Cat

Thanks for the very informative answers. Wasn't looking to extract any particular code, it was just a curiosity question.