Open a1ext opened 6 years ago
there a subcommand of CC that uses base64 as argument, so you wont have such command injection problems if you do it that way
On 23 Oct 2018, at 22:49, a1ext notifications@github.com wrote:
view it on GitHub https://github.com/radare/radare2-r2pipe/issues/77
Hi @radare,
Is it safe to users to keep this behavior? Is it docummented what cmd
/cmdj
can run many commands at once?
yeah may be good to document the behaviour of newlines and semicolons
On 23 Oct 2018, at 22:58, a1ext notifications@github.com wrote:
Hi @radare https://github.com/radare, Is it safe to users to keep this behavior? Is it docummented what cmd/cmdj can run many commands at once?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/radare/radare2-r2pipe/issues/77#issuecomment-432417043, or mute the thread https://github.com/notifications/unsubscribe-auth/AA3-lsqS9ZicWXiwh2cLWmd_jX4RR0ciks5un4LxgaJpZM4X2ooQ.
Environment
Story
While working on some new sample, I was writing a script for decoding embed strings. It has some getting pointers, reading encrypted string, string deciphering and adding a comment to the place, where the string is. Script is looked as the following:
While running this script I got the assertion failure:
That was strange, because a stack trace showed that this code is inside rading from console:
Digging deeper into this, I realized that some of the comments which was passed to
CCa
command had have\n
inside. So, that means a comment string was splitted by radare by\n
and interpreted as a separate command. The following code finfirmed my thoughts:the string after
\n
islol
and was interpreted by radare2 aslist files and directories
command.This means if user automatically decrypts some string and wanted to store it as a comment, he can occasionnaly run some valid radare2 command and pwn itself. For example he can write some shellcode and execute it or spawn some shell command.