Jump to content

[Encoder] Duck Encoder V2.6.3 Released 01/12/14


Recommended Posts

Hi all,

I'm not from the hak5 team but I wanted the share my work. I previously posted it but it went unnoticed :(
So I modestly try to call it Encode V2.0 to have more success :)

You can download the jar and the source code there : http://code.google.com/p/ducky-decode/
(It can be hosted on the official github.)

For the untested layouts I just transformed the teensyduino layout file, but I didn't convert the accentuated keys.
You can send me your modifications. Take a look at the French layout to have a good example.

Enjoy!
Dnucna

V 2.4

- Added REPEAT command

V 2.3

- Added ALT-SHIFT for Input Language Swap

V 2.2

- Bug with GUI key

- command key added for Mac


V 2.1
- Added debug message for unknown chars

V 2.0
- Added customized layout support (support ASCII, ISO-8859-1, Unicode)
- fr: French (tested)
- pt: Portuguese (tested)
- us: English-US (tested)
- be: Belgian (not tested)
- da: Danish (not tested)
- de: German (not tested)
- no: Norwegian (not tested)
- sv: Swedish (not tested)
- uk: English-UK (not tested)
- Added multiple modifier
- ctrl-alt
- ctrl-shift
- Default_delay fix

Edit (midnitesnake): Added version 2.4 information.

Edited by midnitesnake
Link to post
Share on other sites

Hm that produced this ( see below ) but I think the errors are caused by the use of chars and input in the strings.

After testing the simple of a string with a backslash in ( that was the char i were missing ) i found that it all works as it should :)

# java -jar duckencode.jar -i script.txt -o inject.bin -l da

Error on Line: 19

java.lang.NullPointerException

at Encoder.codeToBytes(Encoder.java:319)

at Encoder.charToBytes(Encoder.java:304)

at Encoder.encodeToFile(Encoder.java:197)

at Encoder.main(Encoder.java:114)

Error on Line: 22

java.lang.NullPointerException

at Encoder.codeToBytes(Encoder.java:319)

at Encoder.charToBytes(Encoder.java:304)

at Encoder.encodeToFile(Encoder.java:197)

at Encoder.main(Encoder.java:114)

Error on Line: 34

java.lang.NullPointerException

at Encoder.codeToBytes(Encoder.java:319)

at Encoder.charToBytes(Encoder.java:304)

at Encoder.encodeToFile(Encoder.java:197)

at Encoder.main(Encoder.java:114)

Error on Line: 37

java.lang.NullPointerException

at Encoder.codeToBytes(Encoder.java:319)

at Encoder.charToBytes(Encoder.java:304)

at Encoder.encodeToFile(Encoder.java:197)

at Encoder.main(Encoder.java:114)

Error on Line: 40

java.lang.NullPointerException

at Encoder.codeToBytes(Encoder.java:319)

at Encoder.charToBytes(Encoder.java:304)

at Encoder.encodeToFile(Encoder.java:197)

at Encoder.main(Encoder.java:114)

Error on Line: 43

java.lang.NullPointerException

at Encoder.codeToBytes(Encoder.java:319)

at Encoder.charToBytes(Encoder.java:304)

at Encoder.encodeToFile(Encoder.java:197)

at Encoder.main(Encoder.java:114)

Error on Line: 49

java.lang.NullPointerException

at Encoder.codeToBytes(Encoder.java:319)

at Encoder.charToBytes(Encoder.java:304)

at Encoder.encodeToFile(Encoder.java:197)

at Encoder.main(Encoder.java:114)

Error on Line: 52

java.lang.NullPointerException

at Encoder.codeToBytes(Encoder.java:319)

at Encoder.charToBytes(Encoder.java:304)

at Encoder.encodeToFile(Encoder.java:197)

at Encoder.main(Encoder.java:114)

Error on Line: 55

java.lang.NullPointerException

at Encoder.codeToBytes(Encoder.java:319)

at Encoder.charToBytes(Encoder.java:304)

at Encoder.encodeToFile(Encoder.java:197)

at Encoder.main(Encoder.java:114)

Error on Line: 58

java.lang.NullPointerException

at Encoder.codeToBytes(Encoder.java:319)

at Encoder.charToBytes(Encoder.java:304)

at Encoder.encodeToFile(Encoder.java:197)

at Encoder.main(Encoder.java:114)

The script.txt contains this ( wont format correctly here.. but it should be all chars on a danish keyboard )

# cat script.txt

DELAY 300

STRING --- NORMAL ---

ENTER

STRING 1234567890+'

ENTER

DELAY 300

STRING qwertyuiopå"

ENTER

DELAY 300

STRING asdfghjklæø'

ENTER

DELAY 300

STRING <zxcvbnm,.-

ENTER

DELAY 300

STRING --- SHIFT ---

ENTER

DELAY 300

STRING §!"#¤%&/()=?`

ENTER

DELAY 300

STRING QWERTYUIOPÅ^

ENTER

DELAY 300

STRING ASDFGHJKLÆØ*

ENTER

DELAY 300

STRING >ZXCVBNM;:_

ENTER

DELAY 300

STRING --- ALT ---

ENTER

DELAY 300

STRING ¾¡@£$½¥{[]}±|

ENTER

DELAY 300

STRING @ł€®þ←↓→œþ"~

ENTER

DELAY 300

STRING ªßðđŋħjĸł'^˝

ENTER

DELAY 300

STRING \«»©“”nµ¸·̣

ENTER

DELAY 300

STRING --- SHIFT + ALT ---

ENTER

DELAY 300

STRING ¶¹²³¼¢⅝÷«»°¿¦

ENTER

DELAY 300

STRING ΩŁ¢®Þ¥↑ıŒÞ°ˇ

ENTER

DELAY 300

STRING º§ÐªŊĦJ&Ł˝ˇ×

ENTER

DELAY 300

STRING ¬<>©‘’Nº˛˙˙

ENTER

DELAY 300

Link to post
Share on other sites

Hi Thermostaten,

you must fix the da.properties. I have done enough :)

To do that you must match your keys with the US keyboard as reference. http://en.wikipedia.org/wiki/Keyboard_layout

For example: Å

ISO_8859_1_C5 = KEY_LEFT_BRACE, MODIFIERKEY_SHIFT

For the keys I only manage right_alt or shift but not both at the same time.

I added some error message to help debug new layout file (download the version 2.1).

[23:02:33]jar$ java -jar encoder.jar -i ../payload/payloadda.txt -l da
Char not found:ASCII_60
Char not found:ASCII_5E
Char not found:ISO_8859_1_BE
Char not found:ISO_8859_1_A1[/CODE]

See you!

Dnu

Link to post
Share on other sites
  • 1 month later...
  • 2 months later...

I thought you might be interested to have a belgian tester :rolleyes:

Sorry if someone has already posted about this.

I made some basic script and so far so good, belgian keyboard with new encoder works fine for me. Need to test further, will let you know.

Thanks for your great work Merry Christmas to you all and all the best for 2013

jeffz

Link to post
Share on other sites
  • 2 weeks later...
  • 1 month later...

got a small problem with the STRING command;

STRING ABC - works

STRING A B C - causes a hang

and for some strange reason, Java was matching REM statements as REPEAT???

1 REM = INFINITE REPEAT??

This should now be resolved!

Edited by midnitesnake
Link to post
Share on other sites
  • 6 months later...

Hello

I got my RubberDucky some days ago and have tested a bit in norwegian.

I ran into problems with ASCII_5E when this key ^ is in the script.

Else I have not seen anything wrong yet...

After som testing with no.properties I gave that up for now. This did not work:

//ASCII_5E = CIRCUMFLEX_BITS, MODIFIERKEY_SHIFT + KEY_SPACE
// 94 ^ 

Instead I tried to circumvent the problem, thinking the other way around: Change "victims" keyboard to US english.

In this post: https://forums.hak5.org/index.php?/topic/30210-payload-memory-dump-windows-recover-password-without-setting-off-av/

I have made a comment at bottom of page on how to do this until no.properties have been fixed.

Link to post
Share on other sites
  • 2 months later...

I have been merrily experimenting with the duck by running duckencode on my Windows command line.

I have noticed some of the scripts don't work - almost certainly because I am using a UK keyboard.

Could someone point me to the latest version of the jar file so I can run it in Windows please?

Thanks.

UPDATE: Found it!

http://code.google.com/p/ducky-decode/downloads/detail?name=DuckEncoder_v2.6.1.zip&can=2&q=

:)

Edited by factgasm
Link to post
Share on other sites
  • 1 month later...

I was wondering if anyone could help me understand what I am doing wrong here. Im very new to this. I can't get a payload to encode. Im using windows 8.

C:\Program Files (x86)\Java\jre7\bin>java -jar encoder.jar -i PSdownload.txt -o
inject.bin
Hak5 Duck Encoder 2.6.3
Loading File ..... [ OK ]
Loading Keyboard File ..... [ OK ]
Loading Language File ..... [ OK ]
Loading DuckyScript ..... [ OK ]
Failed to write hex file!
Link to post
Share on other sites
  • 2 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...