Jump to content

Is it possible to connect a USB Flash Drive instead of a keyboard?


Omar01

Recommended Posts

I want to use the input USB port to mount it on linux and then share the contents of the usb via the internet, so that I can see the contents of the usb remotely but the operating system can see it transparently

I'm trying to get it to work for the moment as a memory in a demo /mnt/USB folder

any ideas?

at the moment I am testing with trial and error script

ATTACKMODE SERIAL STORAGE
LOOTDIR=/mnt/USB
LED ATTACK STAGE1

 

Link to comment
Share on other sites

It is possible, but not officially supported. You can of course ask for help in the forums, as you've already discovered.

If you're trying to access the flash drive on the host PC, it'd be easiest to create an empty folder inside the udisk, and then mount the USB drive inside of it. If you need remote access to it (ssh, etc), then your example should work.

Link to comment
Share on other sites

18 hours ago, Aaron Outhier said:

It is possible, but not officially supported. You can of course ask for help in the forums, as you've already discovered.

If you're trying to access the flash drive on the host PC, it'd be easiest to create an empty folder inside the udisk, and then mount the USB drive inside of it. If you need remote access to it (ssh, etc), then your example should work.

Thank you very much for answering, try to mount it from ssh as follows:
mkdir -p /mnt/USB1
modprobe usb-storage
mount /dev/usbdev2.7 /mnt/USB1

but it won't let me do it, try to indicate the type of filesystem and neither

I think it is necessary to change something in the operating system to allow mounting external disks, I am not sure because there is nothing in the documentation that indicates details about it.

I guess you need to add a module to add compatibility

Link to comment
Share on other sites

12 hours ago, Omar01 said:

Thank you very much for answering, try to mount it from ssh as follows:
mkdir -p /mnt/USB1
modprobe usb-storage
mount /dev/usbdev2.7 /mnt/USB1

but it won't let me do it, try to indicate the type of filesystem and neither

I think it is necessary to change something in the operating system to allow mounting external disks, I am not sure because there is nothing in the documentation that indicates details about it.

I guess you need to add a module to add compatibility

Ok, so I'm getting an error at modprobe usb-storage:

modprobe: ERROR: ../libkmod/libkmod.c:557 kmod_search_moddep() could not open moddep file '/lib/modules/3.4.39/modules.dep.bin'

This is causing the USB drive to not be mountable. I'm not sure if this is by design, but either way, it appears there are very few modules available, including usb-storage.

Perhaps @Foxtrot or @Darren Kitchen will comment soon?

It seems to me, and this is just my 2 cents, but I believe Hak5 products are supposed to be extensible. We're supposed to be able to add functionality as required. And, while Hak5 can't give individual attention to every small issue, the issue above might interfere with some advanced operations.

Link to comment
Share on other sites

I also had thought that it would be a little easier to mount a USB, today I will try more to try to mount it, I am not sure why the limitation of the USB port is to save disk or because the processor cannot handle the speed of transfer

Link to comment
Share on other sites

7 minutes ago, Omar01 said:

I also had thought that it would be a little easier to mount a USB, today I will try more to try to mount it, I am not sure why the limitation of the USB port is to save disk or because the processor cannot handle the speed of transfer

I suspect it is more of a mistake/oversight from Hak5 people. Their products don't have every feature imaginable when you open the box, but it is supposed to be easier to add the stuff you need. Usually, a flash drive shows up as /dev/sdX, where X can be different for different people.

Link to comment
Share on other sites

4 minutes ago, Aaron Outhier said:

I suspect it is more of a mistake/oversight from Hak5 people. Their products don't have every feature imaginable when you open the box, but it is supposed to be easier to add the stuff you need. Usually, a flash drive shows up as /dev/sdX, where X can be different for different people.

from what you can see it shows me in /dev/usbdev2.2

I have nothing in / dev / sdX
# ls / dev / sd *
ls: cannot access / dev / sd *: No such file or directory

I think it is the speed of the usb currently it detects it with sunxi-ehci


[250.160220] usb 2-1: new high-speed USB device number 2 using sunxi-ehci

Usually dmesg shows something like this on other devices that I have:
[81477.804504] usb-storage 2-2: 1.0: USB Mass Storage device detected
[81477.804666] usb-storage 2-2: 1.0: Quirks match for vid 090c pid 1000: 400
[81477.804703] scsi host3: usb-storage 2-2: 1.0
[81543.084379] usb 2-2: USB disconnect, device number 7
[82632.707102] usb 2-2: new high-speed USB device number 8 using xhci_hcd
[82632.858909] usb 2-2: New USB device found, idVendor = 090c, idProduct = 1000, bcdDevice = 11.00
[82632.858915] usb 2-2: New USB device strings: Mfr = 1, Product = 2, SerialNumber = 3
[82632.858917] usb 2-2: Product: Flash Disk
[82632.858919] usb 2-2: Manufacturer: USB
[82632.858921] usb 2-2: SerialNumber: FBH1108231403010
[82632.860136] usb-storage 2-2: 1.0: USB Mass Storage device detected
[82632.860219] usb-storage 2-2: 1.0: Quirks match for vid 090c pid 1000: 400
[82632.860250] scsi host3: usb-storage 2-2: 1.0

 

I think I have to change from sunxi-ehci to xhci_hcd, but doing this maybe it will break the compatibility with current modules :S

 

 

Link to comment
Share on other sites

36 minutes ago, Omar01 said:

I also had thought that it would be a little easier to mount a USB, today I will try more to try to mount it, I am not sure why the limitation of the USB port is to save disk or because the processor cannot handle the speed of transfer

It won't appear there, because modprobe can't load the usb-storage module. Seems like the entire modules folder is missing.

Link to comment
Share on other sites

5 minutes ago, Aaron Outhier said:

It won't appear there, because modprobe can't load the usb-storage module. Seems like the entire modules folder is missing.

do you have the latest system update?
I have the following:
# uname -a
Linux usbbackupmachine1.xxx.com 3.4.39 # 213 SMP PREEMPT Fri Jun 26 04:28:14 UTC 2020 armv7l GNU / Linux

I don't get any error doing "modprobe usb-storage"
root @ usbbackupmachine1: ~ # modprobe usb-storage
root @ usbbackupmachine1: ~ #

but even so "fdisk -l" does not show the partitions

Link to comment
Share on other sites

I am testing with different memory models and manufacturers, at the moment they all detect them but none show them in "fdisk -l"

 

# lsusb
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 0bda:f179 Realtek Semiconductor Corp.
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 003: ID 0951:1666 Kingston Technology
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
 

root@usbbackupmachine1:~# modprobe usb-storage
root@usbbackupmachine1:~# mkdir /mnt/USB2
root@usbbackupmachine1:~# mount /dev/usbdev2.3 /mnt/USB2
mount:  /dev/usbdev2.3 is not a block device
root@usbbackupmachine1:~#

 

Link to comment
Share on other sites

Just now, Omar01 said:

I am testing with different memory models and manufacturers, at the moment they all detect them but none show them in "fdisk -l"

 

# lsusb
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 0bda:f179 Realtek Semiconductor Corp.
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 003: ID 0951:1666 Kingston Technology
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
 


root@usbbackupmachine1:~# modprobe usb-storage
root@usbbackupmachine1:~# mkdir /mnt/USB2
root@usbbackupmachine1:~# mount /dev/usbdev2.3 /mnt/USB2
mount:  /dev/usbdev2.3 is not a block device
root@usbbackupmachine1:~#

 

fdisk -l isn't going to work. I suspect you need another module before it will. It would seem that I have problems of my own. My KeyCroc filesystem is corrupt. I suppose it is my turn to ask for help...

Link to comment
Share on other sites

4 minutes ago, Aaron Outhier said:

fdisk -l isn't going to work. I suspect you need another module before it will. It would seem that I have problems of my own. My KeyCroc filesystem is corrupt. I suppose it is my turn to ask for help...

I think it's worth checking that you have the latest version of the software, I just installed the latest version last week.

I'm looking in rpi forums if I find the solution to this problem, I can't find much information on the internet regarding keycroc

 

these are the versions that I have installed:

root@usbbackupmachine1:~# cat /etc/debian_version
8.11
root@usbbackupmachine1:~# cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 8 (jessie)"
NAME="Debian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=debian
HOME_URL="http://www.debian.org/"
SUPPORT_URL="http://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
root@usbbackupmachine1:~#

 

 

Link to comment
Share on other sites

Do you think any of these modules are necessary?

root@usbbackupmachine1:~# cat /etc/modprobe.d/fbdev-blacklist.conf
# This file blacklists most old-style PCI framebuffer drivers.

blacklist arkfb
blacklist aty128fb
blacklist atyfb
blacklist radeonfb
blacklist cirrusfb
blacklist cyber2000fb
blacklist kyrofb
blacklist matroxfb_base
blacklist mb862xxfb
blacklist neofb
blacklist pm2fb
blacklist pm3fb
blacklist s3fb
blacklist savagefb
blacklist sisfb
blacklist tdfxfb
blacklist tridentfb
blacklist vt8623fb

 

Link to comment
Share on other sites

Was I dreaming, or did I see you say somewhere that you're trying to recover data from a flash drive? If so, don't mess with the key croc for that. Use an actual computer! There are some custom linux distros that can run direct from a CD or (a different) usb drive, so you don't need to permanently install anything on the computer.

Link to comment
Share on other sites

1 minute ago, Aaron Outhier said:

Was I dreaming, or did I see you say somewhere that you're trying to recover data from a flash drive? If so, don't mess with the key croc for that. Use an actual computer! There are some custom linux distros that can run direct from a CD or (a different) usb drive, so you don't need to permanently install anything on the computer.

I have many computers with linux, I want to mount a memory in the keycroc to have more than 2gb of loot, since that is very little for these times. I have the need to backup several GB and transfer it slowly via the internet. but i need to copy it to disk first

Link to comment
Share on other sites

4 minutes ago, Omar01 said:

Do you think any of these modules are necessary?

root@usbbackupmachine1:~# cat /etc/modprobe.d/fbdev-blacklist.conf
# This file blacklists most old-style PCI framebuffer drivers.

blacklist arkfb
blacklist aty128fb
blacklist atyfb
blacklist radeonfb
blacklist cirrusfb
blacklist cyber2000fb
blacklist kyrofb
blacklist matroxfb_base
blacklist mb862xxfb
blacklist neofb
blacklist pm2fb
blacklist pm3fb
blacklist s3fb
blacklist savagefb
blacklist sisfb
blacklist tdfxfb
blacklist tridentfb
blacklist vt8623fb

 

No. I believe those are all for video cards. The letters 'fb' at the end would indicate "frame buffers". I also recognize several name brands of old video cards mentioned. Leave the blacklists alone. Good job being thorough in your research.

If you want to know about a specific module, try 'modinfo <modulename>'

Link to comment
Share on other sites

3 minutes ago, Aaron Outhier said:

No. I believe those are all for video cards. The letters 'fb' at the end would indicate "frame buffers". I also recognize several name brands of old video cards mentioned. Leave the blacklists alone. Good job being thorough in your research.

If you want to know about a specific module, try 'modinfo <modulename>'

Thanks, I'll try today. If it doesn't work tomorrow you can look for a keycroc in craigslist and I'll continue working with the rpi 😞

Link to comment
Share on other sites

2 minutes ago, Omar01 said:

I have many computers with linux, I want to mount a memory in the keycroc to have more than 2gb of loot, since that is very little for these times. I have the need to backup several GB and transfer it slowly via the internet. but i need to copy it to disk first

Ok. Does it matter where the data ends up, so long as you can access it? I mean, does it have to go through a key croc? Have you heard of something like NextCloud? I admit I'm not sure if that would work for your specific purpose, but might be worth looking into. I am guessing the data is at a remote location?

Link to comment
Share on other sites

On 3/2/2021 at 1:05 PM, Omar01 said:

I want to use the input USB port to mount it on linux and then share the contents of the usb via the internet, so that I can see the contents of the usb remotely but the operating system can see it transparently

I'm trying to get it to work for the moment as a memory in a demo /mnt/USB folder

any ideas?

at the moment I am testing with trial and error script

ATTACKMODE SERIAL STORAGE
LOOTDIR=/mnt/USB
LED ATTACK STAGE1

 

Looking back at your original post, I see you answered the questions I just asked. I would absolutely use a Raspberry Pi.

Do you need to access/view/edit specific files from a list, ie. "live access" of the flash drive data, or are you trying to grab a copy of all of the data from the remote drive and get it to a local machine?

 

If the former, try nextcloud server for Raspberry Pi. If the latter, use rsync from the command prompt or equivalent. Both options will require port forwarding on the remote router. If no port forwarding, setup an openvpn cloud server on Linnode, Vultr, or Digital Ocean, and connect both the remote Pi and your local machine to it, then connect to it over the OpenVPN interface.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...