Tuesday, May 30, 2023

Hacktivity 2018 Badge - Quick Start Guide For Beginners

You either landed on this blog post because 
  • you are a huge fan of Hacktivity
  • you bought this badge around a year ago
  • you are just interested in hacker conference badge hacking. 
or maybe all of the above. Whatever the reasons, this guide should be helpful for those who never had any real-life experience with these little gadgets. 
But first things first, here is a list what you need for hacking the badge:
  • a computer with USB port and macOS, Linux or Windows. You can use other OS as well, but this guide covers these
  • USB mini cable to connect the badge to the computer
  • the Hacktivity badge from 2018
By default, this is how your badge looks like.


Let's get started

Luckily, you don't need any soldering skills for the first steps. Just connect the USB mini port to the bottom left connector on the badge, connect the other part of the USB cable to your computer, and within some seconds you will be able to see that the lights on your badge are blinking. So far so good. 

Now, depending on which OS you use, you should choose your destiny here.

Linux

The best source of information about a new device being connected is
# dmesg

The tail of the output should look like
[267300.206966] usb 2-2.2: new full-speed USB device number 14 using uhci_hcd [267300.326484] usb 2-2.2: New USB device found, idVendor=0403, idProduct=6001 [267300.326486] usb 2-2.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [267300.326487] usb 2-2.2: Product: FT232R USB UART [267300.326488] usb 2-2.2: Manufacturer: FTDI [267300.326489] usb 2-2.2: SerialNumber: AC01U4XN [267300.558684] usbcore: registered new interface driver usbserial_generic [267300.558692] usbserial: USB Serial support registered for generic [267300.639673] usbcore: registered new interface driver ftdi_sio [267300.639684] usbserial: USB Serial support registered for FTDI USB Serial Device [267300.639713] ftdi_sio 2-2.2:1.0: FTDI USB Serial Device converter detected [267300.639741] usb 2-2.2: Detected FT232RL [267300.643235] usb 2-2.2: FTDI USB Serial Device converter now attached to ttyUSB0 

Dmesg is pretty kind to us, as it even notifies us that the device is now attached to ttyUSB0. 

From now on, connecting to the device is exactly the same as it is in the macOS section, so please find the "Linux users, read it from here" section below. 

macOS

There are multiple commands you can type into Terminal to get an idea about what you are looking at. One command is:
# ioreg -p IOUSB -w0 -l

With this command, you should get output similar to this:

+-o FT232R USB UART@14100000  <class AppleUSBDevice, id 0x100005465, registered, matched, active, busy 0 (712 ms), retain 20>     |   {     |     "sessionID" = 71217335583342     |     "iManufacturer" = 1     |     "bNumConfigurations" = 1     |     "idProduct" = 24577     |     "bcdDevice" = 1536     |     "Bus Power Available" = 250     |     "USB Address" = 2     |     "bMaxPacketSize0" = 8     |     "iProduct" = 2     |     "iSerialNumber" = 3     |     "bDeviceClass" = 0     |     "Built-In" = No     |     "locationID" = 336592896     |     "bDeviceSubClass" = 0     |     "bcdUSB" = 512     |     "USB Product Name" = "FT232R USB UART"     |     "PortNum" = 1     |     "non-removable" = "no"     |     "IOCFPlugInTypes" = {"9dc7b780-9ec0-11d4-a54f-000a27052861"="IOUSBFamily.kext/Contents/PlugIns/IOUSBLib.bundle"}     |     "bDeviceProtocol" = 0     |     "IOUserClientClass" = "IOUSBDeviceUserClientV2"     |     "IOPowerManagement" = {"DevicePowerState"=0,"CurrentPowerState"=3,"CapabilityFlags"=65536,"MaxPowerState"=4,"DriverPowerState"=3}     |     "kUSBCurrentConfiguration" = 1     |     "Device Speed" = 1     |     "USB Vendor Name" = "FTDI"     |     "idVendor" = 1027     |     "IOGeneralInterest" = "IOCommand is not serializable"     |     "USB Serial Number" = "AC01U4XN"     |     "IOClassNameOverride" = "IOUSBDevice"     |   }  
The most important information you get is the USB serial number - AC01U4XN in my case.
Another way to get this information is
# system_profiler SPUSBDataType  
which will give back something similar to:
FT232R USB UART:            Product ID: 0x6001           Vendor ID: 0x0403  (Future Technology Devices International Limited)           Version: 6.00           Serial Number: AC01U4XN           Speed: Up to 12 Mb/sec           Manufacturer: FTDI           Location ID: 0x14100000 / 2           Current Available (mA): 500           Current Required (mA): 90           Extra Operating Current (mA): 0 

The serial number you got is the same.

What you are trying to achieve here is to connect to the device, but in order to connect to it, you have to know where the device in the /dev folder is mapped to. A quick and dirty solution is to list all devices under /dev when the device is disconnected, once when it is connected, and diff the outputs. For example, the following should do the job:

ls -lha /dev/tty* > plugged.txt ls -lha /dev/tty* > np.txt vimdiff plugged.txt np.txt 

The result should be obvious, /dev/tty.usbserial-AC01U4XN is the new device in case macOS. In the case of Linux, it was /dev/ttyUSB0.

Linux users, read it from here. macOS users, please continue reading

Now you can use either the built-in screen command or minicom to get data out from the badge. Usually, you need three information in order to communicate with a badge. Path on /dev (you already got that), speed in baud, and the async config parameters. Either you can guess the speed or you can Google that for the specific device. Standard baud rates include 110, 300, 600, 1200, 2400, 4800, 9600, 14400, 19200, 38400, 57600, 115200, 128000 and 256000 bits per second. I usually found 1200, 9600 and 115200 a common choice, but that is just me.
Regarding the async config parameters, the default is that 8 bits are used, there is no parity bit, and 1 stop bit is used. The short abbreviation for this is 8n1. In the next example, you will use the screen command. By default, it uses 8n1, but it is called cs8 to confuse the beginners.

If you type:
# screen /dev/tty.usbserial-AC01U4XN 9600
or
# screen /dev/ttyUSB0 9600
and wait for minutes and nothing happens, it is because the badge already tried to communicate via the USB port, but no-one was listening there. Disconnect the badge from the computer, connect again, and type the screen command above to connect. If you are quick enough you can see that the amber LED will stop blinking and your screen command is greeted with some interesting information. By quick enough I mean ˜90 seconds, as it takes the device 1.5 minutes to boot the OS and the CTF app.

Windows

When you connect the device to Windows, you will be greeted with a pop-up.

Just click on the popup and you will see the COM port number the device is connected to:


In this case, it is connected to COM3. So let's fire up our favorite putty.exe, select Serial, choose COM3, add speed 9600, and you are ready to go!


You might check the end of the macOS section in case you can't see anything. Timing is everything.

The CTF

Welcome to the Hacktivity 2018 badge challenge!  This challenge consists of several tasks with one or more levels of difficulty. They are all connected in some way or another to HW RE and there's no competition, the whole purpose is to learn things.  Note: we recommend turning on local echo in your terminal! Also, feel free to ask for hints at the Hackcenter!  Choose your destiny below:    1. Visual HW debugging   2. Reverse engineering   3. RF hacking   4. Crypto protection  Enter the number of the challenge you're interested in and press [ 
Excellent, now you are ready to hack this! In case you are lost in controlling the screen command, go to https://linuxize.com/post/how-to-use-linux-screen/.

I will not spoil any fun in giving out the challenge solutions here. It is still your task to find solutions for these.

But here is a catch. You can get a root shell on the device. And it is pretty straightforward. Just carefully remove the Omega shield from the badge. Now you see two jumpers; by default, these are connected together as UART1. As seen below.



But what happens if you move these jumpers to UART0? Guess what, you can get a root shell! This is what I call privilege escalation on the HW level :) But first, let's connect the Omega shield back. Also, for added fun, this new interface speaks on 115200 baud, so you should change your screen parameters to 115200. Also, the new interface has a different ID under /dev, but I am sure you can figure this out from now on.




If you connect to the device during boot time, you can see a lot of exciting debug information about the device. And after it boots, you just get a root prompt. Woohoo! 
But what can you do with this root access? Well, for starters, how about running 
# strings hello | less

From now on, you are on your own to hack this badge. Happy hacking.
Big thanks to Attila Marosi-Bauer and Hackerspace Budapest for developing this badge and the contests.

PS: In case you want to use the radio functionality of the badge, see below how you should solder the parts to it. By default, you can process slow speed radio frequency signals on GPIO19. But for higher transfer speeds, you should wire the RF module DATA OUT pin with the RX1 free together.



More articles


  1. Nsa Hacker Tools
  2. Hacker Tools
  3. How To Make Hacking Tools
  4. Pentest Tools Android
  5. Hacker Tools Apk
  6. Top Pentest Tools
  7. Hacking Tools 2020
  8. Pentest Box Tools Download
  9. Black Hat Hacker Tools
  10. Hacking Tools Software
  11. Computer Hacker
  12. Hacker Tools 2019
  13. Hacking Apps
  14. Hacking Tools Mac
  15. Top Pentest Tools
  16. Hack Apps
  17. Hacking Tools For Pc
  18. Hacking Tools For Windows
  19. Hacker Tools Online
  20. Hacking Tools For Windows 7
  21. Pentest Tools Subdomain
  22. Pentest Recon Tools
  23. Pentest Tools For Windows
  24. Hacker Search Tools
  25. Hacking Tools For Windows Free Download
  26. Wifi Hacker Tools For Windows
  27. Hack App
  28. Hacker Tools 2020
  29. Hacking Tools For Windows Free Download
  30. Pentest Tools Alternative
  31. Pentest Tools Online
  32. Hack Tools Download
  33. Pentest Tools Port Scanner
  34. Hack App
  35. Hackers Toolbox
  36. Computer Hacker
  37. Pentest Tools Alternative
  38. Hacking Tools Software
  39. Hack Tools 2019
  40. Hacking Tools Windows 10
  41. Hacking Tools
  42. Hacker Search Tools
  43. Hacker Security Tools
  44. Hacking Tools Github
  45. Pentest Tools Review
  46. Hacking Tools Hardware
  47. Hacking Tools Name
  48. Hacking Apps
  49. Hacker Tools For Windows
  50. Hacking Tools For Windows Free Download
  51. Install Pentest Tools Ubuntu
  52. Hak5 Tools
  53. What Are Hacking Tools
  54. Hak5 Tools
  55. Hack Tools For Mac
  56. Hacker Tools Free
  57. Hacking Tools Mac
  58. Pentest Tools Review
  59. Pentest Tools Apk
  60. Hack Rom Tools
  61. Hacking Tools 2020
  62. Easy Hack Tools
  63. How To Make Hacking Tools
  64. Pentest Reporting Tools
  65. Hack Tools For Games
  66. Hacks And Tools
  67. Hacker Tools Online
  68. Hacking Tools For Kali Linux
  69. Hack Tools For Windows
  70. Hak5 Tools
  71. Hacker Tools For Windows
  72. Pentest Tools Tcp Port Scanner
  73. Hacker
  74. Hacker Tools Apk
  75. Hacker Tools For Ios
  76. Hacker Security Tools
  77. Hacker Tools For Ios
  78. Hacker Tools List
  79. Pentest Tools Website
  80. Hacker Tools For Mac
  81. Hackrf Tools
  82. Pentest Tools Nmap
  83. Pentest Tools Review
  84. Hack Website Online Tool
  85. Pentest Tools Free
  86. Pentest Tools
  87. Hacking Tools For Mac
  88. World No 1 Hacker Software
  89. Pentest Tools Windows
  90. Hacking Tools Windows
  91. Hacker Tools Hardware
  92. Pentest Tools Github
  93. Pentest Tools Tcp Port Scanner
  94. Hacking Tools Pc
  95. Underground Hacker Sites
  96. Pentest Tools For Ubuntu
  97. What Is Hacking Tools
  98. Pentest Tools Tcp Port Scanner
  99. Hack Tools For Pc
  100. Hacker Search Tools
  101. Hacking Tools Free Download
  102. Hacker Tools List
  103. Hacking Tools Mac
  104. Install Pentest Tools Ubuntu
  105. Hack Tools For Games
  106. New Hack Tools
  107. Hacking Tools And Software
  108. Hacker Tools List
  109. Pentest Tools Android
  110. Pentest Tools Port Scanner
  111. Hacking Tools For Mac
  112. Computer Hacker
  113. Pentest Tools Website
  114. Free Pentest Tools For Windows
  115. Hacking Tools 2019
  116. Hacking Tools Hardware
  117. Top Pentest Tools
  118. Hacker Tools Software
  119. Hacking Tools Windows
  120. Pentest Tools Github
  121. Hack Tool Apk No Root
  122. Hacking Tools For Mac
  123. Best Hacking Tools 2019
  124. Pentest Tools For Windows
  125. Pentest Tools Open Source
  126. Growth Hacker Tools
  127. Hack And Tools
  128. Pentest Tools List
  129. Hacker Tools Windows
  130. Black Hat Hacker Tools
  131. Install Pentest Tools Ubuntu
  132. Hack Tools Download
  133. Pentest Tools Linux
  134. Hacker Security Tools
  135. Nsa Hack Tools Download
  136. Blackhat Hacker Tools
  137. Underground Hacker Sites
  138. Hack Rom Tools
  139. Hacking Tools Windows 10
  140. Best Hacking Tools 2020
  141. Hacker Tools Github
  142. Pentest Tools Linux
  143. Hacking Tools For Windows
  144. Nsa Hack Tools Download
  145. Pentest Tools
  146. Best Pentesting Tools 2018
  147. Pentest Tools Free
  148. Pentest Tools Website Vulnerability
  149. Nsa Hack Tools Download
  150. Hacker Tools List
  151. Hacker Tools 2020
  152. Android Hack Tools Github
  153. Tools 4 Hack
  154. Bluetooth Hacking Tools Kali
  155. Hacker Techniques Tools And Incident Handling
  156. Hacking Tools For Mac
  157. Pentest Tools Bluekeep
  158. Pentest Tools Open Source
  159. Pentest Tools Tcp Port Scanner
  160. Hacking Tools Usb
  161. Pentest Tools Windows
  162. Hacker Tools For Ios
  163. Pentest Automation Tools
  164. Tools For Hacker
  165. Hacking Tools For Windows 7
  166. Pentest Automation Tools
  167. Pentest Tools Find Subdomains
  168. Pentest Tools For Ubuntu
  169. Hack App
  170. Hacker Tools Apk Download
  171. Tools 4 Hack
  172. Pentest Reporting Tools
  173. What Are Hacking Tools
  174. Hacking Tools Github
  175. Hacker Tools Online
  176. Hacking Tools For Windows 7
  177. Nsa Hack Tools Download

No comments:

Post a Comment