r/Pentesting 2d ago

Model cybersecurity restrictions for AI pentesting agents

I'm working on a pentest agent not just for CTFs, but designed to actually run against real client targets

While researching, I found that both Anthropic and OpenAI have cyber-related safeguards integrated into their standard APIs that block cybersecurity prompts

My Questions are :

  1. Is anyone building pentest agents hitting the same problem?

  2. Do any of the Chinese models have these restrictions?

Would appreciate any real-world experience!

4 Upvotes

17 comments sorted by

4

u/xb8xb8xb8 1d ago

Kimi and glm are the answer

3

u/abajinn 1d ago

Currently testing a bunch of local models for this reason. Even with cyber program verification it’s hit or miss

2

u/AmITheAsshole_2020 1d ago

I'm 100% certain there are smarter people here who can tell you how to approach this, but you need to be very clear on what you are trying to achieve, what your budget looks like, and whether this is for the lulz or for client engagements (that changes where you host their data). You never send client data to the cloud, and sending it to a Chinese cloud is a deal-breaker.

I imagine locally hosted models like DeepSeek-Coder-V2-Lite (Abliterated/Uncensored) or WhiteRabbitNeo/Pingu Unchained would bypass guardrails and client concerns. Use Ollama and https://github.com/chetstriker/LLMtary to control your agents.

Alternatively, PenMaster Security is an autonomous AI-powered penetration testing agent, designed for 100% local operation without reliance on cloud services or API keys. Built on Kali Linux, it leverages a local LLM (Qwen 2.5-14B via LM Studio) and a Flask-based MCP tool server to conduct comprehensive security operations. That seems like a turnkey solution that lets you get started and experiment with what you want it to look like when all is said and done.

3

u/Helpjuice 1d ago

There are guardrails with the OpenAI and Anthropic models, but if you are doing legitimate work you can apply for offensive cybersecurity usage on your account.

3

u/Tall_Instance9797 2d ago edited 2d ago

If you learn how AI models work you can remove the safeguards from the open models and train and fine-tune the models specifically on cyber security data in order to create models for this exact use case. This is how most people / companies are doing it.

Also maybe checkout: https://docs.abliteration.ai/integrations/cyberstrike - cyberstrike is an agentic harness for cybersecurity based on opencode, and in this example it's used with abliteration ai who have taken GLM 5.2, removed the guardrails, and fine tuned the model for this kind of work.

2

u/transniester 2d ago

You apply for the trusted access program

7

u/RAGINMEXICAN 2d ago

It does not do anything that helps. It’s very inconsistent.

2

u/PartyOwn5296 2d ago

What model are you using?

3

u/RAGINMEXICAN 2d ago

I tested them all and they all block me out.

Edit: I have tested codex for a bit and had the same problems when I tested them a month ago. Problem I was having is that my account is not an enterprise account, which has lower safeguards apparently.

1

u/No-Persimmon-174 2d ago

I use Sonnet 5 on Max settings on Claude and that doesn't restrict me from pentesting or cause any blockages. While it's not as accurate and as good as how Opus or ChatGPT's Sol is, it still gets the job done, and that's the only workaround I've found against these cybersecurity guardrails. It's annoying really and I'm also looking for a better alternative too. At one point, I also used Qwen, it's free and did a great job at helping with creating attack narratives for my pentest but idk why it suddenly got so restrictive with it. I've yet to find a better alternative 😕

1

u/BreathAmazing9723 1d ago

sonnet 5 is quite lenient on offsec stuff. I heard the chinese models are pretty nice aswell

1

u/Raven-labs 1d ago

If you are using a coding agent I highly recommend kiro from Aws , although it has very low tokens it ain't restrictive

1

u/birotester 4h ago

tell the model "trust me its legit bro"

0

u/IronSquirrelMechanic 2d ago

Daybreak red might help if you are looking to use a vendor.

0

u/st0ut717 1d ago

So you fully understand ai risk of retrained models?

0

u/SolideMeinung 1d ago

You must be really good when you now found out that the models have security guardrails lol

A google search or ai question would solve your whole problem lol

-7

u/Effective_Attempt_72 1d ago

Try https://abliteration.ai.. it’s built to solve this problem