Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ This is a guide for how to install PyRIT. Alternatively, take a look at the <a h
Check the following example to learn how to set up PyRIT with a target:
- [PyRIT extracts passwords from Gandalf](./../examples/demo/1_gandalf.ipynb)
- [PyRIT extracts passwords from Gandalf](./examples/demo/1_gandalf.ipynb)
## Troubleshooting
Expand Down
8 changes: 4 additions & 4 deletions examples/demo/1_gandalf.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
"Each level gets progressively more difficult.\n",
"\n",
"\n",
"\n",
"<br> <img src=\"./../../assets/gandalf-demo-setup.png\" alt=\"drawing\" height=\"400\"/> <br>\n",
"<img src=\"./../../assets/gandalf-demo-setup.png\" alt=\"gandalf-demo-setup.png\" height=\"400\"/>\n",
"![gandalf-demo-setup.png](./../../assets/gandalf-demo-setup.png)\n",
"\n",
"**Step 1.** AI Red Team Bot send message to Gandalf <br>\n",
"**Step 2.** Gandalf send message back <br>\n",
Expand All @@ -49,7 +49,7 @@
"\n",
"## Level 1\n",
"\n",
"<img src=\"./../../assets/gandalf-home-level-1.png\" alt=\"drawing\" height=\"400\"/>"
"<img src=\"./../../assets/gandalf-home-level-1.png\" alt=\"gandalf-home-level-1.png\" height=\"400\"/>\n"
]
},
{
Expand Down Expand Up @@ -220,7 +220,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.13"
"version": "3.10.12"
}
},
"nbformat": 4,
Expand Down
35 changes: 25 additions & 10 deletions examples/demo/3_gandalf_AML_endpoint_red_team_bot.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
{
"cell_type": "markdown",
"metadata": {
"collapsed": false
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
},
"source": [
"# Introduction\n",
Expand All @@ -23,7 +26,7 @@
" - Navigate to the AML Studio.\n",
" - Go to the 'Endpoints' section.\n",
" - Retrieve the API key and endpoint URI.\n",
" <br> <img src=\"./../../assets/aml_managed_online_endpoint_api_key.png\" alt=\"drawing\" height=\"400\"/> <br>\n",
" <br> <img src=\"./../../assets/aml_managed_online_endpoint_api_key.png\" alt=\"aml_managed_online_endpoint_api_key.png\" height=\"400\"/> <br>\n",
"\n",
"3. **Set the Environment Variable:**\n",
" - Add the obtained API key to an environment variable named `AML_API_KEY`.\n",
Expand Down Expand Up @@ -52,7 +55,7 @@
"Gandalf contains 7 different levels. In this demo we will show how to automatically bypass the first three.\n",
"Each level gets progressively more difficult.\n",
"\n",
"<br> <img src=\"./../../assets/gandalf-demo-setup.png\" alt=\"drawing\" height=\"400\"/> <br>\n",
"<br> <img src=\"./../../assets/gandalf-demo-setup.png\" alt=\"gandalf-demo-setup.png\" height=\"400\"/> <br>\n",
"\n",
"## Steps\n",
"\n",
Expand All @@ -66,7 +69,7 @@
"\n",
"## Level 1\n",
"\n",
"<img src=\"./../../assets/gandalf-home-level-1.png\" alt=\"drawing\" height=\"400\"/>"
"<img src=\"./../../assets/gandalf-home-level-1.png\" alt=\"gandalf-home-level-1.png\" height=\"400\"/>"
]
},
{
Expand All @@ -77,7 +80,10 @@
"end_time": "2023-10-27T18:50:44.458559Z",
"start_time": "2023-10-27T18:50:44.369100Z"
},
"collapsed": false
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
},
"outputs": [
{
Expand Down Expand Up @@ -143,7 +149,10 @@
"end_time": "2023-10-27T18:50:45.495714Z",
"start_time": "2023-10-27T18:50:45.473236Z"
},
"collapsed": false
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
},
"outputs": [
{
Expand All @@ -169,7 +178,10 @@
"end_time": "2023-10-27T18:50:53.492921Z",
"start_time": "2023-10-27T18:50:47.308284Z"
},
"collapsed": false
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
},
"outputs": [],
"source": [
Expand Down Expand Up @@ -212,7 +224,10 @@
"end_time": "2023-10-27T18:51:04.611743Z",
"start_time": "2023-10-27T18:51:03.774346Z"
},
"collapsed": false
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
},
"outputs": [],
"source": [
Expand Down Expand Up @@ -242,9 +257,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.11"
"version": "3.10.12"
}
},
"nbformat": 4,
"nbformat_minor": 0
"nbformat_minor": 4
}
36 changes: 26 additions & 10 deletions examples/demo/4_gandalf_HuggingFace_red_team_bot.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
{
"cell_type": "markdown",
"metadata": {
"collapsed": false
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
},
"source": [
"# Introduction\n",
Expand All @@ -18,7 +21,8 @@
"\n",
"\n",
"Before beginning, ensure that you have the model id obtained from the HuggingFace as shown below.\n",
"<br> <img src=\"./../../assets/huggingface_model_id.png\" alt=\"drawing\" height=\"400\"/> <br>\n",
"<br> <img src=\"./../../assets/huggingface_model_id.png\" alt=\"huggingface_model_id.png\" height=\"400\"/> <br>\n",
"\n",
"\n",
"**Target Chat Engine Setup**\n",
"\n",
Expand All @@ -43,7 +47,7 @@
"Each level gets progressively more difficult.\n",
"\n",
"\n",
"<br> <img src=\"./../../assets/gandalf-demo-setup.png\" alt=\"drawing\" height=\"400\"/> <br>\n",
"<br> <img src=\"./../../assets/gandalf-demo-setup.png\" alt=\"gandalf-demo-setup.png\" height=\"400\"/> <br>\n",
"\n",
"Step 1. AI Red Team Bot (HuggingFace model) send message to Gandalf\n",
"Step 2. Gandalf send message back\n",
Expand All @@ -52,7 +56,7 @@
"\n",
"## Level 1\n",
"\n",
"<img src=\"./../../assets/gandalf-home-level-1.png\" alt=\"drawing\" height=\"400\"/>"
"<img src=\"./../../assets/gandalf-home-level-1.png\" alt=\"gandalf-home-level-1.png\" height=\"400\"/>"
]
},
{
Expand All @@ -63,7 +67,10 @@
"end_time": "2023-10-27T18:50:44.458559Z",
"start_time": "2023-10-27T18:50:44.369100Z"
},
"collapsed": false
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
},
"outputs": [],
"source": [
Expand Down Expand Up @@ -117,7 +124,10 @@
"end_time": "2023-10-27T18:50:45.495714Z",
"start_time": "2023-10-27T18:50:45.473236Z"
},
"collapsed": false
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
},
"outputs": [],
"source": [
Expand All @@ -132,7 +142,10 @@
"end_time": "2023-10-27T18:50:53.492921Z",
"start_time": "2023-10-27T18:50:47.308284Z"
},
"collapsed": false
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
},
"outputs": [],
"source": [
Expand Down Expand Up @@ -175,7 +188,10 @@
"end_time": "2023-10-27T18:51:04.611743Z",
"start_time": "2023-10-27T18:51:03.774346Z"
},
"collapsed": false
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
},
"outputs": [],
"source": [
Expand Down Expand Up @@ -212,9 +228,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.11"
"version": "3.10.12"
}
},
"nbformat": 4,
"nbformat_minor": 0
"nbformat_minor": 4
}