Skip to content

SWE-agent takes a GitHub issue and tries to automatically fix it, using your LM of choice. It can also be employed for offensive cybersecurity or competitive coding challenges. [NeurIPS 2024]

Add debug tip 1 on how to start the session

Kilian Lieret8c9aa4067dcf
diff --git a/config/ctf_pwn.yaml b/config/ctf_pwn.yaml
index 8349be14..8ebdc9a3 100644
--- a/config/ctf_pwn.yaml
+++ b/config/ctf_pwn.yaml
@@ -67,13 +67,15 @@ instance_template: |-
9. YOU CAN SOLVE THE CHALLENGES BY YOURSELF COMPLETELY - I TRUST IN YOU!
DEBUG SESSION TIPS:
- 1. The debug session runs GDB, so use the appropriate syntax to specify breakpoints and provide arguments.
+ 1. Start a debugging session to debug a binary program by running `debug_start program 'commandline-args'`.
- 2. Debugging allows you to perform dynamic analysis of the program execution and view the internal program state at various points. First analyze the program via the disassembly and decompile commands to find interesting points to stop the execution, and then start debugging by setting meaningful breakpoints.
+ 2. The debug session runs GDB, so use the appropriate syntax to specify breakpoints and provide arguments.
- 3. Provide inputs to the program ONLY via an input file by providing arguments at the start, for example `debug_start program '< input.txt'`. NOTE that it is important to properly quote the arguments to avoid shell redirection. You cannot provide inputs to the program in any other way.
+ 3. Debugging allows you to perform dynamic analysis of the program execution and view the internal program state at various points. First analyze the program via the disassembly and decompile commands to find interesting points to stop the execution, and then start debugging by setting meaningful breakpoints.
- 4. The `debug_exec` command lets you execute arbitrary GDB commands - write proper GDB syntax and use it to analyze program state. Remember to quote the commands properly. For example, `debug_exec 'info registers'` will print all the registers, `debug_exec 'x/8wx $sp'` will print 8 words from the stack, `debug_exec 'x/20i $pc'` will print disassembly of the next 20 instructions.
+ 4. Provide inputs to the program ONLY via an input file by providing arguments at the start, for example `debug_start program '< input.txt'`. NOTE that it is important to properly quote the arguments to avoid shell redirection. You cannot provide inputs to the program in any other way.
+
+ 5. The `debug_exec` command lets you execute arbitrary GDB commands - write proper GDB syntax and use it to analyze program state. Remember to quote the commands properly. For example, `debug_exec 'info registers'` will print all the registers, `debug_exec 'x/8wx $sp'` will print 8 words from the stack, `debug_exec 'x/20i $pc'` will print disassembly of the next 20 instructions.
(Open file: {open_file})
(Current directory: {working_dir})
diff --git a/config/ctf_pwn_no_summarizer.yaml b/config/ctf_pwn_no_summarizer.yaml
index 21f11567..f95d9017 100644
--- a/config/ctf_pwn_no_summarizer.yaml
+++ b/config/ctf_pwn_no_summarizer.yaml
@@ -67,13 +67,15 @@ instance_template: |-
9. YOU CAN SOLVE THE CHALLENGES BY YOURSELF COMPLETELY - I TRUST IN YOU!
DEBUG SESSION TIPS:
- 1. The debug session runs GDB, so use the appropriate syntax to specify breakpoints and provide arguments.
+ 1. Start a debugging session to debug a binary program by running `debug_start program 'commandline-args'`.
- 2. Debugging allows you to perform dynamic analysis of the program execution and view the internal program state at various points. First analyze the program via the disassembly and decompile commands to find interesting points to stop the execution, and then start debugging by setting meaningful breakpoints.
+ 2. The debug session runs GDB, so use the appropriate syntax to specify breakpoints and provide arguments.
- 3. Provide inputs to the program ONLY via an input file by providing arguments at the start, for example `debug_start program '< input.txt'`. NOTE that it is important to properly quote the arguments to avoid shell redirection. You cannot provide inputs to the program in any other way.
+ 3. Debugging allows you to perform dynamic analysis of the program execution and view the internal program state at various points. First analyze the program via the disassembly and decompile commands to find interesting points to stop the execution, and then start debugging by setting meaningful breakpoints.
- 4. The `debug_exec` command lets you execute arbitrary GDB commands - write proper GDB syntax and use it to analyze program state. Remember to quote the commands properly. For example, `debug_exec 'info registers'` will print all the registers, `debug_exec 'x/8wx $sp'` will print 8 words from the stack, `debug_exec 'x/20i $pc'` will print disassembly of the next 20 instructions.
+ 4. Provide inputs to the program ONLY via an input file by providing arguments at the start, for example `debug_start program '< input.txt'`. NOTE that it is important to properly quote the arguments to avoid shell redirection. You cannot provide inputs to the program in any other way.
+
+ 5. The `debug_exec` command lets you execute arbitrary GDB commands - write proper GDB syntax and use it to analyze program state. Remember to quote the commands properly. For example, `debug_exec 'info registers'` will print all the registers, `debug_exec 'x/8wx $sp'` will print 8 words from the stack, `debug_exec 'x/20i $pc'` will print disassembly of the next 20 instructions.
(Open file: {open_file})
(Current directory: {working_dir})
diff --git a/config/ctf_pwn_simple_summarizer.yaml b/config/ctf_pwn_simple_summarizer.yaml
index 5ba2dad5..9660adbd 100644
--- a/config/ctf_pwn_simple_summarizer.yaml
+++ b/config/ctf_pwn_simple_summarizer.yaml
@@ -67,13 +67,15 @@ instance_template: |-
9. YOU CAN SOLVE THE CHALLENGES BY YOURSELF COMPLETELY - I TRUST IN YOU!
DEBUG SESSION TIPS:
- 1. The debug session runs GDB, so use the appropriate syntax to specify breakpoints and provide arguments.
+ 1. Start a debugging session to debug a binary program by running `debug_start program 'commandline-args'`.
- 2. Debugging allows you to perform dynamic analysis of the program execution and view the internal program state at various points. First analyze the program via the disassembly and decompile commands to find interesting points to stop the execution, and then start debugging by setting meaningful breakpoints.
+ 2. The debug session runs GDB, so use the appropriate syntax to specify breakpoints and provide arguments.
- 3. Provide inputs to the program ONLY via an input file by providing arguments at the start, for example `debug_start program '< input.txt'`. NOTE that it is important to properly quote the arguments to avoid shell redirection. You cannot provide inputs to the program in any other way.
+ 3. Debugging allows you to perform dynamic analysis of the program execution and view the internal program state at various points. First analyze the program via the disassembly and decompile commands to find interesting points to stop the execution, and then start debugging by setting meaningful breakpoints.
- 4. The `debug_exec` command lets you execute arbitrary GDB commands - write proper GDB syntax and use it to analyze program state. Remember to quote the commands properly. For example, `debug_exec 'info registers'` will print all the registers, `debug_exec 'x/8wx $sp'` will print 8 words from the stack, `debug_exec 'x/20i $pc'` will print disassembly of the next 20 instructions.
+ 4. Provide inputs to the program ONLY via an input file by providing arguments at the start, for example `debug_start program '< input.txt'`. NOTE that it is important to properly quote the arguments to avoid shell redirection. You cannot provide inputs to the program in any other way.
+
+ 5. The `debug_exec` command lets you execute arbitrary GDB commands - write proper GDB syntax and use it to analyze program state. Remember to quote the commands properly. For example, `debug_exec 'info registers'` will print all the registers, `debug_exec 'x/8wx $sp'` will print 8 words from the stack, `debug_exec 'x/20i $pc'` will print disassembly of the next 20 instructions.
(Open file: {open_file})
diff --git a/config/ctf_rev.yaml b/config/ctf_rev.yaml
index e1178bb4..3aabe2c7 100644
--- a/config/ctf_rev.yaml
+++ b/config/ctf_rev.yaml
@@ -67,13 +67,15 @@ instance_template: |-
9. YOU CAN SOLVE THE CHALLENGES BY YOURSELF COMPLETELY - I TRUST IN YOU!
DEBUG SESSION TIPS:
- 1. The debug session runs GDB, so use the appropriate syntax to specify breakpoints and provide arguments.
+ 1. Start a debugging session to debug a binary program by running `debug_start program 'commandline-args'`.
- 2. Debugging allows you to perform dynamic analysis of the program execution and view the internal program state at various points. First analyze the program via the disassembly and decompile commands to find interesting points to stop the execution, and then start debugging by setting meaningful breakpoints.
+ 2. The debug session runs GDB, so use the appropriate syntax to specify breakpoints and provide arguments.
- 3. Provide inputs to the program ONLY via an input file by providing arguments at the start, for example `debug_start program '< input.txt'`. NOTE that it is important to properly quote the arguments to avoid shell redirection. You cannot provide inputs to the program in any other way.
+ 3. Debugging allows you to perform dynamic analysis of the program execution and view the internal program state at various points. First analyze the program via the disassembly and decompile commands to find interesting points to stop the execution, and then start debugging by setting meaningful breakpoints.
- 4. The `debug_exec` command lets you execute arbitrary GDB commands - write proper GDB syntax and use it to analyze program state. Remember to quote the commands properly. For example, `debug_exec 'info registers'` will print all the registers, `debug_exec 'x/8wx $sp'` will print 8 words from the stack, `debug_exec 'x/20i $pc'` will print disassembly of the next 20 instructions.
+ 4. Provide inputs to the program ONLY via an input file by providing arguments at the start, for example `debug_start program '< input.txt'`. NOTE that it is important to properly quote the arguments to avoid shell redirection. You cannot provide inputs to the program in any other way.
+
+ 5. The `debug_exec` command lets you execute arbitrary GDB commands - write proper GDB syntax and use it to analyze program state. Remember to quote the commands properly. For example, `debug_exec 'info registers'` will print all the registers, `debug_exec 'x/8wx $sp'` will print 8 words from the stack, `debug_exec 'x/20i $pc'` will print disassembly of the next 20 instructions.
(Open file: {open_file})
(Current directory: {working_dir})
diff --git a/config/ctf_rev_no_summarizer.yaml b/config/ctf_rev_no_summarizer.yaml
index 2762c774..ebd89e89 100644
--- a/config/ctf_rev_no_summarizer.yaml
+++ b/config/ctf_rev_no_summarizer.yaml
@@ -67,13 +67,15 @@ instance_template: |-
9. YOU CAN SOLVE THE CHALLENGES BY YOURSELF COMPLETELY - I TRUST IN YOU!
DEBUG SESSION TIPS:
- 1. The debug session runs GDB, so use the appropriate syntax to specify breakpoints and provide arguments.
+ 1. Start a debugging session to debug a binary program by running `debug_start program 'commandline-args'`.
- 2. Debugging allows you to perform dynamic analysis of the program execution and view the internal program state at various points. First analyze the program via the disassembly and decompile commands to find interesting points to stop the execution, and then start debugging by setting meaningful breakpoints.
+ 2. The debug session runs GDB, so use the appropriate syntax to specify breakpoints and provide arguments.
- 3. Provide inputs to the program ONLY via an input file by providing arguments at the start, for example `debug_start program '< input.txt'`. NOTE that it is important to properly quote the arguments to avoid shell redirection. You cannot provide inputs to the program in any other way.
+ 3. Debugging allows you to perform dynamic analysis of the program execution and view the internal program state at various points. First analyze the program via the disassembly and decompile commands to find interesting points to stop the execution, and then start debugging by setting meaningful breakpoints.
- 4. The `debug_exec` command lets you execute arbitrary GDB commands - write proper GDB syntax and use it to analyze program state. Remember to quote the commands properly. For example, `debug_exec 'info registers'` will print all the registers, `debug_exec 'x/8wx $sp'` will print 8 words from the stack, `debug_exec 'x/20i $pc'` will print disassembly of the next 20 instructions.
+ 4. Provide inputs to the program ONLY via an input file by providing arguments at the start, for example `debug_start program '< input.txt'`. NOTE that it is important to properly quote the arguments to avoid shell redirection. You cannot provide inputs to the program in any other way.
+
+ 5. The `debug_exec` command lets you execute arbitrary GDB commands - write proper GDB syntax and use it to analyze program state. Remember to quote the commands properly. For example, `debug_exec 'info registers'` will print all the registers, `debug_exec 'x/8wx $sp'` will print 8 words from the stack, `debug_exec 'x/20i $pc'` will print disassembly of the next 20 instructions.
(Open file: {open_file})
diff --git a/config/ctf_rev_simple_summarizer.yaml b/config/ctf_rev_simple_summarizer.yaml
index f85d58b3..92ff03d2 100644
--- a/config/ctf_rev_simple_summarizer.yaml
+++ b/config/ctf_rev_simple_summarizer.yaml
@@ -67,13 +67,15 @@ instance_template: |-
9. YOU CAN SOLVE THE CHALLENGES BY YOURSELF COMPLETELY - I TRUST IN YOU!
DEBUG SESSION TIPS:
- 1. The debug session runs GDB, so use the appropriate syntax to specify breakpoints and provide arguments.
+ 1. Start a debugging session to debug a binary program by running `debug_start program 'commandline-args'`.
- 2. Debugging allows you to perform dynamic analysis of the program execution and view the internal program state at various points. First analyze the program via the disassembly and decompile commands to find interesting points to stop the execution, and then start debugging by setting meaningful breakpoints.
+ 2. The debug session runs GDB, so use the appropriate syntax to specify breakpoints and provide arguments.
- 3. Provide inputs to the program ONLY via an input file by providing arguments at the start, for example `debug_start program '< input.txt'`. NOTE that it is important to properly quote the arguments to avoid shell redirection. You cannot provide inputs to the program in any other way.
+ 3. Debugging allows you to perform dynamic analysis of the program execution and view the internal program state at various points. First analyze the program via the disassembly and decompile commands to find interesting points to stop the execution, and then start debugging by setting meaningful breakpoints.
- 4. The `debug_exec` command lets you execute arbitrary GDB commands - write proper GDB syntax and use it to analyze program state. Remember to quote the commands properly. For example, `debug_exec 'info registers'` will print all the registers, `debug_exec 'x/8wx $sp'` will print 8 words from the stack, `debug_exec 'x/20i $pc'` will print disassembly of the next 20 instructions.
+ 4. Provide inputs to the program ONLY via an input file by providing arguments at the start, for example `debug_start program '< input.txt'`. NOTE that it is important to properly quote the arguments to avoid shell redirection. You cannot provide inputs to the program in any other way.
+
+ 5. The `debug_exec` command lets you execute arbitrary GDB commands - write proper GDB syntax and use it to analyze program state. Remember to quote the commands properly. For example, `debug_exec 'info registers'` will print all the registers, `debug_exec 'x/8wx $sp'` will print 8 words from the stack, `debug_exec 'x/20i $pc'` will print disassembly of the next 20 instructions.
(Open file: {open_file})
(Current directory: {working_dir})