小编Inn*_*wit的帖子

助记符中的无效字符“\”

我是 asm/shellcode 新手,我在编译 ParrotOS 中作为模板包含的示例 shellcode 时遇到了麻烦。

我浏览了以下主题,但它无法解决我的问题:

程序集错误:助记符中的无效字符“$”

助记符中的无效字符 (0xe2)

我尝试使用ascommand 而不是gcc,但是我遇到了同样的错误。

char code[] = 

    "\xe9\x1e\x00\x00\x00"  //          jmp    8048083 <MESSAGE>
    "\xb8\x04\x00\x00\x00"  //          mov    $0x4,%eax
    "\xbb\x01\x00\x00\x00"  //          mov    $0x1,%ebx
    "\x59"                  //          pop    %ecx
    "\xba\x0f\x00\x00\x00"  //          mov    $0xf,%edx
    "\xcd\x80"              //          int    $0x80
    "\xb8\x01\x00\x00\x00"  //          mov    $0x1,%eax
    "\xbb\x00\x00\x00\x00"  //          mov    $0x0,%ebx
    "\xcd\x80"              //          int    $0x80
    "\xe8\xdd\xff\xff\xff"  //          call   8048065 <GOBACK>
    "give me a bottle of rum!\r\n";     // OR       "\x48\x65\x6c\x6c\x6f\x2c\x20\x57"
                            //          "\x6f\x72\x6c\x64\x21\x0d\x0a"


int main(int argc, char **argv)
{
    (*(void(*)())code)(); …
Run Code Online (Sandbox Code Playgroud)

c linux assembly gcc shellcode

2
推荐指数
2
解决办法
735
查看次数

标签 统计

assembly ×1

c ×1

gcc ×1

linux ×1

shellcode ×1