Windows 10 connection sharing guide thing for rpi0w (Pwnagotchi V.1.4.0 and earlier)

First of all, get a known good usb cable, plug it into your computer, and the data port of your pi, (the one closer to the center, there is an image in the documentation)
Then go into device manager, it should show up as an usb ethernet/rndis gadget, but if it doesnt, that is pretty normal, Here is a direct link to the rndis driver you need, http://web1.moddevices.com/shared/mod-duo-rndis.zip
Make a new folder for example C:\Drivers, and place the 2 files from that zip there
image
This is what it looks like if the rndis device isnt installed, the rpi0w will show up as a usb serial device, you need to right click it, and update driver software, then manually select the driver from your computer (the file you downloaded earlier)
Now if you did everything correctly it should show up as an usb ethernet/rndis device under network adapters

The next part is either using the win connection share script (https://github.com/evilsocket/pwnagotchi/blob/master/scripts/win_connection_share.ps1)
Or following the comment below this post for manual sharing.
Download that file, place it into an easy folder, for example C:\pwnagotchi, then open up admin powershell and use cd.. twice to move back into the C: directory
Then cd pwnagotchi to go into the folder with the script.
Next step is running .\win_connection_share -SetPwnagotchiSubnet and restarting your computer

After restart, cd into the folder again, and use
.\win_connection_share -EnableInternetConnectionSharing to connect the pwnagotchi to the internet through your computer.

You can use .\win_connection_share -DisableInternetConnectionSharing to disable this connection

I hope this helps some people and i will try and help if there are people who are still confused.

4 Likes

I was able to do it by right clicking the network icon on the bottom right taskbar. Open Network & Internet Settings. Change adapter options. Right-click the raspberry pi, go to properties, click Internet Protocol Version 4, click Properties.
Use the following IP address: 10.0.0.1, subnet mask 255.255.255.0, gateway 10.0.0.1, DNS server 1.1.1.1, 8.8.8.8.

Close those two windows and go back the the network connections window.b right click your main network connection you use for your computer. Properties. Sharing tab.
Tick the box to allow other network users to connect through this computer connection.
If it has a list below that to choose from, choose the raspberry pi’s connection.

Don’t have to mess with allowing unsigned powershell scripts and such.

4 Likes

Since the last version was a bit old and the link not working here’s a new version. It’s just a copy and paste which is heavily edited but I still give credit to @Arttumiro for making the first guide.

First of all, get a known good usb cable, plug the big end into your computer, and the other end into the data port of your pi.

Then go into device manager, it should show up as a COM6 port device,
COM

After that, you need to change the driver for the ports.

Download the zip file from this link (Its from MOD Devices Again):
https://modclouddownloadprod.blob.core.windows.net/shared/mod-duo-rndis.zip

After you’ve unzipped it then make a new folder (for example C:\Drivers), and place the 2 files from that zip in your new folder.

Go into your device manager(If you don’t know where this is then click the search bar and search device manager), select the COM6 device and left-click and click “Update driver”. Then click “Browse My Computer For Drivers”, hit browse and find the new folder you put the files in and click on it and hit the checkmark below which says “Include subfolders”. Then hit next and it should automatically install and say this:

installed drivers

If everything went well then your Network adaptors should look like this(Ignore the Realtek just focus on the RNDIS gadget):

Finished Solution

The next part is setting up the windows network sharing script. Here it is:
pwnagotchi/win_connection_share.ps1 at master · evilsocket/pwnagotchi · GitHub

Download that file, place it into an easy folder,(for example C:\pwnagotchi) ,then open up admin powershell(Search PowerShell and click “Run as administrator” Note:Do not click the ISE, that is a completely different thing.) and use cd.. twice to move back into the C: directory
Then ‘cd’ your way into your folder until using ls shows this (The directory was C:pwnagotchi in my case):

win connection share

Next step is running .\win_connection_share -SetPwnagotchiSubnet and restarting your computer.

After restart, cd into the folder with the script again, and use
.\win_connection_share -EnableInternetConnectionSharing to connect the pwnagotchi to the internet through your computer.

You will be asked first for your internet adaptor(Like wifi or ethernet, basically what you use to connect to the internet) and put in the number

and then put in the number you see which is your RNDIS gadget(In my case 2)

RNDIS gadget internet sharing

You can use .\win_connection_share -DisableInternetConnectionSharing to disable this connection and select the correct numbers again(They may be switched around this time).