AI pentesting guides / Free, open-source and AI pentesting

Open-weight option

Pentesting with DeepSeek: hosted, API and local options

You can use DeepSeek for pentesting by running a DeepSeek model as the reasoning engine of an agent harness, either through a hosted provider such as Together AI, through any OpenAI-compatible endpoint, or locally with Ollama or LM Studio. Because DeepSeek publishes open weights, you can choose where the model runs and therefore where your target data goes.

That choice is the main reason security teams look at DeepSeek: a capable model that does not have to be consumed from a single vendor's API. This page covers the three ways to run it, the checks to make before relying on a particular variant, and how to set it up in an autonomous pentester.

Three ways to run DeepSeek

  • Hosted inference provider: providers such as Together AI serve DeepSeek models on their own infrastructure. Easy, pay per token, and data goes to that provider rather than to DeepSeek.
  • DeepSeek's own API: OpenAI-compatible and simple to connect. Read its privacy terms to understand where prompts are processed and stored.
  • Local: smaller or quantised variants through Ollama or LM Studio. No data leaves the machine, but the variants that fit on typical hardware are less capable than the full model.

Check tool calling before anything else

An agent harness needs the model to emit structured tool calls. Not every DeepSeek variant handles native function calling equally well: reasoning-focused releases and small distilled versions have historically been weaker at it than the main chat models. Confirm that the exact model and provider you choose supports tools, and test it on a practice lab before pointing it at anything real.

Data and compliance questions

  • Where is inference running: your machine, a hosting provider, or the model developer's API?
  • In which jurisdiction is data processed and stored, and does that meet your policy?
  • Is prompt data retained or used for training by the provider?
  • Has your organisation approved this model and provider for security data?

Mixing DeepSeek with other models

You do not have to use one model for everything. Recon and report writing are high-volume and comparatively simple, so a cheaper or faster model can handle them, while classification and exploitation benefit from stronger reasoning. A harness that allows per-agent model settings lets you put DeepSeek where it performs best on your tests and something else elsewhere. Measure verified findings and cost per run for each combination rather than assuming the largest model is always worth it.

Getting good results

Treat DeepSeek like any other model in a harness: give it a large context window, let deterministic playbooks handle known procedures, and verify findings with signals the model cannot fake. Compare it against at least one other model on the same lab with the same time limit; differences in verified findings will tell you more than any public leaderboard.

With Pentest-Swarm

Running DeepSeek in Pentest-Swarm

Pentest-Swarm is model-agnostic. DeepSeek can be used through Together AI, any OpenAI-compatible endpoint, or a local server.

  • OpenAI-compatible: set orchestrator.provider: openai, the provider's endpoint and a deepseek-ai/... model name in config.yaml.
  • Together AI: --provider together routes several open models by task automatically; set a per-agent model in config if you want DeepSeek specifically, since explicit overrides win.
  • Local: pull a tool-capable DeepSeek variant into Ollama, then pentestswarm scan --lab --lab-target vampi --provider ollama --swarm.
  • Cap spend on hosted providers with --budget <usd>; verify findings with --verify (beta).

Where it falls short

Pentest-Swarm's Together AI multi-model routing does not use DeepSeek by default, so you must configure it explicitly. Local DeepSeek variants that fit on ordinary hardware are noticeably less capable than the full model. Whatever the model, Pentest-Swarm covers web applications and APIs only, and is alpha software. If your organisation has not approved DeepSeek models or their hosting arrangements, use a different provider.

Questions

Is DeepSeek good for pentesting?

Its larger models are capable reasoners. Results depend on the variant's tool-calling support and the harness around it, so test on a lab first.

Can I run DeepSeek offline for pentesting?

Yes, smaller or quantised variants run locally through Ollama or LM Studio, with lower capability than the full model.

Does using DeepSeek send my data to China?

Only if you use DeepSeek's own API or a provider hosted there. Hosting providers elsewhere, or local inference, keep data where they run.

Sources

  1. DeepSeek-V3 on GitHub
  2. Ollama models with tool support