{"id":474067,"date":"2022-12-13T18:02:23","date_gmt":"2022-12-13T16:02:23","guid":{"rendered":"https:\/\/mybroadband.co.za\/news\/?p=474067"},"modified":"2022-12-13T18:15:57","modified_gmt":"2022-12-13T16:15:57","slug":"we-built-a-flash-drive-that-hacks-any-computer","status":"publish","type":"post","link":"https:\/\/mybroadband.co.za\/news\/hardware\/474067-we-built-a-flash-drive-that-hacks-any-computer.html","title":{"rendered":"We built a flash drive that hacks any computer"},"content":{"rendered":"<p>Using a relatively cheap microcontroller and 3D-printed enclosure, we built a &#8220;BadUSB&#8221; device that tricks any PC you plug it into that it&#8217;s a keyboard.<\/p>\n<p>It can be programmed to execute a series of keyboard commands, including ones that could let attackers steal data or damage systems.<\/p>\n<p><span style=\"font-weight: 400;\">A BadUSB is a device that looks like a flash drive but contains a microcontroller that can act as a malicious device when plugged into your computer.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">One of the most popular BadUSB devices is the Hak5 Rubber Ducky, which can be programmed to automate a vast list of tasks, from automatically setting up a new computer to opening a remote connection for someone to take over your machine.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">These are available from $59.99 (R1,038, excl. VAT), which makes them a bargain for any hacker or pentester, but it may be a bit much if you only want to see how it works.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">We decided to build a similar device using a cheap, sub-R100 ATtiny85 development board available from various local suppliers.<\/span><\/p>\n<div id=\"attachment_474091\" style=\"width: 1210px\" class=\"wp-caption aligncenter\"><a  data-lightbox=\"post-image\" href=\"https:\/\/mybroadband.co.za\/news\/wp-content\/uploads\/2022\/12\/ATTiny85.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-474091\" class=\"wp-image-474091 size-full\" src=\"https:\/\/mybroadband.co.za\/news\/wp-content\/uploads\/2022\/12\/ATTiny85.jpg\" alt=\"\" width=\"1200\" height=\"800\" srcset=\"https:\/\/mybroadband.co.za\/news\/wp-content\/uploads\/2022\/12\/ATTiny85.jpg 1200w, https:\/\/mybroadband.co.za\/news\/wp-content\/uploads\/2022\/12\/ATTiny85-600x400.jpg 600w, https:\/\/mybroadband.co.za\/news\/wp-content\/uploads\/2022\/12\/ATTiny85-800x533.jpg 800w, https:\/\/mybroadband.co.za\/news\/wp-content\/uploads\/2022\/12\/ATTiny85-768x512.jpg 768w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/a><p id=\"caption-attachment-474091\" class=\"wp-caption-text\">ATtiny85 development board<\/p><\/div>\n<p><span style=\"font-weight: 400;\">The ATtiny85 is a microcontroller that can be programmed using the Arduino IDE, which offers a low barrier of entry.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">A simple 3D-printed enclosure can make it look like a generic flash drive.<\/span><\/p>\n<p><a  data-lightbox=\"post-image\" href=\"https:\/\/mybroadband.co.za\/news\/wp-content\/uploads\/2022\/12\/Enclosure.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-474093\" src=\"https:\/\/mybroadband.co.za\/news\/wp-content\/uploads\/2022\/12\/Enclosure.jpg\" alt=\"\" width=\"1200\" height=\"800\" srcset=\"https:\/\/mybroadband.co.za\/news\/wp-content\/uploads\/2022\/12\/Enclosure.jpg 1200w, https:\/\/mybroadband.co.za\/news\/wp-content\/uploads\/2022\/12\/Enclosure-600x400.jpg 600w, https:\/\/mybroadband.co.za\/news\/wp-content\/uploads\/2022\/12\/Enclosure-800x533.jpg 800w, https:\/\/mybroadband.co.za\/news\/wp-content\/uploads\/2022\/12\/Enclosure-768x512.jpg 768w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">The DigiKeyboard library allows the board to present itself as a keyboard when plugged into a computer&#8217;s USB port.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">This &#8216;keyboard&#8217; can then execute a bunch of pre-programmed keystrokes and commands to perform tasks on the computer it is plugged into.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">This may not sound very dangerous until you realise that a keyboard usually has the same privileges as the user sitting in front of a computer.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Some basic examples of what a BadUSB can do include a bunch of pranks to more advanced malicious scripts.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">A simple prank is a <strong><a href=\"https:\/\/www.youtube.com\/watch?v=dQw4w9WgXcQ\" target=\"_blank\" rel=\"noopener\">Rickroll<\/a><\/strong>, easily opened by pressing Win+R and entering the video URL before pressing enter.<\/span><\/p>\n<div id=\"attachment_474097\" style=\"width: 1210px\" class=\"wp-caption aligncenter\"><a  data-lightbox=\"post-image\" href=\"https:\/\/mybroadband.co.za\/news\/wp-content\/uploads\/2022\/12\/RickRoll-Code.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-474097\" class=\"size-full wp-image-474097\" src=\"https:\/\/mybroadband.co.za\/news\/wp-content\/uploads\/2022\/12\/RickRoll-Code.png\" alt=\"\" width=\"1200\" height=\"891\" srcset=\"https:\/\/mybroadband.co.za\/news\/wp-content\/uploads\/2022\/12\/RickRoll-Code.png 1200w, https:\/\/mybroadband.co.za\/news\/wp-content\/uploads\/2022\/12\/RickRoll-Code-539x400.png 539w, https:\/\/mybroadband.co.za\/news\/wp-content\/uploads\/2022\/12\/RickRoll-Code-718x533.png 718w, https:\/\/mybroadband.co.za\/news\/wp-content\/uploads\/2022\/12\/RickRoll-Code-768x570.png 768w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/a><p id=\"caption-attachment-474097\" class=\"wp-caption-text\">DigiKeyboard C code to RickRoll victim who plugs in BadUSB<\/p><\/div>\n<p><span style=\"font-weight: 400;\">The same can be done to open any other website automatically \u2014 including ones that could try and phish login credentials.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">It is also easy to open an administrator PowerShell window with Win+X, A, Left Alt+Y.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">We used this to collect all the saved Wi-Fi passwords on a device, save them as a text file using comma-separated values, and email them to a predetermined address.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Some online examples also show how attackers can use a BadUSB device to install malicious software, such as a keylogger or create a remote connection to an external device.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Scripts are available that work on different operating systems \u2014 such as MacOS or Linux \u2014 as keyboards work the same, even if the shortcuts might be slightly different.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">While a BadUSB can be a fun party trick, it does demonstrate how dangerous it can be to plug unknown USB devices into your machine.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">It may be a USB drive someone left behind or a BadUSB that takes over your machine and steals all your information.<\/span><\/p>\n<p>We&#8217;ve posted an animated GIF of the BadUSB in action <strong><a href=\"https:\/\/mybroadband.co.za\/forum\/threads\/we-tested-a-badusb-build-that-rickrolld-people-at-the-office.1217689\/\" rel=\"noopener\">in the forum<\/a><\/strong>. For those on mobile data: it&#8217;s 7.3MB big.<\/p>\n<hr \/>\n<h2 class=\"my-4\">Now read:\u00a0<a href=\"https:\/\/mybroadband.co.za\/news\/security\/472999-hacking-teams-exploit-samsung-galaxy-s22-zero-day-twice-win-r1-3-million.html\">Hacking teams exploit Samsung Galaxy S22 zero-day twice \u2014 win R1.3 million<\/a><\/h2>\n","protected":false},"excerpt":{"rendered":"<p>We built a BadUSB drive that can hack any PC you plug it into.<\/p>\n","protected":false},"author":341074,"featured_media":474095,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[29,15,16],"tags":[41294,83303,83305,35],"class_list":["post-474067","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-gadgets","category-hardware","category-software","tag-arduino","tag-badusb","tag-hak5","tag-headline"],"_links":{"self":[{"href":"https:\/\/mybroadband.co.za\/news\/wp-json\/wp\/v2\/posts\/474067"}],"collection":[{"href":"https:\/\/mybroadband.co.za\/news\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mybroadband.co.za\/news\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mybroadband.co.za\/news\/wp-json\/wp\/v2\/users\/341074"}],"replies":[{"embeddable":true,"href":"https:\/\/mybroadband.co.za\/news\/wp-json\/wp\/v2\/comments?post=474067"}],"version-history":[{"count":1,"href":"https:\/\/mybroadband.co.za\/news\/wp-json\/wp\/v2\/posts\/474067\/revisions"}],"predecessor-version":[{"id":474103,"href":"https:\/\/mybroadband.co.za\/news\/wp-json\/wp\/v2\/posts\/474067\/revisions\/474103"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/mybroadband.co.za\/news\/wp-json\/wp\/v2\/media\/474095"}],"wp:attachment":[{"href":"https:\/\/mybroadband.co.za\/news\/wp-json\/wp\/v2\/media?parent=474067"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mybroadband.co.za\/news\/wp-json\/wp\/v2\/categories?post=474067"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mybroadband.co.za\/news\/wp-json\/wp\/v2\/tags?post=474067"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}