Pwnable - seccomp

install

1
gem install seccomp-tools

use

1
seccomp-tools dump [chall]
  • result
1
2
3
4
5
6
7
8
9
10
11
12
13
14
 line  CODE  JT   JF      K
=================================
0000: 0x20 0x00 0x00 0x00000004 A = arch
0001: 0x15 0x00 0x09 0xc000003e if (A != ARCH_X86_64) goto 0011
0002: 0x20 0x00 0x00 0x00000000 A = sys_number
0003: 0x35 0x00 0x01 0x40000000 if (A < 0x40000000) goto 0005
0004: 0x15 0x00 0x06 0xffffffff if (A != 0xffffffff) goto 0011
0005: 0x15 0x04 0x00 0x00000000 if (A == read) goto 0010
0006: 0x15 0x03 0x00 0x00000001 if (A == write) goto 0010
0007: 0x15 0x02 0x00 0x00000002 if (A == open) goto 0010
0008: 0x15 0x01 0x00 0x0000003c if (A == exit) goto 0010
0009: 0x15 0x00 0x01 0x000000e7 if (A != exit_group) goto 0011
0010: 0x06 0x00 0x00 0x7fff0000 return ALLOW
0011: 0x06 0x00 0x00 0x00000000 return KILL

Related Challenge

etc

1
2
WARNING:  You don't have /home/jir4vvit/.local/share/gem/ruby/3.0.0/bin in your PATH,
gem executables will not run.

If you get warning as above when you use the gem, you execute the command below.

1
2
3
4
export GEM_HOME="$(ruby -e 'puts Gem.user_dir')" 
export PATH="$PATH:$GEM_HOME/bin"
gem list
gem update