09.06.23
GPN21

r2wars - battle bots in shared memory

github.com/hanemile/r2wars

@hanemile
github.com/hanemile/r2wars
1
09.06.23
GPN21

https://emile.space/blog/2020/10-10-r2wars/

@hanemile
github.com/hanemile/r2wars
2
09.06.23
GPN21

radare2

@hanemile
github.com/hanemile/r2wars
3
09.06.23
GPN21
; r2 --
[0x00000000]>
@hanemile
github.com/hanemile/r2wars
4
09.06.23
GPN21

Evaluable Strings Intermediate Language (ESIL)

@hanemile
github.com/hanemile/r2wars
5
09.06.23
GPN21
4,esp,-=,ebp,esp,=[4]
esp -= 4
4bytes(dword) [esp] = ebp
@hanemile
github.com/hanemile/r2wars
6
09.06.23
GPN21

Emulation

@hanemile
github.com/hanemile/r2wars
7
09.06.23
GPN21
[0x00000000]> aei      # initialize ESIL VM state
[0x00000000]> aeim     # initialize ESIL VM stack
[0x00000000]> aer      # handle ESIL registers
[0x00000000]> aer PC=0x0      # set the Program Counter
[0x00000000]> aer PC=0x0      # set the StackPointer


@hanemile
github.com/hanemile/r2wars
8
09.06.23
GPN21

r2wars

github.com/hanemile/r2wars

@hanemile
github.com/hanemile/r2wars
9
09.06.23
GPN21
; git clone github.com/hanemile/r2wars
; cd r2wars
; nix develop
; CGO_ENABLED=0 go run ./... -t 1s -v ./bots/warrior0.asm ./bots/warrior1.as
@hanemile
github.com/hanemile/r2wars
10
09.06.23
GPN21

https://emile.space/blog/2020/10-10-r2wars/

---

https://github.com/hanemile/r2wars

---

@hanemile@chaos.social

@hanemile
github.com/hanemile/r2wars
11