Rickroll People With a Raspberry Pi Pico!

by Aaron Leslie in Circuits > Raspberry Pi

7575 Views, 16 Favorites, 0 Comments

Rickroll People With a Raspberry Pi Pico!

Screen_Shot_2021_01_21_at_9.08.49_AM.0.png

Getting Rickrolled is not fun, but watching other people get Rickrolled is, especially if they can't mute it and the volume is somehow stuck at 100%, even if they remove the USB that is causing these grievances.

And it doesn't stop there.

You can also make your desktop turn into a picture of greasy hotdogs, rotate the screen 90 degrees, and make your brand new speakers sound like they were salvaged from a $5 walkie-talkie.

We will do this using a Raspberry Pi Pico, which conveniently is the size of a USB. Yes, we are making a bad USB.

What are you waiting for? Why are you reading this dumb introduction? Let's jump right in!

Supplies

For this project to work, you will need:

  • Raspberry Pi Pico. It is worth getting two of these.
  • Micro USB to USB cable.
  • A computer. I will be using Windows.

Setting Up CircutPython on RasPi

Pico_Setup_AdobeCreativeCloudExpress (1).gif
  1. Complain to Adobe Express about their .wmv to .gif converter giving fuzzy results (See above video for reference)
  2. Get CircuitPython 7.1.1 by clicking "Download .UF2 Now"
  3. Plug in your Raspberry Pi using a micro-USB to USB cable and drag the .uf2 file into its drive.

Your Raspberry Pi will disconnect and reconnect as CircutPython. Do not unplug it.

HID

Screen_Recording__2-6-2022_4-13-44_PM__AdobeCreativeCloudExpress.gif

HID stands for Human Interface Device, like a keyboard or a mouse. In this step, we will make our Raspberry Pi trick the computer into letting us deploy our Rickroll without its permission.

  1. Go to github.com/adafruit/Adafruit_CircuitPython_Bundle/releases and download the adafruit-circutpython-bundle-7.x-mpy-20220206.zip file. Make sure that it is the 7.x one as we are using 7.1.1 CircutPython.
  2. Unzip the folder and go into its lib folder. Find the folder adafruit_hid and copy it. Go into your Raspberry Pi's lib folder and paste it.

Done. All you have to do now is alter the code script.

Swapping the Code Script

On your root folder of your Raspberry Pi, there should be a file named code.py. This runs when you plug in the Raspberry Pi. We want it to run our custom Rickroll script, and it is currently incapable of that. To change this go to github.com/dbisu/pico-ducky and click the green Code button, then press Download ZIP. This contains our new code.py script. Unzip it and copy the duckyinpython.py file. Go back into your Raspberry Pi and delete the code.py file. Paste the duckyinpython.py file in the same place as the code.py one was in and rename it code.py

The file is case-sensitive, so remember to keep it all lowercase.

At this point, your Raspberry Pi is a bad USB, but it won't do anything right now. Let's fix that.

Uploading the Payload

Here's the fun part, adding our payload!

  1. Go to github.com/hak5darren/USB-Rubber-Ducky/wiki/Payloads and click on one of the payloads that will work with your target system. The Rickroll option is under Windows 10 & 11
  2. Hover over the top right corner of the script and press the copy button
  3. Open a text editor like Notepad and paste the code. Click Save As. Save it as payload.dd and select All Files in the drop-down menu.
  4. Drag this file into your Raspberry Pi's root folder. Note that once it is done copying, it will run.
  5. Unplug your Raspberry Pi when you see it running.

You're all set! You can 3D print a flash drive case for your Pico so it looks more legit.

By default, your Pico will show up as a mass storage device. If you're disguising it as a keyboard or mouse and don't want it to look like a USB drive follow these steps:

  1. Copy boot.py from the Pico-Ducky-Main folder to the root of the Raspberry Pi.
  2. Disconnect the pico from your host PC.
  3. Connect a jumper wire between pin 18 and pin 20.

Coding in Ducky

It is easy and simple to write your own code for your Pico. I've written one that prints a picture of a rubber duck.

DELAY 2500

(Delays 2500 milliseconds)

GUI r

(GUI is the Windows key. Windows+r is the shortcut to Windows Run)

DELAY 300

STRING msedge.exe

(Writes the word msedge.exe. This opens Microsoft Edge)

ENTER

(Enter key)

DELAY 300

STRING https://cdn11.bigcommerce.com/s-91br/images/stencil/original/products/1742/21757/IMG_5491__31051.1589004052.jpg?c=2

ENTER

DELAY 500

CONTROL p

(Ctrl P for print)

DELAY 3000

ENTER

(Presses the print key)

Fun Time!

Now that your pico is set up, you can replace the innards of a keyboard or mouse with it, or disguise it as an ordinary flash drive and leave it lying around. By human nature, someone will find it and wonder what's on it, and the only way to find out is to plug it in!

Note: If using the Rickroll payload, your Pico will set the volume to 100 and disable any keyboard and mouse on or plugged into your computer. This is to prevent anyone from lowering the volume or stopping the payload. This is why you only test it on other people's computers. The only way to restore it is to restart your computer. I hope you saved that Word document!