6. Hack
...
Computers.
● to modify (a computer program or electronic device) or write
(a program) in a skillful or clever way.
● to circumvent security and break into (a network, computer,
file, etc.), usually with malicious intent: Criminals hacked the
bank's servers yesterday.
http://www.dictionary.com/browse/hacking
7. Hack
...
Computers.
● to modify (a computer program or electronic device) or
write (a program) in a skillful or clever way.
● to circumvent security and break into (a network, computer,
file, etc.), usually with malicious intent: Criminals hacked the
bank's servers yesterday.
http://www.dictionary.com/browse/hacking
35. Why it IS possible now: Scene 1
Kernel
mov 0x1, %rax
syscall
(translate: I want to exit)
Container
36. Container
Why it IS possible now: Scene 2
Kernel detour.ko
(namespace-
aware)
system call table
system call table
for FreeBSD
#1 is sys_write, so …
...wait, this is a FreeBSD container!
37. Container
Why it IS possible now: Scene 3
Kernel detour.ko
(namespace-
aware)sys_exit()
system call table
for FreeBSD
38. Specific Challenges ( FreeBSD )
● Corresponding system calls
– Flag numbers are not portable
– different calling/exiting conventions
● Unique system calls
– Re-implementation
40. Other Binary Compatibility Work
● Wine
– Special loader for PEs/DLLs
● FreeBSD, Windows 10
– Kernel built-in compatibility layer for Linux binary
– System call remapping/re-implementation
48. The work flow
1. Launch a normal container
2. Run a init script
1. which enables the specific detour modules
3. A FreeBSD environment in the container
4. On exit
1. disable detour modules
50. Conclusion
● The kernel detouring demo attempts to
indicate the possibility of the development of
OS containers
– as a proof-of-concept
– kpatch as a temp. solution
● Future direction
– Make more fun