qiling icon indicating copy to clipboard operation
qiling copied to clipboard

execve EPERM with system syscall

Open sele-nium opened this issue 1 year ago • 2 comments
trafficstars

*Describe the bug I have 2 elf MIPS LE, the main elf run the child with system.

#include <stdlib.h>
#include <stdio.h>

int main()
{
    printf("run system\n");
    system("./testrun");
    return 0;
}
#include <stdlib.h>
#include <stdio.h>

int main()
{
    printf("testrun\n");
    return 0;
}

child is never executed when I use qiling and I see the error execve (EPERM)

Sample Code

#!/usr/bin/env python3

from qiling import Qiling
from qiling.const import QL_VERBOSE, QL_INTERCEPT

if __name__ == "__main__":
    ql = Qiling([r'./testsystem'], r'./', verbose=QL_VERBOSE.DISASM)

    print(f"elf entry {ql.loader.elf_entry:04X}")
    ql.run()

Expected behavior qiling should run the elf child

sele-nium avatar Feb 17 '24 14:02 sele-nium

Could you please attach your logging output when set to QL_VERBOSE.DEBUG? If it is too long, please attach it as a file.

elicn avatar Feb 17 '24 20:02 elicn

sorry for this lack but the output parameter no longer works, so I forgot to attach the file

output.gz

sele-nium avatar Feb 18 '24 07:02 sele-nium