SoI have been working on a script (admittedly for a while, this is my first script) to grab wifi names and passwords off computers and dump them to a text files. So fair I have it working great, it grabs every wireless Internet connection that the computer has ever made and it dumps it straight back to usb within seconds, to grab and go. I just need help with one thing... How to hide the powershell window and is there anyway of making this script better (I already know i can use powershell to sent txt files to servers or through email i just think its easier with such a simple script to dump it straight back to usb)?
Thanks for the help. This is the final product that i have come up with and I'm super happy with it for my first script and Imy first go at powershell. I know there would be a way to shorten the powershell down, so if anyone comes up with anything please post it below. I also added a generated date stamp to the output txt file so you can save multiplet computers and days worth of extracted files.
Awesome thanks for the heads up I'll give it ago. I'm assuming that if it works on window 7 it's forwards and maybe backwards compatible? Not many changes have been made to powershell from what I can tell. I'll have to read up on Windows 7 powershell too. Thanksfor the tip.
This code has to be used with the rubber ducky flash with the twin duck firmware or the standard duck (or arduino) with a second usb drive plugged in as well (as it needs somewhere to store the output file) . The way I have written the code (stolen it from Darren) the usb or duck has to be named @ (just simply the at sign "@" and nothing else). You can of course change this just by changing the @ symbol in the code.
i don't know it's my laptop error or my usbducky error, because it seems that my laptop read "quotation mark" as @ symbol and @ symbol as "quotation mark" when my ducky write into the powershell.... i have to replace @ with "quotation mark" and same with "quotation mark" i replace it with @ and re-encode it again then my problem is solved. do you ever experience this kind of error?
So the issue your having is really simple and it's not your computer or the script. If you are using the duck encoder on the website duckytoolbox it's an issue with the encoder. I have had the exact same problem when encoding anything more then a simple script. The easy fix is just to download the Java script encode (or the whole duck toolkit)from Darren's github page and encode it on your computer with that. It's upto date and from what I believe te website is no longer maintain.
@illwill WhIle I'm here I will thank you for your input, it's interesting to see how powershell has change over the year but at the core it's still the same today as it was when it first come out. They have just added a few little commands to make life easier. Your adjustments work great and worked on every version of powershell. I'll give you some mad props in my REM and from now on try to code at the most basic level of powershell because its upwards compatible.
Have you ever wanted to feel like a true spy or hacker? Have you ever wondered how the spies infiltrate the enemy servers so fast? The rubber ducky is the tool that does that job! The USB Rubber Ducky is a keystroke injection tool disguised as a generic flash drive. Computers recognize it as a regular keyboard and accept pre-programmed keystroke payloads at over 1000 words per minute. In addition, we will also revisit a previous topic about jamming wifi signals and how they work.
I have recently got a raspberry pi zero w. I did this to try and use its USB slave functionality and do things like HID attacks and grab cookies and such with poison tap. I cannot, no matter how hard i try, get duck berry pi to work. I would be very grateful if someone could make a guide on how to do it, or provide an image that I could use. Thanks in advance, m4r10
I have been attempting to execute duckberry payloads with a PI0W over the course of the last week with limited success. Below are a few tutorials (none of which were written by me) that may be of use. In the end, I used P4wnP1 on the PI0W and got a regular old Pi 0 for duckberry (flashed the minbian image) and had immediate success.
So, why do this? Duckberry images flash almost immediately, giving one the ability to launch a very quick and discrete attack with limited functionality. P4wnP1 is a bit slower and complex but, as a result, can execute much more complex attacks on locked computers for example which makes the time on the target machine more easy to come by.
I eventually used P4wnP1 to send more complex attacks which is more along the lines of the functionality of the Hak5 Bash Bunny. I got the default payload to fire and have not yet experimented with running rubber ducky payloads but I imagine it will work.
I also attempted to use the below link which allows one to switch between arming and attack mode and makes editing payloads a cinch. I did however, run into issues when switching into attach mode (device unrecognized and left the project for a later day). Someone with more knowledge would likely have more success. That said, there is much more development going on with P4wnP1 so I recommend that route over this one but a mashup to include the switch would be cool.
Lastly, here is a tutorial which I also attempted and it includes a link to set up the pi as a network server so you can send commands and/or files via your phone or computer. I had moderate success but was still unable to sort out how to actually execute the payload.
Forgot to mention, of course with a Pi Zero W keyboard attacks could be fired via WiFi. P4wnP1 spawns an access point for that purpose... and if you wamt more, no problem - a full covert communication channel could be brought up through the HIiD device, allowing to run a remote shell through it
I first learned about the rubber ducky 4 years ago from the show, [MR ROBOT]( _Robot). I've always wanted one for myself so that I could play around with it in my own environment. Fast forward a couple years, here I am making one with custom payloads and "unofficial" hardware! Lesgeddit
/ Following payload will grab saved Wifi password and will send them to your hosted webhook and hide the cmd windows by using technique mentioned in hak5darren rubberducky wiki -- Payload hide cmd window [
github.com/hak5darren/USB-Rubber-Ducky/wiki.. /
Now when the device gets plugged into any machine, it will execute the payload and exit the program without any issues. For POC's sake, I will be doing this on a windows machine with all protections turned on. [real time anti virus + tamper protection]
The ultimate attack with this method would be to harvest a target's network password, locate the network's physical location in the real world, successfully connect to it and pose as a "range extender". Or you could even launch a WIFI deauth attack and boot everyone else off the network and force them to connect to your "range extender". By doing that you would have access to all their web traffic and could sniff some stuff out. (provided the sites are not using SSL)
This was a cool little side project for me to learn how devices such as these pose as HID and try to take control of your network/machine. I will definitely be venturing and experimenting with different types of payloads in the near future! I might write about them if I find time :) Stay safe yall!
3a8082e126