CS-Remote-OPs-BOF icon indicating copy to clipboard operation
CS-Remote-OPs-BOF copied to clipboard

Escape double quotes with reg_set

Open rasta-mouse opened this issue 11 months ago • 1 comments

I feel like this is a silly question, but how do you escape double quotes when using reg_set? I tried a few variants.

Command:

reg_set HKCU Software\Microsoft\Windows\CurrentVersion\Run Payload REG_SZ "C:\Path\to\payload.exe" /q /n

Result:

C:\Path\to\payload.exe

Command:

reg_set HKCU Software\Microsoft\Windows\CurrentVersion\Run Payload REG_SZ "\"C:\Path\to\payload.exe\" /q /n"

Result:

\

Command:

reg_set HKCU Software\Microsoft\Windows\CurrentVersion\Run Payload REG_SZ '"C:\Path\to\payload.exe" /q /n'

Result:

'"C:\Path\to\payload.exe"

rasta-mouse avatar Jan 07 '25 11:01 rasta-mouse