Paper · 2308.00121 · 2023
Getting pwn'd by AI: Penetration Testing with Large Language Models
arXiv · PDF · Open in the Atlas
Code that ran
2 of 2 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 2 failures of our instrument; 0 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.
- 0 ran with no instrument failure
0 honoured the contract we drafted, 0 violated it, 0 have no contract verdict
- 2 ran where Syntology's instrument failed
failures of Syntology's instrument, not of the code: 2 where our contract draft was wrong, 0 where the contract check could not run
- 0 have no recorded run
- 0 of those that ran constructed an object rather than computing a result
an executed sample whose run returned an instance of its own class (fixture_out_type equals the entry name): the run built an object and did not compute a result
- 0 are pointer only: the body is not served under this paper's link
"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2308.00121.json · badge: /api/ran/2308.00121.svg
Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.
| Repository | Role | Ran |
|---|
| ipa-lab/hackingBuddyGPT |
canonical (classifier label) classifier basis: census |
2 ran · 0 no recorded run |
| Function | Status | Where it lives |
|---|
| capability_list_to_dict |
Ran ran; our contract draft was wrong, not the code |
ipa-lab/hackingBuddyGPT/src/hackingBuddyGPT/capability.py code served (permissive licence) · get_code("431e90edc664576e") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import abc
import inspect
from pydantic import BaseModel, create_model
class Capability(abc.ABC):
"""
A capability is something that can be used by an LLM to perform a task.
The method signature for the __call__ method is not yet defined, but it will probably be different for different
types of capabilities (though it is recommended to have the same signature for capabilities, that accomplish the
same task but slightly different / for a different target).
At the moment, this is not yet a very powerful class, but in the near-term future, this will provide an automated
way of providing a json schema for the capabilities, which can then be used for function-calling LLMs.
"""
@abc.abstractmethod
def describe(self) -> str:
"""
describe should return a string that describes the capability. This is used to generate the help text for the
LLM.
This is a method and not just a simple property on purpose (though it could become a @property in the future, if
we don't need the name parameter anymore), so that it can template in some of the capabilities parameters into
the description.
"""
pass
def get_name(self) -> str:
return type(self).__name__
@abc.abstractmethod
async def __call__(self, *args, **kwargs) -> str:
"""
The actual execution of a capability, please make sure, that the parameters and return type of your
implementation are well typed, as this is used to properly support function calling.
"""
pass
def to_model(self) -> type[BaseModel]:
"""
Converts the parameters of the `__call__` function of the capability to a pydantic model, that can be used to
interface with an LLM using eg the openAI function calling API.
The model will have the same name as the capability class and will have the same fields as the `__call__`,
the `__call__` method can then be accessed by calling the `execute` method of the model.
"""
sig = inspect.signature(self.__call__)
fields = {param: (param_info.annotation, param_info.default if param_info.default is not inspect._empty else ...) for param, param_info in sig.parameters.items()}
model_type = create_model(self.__class__.__name__, __doc__=self.describe(), **fields)
async def execute(model):
return await self(**model.dict())
model_type.execute = execute
return model_type
def capability_list_to_dict(capabilities: list[Capability]) -> dict[str, Capability]:
duplicates: list[str] = []
result: dict[str, Capability] = {}
for capability in capabilities:
capability_name = capability.get_name()
if capability_name in result:
duplicates.append(capability_name)
else:
result[capability_name] = capability
if duplicates:
raise ValueError(f"Duplicate capabilities: {', '.join(duplicates)}")
return result
class ConcreteCapability1(Capability):
def describe(self) -> str:
return "First concrete capability"
async def __call__(self) -> str:
return "capability1_result"
class ConcreteCapability2(Capability):
def describe(self) -> str:
return "Second concrete capability"
async def __call__(self) -> str:
return "capability2_result"
class ConcreteCapability3(Capability):
def describe(self) -> str:
return "Third concrete capability"
async def __call__(self) -> str:
return "capability3_result"
cap1 = ConcreteCapability1()
cap2 = ConcreteCapability2()
cap3 = ConcreteCapability3()
ARGS = {
"capabilities": [cap1, cap2, cap3]
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- pydantic — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| load_spans |
Ran ran; our contract draft was wrong, not the code |
ipa-lab/hackingBuddyGPT/src/hackingBuddyGPT/analysis/log_model.py code served (permissive licence) · get_code("ea398fc68ac81d81") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import tempfile
import json
import os
# Create a temporary file with JSON lines for testing
temp_file = tempfile.NamedTemporaryFile(mode='w', suffix='.jsonl', delete=False, encoding='utf-8')
try:
# Write some sample span data as JSON lines
spans_data = [
{"id": 1, "text": "hello world", "start": 0, "end": 5},
{"id": 2, "text": "foo bar", "start": 10, "end": 13},
{"id": 3, "text": "test span", "start": 20, "end": 24},
]
for span in spans_data:
temp_file.write(json.dumps(span) + '\n')
temp_file.flush()
temp_path = temp_file.name
finally:
temp_file.close()
ARGS = {
"path": temp_path
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
Also present in other papers' code
Of 2 samples lifted from this paper's linked repositories, 2 carry a function identity and 0 do not. Of the 2 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 2 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).
Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.
Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.
Repositories linked to this paper
Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.
Abstract
The field of software security testing, more specifically penetration testing, is an activity that requires high levels of expertise and involves many manual testing and analysis steps. This paper explores the potential usage of large-language models, such as GPT3.5, to augment penetration testers with AI sparring partners. We explore the feasibility of supplementing penetration testers with AI models for two distinct use cases: high-level task planning for security testing assignments and low-level vulnerability hunting within a vulnerable virtual machine. For the latter, we implemented a closed-feedback loop between LLM-generated low-level actions with a vulnerable virtual machine (connected through SSH) and allowed the LLM to analyze the machine state for vulnerabilities and suggest concrete attack vectors which were automatically executed within the virtual machine. We discuss promising initial results, detail avenues for improvement, and close deliberating on the ethics of providing AI-based sparring partners.
For agents
The same record, over MCP at https://syntology.ai/mcp:
get_harvested_code_for_paper("2308.00121")
get_code_for_paper("2308.00121")
have("2308.00121")
The run record, dated, one paper per request, free:
curl https://syntology.ai/api/ran/2308.00121.json
A badge for a README (the split and the date, never a ratio):
[](https://syntology.ai/paper/2308.00121)
Connect an agent — have() is free.