Posted in Security Hacks Tagged attiny, attiny85, keeper, password, security, snopf, usb Vinyl Cut Your Way Into An Edge-Lit Glass Display January 22, 2020 by Erin Pinheiro 17 Comments. Bare bones: The ATtiny85 on its Own. The ATtiny is a small, inexpensive chip that can replace the Arduino in a project you have prototyped. This helps make the project smaller and more permanent, as well as freeing up the Arduino for more fun! The chip comes in a few different types – ones with more flash memory, lower power, and so forth. USB ASP ISP Programmer for ATMEL AVR-ATMega-ATTiny-51 with FRC Cable We need to check if the proper toolchain is selected or not. To test, hook up a processor and run: There’s a 10 pin header with the pinout printed on the back of the PCB.

USB port types and names

I believe he is asking how to communicate with a computer over the USB port AFTER burning the code. The answers talk about connecting seemingly for the purpose of programming and developing and loading any program. The question is, how do you communicate with a host PC over USB FROM the attiny with your own code? I have the same question.

USB (Universal Serial Bus) is an industry standard for connecting computers and other devices. It's available with many types of ports, and each type has a unique shape. On Mac, USB is available with these ports, depending on your Mac model:

USB-A

Type USB-A ports are commonly called USB, USB 2, or USB 3 ports, depending on the USB specification they support. They aren't reversible, so a USB-A connector plugs into the port only when oriented correctly.

USB-C

Type USB-C ports are available on Mac as standard USB-C ports, Thunderbolt 3 ports, and Thunderbolt / USB 4 ports. They all look the same, and the connector plugs into the port in either orientation.

Learn more about identifying the ports on your Mac, as well as the adapters and cables you can use to connect older devices to type USB-C ports.

USB specifications

USB specifications are important primarily when you want the most speed and power for your USB device, or your device needs more power or is using too much power. Every USB port supports a particular USB specification, which determines the port's maximum>USB specifications on MacData transferPower deliveryUSB 4Up to 10 GbpsUp to 15W at 5VUSB 3.1 Gen 2
Also known as USB 3.2 Gen 2
Up to 10 GbpsUp to 15W at 5VUSB 3.1 Gen 1
Also known as USB 3.2 Gen 1 or USB 3
Up to 5 GbpsUp to 900 mA at 5VUSB 2.0
Up to 480 MbpsUp to 500 mA at 5VUSB 1.1
Up to 12 MbpsUp to 500 mA at 5V

To learn which specification is supported by a type USB-A or type USB-C port on your Mac model:

  • Choose Apple menu  > About This Mac, click Support, then click Specifications.
  • Check the System Information app for more details, including about USB devices connected to USB ports on your Mac. Select USB in the sidebar, then select a USB bus on the right.

Get the best performance from your USB devices

USB specifications all work with each other, but speed and power are limited by the cable or device that uses the earliest specification. For example, if you connect a USB 3 device to USB 2 port, your device is limited to USB 2 speeds, and it can't draw more power from the port than can be delivered over USB 2. In other words, to get the best performance, make sure that the USB port on your Mac and the USB cable to your device meet or exceed the USB specification of the device itself.

If your Mac doesn't recognize a USB device after you plug it into your Mac:

  • Check all connections: Unplug the device from your Mac, then plug it back in, and make sure that all cables and adapters are securely connected at both ends. Test with another cable or adapter, if available.
  • Plug the device directly into your Mac instead of a USB hub or other device, and if necessary test with a different USB port on your Mac or device.
  • Some devices need their own software, such as drivers or firmware. Others work without additional software. Check with the maker of your device, and install all available Apple software updates as well.
  • If your device came with an AC power adapter, use it. Some devices can be powered by the USB port on your Mac. Others need more power than your Mac can provide.
  • Restart your Mac.

Learn more

  • USB 3 devices can create wireless interference that affects Wi-Fi and Bluetooth devices. Learn how to resolve Wi-Fi and Bluetooth issues caused by wireless interference.
  • Mac notebook computers with USB-C, Thunderbolt 3, or Thunderbolt / USB 4 can charge over that port using a compatible USB-C power adapter and cable.

A USB Rubber Ducky is a keystroke injection tool disguised as a generic flash drive. The most prominent one being Hak5’s USB Rubber Ducky. Its general idea is to look like a normal USB flash drive while acting like a keyboard, with prerecorded key strokes, when being attached to a computer. One can program it to do anything a user can do with a keyboard (so really anything).

These devices are used in awareness trainings or onsite engagements. Especially in latter, the risk of losing them is quite high and while not beeing too expensive, doing so would still be a bummer. While searching for a cheaper alternative some time ago, I stumbled over the Digispark Attiny85, a small microcontroller development board similiar to an Arduino, just much cheaper, smaller and less powerfull.

Installation

To setup the development environment, detailed installation instructions can be found in the Digistump Wiki. The following is a short summary:

  1. Download & Install Digistump Drivers, [“Install Drivers” (on 32bit systems) or “DPInst64” (on 64bit systems)]
  2. Download & Install & Start Arduino IDE
  3. File -> Preferences -> Additional Board Manager URLs:
    • http://digistump.com/package_digistump_index.json
  4. Tools -> Board: -> Boards Manager .
    • Digistump AVR Boards -> Install
  5. Tools -> Board: -> Digispark (Default - 16.5mHz)

In case of troubles please have a look at the detailed Digistump Wiki.

Programming

Preparation

As we are working with keystrokes, always keep in mind the keyboard layout your target will have. The code in this write-up will be geared towards an American layout. If you encounter other layouts you might want to edit the DigiKeyboard.h header file by adding/modifying the definitions there accordingly.

You can find in the necessary specifications for all characters documented in the USB HID Usage Tables (starting at page 53). /hot-dog-bush-2-download-game.html. An easy way to test other keyboard layouts is a virtual machine with a different layout active.

Demo Setup

For the following code snippets and demonstrations, this setup is used:

  • Victim Windows Machine: [192.168.227.140]
    • Internet access
  • Attacker Host: [192.168.227.136]
    • nc (or similiar) available

PowerShell

The Attiny85 has very strict limitations on the available disk space, allowing us to use only 6012 bytes for our code. Depending on your needs you might be forced to upload your real payload to a server and use the Attiny85 as stager for the attack.

An attack could consist out of the following steps:

  1. Plug in Attiny85
  2. PowerShell stager executed via Run dialog to download our real payload from pastebin
  3. Payload executed -> Reverse shell to our host
  4. (Cleanup)

In our case, the payload will be a small PowerShell reverse shell from the Nishang colllection.

Once executed on the target system, this script opens a reverse shell connection to our server 192.168.227.136 on port 1234.

The stager will also be a PowerShell line, downloading the prepared payload from above (e.g. from pastebin) and executing it. This stager will later be executed by our Attiny85 via the Run dialog of Windows:

Since we are tidy people we are going to do some cleanup after that by deleting the history of the Run dialog in the registry:

Arduino Code

Attiny85 Usb Drivers For Mac Windows 7

Now we need to look at this from a perspective of a keyboard. At first, we want to hit + r and then execute our PowerShell command to download and start the payload. The script should be mostly self explanatory:

The code can now be compiled and uploaded to the Attiny85 with the help of the Arduino IDE. Click on Upload and wait until you see the following message, then insert the Attiny85 in an USB slot. Mac sierra client for pptp vpn.

Demo

Your Attiny85 is now prepared for the first test. Plug it into the Windows system and observe what happens:

Attiny85 Usb Drivers For Macbook Pro

Meanwhile on the attackers machine:

Attiny85 Usb Drivers For Mac Catalina

As you have seen, that worked pretty well. However, speed and invisibility can still be improved.

Coments are closed
Scroll to top