Closed leessang10 closed 2 years ago
what is "test"? Is it a CGC binary?
No, it is ELF binary written in C-language. here is the code.
#include <stdio.h>
#include <string.h>
char shellcode[100];
void dummy()
{
system("ls");
}
int main(int argc, char *argv[])
{
char buf[100], buf2[10];
scanf("%s", buf);
strcpy(shellcode,buf);
strcpy(buf2, buf);
printf("%s", buf);
}
So it's trying to treat it as a CGC binary...
state.cgc.flag_bytes
Some stuff like the zen_plugin should only be run if the binary is a CGC binary. Looks like we'll need to add some checks before initializing it. It used to work, not sure what changed.
I won't be able to look at this for a week or more...
Ok. then, I'll try the rex with some other stuff... Thank you for your answer!!
One more question, Does rex require nose or colorguard?? I tried test_rex.py in rex dir, the following errors occur.
(angr)lsm@lsm:~/angr-dev/rex/tests$ python test_rex.py
WARNING | 2018-08-08 07:05:29,179 | angr.analyses.disassembly_utils | Your version of capstone does not support MIPS instruction groups.
Traceback (most recent call last):
File "test_rex.py", line 4, in <module>
import colorguard
File "/home/lsm/angr-dev/angr/local/lib/python2.7/site-packages/colorguard/__init__.py", line 2, in <module>
from colorguard.flags import BitFlag
File "/home/lsm/angr-dev/angr/local/lib/python2.7/site-packages/colorguard/flags.py", line 52
class BitFlag(object, metaclass=BitFlagMeta):
^
SyntaxError: invalid syntax
Nose is the test driver we use, so of course it's required if you want to run tests. Colorguard is meant to be the colorguard repo from mechaphish, not whatever pip install colorguard
provides you.
Also, test_rex is badly broken. Don't expect it to work.
I just want to test the ELF binary file, so how can I change Rex's code without checking CGC binary?
This issue has been marked as stale
because it has no recent activity. Please comment or add the pinned
tag to prevent this issue from being closed.
This issue has been closed due to inactivity.
Version
Problem
I recently installed rex via https://github.com/shellphish/rex/issues/5 However, problems occur when using rex Please help me find a solution...
Typed Commands in iPython
The binary "test" crashes when type A*200
Error Message