Arrived today, played with it a bit. Arduino provides its own IDE and libraries so basically you're one layer removed from directly hacking the u-controller. Only built the first 4 projects from the PDF that came with the kit.
I also managed to build the crackme I was trying to go for and tested it, seems to work. I think I'll also play with buffer overflows a bit eventually.
If someone knows a simple tool to draw circuits let me know and I'll add the image. Circuit is really simple, red LED and green LED hooked up to pins 10 and 9 of the controller and ground, one 150 ohm resistor per led.
Code:
// Simple crackme, try to get the green light on and red light off
#define PASSWORD_SIZE 100
#define GOOD_PASSWORD "alice"
int redPin = 10;
int greenPin = 9;
char password[PASSWORD_SIZE] = "bob";
void setup() {
pinMode(redPin, OUTPUT);
pinMode(greenPin, OUTPUT);
}
void loop() {
if(strcmp(password,GOOD_PASSWORD)) {
digitalWrite(greenPin, LOW);
digitalWrite(redPin, HIGH);
}
else {
digitalWrite(redPin, LOW);
digitalWrite(greenPin, HIGH);
}
}
As you can see basic Arduino code is a setup() for initialization of stuff and a loop() that acts like a game loop.
pinMode() and digitalWrite() are library functions provided by the Arduino framework. You can set a pin to input (for sensor data etc) or output. Lighting an LED obviously only requires output. digitalWrite is used to switch between HIGH (5V@40mA) and LOW (0V) so if it's set to low nothing flows in the circuit and thus the LED down't shine if it's set to high 5V@40mA flow through.
I'll finish all projects using Arduino only first then I'll recode the crackme stuff without the Arduino libraries. From reading one of the serial communication projects it seems I could add an "Enter PW" prompt over serial.
Next projects is some streetlights with a pushbutton, I think I'll just use that info to use the button to cycle through switching PWs between right and wrong for a bit of debugging.
Last edited by clowntable; 02-01-2012 at 02:14 PM.