4

I have a few bare-bones systems running legacy software on creaking hardware. I want to be able to automate a lot of tasks by using auto hotkey scripts for tasks that currently, must be performed manually. I really don't want to install any software on these machines, and in some cases can't (as they are already maxed out on resources, or running Linux builds, or running weird stripped down Windows versions from the stone age)

I need a solution whereby I can receive keystrokes on a machine in real time without installing any software on it. However, requiring drivers or software on the machine sending keystrokes is no problem.

That's the problem I need to solve. Given the restriction on the receiving machine, I can only imagine that a solution might be along the lines of the input being via something like a Bluetooth dongle or USB receiver that registers as a keyboard, but is actually receiving keystrokes originating on another computer. If anyone knows if such a piece of hardware exists, could you post below? Or alternatively, any other solution that meets the goals.

  • What about a bluetooth keyboard and receiver? Are you avoiding that? You'd just have to install a driver for one of those. – Datarecovery.com MK Jul 7 '15 at 16:54
  • Can you get a bluetooth keyboard which accepts external keystrokes from a second device? – Some_Guy Jul 8 '15 at 7:59
  • I posted an answer since it got too long – Datarecovery.com MK Jul 8 '15 at 16:08
  • BTW, I was in college during the computer stone age (before bluetooth), and a researcher needed essentially what you describe. He built a platform that sat on top of a keyboard, with a solenoid-activated plunger for each key. He then sent the typing instructions to his device from another computer. I'm guessing that wouldn't be a practical solution for you. – fixer1234 Jul 14 '15 at 17:00
  • 2
    I appreciate the comments asking me to create an answer, but I wanted to seed a solution without spending the time to create a good answer. I'm sure you'll agree that a comment pointing you (and others who might be willing to write a more complete answer) in a workable direction is better than nothing. Personally, I might connect an Ethernet module and have it become a echo client over the network rather than serial or bluetooth as some others are suggesting but either way it should resolve your problem. – ssnobody Jul 15 '15 at 21:37
5
+50

You can use a remote IP-based KVM to generate keystrokes on another machine in real time.

Simply connect up the KVM's keyboard (and optionally the video and mouse) to the computer you want to send remote keystrokes to.

You then connect to the IP on the KVM via your web browser or the provided native system app, and send whatever keystrokes you wish.

One such product is Tripp Lite's Server Remote Control, External KVM over IP and another is the Lantronix Spider KVM

Alternatively, you can rebuild a DIY version of one of these with only keyboard support (rather than keyboard, video, and mouse support) using a Teensy USB Dev Board connected to a WIZ712MJ ethernet module with the WIZ812 Ethernet Adaptor Kit

At that point you could use the Teensy's ethernet and keyboard libraries to write a small program that spawns a server using Server.begin(), waits for a connection, and then has an infinite while loop with something like the following content to create a one-way network echo server:

if (myclient.available()) {
    Keyboard.print(myclient.read());
}

You'll likely want to flesh that out with some error checking and the like, but it should work as a skeleton.

| improve this answer | |
  • While this does look like a good solution, my worry here would be how difficult connecting to an IP-based KVM would be. A lot of the time I'm dealing with a bolted on to hardware machinethat doesn't have any internet capability, or even any network connection. I mean, there's an Ethernet port on the machine, but whether it's good for anything?... – Some_Guy Jul 20 '15 at 9:13
  • Also, I think this doesn't quite meet the requirement of not installing software on the follower machine – Some_Guy Jul 20 '15 at 9:18
  • 1
    @Some_Guy: Hardware KVM devices do not require software on the follower machine. They appear as hardware K, V, and M devices. If you deem attaching a keyboard to a machine as "installing software" then your requirements are impossible to meet. Also, how exactly do you plan on sending keystrokes to the machine in realtime if there is no network connection? We don't quite have subspace transceivers yet... – qasdfdsaq Jul 20 '15 at 11:50
  • 1
    Exactly right. The leader connects to the KVM device via the network and the KVM device appears as a keyboard (both USB and PS2 versions are available) to the follower. So its leader --ethernet-> kvm --USB-> follower – ssnobody Jul 20 '15 at 21:54
  • 1
    I would add that depending on the KVM device, some have java clients and some have IPMI interfaces. IPMI is somewhat insecure, but is very widely supported and easily scriptable even from a mobile phone. – qasdfdsaq Jul 21 '15 at 10:00
4

Here is a possible solution, some assembly required.

You can use a micro controller to receive keystrokes via network and transfer them to the computer it is connected to. One possible option would be Arduino platform and it's keyboard library as it may be simpler than making the hardware and libraries yourself. You will also need DIY software to send the keystrokes and, in case of Arduino it can be written in its IDE(simplified JAVA environment) . There are other platforms out there and most can be scaled down in production environment if you find this to be too big or expensive to deploy (as you may need more than one).

| improve this answer | |
  • This is a good suggestion, but it looks to me like teensy USB is probably just a little bit easier (looking at this pjrc.com/teensy/td_keyboard.html), and a little bit cheaper. However, I would love your opinion since I don't have that much experience. – Some_Guy Jul 20 '15 at 9:25
  • Also, do you think it would be possible to send realtime keystrokes from a connected computer using this, rather than pre-programmed? – Some_Guy Jul 20 '15 at 9:26
  • @Some_Guy It looks like a scalled down version of Arduino I was talking about, so it should do just fine. But you would need to connect from two computers at the same time to have realtime keystrokes and that is not possible via one USB port. Full size Arduino can suppport ready made network shields to separate connections, for example send keystrokes via network from your laptop and forward to USB to the receiving computer. – Enis P. Aginić Jul 20 '15 at 9:45
  • yeah the plan was to receive through serial port and go out via USB for the teensy – Some_Guy Jul 20 '15 at 21:39
3

This is far from an out-of-the-box solution, but you might be able to adapt something like the Teensy USB to accomplish this mission. I would envision configuring the Teensy USB to appear as a keyboard, then loading a program onto the Teensy USB that

  • receives keystrokes over a serial connection wired to its I/O pins and
  • sends those keystrokes to the target machine over its USB connection.

I personally wired one to a footpedal and programmed it to send the 's' keystroke when I stepped on the pedal, but that project was much much simpler than what you would need.

| improve this answer | |
  • Failing something easier, this seems like a good solution (But I'm hoping for an easier one). I was previously looking at an arduino build that looked more difficult, more expensive and bigger than this, so thanks! – Some_Guy Jul 15 '15 at 15:20
  • I have hardly any experience of using microcontrollers (I years ago did a very easy project where my hand was held by a book the whole time). Let's say I went with the teensy (looks very good). Would you connect a keyboard directly to the teensy USB with the program loaded, or go through through a laptop with an interface loaded? What type of connectors would I need? – Some_Guy Jul 15 '15 at 15:23
  • The TeensyUSB is the keyboard. I would then connect the laptop to the TeensyUSB using a serial connection (solder a DB9 to the I/O pins of the TeensyUSB and then plug the laptop into that DB9). Then use some terminal software (kermit?) on the laptop to type your characters across the serial connection. Writing the program that runs on the Teensy USB that receives the serial and sends keystrokes would not be trivial, but it would not be a major engineering project either. – Mutant Bob Jul 15 '15 at 15:33
  • I believe that there are bluetooth solutions that send/receive serial port data. BlueSoleil is a commercial software that probably does it - manualslib.com/manual/534847/Ivt-Bluesoleil.html?page=49 "The Bluetooth Serial Port (SPP) provides a virtual serial port via Bluetooth as an alternative to a hardwired serial cable between a computer and device. Any program that uses a standard serial port can use the Bluetooth serial port without any change." bluesoleil.com/bssoftware/BSoftware.aspx In fact, you might want to talk with them and see what they say about your project. – Datarecovery.com MK Jul 15 '15 at 17:05
  • 1
    Hi, I wanted to create another bounty and also award it to this question, but it seems I have to double my bounty to do that. I really appreciate this answer though, so thanks! – Some_Guy Jul 20 '15 at 21:49
0

It would be a bit odd that a keyboard would receive input. I think I understand a little better your angle of sending a keystroke sequence from a laptop. The bluetooth receiver (USB dongle) does the receiving from a bluetooth keyboard. So forget the keyboard since you have a laptop sending instead. There might be a bluetooth receiver out there that is general purpose and will let you pair and receive keyboard data from some other bluetooth device. Keyboard data is part of the bluetooth profile for HID ("Human Interface Device Profile") so at least that's covered. But a receiver that comes with a Logitech keyboard for instance might not allow receiving from anything but a Logitech keyboard. Searching Amazon for "bluetooth data receiver usb" brings up a few that might work like Mediastic's.

Do you already have a way you plan to send the data out from the laptop via bluetooth? You asked about receiving, but not sending. There are a couple interesting questions already about this -

| improve this answer | |
-1

Perfectly possible. In fact its the exact vector attack behind the thing called BAD USB.

You can read in detail about it in here.

Basically, its about changing(reprogramming) USB stick from storage device to another HUD device. It's not that easy to do but if you have the time and skills - yes, it's possible. Certainly not easy though.

A BadUSB device may even have replaced the computer’s BIOS – again by emulating a keyboard and unlocking a hidden file on the USB thumb drive.

| improve this answer | |
  • This isn't really an answer. I know that it's possible to spoof keystrokes, but I'm looking for a device that accepts keystrokes in realtime. – Some_Guy Jul 15 '15 at 9:23
  • This is not stated clearly in the question. However I think you are more likely to use my solution and make the USB device execute commands on the computer. Those commands can be: 1. powershell command to download netcat onto computer, 2. executiing netcat to connect to designated IP address of the server waiting for connection. 3. netcat is also binding local shell to connection 4. Server receiving connection is executing specified script /commands on the connected computer. This is the way to complete your task. Other solutions will most likely involve some kind of installation, – mnmnc Jul 15 '15 at 9:29
  • Also, much easier is to make BADUSB device to download script to the computer and execute it locally although for security reasons powershell script execution tends to be locked on a windows 7+ systems so reverse shell binding might be somewhat less bothersome. – mnmnc Jul 15 '15 at 9:31
  • I've re-written this question (again). What do you think? – Some_Guy Jul 15 '15 at 9:59
  • Your comment does not address the scope of this question. I need to execute keystrokes on an external machine from an external source, without running any scripts on that machine. I am plugging into DOS based systems in some case. The whole point of the question is to avoid having to work out a solution for each individual platform. I really want something that, once set up, is good to go for anything that has the most basic input drivers on it, and I can type on it remotely. – Some_Guy Jul 15 '15 at 10:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.