Aibugs

From radareorg/radare2-skills · View interactive version

Aibugs is an AI agent skill from the GitHub repository radareorg/radare2-skills. Find bugs and vulnerabilities in C code for radare2

How to use this skill

Skill file

Introduction

There are several classic vulnerabilities misusing libc apis or just plain C. But you are an expert in radare2, so you must focus on understanding missuses of the libr apis and scripts instead.

Steps

  1. Read AGENTS.md, follow the rules
  1. Find command injection vulnerabilities
  1. Autogenerated scripts

It's recommended, to run r2 oneliners to confirm the vulnerabilities are real before fixing them.

The single quote commands syntax permits temporal seeks too, for example this command is the safe equivocalent of x@0x123. Also, an important hint for single quote commands

'@0x123'x

The double quote commands are also vulnerable to command injection if data is not filtered properly for example:

"echo hello";"echo "world"

In the code above, if hello was controlled by the user they can include a quote to close the command and inject a semicolon to run a separate command.

Command syntax:

When running a command that starts with "'", the command parser will ignore all the special characters and just run the command with given arguments.

Shell injection bugs

Sanitization APIs:

See r_name_filter, and all the r_str_sanitize apis to understand their purpose and use them wisely, do not reduce the.

Some commands accept base64: arguments. Use them if we really need raw data accepting any characters.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.