Manual Cyberattack Proceso

Page 1

CYBERATTACK MANUAL PROCESO


REINTERPRETACIÓN JUEGO

Inicialmente decicimos trabajar con el juego de Twister. Este juego Fue una de las primeras modas dentro de la industria juguetera. Además fue capaz de llegar a todos los grupos de edad, desde adultos a los más pequeños de la casa, y poco a poco se fue extendiendo a nivel mundial. PROPUESTA: 1. El display nombra a todos los jugadores 2. Una vez estén inscritos, serán llamados por su nombre y recibirán la indicación de qué parte del cuerpo mover. 3. Si apoyas una rodilla o codo en el tapete, o si te caes, estás eliminado! ¿CÓMO JUGAR? 1. Extiende el tapete 2. Ingresa los nombres en el display 3. El tapete alumbrará un círculo y le indicará a un jugador ue parte del cuerpo colocar en el círculo seleccionado


Propuesta grรกfica del juego modificado

Ilustraciรณn dinรกmicas del juego


VIDEO MAGO DE OZ 1

2

3

4

5

https://www.youtube.com/watch?v=RZeq9_O00cI&feature=youtu.be


PROTOTIPO FUNCIONAL

Para la siguiente etapa decidimos cambiar nuestra idea inicial, y para ello creamos el juego de WAR ZONE el cual es una mezcla entre banderitas o capture the flag, y buscaminas; ya que retoma la idea de capturar la bandera y le agrega el elemento sorpresa de las trampas.


Instrucciones del juego


Materiales y cรณdigo

#include <Grove_LED_Bar.h> #include <AddicoreRFID.h> #include <Grove_LED_Bar.h> // Example sketch to read the ID from an Addicore 13.56MHz RFID tag // as found in the RFID AddiKit found at: // http://www.addicore.com/RFID-AddiKit-with-RC522-MIFARE-Module-RFID-Cards-p/126.htm #include <AddicoreRFID.h> #include <SPI.h> #define uchar unsigned char #define uint unsigned int uchar fifobytes; uchar fifoValue;


AddicoreRFID myRFID; // create AddicoreRFID object to control the RFID module ///////////////////////////////////////////////////////////////////// //set the pins ///////////////////////////////////////////////////////////////////// const int chipSelectPin = 10; const int NRSTPD = 5; int elegido; //Maximum length of the array #define MAX_LEN 16 int t1= 118; int t2= 71; int t3= 237; int t4= 27; int t[ ]={t1,t2,t3,t4}; int misbanderas; long r; int ledPin1 = 7; int ledPin2 = 5; Grove_LED_Bar bar(7, 6, 0); // Clock pin, Data pin, Orientation void setup() { pinMode(ledPin1, OUTPUT); // set ledPin pin as output pinMode(ledPin2, OUTPUT); // set ledPin pin as output Serial.begin(9600);

// RFID reader SOUT pin connected to Serial RX pin at 9600bps

// start the SPI library: SPI.begin(); pinMode(chipSelectPin,OUTPUT); /ENABLE pin digitalWrite(chipSelectPin, LOW); pinMode(NRSTPD,OUTPUT); digitalWrite(NRSTPD, HIGH); myRFID.AddicoreRFID_Init(); elegido=t[int(random(3))]; } void loop() {

// Set digital pin 10 as OUTPUT to connect it to the RFID // Activate the RFID reader // Set digital pin 10 , Not Reset and Power-down


uchar i, tmp, checksum1; uchar status; uchar str[MAX_LEN]; uchar RC_size; uchar blockAddr; //Selection operation block address 0 to 63 String mynum = ""; str[1] = 0x4400; //Find tags, return tag type status = myRFID.AddicoreRFID_Request(PICC_REQIDL, str); if (status == MI_OK) { Serial.println("Reloj detectado"); uint tagType = str[0] << 8; tagType = tagType + str[1]; switch (tagType) { case 0x4400: break; case 0x400: break; case 0x200: break; case 0x800: Serial.println("Mifare Pro (X)"); break; case 0x4403:

}

}

break; default: Serial.println("Unknown"); break;

//Anti-collision, return tag serial number 4 bytes status = myRFID.AddicoreRFID_Anticoll(str); if (status == MI_OK) { checksum1 = str[0] ^ str[1] ^ str[2] ^ str[3]; // // // // // //

r = random(1,4); int misbanderas; misbanderas = r; if (t==1){ misbanderas =118;


// // // // // // //

} if (t==2) {misbanderas = 71; } if (t==3) { misbanderas = 237; } if (t==4) { misbanderas =27; }

// //

int sens; sens = funRandom();

// if(t1= elegido) //You can change this to the first byte of your tag by finding the card's ID through the Serial Monitor // {Serial.println("\nTBANDERA EXITOSA\n"); } // else if (t1 != elegido) // {Serial.println("\nTRAMPA1\n");} // // else if(t2= elegido) //You can change this to the first byte of your tag by finding the card's ID through the Serial Monitor // {Serial.println("\nTBANDERA EXITOSA\n"); } // else if (t2 != elegido) // {Serial.println("\nTRAMPA2\n");} // // else if(t3= elegido) //You can change this to the first byte of your tag by finding the card's ID through the Serial Monitor // { Serial.println("\nTBANDERA EXITOSA\n"); } // else if (t3 != elegido) // {Serial.println("\nTRAMPA3\n");} // // else if(t4= elegido) //You can change this to the first byte of your tag by finding the card's ID through the Serial Monitor // {Serial.println("\nTBANDERA EXITOSA\n"); } // else if (t4 != elegido) // {Serial.println("\nTRAMPA4\n");} // // //

else if (str[0] =2) {Serial.println("\nTRAMPA2\n");} if (str[0] != elegido) { Serial.println("\nTRAMPA\n"); digitalWrite(ledPin1, LOW); // set the LED on delay(200); // wait for a second digitalWrite(ledPin2, HIGH); // set the LED on delay(200); // wait for a second } else if (str[0] == elegido) { //You can change this to the first byte of your tag by finding the card's ID through the Serial


Monitor

Serial.println("\nBANDERA EXITOSA!\n"); digitalWrite(ledPin1, HIGH); // set the LED on delay(200); // wait for a second digitalWrite(ledPin2, LOW); // set the LED on delay(200); // wait for a second

Serial.println(); delay(1000); return random(1,4); // // Should really check all pairs, but for now we'll just use the first // if(str[0] = funRandom ()) //You can change this to the first byte of your tag by finding the card's ID through the Serial Monitor // { // Serial.println("\nBANDERA EXITOSA!\n"); // // } else if(str[0] =! funRandom ()) { //You can change this to the first byte of your tag by finding the card's ID through the Serial Monitor // Serial.println("\nTRAMPA\n"); // } // Serial.println(); // delay(1000); // }

myRFID.AddicoreRFID_Halt(); //Command tag into hibernation

} // // // // // // // //

// // //

int funRandom () { r = random(1,4); randomNumber = random (1,4); int rotacion(4) = {t1,t2,t3,t4}; if (str [0] = elegido) { random()==0; }

{ randomNumber = random(1,4); int rotaciรณn(4) = {T1,T2,T3,T4};


PROTOTIPO FUNCIOANL

Si la bandera era trampa se alumbraba rojo. Si la bandera era exitosa, se alumbraba verde. La pantalla del computador tenía abierto el programa de arduino para indicar si era trampa o no y además para indicar cúal era la siguiente badera exitosa.

Conclusiones: Las personas se animaban al saber que cogían una badera correcta. Toca rectificar el tiempo de lectura del RFID ya que si se dejaba mucho tiempo este leía contsantemente. Mirar cómo integrar el Grove led bar al juego. Tocaba generar más la dinámica planteada y para esto el juego tenía que ser wireless. El random y los lectores cumplían su propósito.


DISEÑO FÍSICO DEL JUEGO

Conexiones arduino.

Corte Laser

Ensamblaje



Juego final

CYBERATTACK SOLO TÚ PUEDES SALVAR AL MUNDO DEL VIRUS MUNDIAL


INSTRUCIONES



MISIÓN En el año 2050 el mundo será atacado por unos hackers los cuales pretenden robarse toda la información del mundo. Tu misión es impedir que esto pase, y para ello tendrás que atacar con tu pistola y atrapar el código que evitará este robo. Pero ten cuidado, los hackers insertaron sus virus en todas partes, así que tienes que evitar coger las banderas infectadas. El primero que logre recolectar los 10 pedazos de código será el ganador

CÓDIGO SERVIDOR FINAL /* File: RestServer.ino This example for the Arduino Uno WiFi shows how to access the digital and analog pins of the board through REST calls. It demonstrates how you can create your own API using REST style. Possible commands created in this shetch: "/arduino/digital/13" -> digitalRead(13) "/arduino/digital/13/1" -> digitalWrite(13, HIGH) "/arduino/analog/2/123" -> analogWrite(2, 123) "/arduino/analog/2" -> analogRead(2) "/arduino/mode/13/input" -> pinMode(13, INPUT) "/arduino/mode/13/output" -> pinMode(13, OUTPUT) This example code is part of the public domain Note: works only with Arduino Uno WiFi Developer Edition. http://www.arduino.org/learning/tutorials/boards-tutorials/restserver-and-restclient */ #include <Wire.h> #include <UnoWiFiDevEd.h> #include <Grove_LED_Bar.h> #include <AddicoreRFID.h> #define uchar unsigned char #define uint unsigned int uchar fifobytes;


uchar fifoValue; AddicoreRFID myRFID; // create AddicoreRFID object to control the RFID module int elegido = 118; int t0 = 0; int t1 = 118; int t2 = 71; int t3 = 237; int t4 = 27; int t5 = 149; int t6 = 197; int t7 = 229; int t8 = 133; long r; //random variable int contador = 0; //cuenta el nĂşmero de banderas exitosas y trampas para acumularlas en el Grove Bar Grove_LED_Bar bar(3, 2, 0); // Clock pin, Data pin, Orientation void setup() { Wifi.begin(); Wifi.println("REST Server is up"); Serial.begin(9600); // RFID reader SOUT pin connected to Serial RX pin at 9600bps myRFID.AddicoreRFID_Init(); }

void loop() { while (Wifi.available()) { process(Wifi); } delay(50); uchar i, tmp, checksum1; uchar status; uchar str[MAX_LEN]; uchar RC_size; uchar blockAddr; //Selection operation block address 0 to 63 String mynum = "";


str[1] = 0x4400; //Find tags, return tag type status = myRFID.AddicoreRFID_Request(PICC_REQIDL, str); if (status == MI_OK) { Serial.println("Reloj detectado"); uint tagType = str[0] << 8; tagType = tagType + str[1]; } //Anti-collision, return tag serial number 4 bytes status = myRFID.AddicoreRFID_Anticoll(str); if (status == MI_OK) { checksum1 = str[0] ^ str[1] ^ str[2] ^ str[3]; } myRFID.AddicoreRFID_Halt(); //Command tag into hibernation if (str[0] != elegido && str[0] != 87 && contador > 0) //Si la bandera es una trampa { Serial.println("\nTRAMPA\n"); delay(1000); contador --; Serial.println (contador); } else if (str[0] == elegido) // Si la bandera es exitosa { Serial.println("\nBANDERA EXITOSA!\n"); delay(1000); contador ++; contador ++; ///////////aca va el random //Serial.println (contador); hacerRandom(); } if (contador == 0)


{

bar.setBits(0x0); //Apaga todos los leds de la Grove Bar } if (contador == 1) { bar.setLed(1, 1); bar.setLed(2, 0); bar.setLed(3, 0); bar.setLed(4, 0); bar.setLed(5, 0); bar.setLed(6, 0); bar.setLed(7, 0); bar.setLed(8, 0); bar.setLed(9, 0); bar.setLed(10, 0); } if (contador == 2) { bar.setLed(1, 1); bar.setLed(2, 1); bar.setLed(3, 0); bar.setLed(4, 0); bar.setLed(5, 0); bar.setLed(6, 0); bar.setLed(7, 0); bar.setLed(8, 0); bar.setLed(9, 0); bar.setLed(10, 0); } if (contador == 3) { bar.setLed(1, 1); bar.setLed(2, 1); bar.setLed(3, 1); bar.setLed(4, 0); bar.setLed(5, 0); bar.setLed(6, 0); bar.setLed(7, 0); bar.setLed(8, 0); bar.setLed(9, 0); bar.setLed(10, 0); } if (contador == 4) {

}

bar.setLed(1, 1); bar.setLed(2, 1); bar.setLed(3, 1); bar.setLed(4, 1); bar.setLed(5, 0); bar.setLed(6, 0); bar.setLed(7, 0); bar.setLed(8, 0); bar.setLed(9, 0); bar.setLed(10, 0);

if (contador == 5) { bar.setLed(1, 1); bar.setLed(2, 1); bar.setLed(3, 1); bar.setLed(4, 1); bar.setLed(5, 1); bar.setLed(6, 0); bar.setLed(7, 0); bar.setLed(8, 0); bar.setLed(9, 0); bar.setLed(10, 0); } if (contador == 6) { bar.setLed(1, 1); bar.setLed(2, 1); bar.setLed(3, 1); bar.setLed(4, 1); bar.setLed(5, 1); bar.setLed(6, 1); bar.setLed(7, 0); bar.setLed(8, 0); bar.setLed(9, 0); bar.setLed(10, 0); } if (contador == 7) { bar.setLed(1, 1); bar.setLed(2, 1); bar.setLed(3, 1); bar.setLed(4, 1); bar.setLed(5, 1); bar.setLed(6, 1); bar.setLed(7, 1); bar.setLed(8, 0); bar.setLed(9, 0);


}

bar.setLed(10, 0);

}

if (contador == 8) { bar.setLed(1, 1); bar.setLed(2, 1); bar.setLed(3, 1); bar.setLed(4, 1); bar.setLed(5, 1); bar.setLed(6, 1); bar.setLed(7, 1); bar.setLed(8, 1); bar.setLed(9, 0); bar.setLed(10, 0); }

if (r == 3) { elegido = t3; } if (r == 4) { elegido = t4; } if (r == 5) { elegido = t5; }

if (contador == 9) { bar.setLed(1, 1); bar.setLed(2, 1); bar.setLed(3, 1); bar.setLed(4, 1); bar.setLed(5, 1); bar.setLed(6, 1); bar.setLed(7, 1); bar.setLed(8, 1); bar.setLed(9, 1); bar.setLed(10, 0); }

}

if (contador == 10) { bar.setBits(0x3ff ); // Turn on all LEDs }

// Nueva funciรณn para hacer random void hacerRandom () { r = random(1, 8); if (r == 1) { elegido = t1; } if (r == 2) {

elegido = t2;

if (r == 6) { elegido = t6; } if (r == 7) { elegido = t7; } if (r == 8) { elegido = t8; } } void process(WifiData client) { // read the command String command = client.readStringUntil('/'); Serial.println(command); // is "digital" command? if (command == "digital") { digitalCommand(client); } // is "analog" command?


if (command == "analog") { analogCommand(client); } // is "mode" command? if (command == "mode") { modeCommand(client); } } // Para devolver la bandera void digitalCommand(WifiData client) {

}

// Send feedback to client client.println("HTTP/1.1 200 OK\n"); client.println(elegido); client.print(EOL); //char terminator

// Para hacer random void analogCommand(WifiData client) { // llama la funcion para hacer random! hacerRandom(); client.println("HTTP/1.1 200 OK\n"); client.print(F("La nueva bandera es: ")); client.print(elegido); client.print(EOL); //char terminator } void modeCommand(WifiData client) { // Send feedback to client client.println("HTTP/1.1 200 OK\n"); client.print(F("Pin D")); //client.print(pin); client.println(F(" configured as INPUT!")); client.print(EOL); //char terminator }


CÓDIGO FINAL CLIENTE #include <Wire.h> #include <UnoWiFiDevEd.h> // cual es la bandera int elegido = 0; #include <Grove_LED_Bar.h> #include <AddicoreRFID.h> #define uchar unsigned char #define uint unsigned int uchar fifobytes; uchar fifoValue; AddicoreRFID myRFID; // create AddicoreRFID object to control the RFID module const char* connector = "rest"; //////////////////////////////////////////////////// REVISAR IP DEL SERVIDOR const char* server = "192.168.1.17 "; const char* method = "GET"; const char* getBandera = "/arduino/digital"; const char* randomBandera = "/arduino/analog"; int contador = 0; //cuenta el número de banderas exitosas y trampas para acumularlas en el Grove Bar Grove_LED_Bar bar(3, 2, 0); // Clock pin, Data pin, Orientation void setup() { Serial.begin(9600); Ciao.begin(); pinMode(2, INPUT); myRFID.AddicoreRFID_Init(); /*


}

delay(5000); doRequest(connector, server, getBandera, method); delay(5000); doRandom(connector, server, randomBandera, method); delay(5000); doRequest(connector, server, getBandera, method); */

void loop() { uchar i, tmp, checksum1; uchar status; uchar str[MAX_LEN]; uchar RC_size; uchar blockAddr; //Selection operation block address 0 to 63 String mynum = ""; str[1] = 0x4400; //Find tags, return tag type status = myRFID.AddicoreRFID_Request(PICC_REQIDL, str); if (status == MI_OK) { Serial.println("Reloj detectado"); uint tagType = str[0] << 8; tagType = tagType + str[1]; } //Anti-collision, return tag serial number 4 bytes status = myRFID.AddicoreRFID_Anticoll(str); if (status == MI_OK) { checksum1 = str[0] ^ str[1] ^ str[2] ^ str[3]; doRequest(connector, server, getBandera, method);

//poner doRequest


} myRFID.AddicoreRFID_Halt(); //Command tag into hibernation if (str[0] != elegido && str[0] != 87 && contador > 0) //Si la bandera es una trampa { Serial.println("\nTRAMPA\n"); delay(1000); contador --; Serial.println (contador); } else if (str[0] == elegido) // Si la bandera es exitosa { Serial.println("\nBANDERA EXITOSA!\n"); delay(1000); contador ++; contador ++; doRandom(connector, server, randomBandera, method); }

Serial.println (contador);

if (contador == 0) { bar.setBits(0x0); //Apaga todos los leds de la Grove Bar } if (contador == 1) { bar.setLed(1, 1); bar.setLed(2, 0); bar.setLed(3, 0); bar.setLed(4, 0); bar.setLed(5, 0); bar.setLed(6, 0); bar.setLed(7, 0); bar.setLed(8, 0); bar.setLed(9, 0); bar.setLed(10, 0); }


if (contador == 2) { bar.setLed(1, 1); bar.setLed(2, 1); bar.setLed(3, 0); bar.setLed(4, 0); bar.setLed(5, 0); bar.setLed(6, 0); bar.setLed(7, 0); bar.setLed(8, 0); bar.setLed(9, 0); bar.setLed(10, 0); }

if (contador == 5) { bar.setLed(1, 1); bar.setLed(2, 1); bar.setLed(3, 1); bar.setLed(4, 1); bar.setLed(5, 1); bar.setLed(6, 0); bar.setLed(7, 0); bar.setLed(8, 0); bar.setLed(9, 0); bar.setLed(10, 0); }

if (contador == 3) { bar.setLed(1, 1); bar.setLed(2, 1); bar.setLed(3, 1); bar.setLed(4, 0); bar.setLed(5, 0); bar.setLed(6, 0); bar.setLed(7, 0); bar.setLed(8, 0); bar.setLed(9, 0); bar.setLed(10, 0); }

if (contador == 6) { bar.setLed(1, 1); bar.setLed(2, 1); bar.setLed(3, 1); bar.setLed(4, 1); bar.setLed(5, 1); bar.setLed(6, 1); bar.setLed(7, 0); bar.setLed(8, 0); bar.setLed(9, 0); bar.setLed(10, 0); }

if (contador == 4) { bar.setLed(1, 1); bar.setLed(2, 1); bar.setLed(3, 1); bar.setLed(4, 1); bar.setLed(5, 0); bar.setLed(6, 0); bar.setLed(7, 0); bar.setLed(8, 0); bar.setLed(9, 0); bar.setLed(10, 0); }

if (contador == 7) { bar.setLed(1, 1); bar.setLed(2, 1); bar.setLed(3, 1); bar.setLed(4, 1); bar.setLed(5, 1); bar.setLed(6, 1); bar.setLed(7, 1); bar.setLed(8, 0); bar.setLed(9, 0); bar.setLed(10, 0);


} if (contador == 8) { bar.setLed(1, 1); bar.setLed(2, 1); bar.setLed(3, 1); bar.setLed(4, 1); bar.setLed(5, 1); bar.setLed(6, 1); bar.setLed(7, 1); bar.setLed(8, 1); bar.setLed(9, 0); bar.setLed(10, 0); } if (contador == 9) { bar.setLed(1, 1); bar.setLed(2, 1); bar.setLed(3, 1); bar.setLed(4, 1); bar.setLed(5, 1); bar.setLed(6, 1); bar.setLed(7, 1); bar.setLed(8, 1); bar.setLed(9, 1); bar.setLed(10, 0); } if (contador == 10) { bar.setBits(0x3ff ); // Turn on all LEDs } } void doRequest(const char* conn, const char* server, const char* command, const char* method) {


CiaoData data = Ciao.write(conn, server, command, method); if (!data.isEmpty()) { Ciao.println( "State: " + String (data.get(1)) ); Ciao.println( "Response: " + String (data.get(2)) ); Serial.println( "State: " + String (data.get(1)) ); String temp = String(data.get(2)); Serial.println( "Response: " + temp ); elegido = temp.toInt(); Serial.println(elegido, DEC);

}

} else { Ciao.println ("Write Error"); Serial.println ("Write Error"); }

void doRandom(const char* conn, const char* server, const char* command, const char* method) { CiaoData data = Ciao.write(conn, server, command, method); if (!data.isEmpty()) { Ciao.println( "State: " + String (data.get(1)) ); Ciao.println( "Response: " + String (data.get(2)) ); Serial.println( "State: " + String (data.get(1)) ); Serial.println( "Response: " + String (data.get(2)) ); } else { Ciao.println ("Write Error"); Serial.println ("Write Error"); } }


DISEÑO FÍSICO FINAL


VIDEO PROTOTIPO FINAL


VIDEO PROMOCIONAL FINAL


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.