libxml2 (SAX/DOM)、TinyXML、RapidXML、pugixml。<oval_definitions xmlns="https://oval.mitre.org/XMLSchema/oval-definitions-5">
<definitions>
<definition id="oval:com.example:def:1001" class="vulnerability">
<metadata>
<title>Example CVE-2023-XXXX</title>
<description>Demo vulnerability</description>
<reference source="CVE" ref_id="CVE-2023-XXXX" ref_url="..."/>
</metadata>
<criteria operator="AND">
<criterion test_ref="oval:com.example:tst:2001" comment="Check file version"/>
</criteria>
</definition>
</definitions>
<tests>
<file_test id="oval:com.example:tst:2001" version="1" check_existence="at_least_one_exists" check="all">
<object object_ref="oval:com.example:obj:3001"/>
<state state_ref="oval:com.example:ste:4001"/>
</file_test>
</tests>
<objects>
<file_object id="oval:com.example:obj:3001" version="1">
<filepath>C:\Windows\System32\drivers\etc\hosts</filepath>
</file_object>
</objects>
<states>
<file_state id="oval:com.example:ste:4001" version="1">
<version operation="less than">1.2.3</version>
</file_state>
</states>
</oval_definitions>
pugixml 解析/生成 XML。OpenSCAP、OVALdi)源碼,看如何將 OVAL 轉為 C/C++ 邏輯執行。OVAL Interpreter (參考實現)、OpenSCAP (生產級)。XML 是載體,OVAL 是領域語言。掌握 XML 解析,理解 OVAL 三模型,即可從逆向/安全角度構建漏洞知識庫與自動化檢測能力。