A proof-of-concept project for enabling remote debugging on running Microsoft Edge/WebView2.
The original goal is to enable modification in Windows 11's (useless) Widgets.
It consists of two parts:
- Accept process ID from input
- Find the full path of
msedge.dll
loaded in target process - Download debug symbol (PDB) file for it from Microsoft Symbol Server
- Inject payload into target process using remote thread
- Load downloaded PDB file for
msedge.dll
- Find addresses of some un-exported functions
- Call them
More precisely, it relies on 3 functions:
CommandLine::ForCurrentProcess
CommandLine::AppendSwitchASCII
RemoteDebuggingServer::RemoteDebuggingServer
(constructor)
I'm too lazy to link them to source code, please search on cs.chromium.org.
-
Why not directly downloading PDB in payload?
Because Chromium browser process has no Internet access.
-
It's stuck after entering process ID
It's downloading PDB file (around 380MB), so wait a moment.
- Build normally in Visual Studio
- Copy
dbghelp.dll
,symsrv.dll
andsymsrv.yes
to output folder