Jump to content

Internet Tethering

Go to solution Solved by dark_pyrro,

Recommended Posts

Anyone able to have the key croc tether to a wired internet connection of the device it is connected to?

I have put zero effort into thinking about how difficult or dumb the idea seems. Just something I was thinking about as I was working on the device.


Link to comment
Share on other sites

I guess it depends on the scenario. If doing an "attack" you need to get the target to set up ICS for the Croc in some appropriate way. Not sure though if the Croc is at all set up and prepared out of the box for ICS like the Bunny is. They both share a lot in other areas, so it's possible though. Never tried it since the wireless support covers the needs I've had.

Link to comment
Share on other sites

Ill play with this later, but this should be the right direction. Or not, I could be completely wrong. Even if the script below can get the host machine to share with the "ethernet" device I do not know if the croc can even recognize the USB side as an ethernet interface and send traffic. I dont know if I create the modify the VID/PID if it would count as a secondary device for the key croc internals. I just started playing with these little devices last week.

From a conceptual host control standpoint this should work if the croc can support the wired connection. I have not tested this out at all and I stole the ICS portion and modified it from SuperUser.com. This assume the name of the wired (or wireless, I guess) connection is "Ethernet" and the Key Crocs is "USB_Ethernet". I'll need to convert it over so it is something the Croc can use, but it should be fun to see how it works out, if it does at all.

# Set ATTACKMODE to HID and Ethernet with cloned keyboard VID/PID

VENDOR=$(cat /tmp/vidpid | cut -d: -f1)
PRODUCT=$(cat /tmp/vidpid | cut -d: -f2)
# I found this bit in the Hak5 Documentation  SOURCE

# Run power shell (GUI r) and then
powershell -Command "& { if (!([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] 'Administrator')) { Start-Process powershell -Verb runAs } else { exit } }"

# Some injected arrows keys or tab to auto accept command prompt (assuming it is a yes/no prompt and not a credential prompt).

# Set the ExecutionPolicy - ONLY IF you plan on leaving the a script behind - Can create a windows task to enable this when plugging in a specific USB device?
Set-ExecutionPolicy RemoteSigned -Force


# Register the HNetCfg library
regsvr32 hnetcfg.dll -s  # -s makes it silent

# Create a NetSharingManager object
$m = New-Object -ComObject HNetCfg.HNetShare

# Find Machine A's connection (Ethernet)
$connectionA = $m.EnumEveryConnection |? { $m.NetConnectionProps.Invoke($_).Name -eq "Ethernet" }

# Find Machine B's connection (USB_Ethernet)
$connectionB = $m.EnumEveryConnection |? { $m.NetConnectionProps.Invoke($_).Name -eq "USB_Ethernet" }

# Ensure both connections are found
if (-not $connectionA -or -not $connectionB) {
    Write-Error "Either Ethernet or USB_Ethernet interface not found."

# Enable sharing for Machine A's connection and set it as public
$configA = $m.INetSharingConfigurationForINetConnection.Invoke($connectionA)
$configA.EnableSharing(0)  # 0 for public

# Optionally: If you want to set specific sharing settings for Machine B's connection:
# $configB = $m.INetSharingConfigurationForINetConnection.Invoke($connectionB)
# $configB.EnableSharing(1)  # 1 for private, for example

Write-Output "ICS enabled between Ethernet and USB_Ethernet."


Link to comment
Share on other sites

  • Solution

Just checked now. Using ICS is possible on the Croc. It uses the same settings as the Bunny (not that surprising), so if following the ICS guides for the Bunny, it should work for the Croc as well. I set ICS up on a Win11 box along with the Croc and it plays ball (of course disabling any WiFi connection/setup first to be sure the Croc actually use the usb0 interface to connect to the outside world).

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.

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