question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Service Failed to start. 31: A device attached to the system is not functioning

See original GitHub issue

I seem to be having issues with the physmem2profit service on my bare-metal Windows 10 host. Any suggesstions?

Compiled with Microsoft Visual Studio Community 2019 version 16.5.5

Ran on Microsoft Windows Version 10 2004 update: .\Physmem2profit.exe --ip 192.168.128.142 -p 80 --verbose

Attacking machine command: python3 physmem2profit --host 192.168.128.142 --port 80 --mode all --driver winpmem --install c:/temp/att_winpmem_64.sys --label foobar

Receiving the following output from the Windows 10 host after attacking with my Kali machine:

[+] Found driver bridge: WinPmem.
[+] Registered command: Install.  
[+] Registered command: Uninstall.  
[+] Registered command: Map.
[+] Registered command: Read.
[*] Starting server on 192.168.128.142:21...
[+] Server Started.
[*] Waiting for a connection...
[+] Connected!
[*] Invoking Command Install for driver WinPmem.
[*] Installing service...
[*] Creating service physmem2profit...
[+] Service created successfully.
[*] Starting service...
[*] Service is stopped. Trying to start it...
[-] Service Failed to start. 31: A device attached to the system is not functioning
[*] Invoking Command Uninstall for driver WinPmem.
[?] Service already stopped.
[+] Successfully unloaded the WinPMem driver.
[*] Exit command received. Terminating.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:15 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
fersingbcommented, Jun 23, 2021

Hello,

I tried the most recent driver and got the same issue as @Antho59 , this seems to be caused by a change in the IOCTRL codes. I recompiled the Physmem2profit server with INFO_IOCTRL = 0x22C40F and I got past this specific error. However it’s still not working.

After sending the Map command it just hangs there for a while and at some point the python client crashes with “File does not exist: <path to image.raw>

When I add some debug statements in the client, I see the n value used in the for loop to build the runs array is 0. However in DebugView I see “Memory range runs found: 7”, so this seems to mismatch and I don’t know why. For now this is beyond my Windows Kernel understanding/knowledge.

@timhir: Any chance you could have a quick look at this? I understand you’re probably busy, so maybe if you could give me some pointers I might be able to investigate that further.

Cheers, Boris

1reaction
timhircommented, Aug 23, 2020

I will try to investigate this at some point. Unfortunately cannot give any guarantees on the schedule 😕

Read more comments on GitHub >

github_iconTop Results From Across the Web

Solved: Error 31: A device attached to the system is not f...
This issue occurs if some of the files that are required to run the service are missing. The files may be missing if...
Read more >
How to Fix “A device attached to the system is not ...
One cause of the “A device attached to the system is not functioning” issue is outdated device drivers. Old drivers often have bugs...
Read more >
A device attached to the system is not functioning
It sounds like you are currently having a problem that receiving "a device attached to the system is not functioning" while installing software....
Read more >
How to Fix the "A Device Attached to the System Is Not ...
1. Reconnect the Device · 2. Use a Different USB Port · 3. Run SFC and DISM Scans · 4. Update the Device...
Read more >
FIX Error 31 A device attached to the system is not functioning ...
GamePass #XboxGamePass #GamePassPC How to fix Game Pass, Gaming Services " Error 31 : A device attached to the system is not functioning....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found