RoganDawes / P4wnP1

P4wnP1 is a highly customizable USB attack platform, based on a low cost Raspberry Pi Zero or Raspberry Pi Zero W.
GNU General Public License v3.0
4.05k stars 662 forks source link

[fixed?] duckhid types ">>" before writing a string #127

Closed ugu11 closed 7 years ago

ugu11 commented 7 years ago

I've been using the P4wnP1 and recently I noticed that if I just want to write something, let's say "Hello World!", on the notepad for example, it writes ">>Hello World!" instead of just "Hello World!". Is it normal and what can I do to fix this??

ugu11 commented 7 years ago

And also it ignores the "-" character for example in the portuguese layout

mame82 commented 7 years ago

Could you provide steps to reproduce? Are you using SendKeys from the backdoor payload or outhid from an SSH shell or payload?

Or are you refering to a DuckyScript used with outduck from Shell/payload or SendDuckyScript from backdoor payload?

mame82 commented 7 years ago

Sorry, I ignored the duckhid in the title. Could you please provide a sample of a DuckyScript which causes this error?

ugu11 commented 7 years ago

assign custom drivelabel to UMS

UMSLABEL="HUG4ND" fatlabel $wdir/USB_STORAGE/image.bin $UMSLABEL

=============================

USB setup

=============================

USB_VID="0x1d6b" # Vendor ID USB_PID="0x1002" # Product ID USE_ECM=false # we need no Linux/Mac networking USE_RNDIS=true # RNDIS network device to enable hash stealing USE_HID=true # HID keyboard to allow entering cracked password USE_UMS=true # enable USB Mass Storage

use LED based HID keyboard test, to fire callback to onKeyboardUp()

HID_KEYBOARD_TEST=true

overwrite defaul keyboard language

lang="pt"

function onKeyboardUp() {

cat <<- EOF | duckhid
    DELAY 2000
    STRING Hello World! -
    ENTER
    DELAY 1000
EOF

echo "Just testing - _ %" | outhid

}

ugu11 commented 7 years ago

for example

mame82 commented 7 years ago

I'll try to reproduce this next week

ugu11 commented 7 years ago

ok

ugu11 commented 7 years ago

So @mame82 , how's this issue going? Any progress?

mame82 commented 7 years ago

I'm able to reproduce and preparing fix

mame82 commented 7 years ago

Should be fixed, in fact this was caused by a very small typo ... only one "comma" has to be removed.

ugu11 commented 7 years ago

Oh nice! I'll try it when I get home.

ugu11 commented 7 years ago

It works like a charm!!! Great job!

mame82 commented 7 years ago

Thx for reporting