mouse integration on infected guest machine - virtual-machine

Mouse integration (which is under the input menu(top left)) in oracle virtualbox, can you have it on when doing malware analysis
I'm really just worried about a memory leak, that would cause my host computer to get infected.
Note that I will not have guest additions installed.Just worried about the mouse feature, if it is the case that its not safe, I will get a seperate mouse.

Related

Armbian - how to turn off a hard drive connected on SATA

I have an Orange Pi + 2 single board computer with the ability to connect an external hard drive via SATA.
Armbian is installed on the hard disk, the bootloader is in the onboard memory of the board.
Any command to turn off the device leads to the same result: the indicators on the board go out, it is no longer available via SSH, but the hard disk, any devices connected via USB continue to work, and the image via HDMI is also displayed on the screen.
How to completely turn off the device so that the hard drive stops correctly?
I believe that if you are capable of powering the device off using the operating system's menu, then it should be safe to cut the power off from the device itself. I have a raspberry pi 4 and have a little USB-C adapter that has a simple power switch which makes this concept very convenient for me. Cutting power to a turned-on, working device is very dangerous as it can damage critical files that could be being written. For this reason, it is probably smart to back up the device and also make sure that you are powering the device off through the operating system so that it can finish editing core files in case it needs to.

Where are my USB mouse's files stored and how to reverse-engineer them?

I bought a new mouse (which doesn't have it's own software) and I was wondering:
Since it has RGB lights that change on their own, as far as my understanding goes, it has some software inside it that controls this.
First, the simpler question: when I first connect the mouse, Windows says it's "installing" some stuff. Where can I find this stuff (files probably)?
Second: Is there any way for me to "reverse engineer" this and get access to the mouse's code, so that I would be able to control the LED's color, for example?
When Windows says it is "installing" something for your mouse, it is looking at the USB descriptors, figuring out what driver to associate with the mouse, and recording other metadata. You can look in your registry under "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB" to see what gets recorded. For a more complicated device, I think Windows could actually download driver files from the internet during this stage and install them on your computer. But for a standard HID mouse, it should already have the drivers it needs.
There is no standard way to read the code from a hardware device, and it is likely to be extremely difficult if the device is not open source. The code is likely stored in the memory of a microcontroller that has read protection enabled, meaning that it cannot be read from an external programmer. It is also possible that much of the funcitonality of the mouse is actually implemented in application-specific hardware instead of software.
If there is existing software on your PC that allows you to control the LED color of your mouse, your best hope is to run that software and look at what USB packets it is sending to the mouse using a USB protocol analyzer.

What is the difference in physical behavior of hardware on bare metal vs VM with IOMMU passthrough?

I have some dated equipment used to run an experimental apparatus. Unfortunately, that equipment will only run on WinXP using FireWire/IEEE1394, which is becoming more and more of a pain for us to maintain hardware-wise. Unfortunately we also don't have the money to replace this equipment. We discussed perhaps trying to virtualize the XP environment on a newer OS. I'd been reading about VFIO/IOMMU and figured maybe I could pass the FireWire PCI cards through and just do it that way.
Plus side - I got it to work. I installed XP with a QEMU-KVM hypervisor. Got it set up, passed the firewire cards through, and all was recognized in the VM, including when I attached the equipment to the FW cards. XP device manager saw that it was all there.
Unfortunately, I've found that the actual interaction with the hardware seems to be touchy at best. Things misbehave in weird, unexplainable ways. Some of those made me think that the guest OS wasn't communicating with the passed through cards correctly. This was surprising as I was under the impression that passed through cards were utilized directly by the guest OS without host OS intervention.
My question is basically - if I'm virtualizing an older system and passing through the various ports/cards needed, should it behave as if it were bare metal? Or are there circumstances where what the guest OS tries to do is not the same as if it were bare metal (I.E - the host OS changes something when the instruction leaves the VM)? As I said - I was under the impression that the guest OS was interacting with hardware directly, but experience has made me question if this is actually the case.
Part of the reason I want to know this is that there's other equipment that would be more dangerous or lead to damage of the equipment if it behaved unexpectedly (I.E Lasers where power is computer controlled) that uses other hardware interfaces. So, if there is a risk of what the guest OS thinks it's doing being disconnected from the actual reality, that's a safety risk that I want to understand before going forward.

wine without capturing mouse

I wonder, can I use wine like a sort of virtual machine? I mean, can I run windows programs without mouse / keyboard capturing?
Second question, connected with the first one, how does several programs, run with wine, interact with each other? For example, do they see each other processes and can they read each other memory?
If I can't do it with wine, is there wine analogs, that can do it?
P.S.
I do not consider virtual machines because it is very heavy program, and wine uses much lesser resources
Wine does not 'capture' the keyboard and mouse like virtual machine software usually does - whatever program you run in wine is able to interact with your keyboard and mouse in the same manner any other application running on your machine does, since the window is actually handled by your operating system like any other desktop software. Certain games may capture the mouse, the same way they do on windows.
In much the same way, wine doesn't really sandbox your application like a virtual machine does - the application, if it chose to, could do anything that any other software run as your user account could do.
That said, running incompatible software simultaneously in two different wine prefixes can usually be done.

C++ Issue creating a mouse simulator

I have been given the following project to do:
create a program that runs on computer 1. The program will simulate mouse movements and pass that information through a usb cable from computer 1 to computer 2. Computer 2 must believe the information being passed to it is coming from a mouse-device.
Basically computer 2 has to believe that a mouse is connected to its usb-port, when actually it is another computer (computer 1), and computer 1 basically simulates mouse movements. Which movements the computer simulates doesn't really matter because that would probably be the easy bit, the harder bit is actually making the software that makes that possible.
QUESTION: Is there any program that currently does that? If so please tell me which one it is. If there isn't any program you know of, how would I go about making it myself?
PS: I would assume that this project is theoretically possible. I mean the computer 1 would just have to send signals to computer 2 that are similar to the normal signals sent to a computer by an ordinary mouse.
The ability to act as a USB host as well as a client (keyboard, mouse, etc.) is not typically part of the USB chipset in PCs. The ability to serve either role requires something unique like USB OTG; which you can find in some mobile phones.
So no, this is generally not possible with two random PCs and a USB cable. In any case, you can find a discussion on this here:
Emulate USB Device with USB Host
The thread mentions that you could make a proxying device with active electronics in it to sit between two host-only devices and be capable of translating to appear as a client to one. But with just a plain old USB cable you can't.
Since you're so specific about wanting it to be done with USB and no need to install special software you are probably not interested in something like Synergy:
https://en.wikipedia.org/wiki/Synergy_(software)
...but someone else finding this question might be.