<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<rfc ipr="trust200902" category="exp" docName="draft-daisuke-iodef-experiment-00.txt">
	<?rfc compact="yes"?>
	<?rfc subcompact="no"?>
	<?rfc toc="yes"?>
	<?rfc symrefs="yes"?>

	<front>
		<title>Knowledge obtained from the implementation experience of an IODEF-capable incident response management system</title>
		<author initials="D." surname="Miyamoto" fullname="Daisuke Miyamoto">
			<organization abbrev="UTokyo"> The University of Tokyo
			</organization>
			<address>
				<postal>
					<street>2-11-16 Yayoi Bunkyo-Ku</street>
					<city>113-8658 Tokyo</city>
					<country>Japan</country>
				</postal>
				<phone>+80 3 5841 0836</phone>
				<email>daisu-mi@nc.u-tokyo.ac.jp</email>
			</address>
		</author>
		<author initials="T." surname="Takahashi" fullname="Takeshi Takahashi">
			<organization abbrev="NICT"> National Institute of Information
				and
				Communications Technology
			</organization>
			<address>
				<postal>
					<street>4-2-1 Nukui-Kitamachi Koganei</street>
					<city>184-8795 Tokyo</city>
					<country>Japan</country>
				</postal>
				<phone>+80 423 27 5862</phone>
				<email>takeshi_takahashi@nict.go.jp</email>
			</address>
		</author>
		<date month='Feb' day='12' year='2014' />
		<area>Security</area>
		<workgroup>MILE Working Group</workgroup>
		<abstract>

			<t>
				This document explains our observation on the usability of <xref target='RFC5070'>IODEF</xref>,
				based on our experiments. We aim at developing an IODEF-capable incident response
				management systems in order to facilitate incident response activities.
				We started to design and implement the system for our university CERT, 
				however, there are several technical issues while implementing and 
				operating the system. This document shares the observation from our
				proto-type implementation and provides new sight from operational aspects.
			</t>
			<!-- formatted by specifications, including <xref target='CAPEC'>CAPEC&trade;</xref>, 
				<xref target='CEE'>CEE&trade;</xref>, <xref target='CPE'>CPE&trade;</xref>, 
				<xref target='CVE'>CVE&reg;</xref>, <xref target='CVRF'>CVRF</xref>, <xref 
				target='CVSS'>CVSS</xref>, <xref target='CWE'>CWE&trade;</xref>, <xref target='CWSS'>CWSS&trade;</xref>, 
				<xref target='OCIL'>OCIL</xref>, <xref target='OVAL'>OVAL&reg;</xref>, and 
				<xref target='XCCDF'>XCCDF</xref>.</t> -->
		</abstract>
	</front>

	<middle>

		<section title="Introduction" anchor="ext-intro">
			<t>
				The number of incidents in cyber society is growing day by day.
				Incident information needs to be reported, exchanged, and shared
				among organizations in order to cope with the situation. IODEF provides
				a scheme to describe and exchange incident response information among
				interested parties.
			</t>
			<t>
				For our university CERT, we decided to introduce an IODEF-capable 
				incident response management system to facilitate incident response
				activities. Our university has two types of CERT, namely, a central
				CERT and divisional CERTs. The former is a contact point for external
				organizations, and the latter is a CERT for each division in the university. 
				When the central CERT receives such information, it notifies the information to 
				the corresponding divisional CERT who has an accountability for decision and actions.
			</t>
			<t>
				Our old system employed emails for exchanging the information between the central and
				divisional CERTS, however, we started to employ machine-readable message in regard to
				the growing demand for automated incident response systems. For doing so, we attempted
				to implement an IODEF-capable incident response management system.
			</t>
			<t>
				In our implementation, we encountered problems while dealing with XML schema.
				To save the development cost, we employed code generators that build 
				class libraries for accessing values in IODEF elements. Due to the complexity of 
				IODEF message format defined in <xref target="RFC5070"/>, some 
				code generators could not understand its schema.
			</t>
			<t>
				We also found some operational problems as well as the implementation problem. 
				Most of the problems were on the choice of values for IODEF attributes and/or
				elemens. 
			</t>
			<t>
				This draft provides how we evade the implementation problem, and explores 
				the suitable value for XML element in regard to the incidents.
			</t>

		</section>

		<section title="Terminology" anchor="ext-terminology">
			<t>
				The terminology used in this document follows the one defined in
				<xref target="RFC5070"/>.
			</t>
			<t>
				The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
				"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
				document are to be interpreted as described in
				<xref target="RFC2119" />.
			</t>
		</section>

		<section title="Implementation" anchor="ext-implementation">
			<t>
				Since a code generator for XSD automatically develops useful libraries for accessing XML
				attributes and/or composing messages, we tested following generators to
				build the libraries from <xref target="RFC5070">RFC 5070</xref> .
			</t>
			<t>
				<list style="symbols">
					<t><xref target="XSD:Perl">XML::Pastor</xref> (Perl)</t>
					<t><xref target="XSD:Ruby">RXSD</xref> (Ruby) </t>
					<t><xref target="XSD:Python">PyXB</xref> (Python) </t>
					<t><xref target="XSD:Java">JAXB</xref> (Java) </t>
					<t><xref target="XSD:Cxx">CodeSynthesis XSD</xref> (C++) </t>
					<t><xref target="XSD:CS">Xsd.exe</xref> (C#) </t>
				</list>
			</t>
			<t>
				We thought we can use them to generate IODEF, but they cannot be easily used.
				For instance, we have used XML::Pastor, but it could not properly understand
				its schema due to the complexity of IODEF XSD. The same applies to RXSD and JAXB.
				Only PyXB, CodeSynthesis XSD and Xsd.exe were able to understand the schema.
			</t>
			<t>
				To cope with the situation, we have made a trick, which is not recommended, but
				is one option to go through the situation. That is, "XSD2XML2XSD", which means
				that XSD is converted to XML, and it is again converted to XSD.
				The resultant XSD was process-able by the all tools above.
			</t>
			<t>
				Nevertheless, the generated module was unworkable. This is due to the fact that
				IODEF uses '-' (hyphen) symbols in its classes or attributes, listed as follows.
			</t>
			<t>
				<list style="symbols">
					<t>
						IODEF-Document Class; it is the top level class in the IODEF data model
						described in section 3.1 of <xref target="RFC5070"/>.
					</t>
					<t>
						The vlan-name and vlan-num Attribute; according to section 3.16.2 of
						<xref target="RFC5070"/>, they are the name and number of Virtual LAN and are the
						attributes for Address class.
					</t>
					<t>
						Extending the Enumerated Values of Attribute; according to section 5.1
						of <xref target="RFC5070"/>, it is a extension techniques to add new enumerated values
						to an attribute, and has a prefix of "ext-", e.g., ext-value, ext-category,
						ext-type, and so on.
					</t>
				</list>
			</t>
			<t>
				According to the language specification, Perl classes and/or functions could not
				contain '-' symbols in their names. We replaced hyphens with '_' (underscore) symbols
				to evade this issue. Before outputting an IODEF format message, our system must
				manually replace these renamed characters in its serialization process. 
			</t>
			<t>
				Aside from the case of Perl, other language tend to evade using any hyphens 
				in its name space. PyXB and CodeSynthesis XSD automatically replaced hyphen 
				with underscore symbols, and JAXB and Xsd.exe simply removed hyphens.
				These tools also might output an exact IODEF message format through their
				serialization process. RXSD was similar to JAXB and Xsd.exe, replaced with 
				hyphens automatically, but did not support converting the renamed characters
				for outputting.
			</t>
		</section>

		<section title="Operational Issues" anchor="ext-operation">
			<t>
				This section explains some pitfalls while assigning values for IODEF-based
				XML elements. Mainly, our central CERT notifies the incident information 
				to the issued divisional CERT, and the divisional CERT reports the results
				of forensics. Based on this situation, we found several cases that we were 
				not sure about which attributes should be chosen.
			</t>

			<section title="type attribute @ Impact class">
				<t>
					Various incident classification exist. For instance, JPCERT proposes the
					following classification: phishing site, page hijack, malware propagation,
					scan, DoS/DDoS, and control systems. Nevertheless, it is hard to fit them
					into the type attribute of theimpact class.
				</t>
				<t>
					For example, phishing site, scan, and DoS/DDoS might be mapped as 
					"social-engineering", "recon", and "dos" attributes in respectively. 
					In the rest of cases, what the type of the attribute should we choose?
				</t>
			</section>

			<section title="category attribute @ NodeRole Class">
				<t>
					IODEF has category attribute for NodeRole class. Though various categories
					are described, they are not enough. For instance, we sometime report the category
					of "proxy server" in our daily CERT operation, but which one am we supposed to
					choose? How about web mail? Should we choose "www"? or "mail"?
				</t>
			</section>

			<section title="action attribute @ Expectation Class">
				<t>
					Assuming if the notifier sends a message with expecting to forensic for
					the issues, and the reporter answers the result of their forensics.
					In such cases, the notifiers would choose "investigation", but what 
					types of action attribute should the reporter choose?
					Should the reporter choose "nothing" ?
				</t>
				<t>
					When a notifier sends IODEF document, the report wishes to confirm it
					without asking any further actions. Then what values shall we choose?
				</t>
			</section>

<!--
			<section title="combination of purpose and action attribute">
				<t>
					While assining values for purpose and action fields, we also confused 
					to choose the values. For example. if the incident type was DoS, our
					CERT would attempt to detect the attack source; it composes such
					messages as follows.
				</t>
				<figure>
					<artwork><![CDATA[ <IODEF purpose="traceback">
	<Assessment>
		<Impact type="dos" completion="successed" />
	</Assessment>
	<Expectaction action="investigate">... ]]>
					</artwork>
				</figure>
				<t>
					It is naturally to assume that our CERT wants to block the 
					attack traffic in regarding to the proximity of the source.
					The messages is, 
				</t>
				<figure>
					<artwork><![CDATA[ <IODEF purpose="mitigate">
	<Assessment>
		<Impact type="dos" completion="successed" />
	</Assessment>
	<Expectaction action="block-host">... ]]>
					</artwork>
				</figure>
				<t>
					Here, we found that IODEF specificaiton allows to write
					such format.
				</t>
				<figure>
					<artwork><![CDATA[ <IODEF purpose="reporting">
	<Assessment>
		<Impact type="dos" completion="successed" />
	</Assessment>
	<Expectaction action="block-host">
]]>
					</artwork>
				</figure>
			</section>
-->

			 <section title="Potential information leakage">
				<t>
					The numbering of Incident ID needs to be considered. Otherwise, information,
					such as the number of incidents within certain period could be observed by
					document receivers. For instance, we could randomize the assignment of the numbers.
				</t>
			</section>

			<section title="Configuration of Nodes">
				<t>
					Node class can describe various information of the system, but the level of
					information granularity there is not defined. It could be that very detailed
					information is needed, or it could be the opposite. It has the field of the 
					software id and configid, but the formats for them are not specifically
					defined.
				</t>
				<t>
					It is natural to guess that we cannot define single, common level of information
					granularity. Depending on situation and operation, the needed level of information
					granularity differs.
				</t>
				<t>
					Thus one approach is using IODEF-SCI, which can choose arbitrary schema to describe
					the details of such information.
				</t>
			</section>
		</section>

		<section anchor="sec-security" title="Security Considerations">
			<t>
				This document raises no security issues itself. The potential 
				security issues are the vulnerabilities in the class libraries
				constructed by code generators.
			</t>
		</section>

		<section anchor="sec-iana" title="IANA Considerations">
			<t>
				This document contains no considerations for IANA.
			</t>
		</section>

		<section anchor="ext-conslusion" title="Conclusions">
			<t>
				The document explains the implemetation issue, the problems
				raised from code generation, and the operational issue,
				the problems while choosing the value in XML elements for
				IODEF format messages.
			</t>
		</section>

		<section anchor="ext-additional" title="Acknowledgements">
			<t>
				Many thanks for feedback from Tomohiro Ishihara for his comments.
				This work is materially supported by the Ministry of Internal Affairs
				and Communication, Japan, and by the European Union Seventh Framework
				Programme (FP7/2007-2013) under grant agreement No. 608533 (NECOMA).
			</t>
		</section>

	</middle>

	<back>
		<references title="Normative References">
			<?rfc include="reference.RFC.2119" ?>
			<?rfc include="reference.RFC.5070" ?>
		</references>
		<references title="Informative References">
			<reference anchor="XSD:Perl" target="http://search.cpan.org/~aulusoy/XML-Pastor-1.0.4/">
				<front>
					<title>XML::Pastor</title>
					<author initials="A." surname="Ulsoy" fullname="Ayhan Ulusoy" />
					<date year="" />
				</front>
			</reference>
			<reference anchor="XSD:Ruby" target="https://github.com/movitto/RXSD">
				<front>
					<title>RXSD - XSD / Ruby Translator</title>
					<author initials="M." surname="Morsi" fullname="Mohammed Morsi" />
					<date year="" />
				</front>
			</reference>
			<reference anchor="XSD:Python" target="https://pypi.python.org/pypi/PyXB">
				<front>
					<title>PyXB: Python XML Schema Bindings</title>
					<author initials="P." surname="Bigot" fullname="Peter A. Bigot" />
					<date year="" />
				</front>
			</reference>
			<reference anchor="XSD:Java" target="https://jaxb.java.net/">
				<front>
					<title>JAXB Reference Implementation</title>
					<author>
						<organization>Project Kenai</organization>
					</author>
					<date year="" />
				</front>
			</reference>
			<reference anchor="XSD:Cxx" target="http://www.codesynthesis.com/">
				<front>
					<title>XSD - XML Data Binding for C++</title>
					<author>
						<organization>CodeSynthesis</organization>
					</author>
					<date year="" />
				</front>
			</reference>
			<reference anchor="XSD:CS" target="http://www.codesynthesis.com/">
				<front>
					<title>XML Schema Definition Tool (Xsd.exe)</title>
					<author>
						<organization>Microsoft</organization>
					</author>
					<date year="" />
				</front>
			</reference>
		</references>
	</back>
</rfc>
