roll a d8中编译有漏洞版本的v8出现错误 5C

萌新一枚,之前一直是学习web方面的漏洞挖掘。最近,想着对浏览器有更深入的了解,在学长的带领下尝试学习chrome的漏洞挖掘,决定从roll a d8开始入门。
但是,作为第一次漏洞利用的挑战,连编译都没有通过Orz

我搭建环境的步骤是照着这位师傅的博客做的
https://xz.aliyun.com/t/5190

git reset --hard 1dab065bb4025bdd663ba12e2e976c34c3fa6599
gclient sync
tools/dev/v8gen.py x64.debug 
ninja -C out.gn/x64.debug d8

做到第三步使用v8gen.py时候,报错如下:

Traceback (most recent call last):
  File "tools/dev/v8gen.py", line 304, in <module>
    sys.exit(gen.main())
  File "tools/dev/v8gen.py", line 298, in main
    return self._options.func()
  File "tools/dev/v8gen.py", line 166, in cmd_gen
    gn_outdir,
  File "tools/dev/v8gen.py", line 208, in _call_cmd
    stderr=subprocess.STDOUT,
  File "/usr/lib/python2.7/subprocess.py", line 574, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['/usr/bin/python', '-u', 'tools/mb/mb.py', 'gen', '-f', 'infra/mb/mb_config.pyl', '-m', 'developer_default', '-b', 'x64.debug', 'out.gn/x64.debug']' returned non-zero exit status 1

尝试带上-vv,结果如下:

################################################################################
/usr/bin/python -u tools/mb/mb.py gen -f infra/mb/mb_config.pyl -m developer_default -b x64.debug out.gn/x64.debug

  Writing """\
  is_debug = true
  target_cpu = "x64"
  v8_enable_backtrace = true
  v8_enable_slow_dchecks = true
  v8_optimized_debug = false
  """ to /home/admin/v8/out.gn/x64.debug/args.gn.

  /home/admin/v8/buildtools/linux64/gn gen out.gn/x64.debug --check
    -> returned 1
  ERROR at //build/config/linux/pkg_config.gni:103:17: Script returned non-zero exit code.
      pkgresult = exec_script(pkg_config_script, args, "value")
                  ^----------
  Current dir: /home/admin/v8/out.gn/x64.debug/
  Command: python -- /home/admin/v8/build/config/linux/pkg-config.py -s /home/admin/v8/build/linux/debian_sid_amd64-sysroot -a x64 glib-2.0 gmodule-2.0 gobject-2.0 gthread-2.0
  Returned 1.
  stderr:

  Traceback (most recent call last):
    File "/home/admin/v8/build/config/linux/pkg-config.py", line 233, in <module>
      sys.exit(main())
    File "/home/admin/v8/build/config/linux/pkg-config.py", line 139, in main
      prefix = GetPkgConfigPrefixToStrip(options, args)
    File "/home/admin/v8/build/config/linux/pkg-config.py", line 80, in GetPkgConfigPrefixToStrip
      "--variable=prefix"] + args, env=os.environ)
    File "/usr/lib/python2.7/subprocess.py", line 567, in check_output
      process = Popen(stdout=PIPE, *popenargs, **kwargs)
    File "/usr/lib/python2.7/subprocess.py", line 711, in __init__
      errread, errwrite)
    File "/usr/lib/python2.7/subprocess.py", line 1343, in _execute_child
      raise child_exception
  OSError: [Errno 2] No such file or directory

  See //build/config/linux/BUILD.gn:83:3: whence it was called.
    pkg_config("glib") {
    ^-------------------
  See //build/config/compiler/BUILD.gn:198:18: which caused the file to be included.
      configs += [ "//build/config/linux:compiler" ]
                   ^------------------------------
  GN gen failed: 1
Traceback (most recent call last):
  File "tools/dev/v8gen.py", line 304, in <module>
    sys.exit(gen.main())
  File "tools/dev/v8gen.py", line 298, in main
    return self._options.func()
  File "tools/dev/v8gen.py", line 166, in cmd_gen
    gn_outdir,
  File "tools/dev/v8gen.py", line 208, in _call_cmd
    stderr=subprocess.STDOUT,
  File "/usr/lib/python2.7/subprocess.py", line 574, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['/usr/bin/python', '-u', 'tools/mb/mb.py', 'gen', '-f', 'infra/mb/mb_config.pyl', '-m', 'developer_default', '-b', 'x64.debug', 'out.gn/x64.debug']' returned non-zero exit status 1

大概意思就是GN里有一个文件没有办法include,但是我看其他师傅都是正常执行。
Google查询的话,表示重装一遍~然而我试着做也并没有什么用。
求助师傅们

2个回答

缺少依赖吧,glib没安装?

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问