iodef-1.0.xml 39 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <xs:schema targetNamespace="urn:ietf:params:xml:ns:iodef-1.0"
  3. xmlns="urn:ietf:params:xml:ns:iodef-1.0"
  4. xmlns:iodef="urn:ietf:params:xml:ns:iodef-1.0"
  5. xmlns:xs="http://www.w3.org/2001/XMLSchema"
  6. elementFormDefault="qualified"
  7. attributeFormDefault="unqualified">
  8. <xs:annotation>
  9. <xs:documentation>
  10. Incident Object Description Exchange Format v1.00, see RFC XXX
  11. </xs:documentation>
  12. </xs:annotation>
  13. <!--
  14. ====================================================================
  15. == IODEF-Document class ==
  16. ====================================================================
  17. -->
  18. <xs:element name="IODEF-Document">
  19. <xs:complexType>
  20. <xs:sequence>
  21. <xs:element ref="iodef:Incident"
  22. maxOccurs="unbounded"/>
  23. </xs:sequence>
  24. <xs:attribute name="version"
  25. type="xs:string" fixed="1.00"/>
  26. <xs:attribute name="lang"
  27. type="xs:language" use="required"/>
  28. <xs:attribute name="formatid"
  29. type="xs:string"/>
  30. </xs:complexType>
  31. </xs:element>
  32. <!--
  33. ====================================================================
  34. === Incident class ===
  35. ====================================================================
  36. -->
  37. <xs:element name="Incident">
  38. <xs:complexType>
  39. <xs:sequence>
  40. <xs:element ref="iodef:IncidentID"/>
  41. <xs:element ref="iodef:AlternativeID"
  42. minOccurs="0"/>
  43. <xs:element ref="iodef:RelatedActivity"
  44. minOccurs="0"/>
  45. <xs:element ref="iodef:DetectTime"
  46. minOccurs="0"/>
  47. <xs:element ref="iodef:StartTime"
  48. minOccurs="0"/>
  49. <xs:element ref="iodef:EndTime"
  50. minOccurs="0"/>
  51. <xs:element ref="iodef:ReportTime"/>
  52. <xs:element ref="iodef:Description"
  53. minOccurs="0" maxOccurs="unbounded"/>
  54. <xs:element ref="iodef:Assessment"
  55. maxOccurs="unbounded"/>
  56. <xs:element ref="iodef:Method"
  57. minOccurs="0" maxOccurs="unbounded"/>
  58. <xs:element ref="iodef:Contact"
  59. maxOccurs="unbounded"/>
  60. <xs:element ref="iodef:EventData"
  61. minOccurs="0" maxOccurs="unbounded"/>
  62. <xs:element ref="iodef:History"
  63. minOccurs="0"/>
  64. <xs:element ref="iodef:AdditionalData"
  65. minOccurs="0" maxOccurs="unbounded"/>
  66. </xs:sequence>
  67. <xs:attribute name="purpose" use="required">
  68. <xs:simpleType>
  69. <xs:restriction base="xs:NMTOKEN">
  70. <xs:enumeration value="traceback"/>
  71. <xs:enumeration value="mitigation"/>
  72. <xs:enumeration value="reporting"/>
  73. <xs:enumeration value="other"/>
  74. <xs:enumeration value="ext-value"/>
  75. </xs:restriction>
  76. </xs:simpleType>
  77. </xs:attribute>
  78. <xs:attribute name="ext-purpose"
  79. type="xs:string" use="optional"/>
  80. <xs:attribute name="lang"
  81. type="xs:language"/>
  82. <xs:attribute name="restriction"
  83. type="iodef:restriction-type" default="private"/>
  84. </xs:complexType>
  85. </xs:element>
  86. <!--
  87. ====================================================================
  88. == IncidentID class ==
  89. ====================================================================
  90. -->
  91. <xs:element name="IncidentID" type="iodef:IncidentIDType"/>
  92. <xs:complexType name="IncidentIDType">
  93. <xs:simpleContent>
  94. <xs:extension base="xs:string">
  95. <xs:attribute name="name"
  96. type="xs:string" use="required"/>
  97. <xs:attribute name="instance"
  98. type="xs:string" use="optional"/>
  99. <xs:attribute name="restriction"
  100. type="iodef:restriction-type" default="public"/>
  101. </xs:extension>
  102. </xs:simpleContent>
  103. </xs:complexType>
  104. <!--
  105. ====================================================================
  106. == AlternativeID class ==
  107. ====================================================================
  108. -->
  109. <xs:element name="AlternativeID">
  110. <xs:complexType>
  111. <xs:sequence>
  112. <xs:element ref="iodef:IncidentID"
  113. maxOccurs="unbounded"/>
  114. </xs:sequence>
  115. <xs:attribute name="restriction"
  116. type="iodef:restriction-type"/>
  117. </xs:complexType>
  118. </xs:element>
  119. <!--
  120. ====================================================================
  121. == RelatedActivity class ==
  122. ====================================================================
  123. -->
  124. <xs:element name="RelatedActivity">
  125. <xs:complexType>
  126. <xs:choice>
  127. <xs:element ref="iodef:IncidentID"
  128. maxOccurs="unbounded"/>
  129. <xs:element ref="iodef:URL"
  130. maxOccurs="unbounded"/>
  131. </xs:choice>
  132. <xs:attribute name="restriction"
  133. type="iodef:restriction-type"/>
  134. </xs:complexType>
  135. </xs:element>
  136. <!--
  137. ====================================================================
  138. === AdditionalData class ===
  139. ====================================================================
  140. -->
  141. <xs:element name="AdditionalData" type="iodef:ExtensionType"/>
  142. <!--
  143. ====================================================================
  144. === Contact class ===
  145. ====================================================================
  146. -->
  147. <xs:element name="Contact">
  148. <xs:complexType>
  149. <xs:sequence>
  150. <xs:element ref="iodef:ContactName"
  151. minOccurs="0"/>
  152. <xs:element ref="iodef:Description"
  153. minOccurs="0" maxOccurs="unbounded"/>
  154. <xs:element ref="iodef:RegistryHandle"
  155. minOccurs="0" maxOccurs="unbounded"/>
  156. <xs:element ref="iodef:PostalAddress"
  157. minOccurs="0"/>
  158. <xs:element ref="iodef:Email"
  159. minOccurs="0" maxOccurs="unbounded"/>
  160. <xs:element ref="iodef:Telephone"
  161. minOccurs="0" maxOccurs="unbounded"/>
  162. <xs:element ref="iodef:Fax"
  163. minOccurs="0"/>
  164. <xs:element ref="iodef:Timezone"
  165. minOccurs="0"/>
  166. <xs:element ref="iodef:Contact"
  167. minOccurs="0" maxOccurs="unbounded"/>
  168. <xs:element ref="iodef:AdditionalData"
  169. minOccurs="0" maxOccurs="unbounded"/>
  170. </xs:sequence>
  171. <xs:attribute name="role" use="required">
  172. <xs:simpleType>
  173. <xs:restriction base="xs:NMTOKEN">
  174. <xs:enumeration value="creator"/>
  175. <xs:enumeration value="admin"/>
  176. <xs:enumeration value="tech"/>
  177. <xs:enumeration value="irt"/>
  178. <xs:enumeration value="cc"/>
  179. <xs:enumeration value="ext-value"/>
  180. </xs:restriction>
  181. </xs:simpleType>
  182. </xs:attribute>
  183. <xs:attribute name="ext-role"
  184. type="xs:string" use="optional"/>
  185. <xs:attribute name="type" use="required">
  186. <xs:simpleType>
  187. <xs:restriction base="xs:NMTOKEN">
  188. <xs:enumeration value="person"/>
  189. <xs:enumeration value="organization"/>
  190. <xs:enumeration value="ext-value"/>
  191. </xs:restriction>
  192. </xs:simpleType>
  193. </xs:attribute>
  194. <xs:attribute name="ext-type"
  195. type="xs:string" use="optional"/>
  196. <xs:attribute name="restriction"
  197. type="iodef:restriction-type"/>
  198. </xs:complexType>
  199. </xs:element>
  200. <xs:element name="ContactName"
  201. type="iodef:MLStringType"/>
  202. <xs:element name="RegistryHandle">
  203. <xs:complexType>
  204. <xs:simpleContent>
  205. <xs:extension base="xs:string">
  206. <xs:attribute name="registry">
  207. <xs:simpleType>
  208. <xs:restriction base="xs:NMTOKEN">
  209. <xs:enumeration value="internic"/>
  210. <xs:enumeration value="apnic"/>
  211. <xs:enumeration value="arin"/>
  212. <xs:enumeration value="lacnic"/>
  213. <xs:enumeration value="ripe"/>
  214. <xs:enumeration value="afrinic"/>
  215. <xs:enumeration value="local"/>
  216. <xs:enumeration value="ext-value"/>
  217. </xs:restriction>
  218. </xs:simpleType>
  219. </xs:attribute>
  220. <xs:attribute name="ext-registry"
  221. type="xs:string" use="optional"/>
  222. </xs:extension>
  223. </xs:simpleContent>
  224. </xs:complexType>
  225. </xs:element>
  226. <xs:element name="PostalAddress">
  227. <xs:complexType>
  228. <xs:simpleContent>
  229. <xs:extension base="iodef:MLStringType">
  230. <xs:attribute name="meaning"
  231. type="xs:string" use="optional"/>
  232. </xs:extension>
  233. </xs:simpleContent>
  234. </xs:complexType>
  235. </xs:element>
  236. <xs:element name="Email" type="iodef:ContactMeansType"/>
  237. <xs:element name="Telephone" type="iodef:ContactMeansType"/>
  238. <xs:element name="Fax" type="iodef:ContactMeansType"/>
  239. <xs:complexType name="ContactMeansType">
  240. <xs:simpleContent>
  241. <xs:extension base="xs:string">
  242. <xs:attribute name="meaning"
  243. type="xs:string" use="optional"/>
  244. </xs:extension>
  245. </xs:simpleContent>
  246. </xs:complexType>
  247. <!--
  248. ====================================================================
  249. === Time-based classes ===
  250. ====================================================================
  251. -->
  252. <xs:element name="DateTime"
  253. type="xs:dateTime"/>
  254. <xs:element name="ReportTime"
  255. type="xs:dateTime"/>
  256. <xs:element name="DetectTime"
  257. type="xs:dateTime"/>
  258. <xs:element name="StartTime"
  259. type="xs:dateTime"/>
  260. <xs:element name="EndTime"
  261. type="xs:dateTime"/>
  262. <xs:element name="Timezone"
  263. type="iodef:TimezoneType"/>
  264. <xs:simpleType name="TimezoneType">
  265. <xs:restriction base="xs:string">
  266. <xs:pattern value="Z|[\+\-](0[0-9]|1[0-4]):[0-5][0-9]"/>
  267. </xs:restriction>
  268. </xs:simpleType>
  269. <!--
  270. ====================================================================
  271. === History class ===
  272. ====================================================================
  273. -->
  274. <xs:element name="History">
  275. <xs:complexType>
  276. <xs:sequence>
  277. <xs:element ref="iodef:HistoryItem"
  278. maxOccurs="unbounded"/>
  279. </xs:sequence>
  280. <xs:attribute name="restriction"
  281. type="iodef:restriction-type" default="default"/>
  282. </xs:complexType>
  283. </xs:element>
  284. <xs:element name="HistoryItem">
  285. <xs:complexType>
  286. <xs:sequence>
  287. <xs:element ref="iodef:DateTime"/>
  288. <xs:element ref="iodef:IncidentID"
  289. minOccurs="0"/>
  290. <xs:element ref="iodef:Contact"
  291. minOccurs="0"/>
  292. <xs:element ref="iodef:Description"
  293. minOccurs="0" maxOccurs="unbounded"/>
  294. <xs:element ref="iodef:AdditionalData"
  295. minOccurs="0" maxOccurs="unbounded"/>
  296. </xs:sequence>
  297. <xs:attribute name="restriction"
  298. type="iodef:restriction-type"/>
  299. <xs:attribute name="action"
  300. type="iodef:action-type" use="required"/>
  301. <xs:attribute name="ext-action"
  302. type="xs:string" use="optional"/>
  303. </xs:complexType>
  304. </xs:element>
  305. <!--
  306. ====================================================================
  307. === Expectation class ===
  308. ====================================================================
  309. -->
  310. <xs:element name="Expectation">
  311. <xs:complexType>
  312. <xs:sequence>
  313. <xs:element ref="iodef:Description"
  314. minOccurs="0" maxOccurs="unbounded"/>
  315. <xs:element ref="iodef:StartTime"
  316. minOccurs="0"/>
  317. <xs:element ref="iodef:EndTime"
  318. minOccurs="0"/>
  319. <xs:element ref="iodef:Contact"
  320. minOccurs="0"/>
  321. </xs:sequence>
  322. <xs:attribute name="restriction"
  323. type="iodef:restriction-type" default="default"/>
  324. <xs:attribute name="severity"
  325. type="iodef:severity-type"/>
  326. <xs:attribute name="action"
  327. type="iodef:action-type" default="other"/>
  328. <xs:attribute name="ext-action"
  329. type="xs:string" use="optional"/>
  330. </xs:complexType>
  331. </xs:element>
  332. <!--
  333. ====================================================================
  334. === Method class ===
  335. ====================================================================
  336. -->
  337. <xs:element name="Method">
  338. <xs:complexType>
  339. <xs:sequence>
  340. <xs:choice maxOccurs="unbounded">
  341. <xs:element ref="iodef:Reference"/>
  342. <xs:element ref="iodef:Description"/>
  343. </xs:choice>
  344. <xs:element ref="iodef:AdditionalData"
  345. minOccurs="0" maxOccurs="unbounded"/>
  346. </xs:sequence>
  347. <xs:attribute name="restriction"
  348. type="iodef:restriction-type"/>
  349. </xs:complexType>
  350. </xs:element>
  351. <xs:element name="Reference">
  352. <xs:complexType>
  353. <xs:sequence>
  354. <xs:element name="ReferenceName"
  355. type="iodef:MLStringType"/>
  356. <xs:element ref="iodef:URL"
  357. minOccurs="0" maxOccurs="unbounded"/>
  358. <xs:element ref="iodef:Description"
  359. minOccurs="0" maxOccurs="unbounded"/>
  360. </xs:sequence>
  361. </xs:complexType>
  362. </xs:element>
  363. <!--
  364. ====================================================================
  365. === Assessment class ===
  366. ====================================================================
  367. -->
  368. <xs:element name="Assessment">
  369. <xs:complexType>
  370. <xs:sequence>
  371. <xs:choice maxOccurs="unbounded">
  372. <xs:element ref="iodef:Impact"/>
  373. <xs:element ref="iodef:TimeImpact"/>
  374. <xs:element ref="iodef:MonetaryImpact"/>
  375. </xs:choice>
  376. <xs:element ref="iodef:Counter"
  377. minOccurs="0" maxOccurs="unbounded"/>
  378. <xs:element ref="iodef:Confidence" minOccurs="0"/>
  379. <xs:element ref="iodef:AdditionalData"
  380. minOccurs="0" maxOccurs="unbounded"/>
  381. </xs:sequence>
  382. <xs:attribute name="occurrence">
  383. <xs:simpleType>
  384. <xs:restriction base="xs:NMTOKEN">
  385. <xs:enumeration value="actual"/>
  386. <xs:enumeration value="potential"/>
  387. </xs:restriction>
  388. </xs:simpleType>
  389. </xs:attribute>
  390. <xs:attribute name="restriction"
  391. type="iodef:restriction-type"/>
  392. </xs:complexType>
  393. </xs:element>
  394. <xs:element name="Impact">
  395. <xs:complexType>
  396. <xs:simpleContent>
  397. <xs:extension base="iodef:MLStringType">
  398. <xs:attribute name="severity"
  399. type="iodef:severity-type"/>
  400. <xs:attribute name="completion">
  401. <xs:simpleType>
  402. <xs:restriction base="xs:NMTOKEN">
  403. <xs:enumeration value="failed"/>
  404. <xs:enumeration value="succeeded"/>
  405. </xs:restriction>
  406. </xs:simpleType>
  407. </xs:attribute>
  408. <xs:attribute name="type"
  409. use="optional" default="unknown">
  410. <xs:simpleType>
  411. <xs:restriction base="xs:NMTOKEN">
  412. <xs:enumeration value="admin"/>
  413. <xs:enumeration value="dos"/>
  414. <xs:enumeration value="extortion"/>
  415. <xs:enumeration value="file"/>
  416. <xs:enumeration value="info-leak"/>
  417. <xs:enumeration value="misconfiguration"/>
  418. <xs:enumeration value="recon"/>
  419. <xs:enumeration value="policy"/>
  420. <xs:enumeration value="social-engineering"/>
  421. <xs:enumeration value="user"/>
  422. <xs:enumeration value="unknown"/>
  423. <xs:enumeration value="ext-value"/>
  424. </xs:restriction>
  425. </xs:simpleType>
  426. </xs:attribute>
  427. <xs:attribute name="ext-type"
  428. type="xs:string" use="optional"/>
  429. </xs:extension>
  430. </xs:simpleContent>
  431. </xs:complexType>
  432. </xs:element>
  433. <xs:element name="TimeImpact">
  434. <xs:complexType>
  435. <xs:simpleContent>
  436. <xs:extension base="iodef:PositiveFloatType">
  437. <xs:attribute name="severity"
  438. type="iodef:severity-type"/>
  439. <xs:attribute name="metric"
  440. use="required">
  441. <xs:simpleType>
  442. <xs:restriction base="xs:NMTOKEN">
  443. <xs:enumeration value="labor"/>
  444. <xs:enumeration value="elapsed"/>
  445. <xs:enumeration value="downtime"/>
  446. <xs:enumeration value="ext-value"/>
  447. </xs:restriction>
  448. </xs:simpleType>
  449. </xs:attribute>
  450. <xs:attribute name="ext-metric"
  451. type="xs:string" use="optional"/>
  452. <xs:attribute name="duration"
  453. type="iodef:duration-type"/>
  454. <xs:attribute name="ext-duration"
  455. type="xs:string" use="optional"/>
  456. </xs:extension>
  457. </xs:simpleContent>
  458. </xs:complexType>
  459. </xs:element>
  460. <xs:element name="MonetaryImpact">
  461. <xs:complexType>
  462. <xs:simpleContent>
  463. <xs:extension base="iodef:PositiveFloatType">
  464. <xs:attribute name="severity"
  465. type="iodef:severity-type"/>
  466. <xs:attribute name="currency"
  467. type="xs:string"/>
  468. </xs:extension>
  469. </xs:simpleContent>
  470. </xs:complexType>
  471. </xs:element>
  472. <xs:element name="Confidence">
  473. <xs:complexType mixed="true">
  474. <xs:attribute name="rating" use="required">
  475. <xs:simpleType>
  476. <xs:restriction base="xs:NMTOKEN">
  477. <xs:enumeration value="low"/>
  478. <xs:enumeration value="medium"/>
  479. <xs:enumeration value="high"/>
  480. <xs:enumeration value="numeric"/>
  481. <xs:enumeration value="unknown"/>
  482. </xs:restriction>
  483. </xs:simpleType>
  484. </xs:attribute>
  485. </xs:complexType>
  486. </xs:element>
  487. <!--
  488. ====================================================================
  489. === EventData class ===
  490. ====================================================================
  491. -->
  492. <xs:element name="EventData">
  493. <xs:complexType>
  494. <xs:sequence>
  495. <xs:element ref="iodef:Description"
  496. minOccurs="0" maxOccurs="unbounded"/>
  497. <xs:element ref="iodef:DetectTime"
  498. minOccurs="0"/>
  499. <xs:element ref="iodef:StartTime"
  500. minOccurs="0"/>
  501. <xs:element ref="iodef:EndTime"
  502. minOccurs="0"/>
  503. <xs:element ref="iodef:Contact"
  504. minOccurs="0" maxOccurs="unbounded"/>
  505. <xs:element ref="iodef:Assessment"
  506. minOccurs="0"/>
  507. <xs:element ref="iodef:Method"
  508. minOccurs="0" maxOccurs="unbounded"/>
  509. <xs:element ref="iodef:Flow"
  510. minOccurs="0" maxOccurs="unbounded"/>
  511. <xs:element ref="iodef:Expectation"
  512. minOccurs="0" maxOccurs="unbounded"/>
  513. <xs:element ref="iodef:Record"
  514. minOccurs="0"/>
  515. <xs:element ref="iodef:EventData"
  516. minOccurs="0" maxOccurs="unbounded"/>
  517. <xs:element ref="iodef:AdditionalData"
  518. minOccurs="0" maxOccurs="unbounded"/>
  519. </xs:sequence>
  520. <xs:attribute name="restriction"
  521. type="iodef:restriction-type" default="default"/>
  522. </xs:complexType>
  523. </xs:element>
  524. <!--
  525. ====================================================================
  526. === Flow class ===
  527. ====================================================================
  528. -->
  529. <xs:element name="Flow">
  530. <xs:complexType>
  531. <xs:sequence>
  532. <xs:element ref="iodef:System"
  533. maxOccurs="unbounded"/>
  534. </xs:sequence>
  535. </xs:complexType>
  536. </xs:element>
  537. <!--
  538. ====================================================================
  539. === System class ===
  540. ====================================================================
  541. -->
  542. <xs:element name="System">
  543. <xs:complexType>
  544. <xs:sequence>
  545. <xs:element ref="iodef:Node"/>
  546. <xs:element ref="iodef:Service"
  547. minOccurs="0" maxOccurs="unbounded"/>
  548. <xs:element ref="iodef:OperatingSystem"
  549. minOccurs="0" maxOccurs="unbounded"/>
  550. <xs:element ref="iodef:Counter"
  551. minOccurs="0" maxOccurs="unbounded"/>
  552. <xs:element ref="iodef:Description"
  553. minOccurs="0" maxOccurs="unbounded"/>
  554. <xs:element ref="iodef:AdditionalData"
  555. minOccurs="0" maxOccurs="unbounded"/>
  556. </xs:sequence>
  557. <xs:attribute name="restriction"
  558. type="iodef:restriction-type"/>
  559. <xs:attribute name="interface"
  560. type="xs:string"/>
  561. <xs:attribute name="category">
  562. <xs:simpleType>
  563. <xs:restriction base="xs:NMTOKEN">
  564. <xs:enumeration value="source"/>
  565. <xs:enumeration value="target"/>
  566. <xs:enumeration value="intermediate"/>
  567. <xs:enumeration value="sensor"/>
  568. <xs:enumeration value="infrastructure"/>
  569. <xs:enumeration value="ext-value"/>
  570. </xs:restriction>
  571. </xs:simpleType>
  572. </xs:attribute>
  573. <xs:attribute name="ext-category"
  574. type="xs:string" use="optional"/>
  575. <xs:attribute name="spoofed"
  576. default="unknown">
  577. <xs:simpleType>
  578. <xs:restriction base="xs:NMTOKEN">
  579. <xs:enumeration value="unknown"/>
  580. <xs:enumeration value="yes"/>
  581. <xs:enumeration value="no"/>
  582. </xs:restriction>
  583. </xs:simpleType>
  584. </xs:attribute>
  585. </xs:complexType>
  586. </xs:element>
  587. <!--
  588. ====================================================================
  589. === Node class ===
  590. ====================================================================
  591. -->
  592. <xs:element name="Node">
  593. <xs:complexType>
  594. <xs:sequence>
  595. <xs:choice maxOccurs="unbounded">
  596. <xs:element name="NodeName"
  597. type="iodef:MLStringType" minOccurs="0"/>
  598. <xs:element ref="iodef:Address"
  599. minOccurs="0" maxOccurs="unbounded"/>
  600. </xs:choice>
  601. <xs:element ref="iodef:Location"
  602. minOccurs="0"/>
  603. <xs:element ref="iodef:DateTime"
  604. minOccurs="0"/>
  605. <xs:element ref="iodef:NodeRole"
  606. minOccurs="0" maxOccurs="unbounded"/>
  607. <xs:element ref="iodef:Counter"
  608. minOccurs="0" maxOccurs="unbounded"/>
  609. </xs:sequence>
  610. </xs:complexType>
  611. </xs:element>
  612. <xs:element name="Address">
  613. <xs:complexType>
  614. <xs:simpleContent>
  615. <xs:extension base="xs:string">
  616. <xs:attribute name="category" default="ipv4-addr">
  617. <xs:simpleType>
  618. <xs:restriction base="xs:NMTOKEN">
  619. <xs:enumeration value="asn"/>
  620. <xs:enumeration value="atm"/>
  621. <xs:enumeration value="e-mail"/>
  622. <xs:enumeration value="mac"/>
  623. <xs:enumeration value="ipv4-addr"/>
  624. <xs:enumeration value="ipv4-net"/>
  625. <xs:enumeration value="ipv4-net-mask"/>
  626. <xs:enumeration value="ipv6-addr"/>
  627. <xs:enumeration value="ipv6-net"/>
  628. <xs:enumeration value="ipv6-net-mask"/>
  629. <xs:enumeration value="ext-value"/>
  630. </xs:restriction>
  631. </xs:simpleType>
  632. </xs:attribute>
  633. <xs:attribute name="ext-category"
  634. type="xs:string" use="optional"/>
  635. <xs:attribute name="vlan-name"
  636. type="xs:string"/>
  637. <xs:attribute name="vlan-num"
  638. type="xs:integer"/>
  639. </xs:extension>
  640. </xs:simpleContent>
  641. </xs:complexType>
  642. </xs:element>
  643. <xs:element name="Location" type="iodef:MLStringType"/>
  644. <xs:element name="NodeRole">
  645. <xs:complexType>
  646. <xs:simpleContent>
  647. <xs:extension base="iodef:MLStringType">
  648. <xs:attribute name="category" use="required">
  649. <xs:simpleType>
  650. <xs:restriction base="xs:NMTOKEN">
  651. <xs:enumeration value="client"/>
  652. <xs:enumeration value="server-internal"/>
  653. <xs:enumeration value="server-public"/>
  654. <xs:enumeration value="www"/>
  655. <xs:enumeration value="mail"/>
  656. <xs:enumeration value="messaging"/>
  657. <xs:enumeration value="streaming"/>
  658. <xs:enumeration value="voice"/>
  659. <xs:enumeration value="file"/>
  660. <xs:enumeration value="ftp"/>
  661. <xs:enumeration value="p2p"/>
  662. <xs:enumeration value="name"/>
  663. <xs:enumeration value="directory"/>
  664. <xs:enumeration value="credential"/>
  665. <xs:enumeration value="print"/>
  666. <xs:enumeration value="application"/>
  667. <xs:enumeration value="database"/>
  668. <xs:enumeration value="infra"/>
  669. <xs:enumeration value="log"/>
  670. <xs:enumeration value="ext-value"/>
  671. </xs:restriction>
  672. </xs:simpleType>
  673. </xs:attribute>
  674. <xs:attribute name="ext-category"
  675. type="xs:string" use="optional"/>
  676. </xs:extension>
  677. </xs:simpleContent>
  678. </xs:complexType>
  679. </xs:element>
  680. <!--
  681. ====================================================================
  682. === Service Class ===
  683. ====================================================================
  684. -->
  685. <xs:element name="Service">
  686. <xs:complexType>
  687. <xs:sequence>
  688. <xs:choice minOccurs="0">
  689. <xs:element name="Port"
  690. type="xs:integer"/>
  691. <xs:element name="Portlist"
  692. type="iodef:PortlistType"/>
  693. </xs:choice>
  694. <xs:element name="ProtoType"
  695. type="xs:integer" minOccurs="0"/>
  696. <xs:element name="ProtoCode"
  697. type="xs:integer" minOccurs="0"/>
  698. <xs:element name="ProtoField"
  699. type="xs:integer" minOccurs="0"/>
  700. <xs:element ref="iodef:Application"
  701. minOccurs="0"/>
  702. </xs:sequence>
  703. <xs:attribute name="ip_protocol"
  704. type="xs:integer" use="required"/>
  705. </xs:complexType>
  706. </xs:element>
  707. <xs:simpleType name="PortlistType">
  708. <xs:restriction base="xs:string">
  709. <xs:pattern value="\d+(\-\d+)?(,\d+(\-\d+)?)*"/>
  710. </xs:restriction>
  711. </xs:simpleType>
  712. <!--
  713. ====================================================================
  714. === Counter class ===
  715. ====================================================================
  716. -->
  717. <xs:element name="Counter">
  718. <xs:complexType>
  719. <xs:simpleContent>
  720. <xs:extension base="xs:double">
  721. <xs:attribute name="type" use="required">
  722. <xs:simpleType>
  723. <xs:restriction base="xs:NMTOKEN">
  724. <xs:enumeration value="byte"/>
  725. <xs:enumeration value="packet"/>
  726. <xs:enumeration value="flow"/>
  727. <xs:enumeration value="session"/>
  728. <xs:enumeration value="event"/>
  729. <xs:enumeration value="alert"/>
  730. <xs:enumeration value="message"/>
  731. <xs:enumeration value="host"/>
  732. <xs:enumeration value="site"/>
  733. <xs:enumeration value="organization"/>
  734. <xs:enumeration value="ext-value"/>
  735. </xs:restriction>
  736. </xs:simpleType>
  737. </xs:attribute>
  738. <xs:attribute name="ext-type"
  739. type="xs:string" use="optional"/>
  740. <xs:attribute name="meaning"
  741. type="xs:string" use="optional"/>
  742. <xs:attribute name="duration"
  743. type="iodef:duration-type"/>
  744. <xs:attribute name="ext-duration"
  745. type="xs:string" use="optional"/>
  746. </xs:extension>
  747. </xs:simpleContent>
  748. </xs:complexType>
  749. </xs:element>
  750. <!--
  751. ====================================================================
  752. === Record class ===
  753. ====================================================================
  754. -->
  755. <xs:element name="Record">
  756. <xs:complexType>
  757. <xs:sequence>
  758. <xs:element ref="iodef:RecordData"
  759. maxOccurs="unbounded"/>
  760. </xs:sequence>
  761. <xs:attribute name="restriction"
  762. type="iodef:restriction-type"/>
  763. </xs:complexType>
  764. </xs:element>
  765. <xs:element name="RecordData">
  766. <xs:complexType>
  767. <xs:sequence>
  768. <xs:element ref="iodef:DateTime"
  769. minOccurs="0"/>
  770. <xs:element ref="iodef:Description"
  771. minOccurs="0" maxOccurs="unbounded"/>
  772. <xs:element ref="iodef:Application"
  773. minOccurs="0"/>
  774. <xs:element ref="iodef:RecordPattern"
  775. minOccurs="0" maxOccurs="unbounded"/>
  776. <xs:element ref="iodef:RecordItem"
  777. maxOccurs="unbounded"/>
  778. <xs:element ref="iodef:AdditionalData"
  779. minOccurs="0" maxOccurs="unbounded"/>
  780. </xs:sequence>
  781. <xs:attribute name="restriction"
  782. type="iodef:restriction-type"/>
  783. </xs:complexType>
  784. </xs:element>
  785. <xs:element name="RecordPattern">
  786. <xs:complexType>
  787. <xs:simpleContent>
  788. <xs:extension base="xs:string">
  789. <xs:attribute name="type" use="required">
  790. <xs:simpleType>
  791. <xs:restriction base="xs:NMTOKEN">
  792. <xs:enumeration value="regex"/>
  793. <xs:enumeration value="binary"/>
  794. <xs:enumeration value="xpath"/>
  795. <xs:enumeration value="ext-value"/>
  796. </xs:restriction>
  797. </xs:simpleType>
  798. </xs:attribute>
  799. <xs:attribute name="ext-type"
  800. type="xs:string" use="optional"/>
  801. <xs:attribute name="offset"
  802. type="xs:integer" use="optional"/>
  803. <xs:attribute name="offsetunit"
  804. use="optional" default="line">
  805. <xs:simpleType>
  806. <xs:restriction base="xs:NMTOKEN">
  807. <xs:enumeration value="line"/>
  808. <xs:enumeration value="byte"/>
  809. <xs:enumeration value="ext-value"/>
  810. </xs:restriction>
  811. </xs:simpleType>
  812. </xs:attribute>
  813. <xs:attribute name="ext-offsetunit"
  814. type="xs:string" use="optional"/>
  815. <xs:attribute name="instance"
  816. type="xs:integer" use="optional"/>
  817. </xs:extension>
  818. </xs:simpleContent>
  819. </xs:complexType>
  820. </xs:element>
  821. <xs:element name="RecordItem"
  822. type="iodef:ExtensionType"/>
  823. <!--
  824. ====================================================================
  825. === Classes that describe software ===
  826. ====================================================================
  827. -->
  828. <xs:complexType name="SoftwareType">
  829. <xs:sequence>
  830. <xs:element ref="iodef:URL"
  831. minOccurs="0"/>
  832. </xs:sequence>
  833. <xs:attribute name="swid"
  834. type="xs:string" default="0"/>
  835. <xs:attribute name="configid"
  836. type="xs:string" default="0"/>
  837. <xs:attribute name="vendor"
  838. type="xs:string"/>
  839. <xs:attribute name="family"
  840. type="xs:string"/>
  841. <xs:attribute name="name"
  842. type="xs:string"/>
  843. <xs:attribute name="version"
  844. type="xs:string"/>
  845. <xs:attribute name="patch"
  846. type="xs:string"/>
  847. </xs:complexType>
  848. <xs:element name="Application"
  849. type="iodef:SoftwareType"/>
  850. <xs:element name="OperatingSystem"
  851. type="iodef:SoftwareType"/>
  852. <!--
  853. ====================================================================
  854. === Miscellaneous simple classes ===
  855. ====================================================================
  856. -->
  857. <xs:element name="Description"
  858. type="iodef:MLStringType"/>
  859. <xs:element name="URL"
  860. type="xs:anyURI"/>
  861. <!--
  862. ====================================================================
  863. === Data Types ===
  864. ====================================================================
  865. -->
  866. <xs:simpleType name="PositiveFloatType">
  867. <xs:restriction base="xs:float">
  868. <xs:minExclusive value="0"/>
  869. </xs:restriction>
  870. </xs:simpleType>
  871. <xs:complexType name="MLStringType">
  872. <xs:simpleContent>
  873. <xs:extension base="xs:string">
  874. <xs:attribute name="lang"
  875. type="xs:language" use="optional"/>
  876. </xs:extension>
  877. </xs:simpleContent>
  878. </xs:complexType>
  879. <xs:complexType name="ExtensionType" mixed="true">
  880. <xs:sequence>
  881. <xs:any namespace="##any" processContents="lax"
  882. minOccurs="0" maxOccurs="unbounded"/>
  883. </xs:sequence>
  884. <xs:attribute name="dtype"
  885. type="iodef:dtype-type" use="required"/>
  886. <xs:attribute name="ext-dtype"
  887. type="xs:string" use="optional"/>
  888. <xs:attribute name="meaning"
  889. type="xs:string"/>
  890. <xs:attribute name="formatid"
  891. type="xs:string"/>
  892. <xs:attribute name="restriction"
  893. type="iodef:restriction-type"/>
  894. </xs:complexType>
  895. <!--
  896. ====================================================================
  897. === Global attribute type declarations ===
  898. ====================================================================
  899. -->
  900. <xs:simpleType name="restriction-type">
  901. <xs:restriction base="xs:NMTOKEN">
  902. <xs:enumeration value="default"/>
  903. <xs:enumeration value="public"/>
  904. <xs:enumeration value="need-to-know"/>
  905. <xs:enumeration value="private"/>
  906. </xs:restriction>
  907. </xs:simpleType>
  908. <xs:simpleType name="severity-type">
  909. <xs:restriction base="xs:NMTOKEN">
  910. <xs:enumeration value="low"/>
  911. <xs:enumeration value="medium"/>
  912. <xs:enumeration value="high"/>
  913. </xs:restriction>
  914. </xs:simpleType>
  915. <xs:simpleType name="duration-type">
  916. <xs:restriction base="xs:NMTOKEN">
  917. <xs:enumeration value="second"/>
  918. <xs:enumeration value="minute"/>
  919. <xs:enumeration value="hour"/>
  920. <xs:enumeration value="day"/>
  921. <xs:enumeration value="month"/>
  922. <xs:enumeration value="quarter"/>
  923. <xs:enumeration value="year"/>
  924. <xs:enumeration value="ext-value"/>
  925. </xs:restriction>
  926. </xs:simpleType>
  927. <xs:simpleType name="action-type">
  928. <xs:restriction base="xs:NMTOKEN">
  929. <xs:enumeration value="nothing"/>
  930. <xs:enumeration value="contact-source-site"/>
  931. <xs:enumeration value="contact-target-site"/>
  932. <xs:enumeration value="contact-sender"/>
  933. <xs:enumeration value="investigate"/>
  934. <xs:enumeration value="block-host"/>
  935. <xs:enumeration value="block-network"/>
  936. <xs:enumeration value="block-port"/>
  937. <xs:enumeration value="rate-limit-host"/>
  938. <xs:enumeration value="rate-limit-network"/>
  939. <xs:enumeration value="rate-limit-port"/>
  940. <xs:enumeration value="remediate-other"/>
  941. <xs:enumeration value="status-triage"/>
  942. <xs:enumeration value="status-new-info"/>
  943. <xs:enumeration value="other"/>
  944. <xs:enumeration value="ext-value"/>
  945. </xs:restriction>
  946. </xs:simpleType>
  947. <xs:simpleType name="dtype-type">
  948. <xs:restriction base="xs:NMTOKEN">
  949. <xs:enumeration value="boolean"/>
  950. <xs:enumeration value="byte"/>
  951. <xs:enumeration value="character"/>
  952. <xs:enumeration value="date-time"/>
  953. <xs:enumeration value="integer"/>
  954. <xs:enumeration value="ntpstamp"/>
  955. <xs:enumeration value="portlist"/>
  956. <xs:enumeration value="real"/>
  957. <xs:enumeration value="string"/>
  958. <xs:enumeration value="file"/>
  959. <xs:enumeration value="path"/>
  960. <xs:enumeration value="frame"/>
  961. <xs:enumeration value="packet"/>
  962. <xs:enumeration value="ipv4-packet"/>
  963. <xs:enumeration value="ipv6-packet"/>
  964. <xs:enumeration value="url"/>
  965. <xs:enumeration value="csv"/>
  966. <xs:enumeration value="winreg"/>
  967. <xs:enumeration value="xml"/>
  968. <xs:enumeration value="ext-value"/>
  969. </xs:restriction>
  970. </xs:simpleType>
  971. </xs:schema>