Alternative format for threat lib for better readability and editing
维护者通常 3 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 32/100
调研方向
首先定位 threatlib.json,并追踪 pytm 如何加载威胁定义。定义所提议的 Markdown 元数据和内容结构,然后确定仅使用 Python 标准库的生成器如何生成等效的 threatlib.json 数据;当格式和转换方案达成一致,并保留现有威胁信息时,即视为完成。
由索引模型根据 Issue 内容生成。
描述
So I looked through the threats recently and again and again I find it difficult to read through the JSON document.
What bothers me the most is the combination of text in details, mitigation, and example with the metadata like id condtion severity and target.
It makes the text hard to read and the metadata difficult to find.
Now I had the idea to have a markdown file for each threat in the style of pandoc with the yaml_metadata_extension.
The result could look similar to this
---
id: INP01
condition: target.usesEnvironmentVariables is True and target.controls.sanitizesInput is False and target.controls.checksInputBounds is False
severity: High
target: (<class 'pytm.pytm.Lambda'>, <class 'pytm.pytm.Process'>)
---
# Buffer Overflow via Environment Variables
This attack pattern involves causing a buffer overflow through manipulation of environment variables. Once the attacker finds that they can modify an environment variable, they may try to overflow associated buffers. This attack leverages implicit trust often placed in environment variables.
## Example
Attack Example: Buffer Overflow in `$HOME` A buffer overflow in sccw allows local users to gain root access via the `$HOME` environmental variable. Attack Example: Buffer Overflow in TERM A buffer overflow in the rlogin program involves its consumption of the TERM environmental variable.
## Mitigations
Do not expose environment variable to the user.Do not use untrusted data in your environment variables. Use a language or compiler that performs automatic bounds checking. There are tools such as Sharefuzz [R.10.3] which is an environment variable fuzzer for Unix that support loading a shared library. You can use Sharefuzz to determine if you are exposing an environment variable vulnerable to buffer overflow.
## References
- https://capec.mitre.org/data/definitions/10.html
- CVE-1999-0906
- CVE-1999-0046
- http://cwe.mitre.org/data/definitions/120.html
- http://cwe.mitre.org/data/definitions/119.html
- http://cwe.mitre.org/data/definitions/680.html
Of course this file would not be parseable by pytm with the restriction that it should only depend on python stdlib.
But what could be done is that the threats are stored in markdown files from which the threatlib.json could be generated.
What do you think about this idea?
- 主要语言
- Python
- 星标
- 1.2k
- 派生
- 237
- 平均合并
- 4 天 2 小时
- 30 天内合并 PR
- 9
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
OWASP/pytm 的其他 Issue
-
Dataflow defaults overwrite values the model set explicitly可能已有人在做 @markthomaschurch 于 1 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 30/100
维护者通常 3 天内回复
-
Calling TM.dfd() a second time returns an empty diagram可能重新可做 关联的 PR 已关闭且未合并。 未关闭
难度 2/5 1-3 小时 新手友好度 25/100
维护者通常 3 天内回复
-
Datastore icon is missing from SVG diagrams (absolute PNG path)可能已有人在做 @markthomaschurch 于 3 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 20/100
维护者通常 3 天内回复
-
Long boundary names render a literal "\n" in the DFD可能重新可做 关联的 PR 已关闭且未合并。 未关闭
难度 2/5 1-3 小时 新手友好度 35/100
维护者通常 3 天内回复
-
`TM.check()` overwrites explicit Dataflow `protocol`, `dstPort` and `controls.isEncrypted` with sink defaults (regression in 1.4.0)可能已有人在做 @Svastikkka 于 14 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 75/100
维护者通常 3 天内回复
相似的 Issue
-
AI bug
难度 2/5 1-3 小时 新手友好度 68/100
AUTO-MAS-Project/AUTO-MAS#1960 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
btclib-org/btclib-wallet#872 ·
维护者通常 1 天内回复
-
[Bug]: Scheduled returns scan all accepted minion keys causing extreme load可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭bug needs-triage
难度 2/5 1-3 小时 新手友好度 76/100
saltstack/salt#70789 · 1 条评论 ·
维护者通常 3 天内回复
-
难度 2/5 1-3 小时 新手友好度 87/100
btclib-org/btclib#3093 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复