Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

payload error #2

Open
GoogleCodeExporter opened this issue Feb 20, 2016 · 4 comments
Open

payload error #2

GoogleCodeExporter opened this issue Feb 20, 2016 · 4 comments

Comments

@GoogleCodeExporter
Copy link

im using kali 1.0.5 64bit xfce4 desktop i used the install script

when generating payloads i get an error ive tried a few different java versions.

Generating your inject.bin file...

Hak5 Duck Encoder 2.6

Loading File .....      [ OK ]
Loading Keyboard File ..... [ OK ]
Loading Language File ..... [ OK ]
Loading DuckyScript .....   [ OK ]
Error on Line: 1
java.lang.NumberFormatException: For input string: ""
    at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
    at java.lang.Integer.parseInt(Integer.java:504)
    at java.lang.Integer.parseInt(Integer.java:527)
    at Encoder.encodeToFile(Encoder.java:236)
    at Encoder.main(Encoder.java:130)
DuckyScript Complete.....   [ OK ]


Your payload has been created, its located in /usr/share/simple-ducky

Press any key to contiue

Original issue reported on code.google.com by [email protected] on 25 Dec 2013 at 5:50

@GoogleCodeExporter
Copy link
Author

to work around this issue I have taken the payload.txt file and manually encode 
it myself with java -jar duckencode.jar -i payload.txt

Original comment by [email protected] on 22 Apr 2014 at 6:11

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

Looks like the error is caused by a missing argument for the DELAY command in 
the first line...

Here is the beginning of a payload i generated

DELAY     <- delay time is missing on this row
ESCAPE
DELAY 400
CONTROL ESCAPE
DELAY 400
STRING cmd
DELAY 400
...

I added 400 after DELAY in the first line. Now the output looks like this,

Hak5 Duck Encoder 2.6

Loading File .....      [ OK ]
Loading Keyboard File ..... [ OK ]
Loading Language File ..... [ OK ]
Loading DuckyScript .....   [ OK ]
DuckyScript Complete.....   [ OK ]

after running,

java -jar encoder.jar -l us -i payload.txt

probably a small bug in the script generating the payload...

Original comment by [email protected] on 4 Sep 2014 at 9:19

@GoogleCodeExporter
Copy link
Author

Just realized that the human error was present...

In my case i forgot to type in the initial DELAY when asked for it (i just hit 
return...)

How long of a delay would like before starting? 
Use Milliseconds (15000 ms = 15 sec) 400   < --- Don't forget this!

Works like a charm now!

Original comment by [email protected] on 4 Sep 2014 at 9:37

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant