Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

这个环境是不是不能用来调试? #3

Closed
leveryd opened this issue Nov 9, 2021 · 7 comments
Closed

这个环境是不是不能用来调试? #3

leveryd opened this issue Nov 9, 2021 · 7 comments

Comments

@leveryd
Copy link

leveryd commented Nov 9, 2021

仓库中只有bzImage,没有vmlinux,是不是不能用来调试exp?

@bsauce
Copy link
Owner

bsauce commented Nov 9, 2021

没有符号表也能调试,只是下断点更麻烦一点

@leveryd
Copy link
Author

leveryd commented Nov 9, 2021

似乎看不到指令
image

@leveryd
Copy link
Author

leveryd commented Nov 9, 2021

我准备自己编译一个vmlinux,想先问下大佬为什么没有把vmlinux放到仓库中。

@bsauce
Copy link
Owner

bsauce commented Nov 9, 2021

1个vmlinux至少700M,我网速太慢了。你可以用 extract-vmlinux 生成一个不带符号表的 vmlinux。extract-vmlinux脚本你可以在网上搜到

@bsauce
Copy link
Owner

bsauce commented Nov 9, 2021

$ extract-vmlinux ./bzImage > ./vmlinux

@leveryd
Copy link
Author

leveryd commented Nov 9, 2021

$ extract-vmlinux ./bzImage > ./vmlinux

我试过这样。用 https://github.com/bsauce/kernel-exploit-factory/blob/main/CVE-2020-8835/file/bzImage 和 extract-vmlinux脚本 生成了一个vmlinux。

我用这个生成的vmlinux去调试,仍然看不到指令。

  ➜  file gdb vmlinux
  ...
  (gdb) target remote :1234
  Remote debugging using :1234
  0xffffffff81aeacfe in ?? ()
  (gdb) disassemble
  No function contains program counter for selected frame.

@bsauce
Copy link
Owner

bsauce commented Nov 9, 2021

$ x /20i $rip 我一般用这个反汇编

@leveryd leveryd closed this as completed Nov 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants