bogart Posted August 20, 2022 Share Posted August 20, 2022 I'm trying to launch the browser (Chrome) and email app (Gmail) on an Android device. The challenge is that using the following approaches, the target system pulls up Google assistant, rather than the target application. Example attempted commands: GUI e WINDOWS E GUI B WINDOWS b Intended script: (delays omitted) GUI b CTRL h PRINTSCREEN This is tested on Oneplus 10 (android 11), Most recent full ParanoidAndroid release (Android 10) and Samsung Note 6 (Android 12). In all cases, the Google assistant pops up and interferes with the script. I want to simply launch the email and browser applications without invoking any other Android tools. Has anyone been successful here? Link to comment Share on other sites More sharing options...
dark_pyrro Posted August 20, 2022 Share Posted August 20, 2022 If you try to connect a (true) keyboard to the phone, does the shortcuts work? What language are the phones configured for? English UI or something else? Link to comment Share on other sites More sharing options...
bogart Posted August 20, 2022 Author Share Posted August 20, 2022 5 hours ago, dark_pyrro said: If you try to connect a (true) keyboard to the phone, does the shortcuts work? What language are the phones configured for? English UI or something else? Yes, using a standard Logitech wireless keyboard, the Windows/Super key shortcuts work just fine and I can perform the Duckyscript manually. Everything in my setup and test systems is a US keyboard configuration. Link to comment Share on other sites More sharing options...
dark_pyrro Posted August 20, 2022 Share Posted August 20, 2022 Android is a "broken family", so it depends. I tried now (not with the Ducky but with a keyboard) and GUI b worked on 3 out of 4 devices (1 Samsung, 1 Sony, 1 Nokia but not on 1 Motorola). GUI e worked on all of them. The result should be the same with the Ducky, so I didn't test that specifically. If you can't do it using a "real" keyboard, then I guess the problem isn't because of some issue with the Ducky. I would most likely try other possible key combos to see if it's anything else other than GUI b that opens the browser for those specific Android devices. Link to comment Share on other sites More sharing options...
Darren Kitchen Posted August 20, 2022 Share Posted August 20, 2022 I just tested the following on my Samsung Z Fold2 and a Google Pixel 5. Worked on both. ATTACKMODE HID STORAGE WAIT_FOR_BUTTON_PRESS GUI b DELAY 700 CTRL l DELAY 700 STRINGLN hak5.org inject.bin attached. inject.bin Link to comment Share on other sites More sharing options...
Wiz Posted August 30, 2022 Share Posted August 30, 2022 Hi all, just got my new ducky in the mail and it is working like a charm. I am testing with some Android payloads that basically open the browser navigates to youtube an plays the video aka "Rick-roll" I got it to work on my Galaxy Note 20 Android 10 OS. My question is does someone have a full list of the usable commands for the Androids? I would like to create my own scripts but cannot find all the commands in one list. On another note wouldn't it be nice to have emulators for testing the scripts? Having to generate the payloads for every small change loading to the ducky and testing is time consuming lol... but fun I must confess. inject.bin Link to comment Share on other sites More sharing options...
Darren Kitchen Posted August 30, 2022 Share Posted August 30, 2022 It's telling that a quick Google search for "Android keyboard shortcuts" yields a 12 year old CNET article as the first result...https://www.google.com/search?q=android+keyboard+shortcuts I recall at some point in my security research rabbit hole finding an official source, but a quick look is coming up short. As is the fragmented Android ecosystem. I'd link to the common articles that spell out the keyboard shortcuts various people "have found" — but you'll see them from the link above. If anyone comes across a more official list, I'd be keen to see them as well. Link to comment Share on other sites More sharing options...
crycry Posted December 16, 2022 Share Posted December 16, 2022 i have been trying to make a script that will allow me to turn on mobile hotspot on samsung galaxy j4. there not much material online to learn how to do this. someone provide a basic structure of command on how to do this. Link to comment Share on other sites More sharing options...
Xeleet Posted February 13, 2023 Share Posted February 13, 2023 I have connect a keyboard to my android, The Command key does what I wanted in the keyboard. I want to use Command on my script but can not seems to work. rubberducky 1 , does not understand COMMAND. It has to do with keyboard layout/ language ? Link to comment Share on other sites More sharing options...
dark_pyrro Posted February 13, 2023 Share Posted February 13, 2023 Have you tried using GUI? Link to comment Share on other sites More sharing options...
Xeleet Posted February 14, 2023 Share Posted February 14, 2023 Sorry a new to this , Do not know which GUI you are talking about. :( Link to comment Share on other sites More sharing options...
Xeleet Posted February 14, 2023 Share Posted February 14, 2023 I just got what you meant , I will try . I figured Alt+space does what I wanted too. thx I guess I want to learn more on , how can I add new "commands" , just like COMMAND or GUI or anything else. is it possible to add my own. from my understanding , maybe can be done in the keyboard layout/ language ? Link to comment Share on other sites More sharing options...
dark_pyrro Posted February 14, 2023 Share Posted February 14, 2023 You can't add new commands to Ducky Script itself. The language files is just an interpretation of how key codes will be sent from the Ducky to the target when it acts as a keyboard. You can alter/change the language file (or add stuff if they are missing), but you can't really add anything that is "outside" a keyboard. If you can do things with a physical/normal keyboard attached to an Android device, then it can be done using the Ducky. There might, however, be situations when certain keys/chars or key combinations are missing for some languages, and in such cases, it's possible to add those to the language file. You need to be more specific about your needs if you want a more specific answer. Link to comment Share on other sites More sharing options...
Xeleet Posted February 14, 2023 Share Posted February 14, 2023 Thank you for your reply. I was trying to use COMMAND ( apple keyboard). I saw the keyboard file have it, but whenever I use it, it gives me an error. Sorry for my lack of knowledge, I did not know where to look. I did not know if it was a keyword file thing or Ducky Script. I will look for list of all command in the Ducky Script, and I will try to find more info in the keyboard/language. I connected an apple keyboard to my android, when I pressed the Command button , it opened the help menu in the android. So I was trying do use COMMAND in the script, but gave me error. I looked at the language file, It had COMMAND. So It was confusing for me. I did not understand my problem was the language or because am using Ducky Script 1. ( maybe COMMAND works with script v3 ). Your reply helped a lot, I know now what info I have to research. Thank you Link to comment Share on other sites More sharing options...
dark_pyrro Posted February 14, 2023 Share Posted February 14, 2023 What error message did you get and where did you get it? Do you want to make the Ducky press/send the COMMAND key only, or in combination with some other key (such as "COMMAND z")? Since you say you are using "Ducky Script 1", is this the 2nd gen (new) USB Rubber Ducky or the older 1st gen USB Rubber Ducky? Link to comment Share on other sites More sharing options...
Xeleet Posted February 14, 2023 Share Posted February 14, 2023 Quote its an old Rubber Ducky, yes I just wanted to Send COMMAND nothing with it. I will be honest, In the Rubber Ducky , it does not show me anything. so I put my file in the Flipperzero, so I can edit the file from my mobile so i can test faster. when it reach the link COMMAND, it stops and say Error. Link to comment Share on other sites More sharing options...
dark_pyrro Posted February 14, 2023 Share Posted February 14, 2023 Since it's the 1st gen (older) Ducky, this should be posted in the forums section that covers the old "classic" Ducky. It's just confusing when trying to help and troubleshoot when assuming it's about the 2nd gen Ducky since the post in being made in that section of the forums. Running it on the Flipper won't be of much help since it's not a product that is licensed with true Ducky Script (Hak5). It just runs something similar, "copy-cat" style. As far as I remember, there was no support for only pressing modifier keys in Ducky Script 1.0. It was implemented in Ducky Script 3.0 that is just operational on the new 2nd gen USB Rubber Ducky (using INJECT_MOD). Yes, I remembered correctly, I entered INJECT_MOD and HOLD/RELEASE in PayloadStudio now and changed the setting to just allow Ducky Script 1.0 code and it complained straight away. Link to comment Share on other sites More sharing options...
Xeleet Posted February 14, 2023 Share Posted February 14, 2023 Thank you again , I will just buy the new Ducky and try. Link to comment Share on other sites More sharing options...
Unknown_Someone Posted March 28, 2023 Share Posted March 28, 2023 i have a problem kinda like this, im trying to launch the playstore but when im in it doesnt let me type anything in the search bar Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.