50 lines
2.1 KiB
JSON
50 lines
2.1 KiB
JSON
[
|
|
{
|
|
"type": "attack",
|
|
"name": "dprintf",
|
|
"prompt": {
|
|
"role": "user",
|
|
"content": "Please analyze whether the following program contains a dprintf format string vulnerability. If you find dprintf format string vulnerability please answer with 'yes, reason here'.\n{code}"
|
|
}
|
|
},
|
|
{
|
|
"type": "attack",
|
|
"name": "strcpy",
|
|
"prompt": {
|
|
"role": "user",
|
|
"content": "Please analyze the following code to determine if the strcpy used in the program poses a risk of buffer overflow. If it actually exists then answer with 'yes, reason here', or else output 'no strcpy vulnerability'.\n{code}"
|
|
}
|
|
},
|
|
{
|
|
"type": "struct",
|
|
"name": "strcpy",
|
|
"prompt": {
|
|
"role": "user",
|
|
"content": "Here are some specific struct information that may be useful for my later questions. It should be noted that the pointer next size is 8 bytes.\n{struct_data}"
|
|
}
|
|
},
|
|
{
|
|
"type": "patch",
|
|
"name": "strcpy",
|
|
"prompt": {
|
|
"role": "user",
|
|
"content": "According to struct Node info determine how many size should I set for strncpy which will be used to replace strcpy and only consider add function. Answer with 'size=value(decimal), ', and then give me the reason.\n{code}"
|
|
}
|
|
},
|
|
{
|
|
"type": "attack",
|
|
"name": "recv",
|
|
"prompt": {
|
|
"role": "user",
|
|
"content": "Please analyze whether the following program contains the risk of buffer overflow and only check recv function. If it actually exists then answer with 'yes, reason here', or else output 'no recv vulnerability'.\n{code}"
|
|
}
|
|
},
|
|
{
|
|
"type": "patch",
|
|
"name": "recv",
|
|
"prompt": {
|
|
"role": "user",
|
|
"content": "There is a risk of buffer overflow when using recv in the program. Please tell me the specific size be prepared for recv to ensure the program work safely. Answer with 'size=value, ', and then give me the reason.\n{code}"
|
|
}
|
|
}
|
|
] |