Dnucna

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

41 posts in this topic

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
2

Share this post


Link to post
Share on other sites

If those extra keyboard layouts work, this is fantastic! There are a lot of people who want to produce more payloads for their duckies, but have been hindered because of the layouts. Hopefully more payloads and ideas are on the way!

0

Share this post


Link to post
Share on other sites

Thank you for this great job

I finally resortie my ducky key of an old drawer!

I tested the French version, works very well

0

Share this post


Link to post
Share on other sites

# java -jar duckencode.jar -l da.properties -i script.txt

Error with keyboard.properties!

How do i find the solution to that error ?

0

Share this post


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

0

Share this post


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

1

Share this post


Link to post
Share on other sites

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

0

Share this post


Link to post
Share on other sites

Hello

I recived my ducky today. Im from sweden and have tested the encoder for the swedish keyboard and it seams to work.

Thanks! Let me know if you need any testing for the swedish keyboard.

Regards

virus84

1

Share this post


Link to post
Share on other sites

Hi jeffz and virus-84,

I'm very happy that it works for you !

I was sure belgian works because it's very close to french, but for swedish it's a good surprise :)

Thanks for the reply.

Dnu

0

Share this post


Link to post
Share on other sites

Just incremented to V2.4

Added the REPEAT command, due to number of user requests.

Please Test and Enjoy

2

Share this post


Link to post
Share on other sites

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
0

Share this post


Link to post
Share on other sites

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.

0

Share this post


Link to post
Share on other sites

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
0

Share this post


Link to post
Share on other sites

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!
0

Share this post


Link to post
Share on other sites

? file/folder permissions? try

java -jar encoder.jar -i PSdownload.txt -o c:\temp\inject.bin
0

Share this post


Link to post
Share on other sites

Thank you for your reply, Still can not get it to work. I have no idea.

0

Share this post


Link to post
Share on other sites

Thank you for your reply, Still can not get it to work. I have no idea.

OK, what if you add java to your environment variable PATH, then try to run it from the sdcard?

0

Share this post


Link to post
Share on other sites

I tried this and still must be doing something wrong. Its interesting that it works find on windows 7. Not sure what Im doing wrong.

0

Share this post


Link to post
Share on other sites

How do I go about using the new REPEAT syntax? An example would be perfect. Thanks.

0

Share this post


Link to post
Share on other sites

How do I go about using the new REPEAT syntax? An example would be perfect. Thanks.

REPEAT x - Repeat previous command X times.

Command Breakdown

Hope that helps a bit.

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.