Skip to content

About Dataset

Jiaying Li edited this page Aug 12, 2023 · 15 revisions

介绍

我们构建了一个数据集,旨在为网络安全领域的研究人员、开发者和从业者提供一个标准化且多样化的语言样本和提示集合。我们的数据集力求涵盖与网络安全相关的各种主题,包括漏洞评估、渗透测试、安全编码实践、入侵检测、网络协议、威胁分析等等。目前我们的数据集可作为 alpaca 类(如 alpaca-lora )大语言模型的训练数据集。

数据集格式

目前,我们的数据集可以分为两个组成部分:

  • Specific Domain dataset:针对特定领域的数据集,其中每条样本具有与下面样例相同的格式,该数据集的特点是对于每条样本的 output 都有严格的格式规范,即 output 中必须包含四个字段:Analysis、Lable、Risk 以及 Solution,其中 Label 字段的理想内容应为 low、high、medium 等用于表示风险等级的标签:
{
	"instruction": "Does this statement have any potential XSS security risks?",
	"input": "<noscript id=x tabindex=1 onfocusin=alert(1)></noscript>",
	"output": "1. analysis: The provided XSS statement attempts to inject a script into the HTML page using the <noscript> tag. It sets the 'id' attribute to 'x', the 'tabindex' attribute to '1', and triggers the 'onfocusin' event to execute the 'alert(1)' JavaScript code. This code will display an alert dialog with the value '1'. \n2. risk: The risk associated with this statement is that it allows an attacker to inject arbitrary JavaScript code into the page and potentially manipulate its behavior or steal sensitive information from users. \n3. solution: To mitigate the XSS vulnerability, input validation and output encoding should be implemented. Any user input or untrusted data should be properly sanitized and validated before being rendered in HTML. Additionally, output encoding should be used when displaying dynamic content to ensure that any special characters are properly encoded and cannot be interpreted as code by the browser."
}
  • QA dataset:针对各种不同网络安全问题的泛化回答。目前收录了部分有关安全协议,密码学原理,网络安全的内容,示例如下:
{
        "instruction": "What is the purpose of the COMP128 algorithm in GSM network security?",
        "input": "",
        "output": "COMP128 algorithm is used for network authentication and session key generation in GSM. It implements the A3 and A8 functions defined in the GSM standard. A3 is used to authenticate mobile stations to the network, while A8 is used to generate session keys. A5 algorithm uses the session key to encrypt data transmitted between the mobile device and the BTS."
}

上传数据集规范

为了保持一致性和使用的便利性,贡献者在向数据集仓库上传文件时遵循以下规范:

  1. 文件格式: 请以常用格式(如纯文本TXT、CSV或JSON)上传数据集以及Prompt文件,具体格式取决于数据集的结构和要求。(由于使用Alpaca模型,我们的数据集将以指定的JSON格式呈现)
  2. 命名规范: 在命名文件时,请使用描述性和有意义的名称,以反映数据集的内容和目的。避免使用泛泛的或模糊的名称,以确保清晰易辨认。具体的文件结构将会在后续说明中给出。
  3. 文件编码: 确保所有文件使用统一的字符编码,例如 UTF-8,以确保跨平台的兼容性和文本数据的正确解析。
  4. 缺失值处理: 如果数据集中存在缺失值,请明确指定缺失值的表示方式,并在数据结构描述中说明处理缺失值的方法或约定。

数据集组成

截止至 2023-7-15,我们的数据集组成如下。我们将继续对数据集的组成、格式继续调整与优化。

dataset composition

注意事项和免责声明

  1. 数据集内容: 本仓库中的数据集可能包含网络安全漏洞和攻击的相关信息。请注意,这些数据仅用于研究和教育目的,并且在实际应用中可能会引起安全风险。
  2. 使用风险: 使用本数据集所带来的任何风险和责任由使用者自行承担。我们强烈建议用户在合适的环境中使用数据集,并遵循适当的安全实践和法律法规。
  3. 数据验证: 虽然我们尽力确保数据集的准确性和质量,但我们无法保证数据集中的所有信息都是完全准确和最新的。用户在使用数据集之前应该自行验证和审查数据的有效性和适用性。
  4. 合法合规: 使用本数据集时,用户应确保其行为符合适用的法律法规,并遵守适用的隐私、数据保护和知识产权规定。我们不对用户使用数据集的违法或滥用行为承担任何责任。
  5. 安全注意: 请用户在使用数据集时采取适当的安全措施,包括但不限于隔离网络环境、匿名化处理数据、避免不必要的系统连接和操作等,以防止意外的安全事件和数据泄露。
  6. 贡献免责: 作为贡献者,请确保你上传的数据符合法律规定,且不包含任何恶意软件、敏感信息或侵犯他人隐私和知识产权的内容。我们对贡献者上传的数据内容不承担任何责任。
  7. 免责声明: 本仓库及其维护者不对因使用数据集导致的任何损失、安全事件或法律纠纷承担责任。

使用本数据集即表示您已阅读、理解并同意上述注意事项和免责声明。

参考链接

本数据集参考了多个Github项目或网络安全相关的网站以及数据集,链接如下:

Alpaca-Lora:https://github.com/tloen/alpaca-lora

Standford Alpaca: https://github.com/tatsu-lab/stanford_alpaca

Self-instruct: https://github.com/yizhongw/self-instruct

......(待更新)

Clone this wiki locally