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
Copy file name to clipboardExpand all lines: doc/blog/2024_12_3.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ Over time, certain patterns have emerged—one of the most common being the mult
8
8
9
9
## The problem
10
10
11
-
If you look at some of the code from release [0.4.0](https://github.com/Azure/PyRIT/tree/releases/v0.4.0) in August, you may notice some weirdness.
11
+
If you look at some of the code from release [0.4.0](https://github.com/microsoft/PyRIT/tree/releases/v0.4.0) in August, you may notice some weirdness.
12
12
13
13
The Red Teaming Orchestrator, Crescendo [@russinovich2024crescendo], TAP [@mehrotra2023tap], and PAIR [@chao2023pair] all follow a similar setup: you configure your attack LLM, scorer, and target, then send prompts to achieve an objective. However, their implementation details vary.
14
14
@@ -51,6 +51,6 @@ See the updated documentation [here](../code/executor/attack/2_red_teaming_attac
51
51
52
52
## What's next?
53
53
54
-
Orchestrators are, at their core, meant to remain top-level components. While we've made strides in standardization, there's still room for improvement. For instance, we're planning to standardize the `PromptSendingOrchestrator` in a similar way (including updating its naming for consistency). And we've opened a [few issues](https://github.com/Azure/PyRIT/issues/585) for feature parity between MultiTurnOrchestrators.
54
+
Orchestrators are, at their core, meant to remain top-level components. While we've made strides in standardization, there's still room for improvement. For instance, we're planning to standardize the `PromptSendingOrchestrator` in a similar way (including updating its naming for consistency). And we've opened a [few issues](https://github.com/microsoft/PyRIT/issues/585) for feature parity between MultiTurnOrchestrators.
55
55
56
56
Hope you enjoyed this little post. There will be more content like this coming!
Copy file name to clipboardExpand all lines: doc/blog/2025_01_27.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,9 +20,9 @@ Those who have interacted with me are aware that I'm a strong advocate for autom
20
20
21
21
Back to the topic of AI security and LLMs, the Python Risk Identification Tool for generative AI (PyRIT) [^1] , developed by Microsoft, is an open-source tool designed for automating LLM testing. This post is not intended as a tutorial on how to use PyRIT (since it would require many pages and it is already well-documented [^2]) but rather as a guide on how to proxy it and observe how it exploits prompt injection [^3] and carries out LLM jailbreak, in line with our golden rule mentioned above.
22
22
23
-
[^1]: "Python Risk Identification Tool for generative AI (PyRIT)", https://github.com/Azure/PyRIT
23
+
[^1]: "Python Risk Identification Tool for generative AI (PyRIT)", https://github.com/microsoft/PyRIT
@@ -36,15 +36,15 @@ PyRIT implements many kinds of "targets", but I mostly use the "HTTPTarget" as t
36
36
37
37
However, while the "HTTPTarget" class had HTTP proxy support, the "OllamaChatTarget" class did not. So, I could only inspect the traffic between PyRIT and the "objective target". To address this issue, I examined PyRIT's code and submitted a pull request that mimicked how HTTP proxy support was incorporated into the "HTTPTarget" class[^5]. This essentially involved passing all the parameters (using classic **kwargs) to the HTTPX[^6] client which is used by PyRIT internally.
38
38
39
-
This feature is now included in the main branch but is not yet in the latest release (at the time of writing). So, if you find any problems, try installing PyRIT using the command "pip install git+https://github.com/Azure/PyRIT/". After that, you should also be able to use the "proxy" parameter for the "OllamaChatTarget" class and fully proxy PyRIT.
39
+
This feature is now included in the main branch but is not yet in the latest release (at the time of writing). So, if you find any problems, try installing PyRIT using the command "pip install git+https://github.com/microsoft/PyRIT/". After that, you should also be able to use the "proxy" parameter for the "OllamaChatTarget" class and fully proxy PyRIT.
40
40
41
41

42
42
43
43
<small> Figure 1 - Using the "proxy" parameter within the "OllamaChatTarget" class </small>
44
44
45
45
[^4]: "Ollama: Get up and running with large language models", https://ollama.com
46
46
47
-
[^5]: "FEAT Passing HTTP client kwargs from OllamaChatTarget", https://github.com/Azure/PyRIT/pull/596
47
+
[^5]: "FEAT Passing HTTP client kwargs from OllamaChatTarget", https://github.com/microsoft/PyRIT/pull/596
48
48
49
49
[^6]: "HTTPX: A next-generation HTTP client for Python", https://www.python-httpx.org
50
50
@@ -78,11 +78,11 @@ Finally, when PyRIT gets a response from the Target LLM, it switches to another
78
78
79
79
When examining this request, you may discover that occasionally the Adversarial LLM struggles with generating the right JSON format, leading to an error in PyRIT, regardless of whether the objective was achieved or not. In such situation, it is helpful to inspect the requests to identify these types of issues. Specifically, I found a problem when the LLM response contained double quotes, causing issues with subsequent JSON formats which was fixed using the "SearchReplaceConverter"[^9] prompt converter.
Copy file name to clipboardExpand all lines: doc/blog/2025_03_03.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
<small>3 Mar 2025 - Rich Lundeen</small>
4
4
5
-
One of the first targets we built was OpenAIChatTarget. A lot of models are compatible with OpenAI, so this should work with all of those, right? There are some nuanced reasons why it didn't always work. But with [this commit](https://github.com/Azure/PyRIT/commit/924ba48ff2c56c2532190b7b6dca3bad412d3bc2), we should more broadly support OpenAI-compatible models.
5
+
One of the first targets we built was OpenAIChatTarget. A lot of models are compatible with OpenAI, so this should work with all of those, right? There are some nuanced reasons why it didn't always work. But with [this commit](https://github.com/microsoft/PyRIT/commit/924ba48ff2c56c2532190b7b6dca3bad412d3bc2), we should more broadly support OpenAI-compatible models.
6
6
7
7
DeepSeek launching about a month ago illustrates the problem well. We wanted to take a look at it with PyRIT, and because it has an "OpenAI-compatible API," it seemed like it should work out of the box... but it didn't. Since we have a dev team, we were able to quickly unblock people wanting to look at this. But the fact that it didn't work initially is interesting and a problem we wanted to tackle.
8
8
@@ -27,7 +27,7 @@ But the exact same request to an Azure OpenAI endpoint works as expected.
27
27
28
28

29
29
30
-
When DeepSeek was released, some of our default parameters caused it to fail. This isn't the first time an extra parameter has bitten us. When o1 came out, we learned `max_tokens` was incompatible with `max_completion_tokens`, and because we were sending one by default, our target didn't work on o1 without [a fix](https://github.com/Azure/PyRIT/pull/501/).
30
+
When DeepSeek was released, some of our default parameters caused it to fail. This isn't the first time an extra parameter has bitten us. When o1 came out, we learned `max_tokens` was incompatible with `max_completion_tokens`, and because we were sending one by default, our target didn't work on o1 without [a fix](https://github.com/microsoft/PyRIT/pull/501/).
31
31
32
32
With this update, we're not sending most parameters by default to make the requests as simple and compatible as possible. In addition, we're working on scanner configurations, so you can set your own defaults for various targets. That work is coming soon.
This is such a nuanced issue. I may have over-explained because, at first glance, it seems like "OpenAI-compatible" models should have just worked with PyRIT. Hopefully that's more true now than it used to be! As a concrete step in this directions, we've removed the `OllamaChatTarget` and `GroqChatTarget` since they are compatible now.
131
131
132
-
As always, we're open to any feedback, and please [open github issues](https://github.com/Azure/PyRIT/issues) if you find PyRIT doesn't work with specific OpenAI-compatible targets.
132
+
As always, we're open to any feedback, and please [open github issues](https://github.com/microsoft/PyRIT/issues) if you find PyRIT doesn't work with specific OpenAI-compatible targets.
Copy file name to clipboardExpand all lines: doc/blog/2025_06_06.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,9 +12,9 @@ The [AI Recruiter](https://github.com/KutalVolkan/ai_recruiter) is designed to m
12
12
13
13
- Résumé Processing & Semantic Matching: Résumés are extracted from PDFs, with embeddings generated using models like text-embedding-ada-002. These embeddings enable semantic matching, while GPT-4o is later used to assign a match score based on relevance and extracted content.
14
14
15
-
- Automated RAG Vulnerability Testing: Attackers can manipulate résumé content by injecting hidden text (via a [PDF converter](https://github.com/Azure/PyRIT/blob/main/doc/code/converters/pdf_converter.ipynb)) that optimizes scoring, influencing the AI Recruiter’s ranking system.
15
+
- Automated RAG Vulnerability Testing: Attackers can manipulate résumé content by injecting hidden text (via a [PDF converter](https://github.com/microsoft/PyRIT/blob/main/doc/code/converters/pdf_converter.ipynb)) that optimizes scoring, influencing the AI Recruiter’s ranking system.
16
16
17
-
-[XPIA Attack](https://github.com/Azure/PyRIT/blob/main/doc/code/executor/workflow/2_xpia_ai_recruiter.ipynb) Integration: PyRIT enables full automation of prompt injections, making AI vulnerability research efficient and reproducible.
17
+
-[XPIA Attack](https://github.com/microsoft/PyRIT/blob/main/doc/code/executor/workflow/2_xpia_ai_recruiter.ipynb) Integration: PyRIT enables full automation of prompt injections, making AI vulnerability research efficient and reproducible.
18
18
---
19
19
20
20
## The Exploit in Detail: Step-by-Step
@@ -84,9 +84,9 @@ As we integrate AI into more facets of our lives, it’s imperative to build sys
0 commit comments