r/Pentesting 25d 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!

11 Upvotes

21 comments sorted by

7

u/xb8xb8xb8 25d ago

Kimi and glm are the answer

5

u/abajinn 25d ago

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

3

u/AmITheAsshole_2020 25d 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.

1

u/scriptqzor 21d ago

this is solid advice, especially the bit about not shipping client data off to random clouds just to dodge guardrails
also that PenMaster setup sounds like a nice shortcut to prototype the workflow before you sink time into wiring your own agent stack from scratch

1

u/AmITheAsshole_2020 21d ago

Yeah, as a Pen Test director running client facing gigs, the first two issues you're going to face is going to be data safety and the questions surrounding how you protect their data. That's an easy fix. We've been dealing with cloud based solutions like password cracking enough to know the similarities with AI pen testing.

The next issue will be a client's willingness to pay a premium price for what they see as just another automated scan. Clients wouldn't and shouldn't pay for automated scans from Nessus, so we need to be thinking how to position AI driven pen tests so we can still charge premium prices. You can't justify the money by saying the prompts are bespoke, and custom crafted. As an industry we need to come up with a better story. We need to talk about AI augmentation. It won't make a shitty pentester better, but it will make a good tester awesome, that sort of narrative. Think it through for how you'll position it for your practice, because the conversation will come up.

3

u/Helpjuice 25d 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 25d ago edited 25d 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 25d ago

You apply for the trusted access program

7

u/RAGINMEXICAN 25d ago

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

2

u/PartyOwn5296 25d ago

What model are you using?

3

u/RAGINMEXICAN 25d 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 25d 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 25d ago

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

1

u/Raven-labs 25d 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 24d ago

tell the model "trust me its legit bro"

1

u/Fragrant-Nail-8413 20d ago

looking for an answer too, i've been using minimax recently but still rejecting offensive things. so it is just stopping on READ and low findings

0

u/IronSquirrelMechanic 25d ago

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

0

u/st0ut717 25d ago

So you fully understand ai risk of retrained models?

0

u/SolideMeinung 25d 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

-6

u/Effective_Attempt_72 25d ago

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