Skip to content

Instantly share code, notes, and snippets.

@uf0o
Last active May 24, 2023 10:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save uf0o/de744a8c70a66383e2164f0867dad291 to your computer and use it in GitHub Desktop.
Save uf0o/de744a8c70a66383e2164f0867dad291 to your computer and use it in GitHub Desktop.
v8/d8 build guide for CVE-2018-17463 (May 2023)

Follow the initial V8/D8 build guide

https://gist.github.com/jhalon/5cbaab99dccadbf8e783921358020159

Install prerequisite software:

  • MSVC v140 - VS 2015 C++ build tools (v14.00)
  • MSVC v141 - VS 2017 C++ x64/x86 build tools (v14.16)
  • Windows 10 SDK (10.0.17134.0)
  • Visual Studio 2017 Community

Environmental Variables:

  • Add the vs2017_install User Variable and set it to C:\Program Files (x86)\Microsoft Visual Studio 14.0\
  • Add C:\Program Files (x86)\Windows Kits\10\bin\10.0.17134.0\x64 to the User Path Variable.

Cleanup

Remove the x64.debug folder and its content from the out folder.

Setup Ninja.exe

Download ninja.exe and copy it under C:\dev\depot_tools\

Check out to the latest vulnerable commit:

From C:\dev\depot_tools\v8\v8\ run git checkout 568979f4d891bafec875fab20f608ff9392f4f29

Force dependencies sync:

From C:\dev\depot_tools\v8\v8\ run gclient sync --force

Build d8 debug version:

Launch a VS2017 Developer Command Prompt and from it run:

C:\dev\v8\v8>gn gen --ide=vs out\x64.debug
C:\dev\v8\v8>cd out\x64.debug
C:\dev\v8\v8\out\x64.debug>msbuild all.sln

It might take up to one hour, so be patience

Test d8:

If everything went well we should be able to run d8 from the x64 debug folder.

C:\dev\depot_tools\v8\v8>out\x64.debug\d8 --allow-natives-syntax
V8 version 7.1.0 (candidate)
d8>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment