You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"- Intelligently analyzes and extracts PoC code\n",
27
+
"- Automatically selects the most reliable PoC samples\n",
28
+
"- Supports collection of PoCs from multiple sources"
29
+
],
30
+
"metadata": {
31
+
"id": "BdX56iM1r5aB"
32
+
}
33
+
},
34
+
{
35
+
"cell_type": "markdown",
36
+
"source": [
37
+
"[](https://colab.research.google.com/github/DhivyaBharathy-web/PraisonAI/blob/main/examples/cookbooks/Pocky_Cybersecurity_PoC_Agent.ipynb)\n"
"You are a highly skilled technical assistant with deep expertise in PoC sample validation.\n",
141
+
"\n",
142
+
"Given the attack intent of a CVE vulnerability and a PoC sample gathered from public sources, your task is to analyze whether the PoC correctly implements the intended attack behavior.\n",
143
+
"\n",
144
+
"Specifically:\n",
145
+
"- Understand the CVE's attack intent, including the attack goal and the underlying exploitation mechanism.\n",
146
+
"- Analyze the PoC to determine whether it is designed to achieve this intent.\n",
147
+
"- Check whether the payloads, request structures, and overall logic of the PoC align with the described attack intent.\n",
148
+
"- You do not need to execute the PoC. Focus on static validation through reasoning and consistency.\n",
149
+
"\n",
150
+
"Your output must be a JSON object with two fields:\n",
151
+
"- \"valid\": a boolean indicating whether the PoC correctly reflects the attack intent.\n",
152
+
"- \"reasoning\": a brief explanation of your judgment. If \"valid\" is false, the reasoning must clearly explain what is incorrect or inconsistent in the PoC compared to the attack intent, so that the PoC can be revised accordingly.\n",
153
+
"\"\"\"\n",
154
+
"print(validation_prompt)"
155
+
],
156
+
"metadata": {
157
+
"id": "9q3aKl1xshrb"
158
+
},
159
+
"execution_count": null,
160
+
"outputs": []
161
+
},
162
+
{
163
+
"cell_type": "markdown",
164
+
"source": [
165
+
"# Main (Query and Validate a CVE PoC)"
166
+
],
167
+
"metadata": {
168
+
"id": "531EZgcLsqP6"
169
+
}
170
+
},
171
+
{
172
+
"cell_type": "code",
173
+
"source": [
174
+
"def run_pocky_for_cve(cve_id):\n",
175
+
" # Example: Simulate fetching a description and PoC (replace with real logic)\n",
176
+
" description = f\"Description for {cve_id} (replace with real Exa/OpenAI search)\"\n",
177
+
" poc_sample = f\"PoC code for {cve_id} (replace with real PoC search)\"\n",
0 commit comments