Set constant value for structure members

未关闭
#8,670 0 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 2 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
12/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
活跃
技术栈
cpp

调研方向

The issue names no files, tests or entry points, so the first step is to find where structure member types and dataflow constant values are handled in the Binary Ninja analysis code. The open question is whether the constant belongs to the type or to the view, and that needs a maintainer decision before any code is written. Done would mean a settled design plus a way to assert a member's value during dataflow.

由索引模型根据 Issue 内容生成。

描述

What is the feature you'd like to have?
I want the ability to specify a constant value of a structure type member, such that when that member is read during analysis, dataflow asserts that the value is whatever constant I have specified. Not sure if this should be a property of the type itself or of the view as a sort of view-level UIDF constant.

Is your feature request related to a problem?

  1. I have a structure with a field that is always set to a specific constant, and I want all functions using this structure to know of that value
  2. I have a C++ class definition with a vtable and want to poke the address of the vtable in the data segment into the vtable member, such that indirect calls through the vtable can automatically discover the concrete destinations for functions.

Are any alternative solutions acceptable?
I can write a script to iterate all uses of that structure member and UIDF the variable it gets loaded into, but this is kinda messy and needs to be re-ran every time analysis updates

Additional Information:
Reported by loadlibrary on Slack, also me because I want the vtable thing

主要语言
C++
星标
1.3k
派生
304
平均合并
2 天 20 小时
30 天内合并 PR
10

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

Vector35/binaryninja-api 的其他 Issue

查看 Vector35/binaryninja-api 的全部 Issue

相似的 Issue

更多 C++ Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。