Thursday, September 25, 2008

Magnetic card access the electonic way




Magnetic card lock :- step 1Hardware
Obviously, you first must obtain a magnetic stripe reader. I'm using an Omron V3A-4K that I ordered from digikey. It cost me $20.00 or so. If you can't find one of these, any standard TTL reader will do.

Don't worry about buying one of the fancy harnesses that they sell. There are breakout pads on the circuit board inside of the reader. Once you have received your reader, pop off the side cover, and solder wires to the pads as shown in the picture. Of course, if you have a different reader, the wiring will probably be different. In this case, consult your reader's datasheet to locate the necessary pads.

Next, connect the wires to the Arduino's digital pins as follows:

DATA - 2
CLK - 3
LOAD - 5

Finally, connect the +5v and GND to their respective terminals on the Arduino board.





step 2Software
This step is easy. Simply load the attached sketch on to your Arduino.

Note: I didn't write this code, I found it here. I've just attached it here for convenience.

Arduino_Magstripe_Reader.pde4 KB

Program for the access of the magenatic access card lock

/*
* Magnetic Stripe Reader
* by Stephan King http://www.kingsdesign.com
*
* Reads a magnetic stripe.
*
*/

int cld1Pin = 5; // Card status pin
int rdtPin = 2; // Data pin
int reading = 0; // Reading status
volatile int buffer[400]; // Buffer for data
volatile int i = 0; // Buffer counter
volatile int bit = 0; // global bit
char cardData[40]; // holds card info
int charCount = 0; // counter for info
int DEBUG = 0;

void setup() {
Serial.begin(9600);

// The interrupts are key to reliable
// reading of the clock and data feed
attachInterrupt(0, changeBit, CHANGE);
attachInterrupt(1, writeBit, FALLING);
}

void loop(){

// Active when card present
while(digitalRead(cld1Pin) == LOW){
reading = 1;
}

// Active when read is complete
// Reset the buffer
if(reading == 1) {

if (DEBUG == 1) {
printBuffer();
}

decode();
reading = 0;
i = 0;

int l;
for (l = 0; l < 40; l = l + 1) {
cardData[l] = '\n';
}

charCount = 0;
}
}

// Flips the global bit
void changeBit(){
if (bit == 0) {
bit = 1;
} else {
bit = 0;
}
}

// Writes the bit to the buffer
void writeBit(){
buffer[i] = bit;
i++;
}

// prints the buffer
void printBuffer(){
int j;
for (j = 0; j < 200; j = j + 1) {
Serial.println(buffer[j]);
}
}

int getStartSentinal(){
int j;
int queue[5];
int sentinal = 0;

for (j = 0; j < 400; j = j + 1) {
queue[4] = queue[3];
queue[3] = queue[2];
queue[2] = queue[1];
queue[1] = queue[0];
queue[0] = buffer[j];

if (DEBUG == 1) {
Serial.print(queue[0]);
Serial.print(queue[1]);
Serial.print(queue[2]);
Serial.print(queue[3]);
Serial.println(queue[4]);
}

if (queue[0] == 0 & queue[1] == 1 & queue[2] == 0 & queue[3] == 1 & queue[4] == 1) {
sentinal = j - 4;
break;
}
}

if (DEBUG == 1) {
Serial.print("sentinal:");
Serial.println(sentinal);
Serial.println("");
}

return sentinal;
}

void decode() {
int sentinal = getStartSentinal();
int j;
int i = 0;
int k = 0;
int thisByte[5];

for (j = sentinal; j < 400 - sentinal; j = j + 1) {
thisByte[i] = buffer[j];
i++;
if (i % 5 == 0) {
i = 0;
if (thisByte[0] == 0 & thisByte[1] == 0 & thisByte[2] == 0 & thisByte[3] == 0 & thisByte[4] == 0) {
break;
}
printMyByte(thisByte);
}
}

Serial.print("Stripe_Data:");
for (k = 0; k < charCount; k = k + 1) {
Serial.print(cardData[k]);
}
Serial.println("");

}

void printMyByte(int thisByte[]) {
int i;
for (i = 0; i < 5; i = i + 1) {
if (DEBUG == 1) {
Serial.print(thisByte[i]);
}
}
if (DEBUG == 1) {
Serial.print("\t");
Serial.print(decodeByte(thisByte));
Serial.println("");
}

cardData[charCount] = decodeByte(thisByte);
charCount ++;
}

char decodeByte(int thisByte[]) {
if (thisByte[0] == 0 & thisByte[1] == 0 & thisByte[2] == 0 & thisByte[3] == 0 & thisByte[4] == 1){
return '0';
}
if (thisByte[0] == 1 & thisByte[1] == 0 & thisByte[2] == 0 & thisByte[3] == 0 & thisByte[4] == 0){
return '1';
}

if (thisByte[0] == 0 & thisByte[1] == 1 & thisByte[2] == 0 & thisByte[3] == 0 & thisByte[4] == 0){
return '2';
}

if (thisByte[0] == 1 & thisByte[1] == 1 & thisByte[2] == 0 & thisByte[3] == 0 & thisByte[4] == 1){
return '3';
}

if (thisByte[0] == 0 & thisByte[1] == 0 & thisByte[2] == 1 & thisByte[3] == 0 & thisByte[4] == 0){
return '4';
}

if (thisByte[0] == 1 & thisByte[1] == 0 & thisByte[2] == 1 & thisByte[3] == 0 & thisByte[4] == 1){
return '5';
}

if (thisByte[0] == 0 & thisByte[1] == 1 & thisByte[2] == 1 & thisByte[3] == 0 & thisByte[4] == 1){
return '6';
}

if (thisByte[0] == 1 & thisByte[1] == 1 & thisByte[2] == 1 & thisByte[3] == 0 & thisByte[4] == 0){
return '7';
}

if (thisByte[0] == 0 & thisByte[1] == 0 & thisByte[2] == 0 & thisByte[3] == 1 & thisByte[4] == 0){
return '8';
}

if (thisByte[0] == 1 & thisByte[1] == 0 & thisByte[2] == 0 & thisByte[3] == 1 & thisByte[4] == 1){
return '9';
}

if (thisByte[0] == 0 & thisByte[1] == 1 & thisByte[2] == 0 & thisByte[3] == 1 & thisByte[4] == 1){
return ':';
}

if (thisByte[0] == 1 & thisByte[1] == 1 & thisByte[2] == 0 & thisByte[3] == 1 & thisByte[4] == 0){
return ';';
}

if (thisByte[0] == 0 & thisByte[1] == 0 & thisByte[2] == 1 & thisByte[3] == 1 & thisByte[4] == 1){
return '<';
}

if (thisByte[0] == 1 & thisByte[1] == 0 & thisByte[2] == 1 & thisByte[3] == 1 & thisByte[4] == 0){
return '=';
}

if (thisByte[0] == 0 & thisByte[1] == 1 & thisByte[2] == 1 & thisByte[3] == 1 & thisByte[4] == 0){
return '>';
}

if (thisByte[0] == 1 & thisByte[1] == 1 & thisByte[2] == 1 & thisByte[3] == 1 & thisByte[4] == 1){
return '?';
}
}

step 3Use it!
Finally, simply open the serial connection in the arduino applet, and start swiping cards! The decoded data from the card will appear in the window as soon as you swipe one.

Silica the wifi hacking hardware

HACK ANY COMPUTER VIA SILICA

A. Silica :-It is a device that uses “CANVAS” a software which uses to scan a WI-FI and launches the exploit code itself and connects to the system for the usage it uses a hand held PDA. It uses a immunity tablet of Nokia 770.but it can be customized for a large range of hardware devices. It works on the touch screen Technologies it can be handled in by a stylus. The stylus can launch the silica (hardware device) into the attack and then can be putted into yours pocket. It can run a drive-by-pen test .we can start it run a Scan connect to the WI-FI, run the exploit and get the html report that what is done.

B. Now about the cost Issues:-it makes a large buck to be settled in the Indian market it costs just for Rs 151,200($3,600). The matter will be the cost issues for my Indian Friends. And the company asks for the recognisation of the buyers identity, from where the money is coming in, and to whom and where the product it getting shipping in.

C. Some Example of the Silica Product:-
Tell the silica to scan the every device on every WI-FI networks for file sharing and that downloads anything of the internet to the device. Then just put it in your pocket and walk in to the workplace of your target. A. Silica :-It is a device that uses “CANVAS” a software which uses to scan a WI-FI and launches the exploit code itself and connects to the system for the usage it uses a hand held PDA. It uses a immunity tablet of Nokia 770.but it can be customized for a large range of hardware devices. It works on the touch screen Technologies it can be handled in by a stylus. The stylus can launch the silica (hardware device) into the attack and then can be putted into yours pocket. It can run a drive-by-pen test .we can start it run a Scan connect to the WI-FI, run the exploit and get the html report that what is done.

B. Now about the cost Issues:-it makes a large buck to be settled in the Indian market it costs just for Rs 151,200($3,600). The matter will be the cost issues for my Indian Friends. And the company asks for the recognisation of the buyers identity, from where the money is coming in, and to whom and where the product it getting shipping in.

C. Some Example of the Silica Product:-
Tell the silica to scan the every device on every WI-FI networks for file sharing and that downloads anything of the internet to the device. Then just put it in your pocket and walk in to the workplace of your target.

Tell silica to actively penetrate any machine it can target and have all the machines successfully penetrated machines connect via HTTP/DNS at an external listing port.

Mail silica to the Targets CEO, Then let it turn on and hack anything it can as it sits on the desk

Have the device conduct MITM (Man-in –The-Middle) attacks against the computer connected to wireless network.


Tell silica to actively penetrate any machine it can target and have all the machines successfully penetrated machines connect via HTTP/DNS at an external listing port.

Mail silica to the Targets CEO, Then let it turn on and hack anything it can as it sits on the desk

Have the device conduct MITM (Man-in –The-Middle) attacks against the computer connected to wireless network.