ufrisk / pcileech

Direct Memory Access (DMA) Attack Software
GNU Affero General Public License v3.0
5.06k stars 736 forks source link

close other pcileech device connection #220

Closed mylylyl closed 1 year ago

mylylyl commented 1 year ago

Hi Ufrisk,

Happy Holidays!

Not sure if this has been brought up but I'm wondering if I can programmatically close pcileech "connections" from other programs? Currently vmm_initialize will just fail if there's other connections to the device.

ufrisk commented 1 year ago

Hi and thanks :)

You'd have to close the other program that have the open connection towards the device. Only one program may have an open connection towards the device by default.

If you wish to connect with multiple programs towards the same device there is a "leechagent" you may start and then connect towards to it over the network (or localhost) with the other programs. But this will come with a performance impact (increased latency).

Alternatively it would be possible to run multiple programs towards different devices.

mylylyl commented 1 year ago

Thanks for the reply!

Problem is I sometimes started multiple programs and some of them may not close properly, thus stopping newly openend ones from connecting to the device. I'm wondering if there's a way to programmatically close all connections so newly opened program won't stuck at failed to initialize vmm and has to restart pc/re-plug cable.

ufrisk commented 1 year ago

You'd have to use the standard Windows API to close the other still open applications. There isn't something in the MemProcFS/VMM API to close the other applications.