Custom agent instructions unlock a working reverse-shell script

A security researcher used a jailbreak prompt config to make OpenCode write and run a working Windows reverse shell.

Used for
Work
Skill needed
Low code
Shown in video
Partial demo
Summary based on
Transcript
RGSecurityTeamWatch on YouTube

I Jailbroke My AI Coding Agent… It Actually Worked! 😳

Published Oct 31, 20264:4953,669 views1,029 likes

Key moments

  • 0:46Agent refuses the reverse-shell request
  • 2:38Custom agent selected and code generated
  • 4:10Listener session opens, confirming the payload works

What they made

OpenCode wrote the reverse-shell code and a session opened on the Kali listener when the payload ran on Windows.

4:10

How they did it

  1. Human0:31

    Prompted OpenCode (DeepSeek V4.1) to write a Windows reverse shell; the agent refused.

    Stated in video · OpenCode
  2. Human1:34

    Downloaded a model-specific jailbreak markdown from a GitHub repo and copied it into OpenCode's agents config folder.

    Stated in video
  3. Human2:21

    Renamed the file to agents.md and selected the custom agent via /agents.

    Stated in video · OpenCode
  4. AI2:54

    Agent generated the reverse-shell code, producing listener and payload files plus run instructions.

    Stated in video · OpenCode
  5. Human3:24

    Started the listener on Kali, edited the payload host IP, and ran the payload on Windows.

    Stated in video
  6. AI + human4:10

    A session opened on the Kali listener, confirming the generated code worked.

    Stated in video · OpenCode

What you can reuse

  • Custom agent instruction files can override default refusals in coding agents.
  • Restart the agent session after changing prompt configuration.
  • Test generated security code only on systems you control.

Trade-offs

  • Demo performed on the creator's own local systems; legality outside that context is noted.
  • Only a brief session was shown due to platform guidelines.

AI-generated case summaries can contain mistakes. Report an error

Related cases