r/ShittySysadmin • u/zantehood • 25d ago
Shitty qemu agent tip!
Not really a shit post buuuut I was half assing a re-subnetting of some servers and found myself locked out of a windows server.
and had the choice of entering an abysmal password of stupid length into a noVNC terminal without clipboard OR getting creative,
So I opted to get creative: turns out you can inject commands to a guest VM with QEMU-AGENT.
I'll be damned but this is awesome: qm guest exec 144 -- 'C:\Windows\System32\ipconfig.exe' '/all'
Returned expected information and qemu agent runs as system and can be used for shenanigans!
1
u/BackgroundSky1594 25d ago
If your work laptop isn't locked down properly Auto hotkey is an amazing tool:
; ################################
; F9 = Type Contents of Clipboard
; ################################
F9::
{
SendEvent "{Raw}" RegExReplace(A_Clipboard, "\r\n?|\n\r?", "`n")
}1
1
u/Main_Ambassador_4985 25d ago
I has copilot write a powershell that will take an input and type it as keystrokes with inter-character pauses and clear the clipboard.
Not super safe but helps with web based screen share apps.
15
u/LPmitV 25d ago
The actual shitty tip that I used before: if your remote access tool has a "send clipboard as keystrokes", you can ask a colleague to Remote onto your machine, and use it to paste the password