hardware reverse engineering of pcb(basic) using matlab(

13
Hardware Reverse Engineering What is hardware reverse engineering ? Reverse engineering is the process of figuring how something works, “the rule of games”. we must understand the rule of the game before we can modify them. In the era of 1960 to 80’s hardware manufacturer provide data sheets and other hardware related stuff like schematic details, power supply guide and block diagram but now a days company consider these things as an IP. So in order to learn from the device we have to do reverse engineering of device. In this document i will describe how to do PCB(printed circuit board) reverse engineering. WHY? – Determine system or subsystem functionality. – Security research/verification. – Clone a design HOW? – Access to copper layers

Upload: md-yasir-bashir

Post on 07-Feb-2017

129 views

Category:

Engineering


3 download

TRANSCRIPT

Page 1: Hardware reverse engineering of PCB(basic) using MATLAB(

Hardware Reverse Engineering

What is hardware reverse engineering ?

Reverse engineering is the process of figuring how something works, “the rule of games”.

we must understand the rule of the game before we can modify them. In the era of 1960 to 80’s hardware manufacturer provide data sheets and other hardware

related stuff like schematic details, power supply guide and block diagram but now a days

company consider these things as an IP.

So in order to learn from the device we have to do reverse engineering of device.

In this document i will describe how to do PCB(printed circuit board) reverse engineering.

WHY?

– Determine system or subsystem functionality.– Security research/verification.– Clone a design

HOW?– Access to copper layers– Analyze layout rules/features– Trace component interconnections

Printed Circuit Boards (PCBs), used within nearly every electronic product in the world, are physical carriers for electronic components and provide conductive pathways between them.

By accessing each individual copper layer of a PCB, one can clone the design, identify areas where new features/capabilities can be inserted, locate specific connections/interfaces, or derive how a product works by creating a schematic diagram.

Page 2: Hardware reverse engineering of PCB(basic) using MATLAB(

PCB Construction & Layer Stack

Layers of thin copper foil (conductive) laminated to insulating(non-conductive) layers– "Circuit board sandwich"• Form the physical carrier and electrical pathways for components

STEPS

1.Component removal from PCB

2.component identification.

3.Imaging.

4.Image processing using matlab .

5.electronics skill’s

The most basic thing you need to recognize is the electronic components that you see on the circuit board. As a new engineer, you may find yourself floated with odd components that you have not seen before. Many newbie may recognize those component symbol that we read from the schematic, but may not be able to recognize them in the actual physical form in a real physical circuit.The resistor component alone can comes with many sizes, shapes, and colour. It is important to recognize them, and understand their differences in characteristic. In school, we usually take resistor as only a ohm value, and don't bother about the precision of the resistor, 

Page 3: Hardware reverse engineering of PCB(basic) using MATLAB(

tolerance, and even wattage is often ignored. In a practical circuit design, there are reason why some resistor are bigger or why some are more precision. First thing first, ensure you can recognize each and every component on the circuit. Knowing their names and how they are classified can helps you speed up the time needed to identify them. It is also a reason why through out my other WebPages, I try to use photo, and put down the possible names that can be use to identify the components. Identify as much components as you can. Resistor, Capacitor, Inductor, IC chips, fuse, diode, transistors, connectors, PCB board, etc...

Nowadays, modern circuit board uses more IC chips than passive components. All IC chip looks the same black encapsulation with various shape and size. The important thing is to examine the number that is printed on the chip itself. Without it, you will need more brain power and experience to decode the board. It is also a main reason why some manufacturers will find ways to erase the lettering on the IC chips. It is a means to increase the barrier for reverse engineering, which can reduce the probability of their circuit design being copied.

Page 4: Hardware reverse engineering of PCB(basic) using MATLAB(

Tools used:-

1.soldering iron.

2.sand paper.

3.camera.

4.computer with matlab.

component removal

Page 5: Hardware reverse engineering of PCB(basic) using MATLAB(

processes in taking image of printed circuit board(mi charger)

Finally! Access to printed circuit board

Page 6: Hardware reverse engineering of PCB(basic) using MATLAB(

component identification here in MI XIOMI charger i found

1.4.7µf(450v) electrolytic capacitor(2 parts)

2. 2.2µf(50v) electrolytic capacitor

3. 680µf(6.3v) electrolytic capacitor(2 parts)

4.490k ohm resistor

5.0.62 ohm resistor

6.NPN silicon transistor

7.flyback transformer

8.6.2 ohm resistor

9.usb port

10.and couple of diodes and SMD resistor

Page 7: Hardware reverse engineering of PCB(basic) using MATLAB(

Image processingWith your PCB layer images in hand, the next phase is to use an image processing/manipulation tool of your choice to adjust the images, create a stack-up of the layers, and configure the opacity of each so that you can see all copper features at once.

Matlab Code:

rgb=imread('C:\Users\md yasir bashir\Desktop\mini project\cik.JPG');l=rgb2gray(rgb);[k t]=edge(l,'canny',0.15);f=imcomplement(k);figure(1)imshow(f);figure(2)imshow(l);

sample image

copper layer(delayering)

Page 8: Hardware reverse engineering of PCB(basic) using MATLAB(

sample image

Output

Sample image

Page 9: Hardware reverse engineering of PCB(basic) using MATLAB(

Electronic skill’s

This step requires your experience from the circuits that you have seen. It is sort like a jigsaw puzzle, using your brain pattern recognition skills, matching component's connection forming the typical circuits layout that was used.Arrange the connected components in their typical function configuration layout.For example the connection may represent a typical- transistor switch configuration- input switch and pull-up resistor- voltage regulator- amplifier- output- etc...

The process is complex, and it is a never ending topics on reverse engineering. The more you reverse engineer the more you will learn and improve your techniques, finding new ways to decode and learn how other circuits are designed.

Page 10: Hardware reverse engineering of PCB(basic) using MATLAB(

References:-

1. http://www.grandideastudio.com/pcbdt/ 2. pcb_deconstruction_techniques_slides.pdf retrieved from

http://www.grandideastudio.com/pcbdt/ 3. YouTube video:- Tarnovsky Deconstruct Processor, url:

https://www.youtube.com/watch?v=w7PT0nrK2BE4. YouTube video:- DEF CON 22 - Joe Grand aka Kingpin - Deconstructing the Circuit

board Sandwich, url: https://www.youtube.com/watch?v=O8FQZIPkgZM5. DEFCON Conference

NAME: MD YASIR BASHIR

Page 11: Hardware reverse engineering of PCB(basic) using MATLAB(

S.NO: 55

F.NO: 13LEB424