<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://elvis.hcw.ac.at/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=MLengl</id>
	<title>Elvis Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://elvis.hcw.ac.at/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=MLengl"/>
	<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php/Special:Contributions/MLengl"/>
	<updated>2026-09-10T15:34:19Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.5</generator>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Bleichenbacher_Attack&amp;diff=5608</id>
		<title>Bleichenbacher Attack</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Bleichenbacher_Attack&amp;diff=5608"/>
		<updated>2020-12-21T23:24:55Z</updated>

		<summary type="html">&lt;p&gt;MLengl: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Description == &lt;br /&gt;
&lt;br /&gt;
The popular RSA asymmetric encryption has a deterministic nature. Therefore PKCS was added to RSA which uses padding to remove this deterministic property and add two functionalities. This are the signature and the encryption of packets and each of those are indicated at the second MSB. Following is a picture of a valid PKCS 1.5 packet (bytes are displayed as hex):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:pkcs-paket.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this picture you see a 0 Byte as MSB followed by a &amp;quot;2&amp;quot; to indicate encryption. Following is the variable length random padding with at least 8 Byte, delimited by another 0 Byte. After this delimiter you find the data you want to send or like to receive. At the sender side this packet is now encrypted with RSA and on the receiver side the data is extracted after RSA decryption. This encryption and most important decryption is only successful if the validity of such a PKCS packet is given. Therefore decrypted data is checked upon the validity.&lt;br /&gt;
&lt;br /&gt;
Daniel Bleichenbacher published a method in 1998 called the &amp;quot;Bleichenbacher Attack&amp;quot; to use this validity check to decrypt a previous captured packet. An attacker therefore captures a packet sent from client to server and multiplies it with a number. This number can be chosen randomly and due to the fact, that the public key of the server previously used by the client is also available to the attacker, he or she is able to compute a new packet and send it to the target system. This system acts as an oracle and answers most likely with an error due to the invalid PKCS packet because of an unknown structure. For example there is no 0 as MSB after modifying this packet. After receiving the first answer, the attacker computes a new packet with another number and sends it again to the oracle. This procedure is now constantly repeated until no error message is answered. The attacker now knows that his comuted packet produced a decrypted packet between:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;020000000... &amp;lt;&amp;lt; 030000000...&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
By further continuing this procedure the attacker learns more intervals and can eventually derive the originally encrypted message. Because of the amount of messages that have to be sent, this attack also is called the &amp;quot;Million Message Attack&amp;quot;. In case of SSL encryption the RSA key exchange is using PKCS 1.5 to transmit the so called pre_master_secret. If an attacker can capture and decrypt this packet, he or she can read the entire transmitted data between this client and the server within this specific ssl session.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
There are  a couple things which are needed for an effective Bleichenbacher Attack. Basically this attack works with RSA PKCS 1.5 and the initial captured packet itself must be PKCS conform. But there is one main important requirement: a Bleichenbacher Oracle. &lt;br /&gt;
Such an oracle is a target system which answers repeated questions concerning the validity of an PKCS packet. To create such an oracle there are basically three ways:&lt;br /&gt;
&lt;br /&gt;
* Plain Encryption: if implementation is without signature, the target system will only check the validity of the PKCS packet and sending an error message if the packet is invalid&lt;br /&gt;
* Detailed Error Messages: if encryption and signature is applied, but the target system generates specific errors regarding the validity of an pkcs packet&lt;br /&gt;
*Timing Attack: if encryption and signature is applied in a proper way, you can still check the time between responses to generate a side channel regarding the validity of the packet&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Affected Products ==&lt;br /&gt;
There are many implementations that are vulnerable. The product list includes:&lt;br /&gt;
&lt;br /&gt;
* F5&lt;br /&gt;
* Citrix&lt;br /&gt;
* Cisco&lt;br /&gt;
* Java / JSSE&lt;br /&gt;
* IBM GSKit&lt;br /&gt;
* Bouncy Castle&lt;br /&gt;
* SSL 1.0 - 1.3&lt;br /&gt;
* TLS 1.0 - 1.2&lt;br /&gt;
&lt;br /&gt;
Implementations in TLS 1.1 and 1.2 may not be practicably vulnerable if implemented with the attack in mind. Due to the complexity of an correct implementation, this easily can be done wrong and there&#039;s still a side channel to generate an oracle. With TLS 1.3 RSA PKCS key exchange is fully dropped regarding the encryption.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://link.springer.com/content/pdf/10.1007/BFb0055716.pdf&lt;br /&gt;
* https://robotattack.ogr&lt;br /&gt;
* https://www.usenix.org/system/files/conference/usenixsecurity18/sec18-bock.pdf&lt;br /&gt;
* https://www.hjp.at/doc/rfc/rfc2313.html&lt;br /&gt;
&lt;br /&gt;
[[Category:Basic]]&lt;/div&gt;</summary>
		<author><name>MLengl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Bleichenbacher_Attack&amp;diff=5587</id>
		<title>Bleichenbacher Attack</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Bleichenbacher_Attack&amp;diff=5587"/>
		<updated>2020-12-21T20:40:07Z</updated>

		<summary type="html">&lt;p&gt;MLengl: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Description == &lt;br /&gt;
&lt;br /&gt;
The popular RSA asymmetric encryption has a deterministic nature. Therefore PKCS was added to RSA which uses padding to remove this deterministic property and add two functionalities. This are the signature and the encryption of packets and each of those are indicated at the second MSB. Following is a picture of a valid PKCS 1.5 packet (bytes are displayed as hex):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:pkcs-paket.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this picture you see a 0 Byte as MSB followed by a &amp;quot;2&amp;quot; to indicate encryption. Following is the variable length random padding with at least 8 Byte, delimited by another 0 Byte. After this delimiter you find the data you want to send or like to receive. At the sender side this packet is now encrypted with RSA and on the receiver side the data is extracted after RSA decryption. This encryption and most important decryption is only successful if the validity of such a PKCS packet is given. Therefore decrypted data is checked upon the validity.&lt;br /&gt;
&lt;br /&gt;
Daniel Bleichenbacher published a method in 1998 called the &amp;quot;Bleichenbacher Attack&amp;quot; to use this validity check to decrypt a previous captured packet. An attacker therefore captures a packet sent from client to server and multiplies it with a number. This number can be chosen randomly and due to the fact, that the public key of the server previously used by the client is also available to the attacker, he or she is able to compute a new packet and send it to the target system. This system acts as an oracle and answers most likely with an error due to the invalid PKCS packet because of an unknown structure. For example there is no 0 as MSB after modifying this packet. After receiving the first answer, the attacker computes a new packet with another number and sends it again to the oracle. This procedure is now constantly repeated until no error message is answered. The attacker now knows that his comuted packet produced a decrypted packet between:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;020000000... &amp;lt;&amp;lt; 030000000...&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
By further continuing this procedure the attacker learns more intervals and can eventually derive the originally encrypted message. Because of the amount of messages that have to be sent, this attack also is called the &amp;quot;Million Message Attack&amp;quot;. In case of SSL encryption the RSA key exchange is using PKCS 1.5 to transmit the so called pre_master_secret. If an attacker can capture and decrypt this packet, he or she can read the entire transmitted data between this client and the server within this specific ssl session.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
There are  a couple things which are needed for an effective Bleichenbacher Attack. Basically this attack works with RSA PKCS 1.5 and the initial captured packet itself must be PKCS conform. But there is one main important requirement: a Bleichenbacher Oracle. &lt;br /&gt;
Such an oracle is a target system which answers repeated questions concerning the validity of an PKCS packet. To create such an oracle there are basically three ways:&lt;br /&gt;
&lt;br /&gt;
* Plain Envryption: if implementation is without signature, the target system will only check the validity of the PKCS packet and sending an error message if the packet is invalid&lt;br /&gt;
* Detailed Error Messages: if encryption and signature is applied, but the target system generates specific eroors regarding the validity of an pkcs packet&lt;br /&gt;
*Timing Attack: if encryption and signature is applied in a proper way, you can still check the time between responses to generate a side channel regarding the validity of the packet&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Affected Products ==&lt;br /&gt;
There are many implementations that are vulnerable. The product list includes:&lt;br /&gt;
&lt;br /&gt;
* F5&lt;br /&gt;
* Citrix&lt;br /&gt;
* Cisco&lt;br /&gt;
* Java / JSSE&lt;br /&gt;
* IBM GSKit&lt;br /&gt;
* Bouncy Castle&lt;br /&gt;
* SSL 1.0 - 1.3&lt;br /&gt;
* TLS 1.0 - 1.2&lt;br /&gt;
&lt;br /&gt;
Implementations in TLS 1.1 and 1.2 may not be practicably vulnerable if implemented with the attack in mind. Due to the complexity of an correct implementation, this easily can be done wrong and there&#039;s still a side channel to generate an oracle. With TLS 1.3 RSA PKCS key exchange is fully dropped regarding the encryption.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://link.springer.com/content/pdf/10.1007/BFb0055716.pdf&lt;br /&gt;
* https://robotattack.ogr&lt;br /&gt;
* https://www.usenix.org/system/files/conference/usenixsecurity18/sec18-bock.pdf&lt;br /&gt;
* https://www.hjp.at/doc/rfc/rfc2313.html&lt;br /&gt;
&lt;br /&gt;
[[Category:Basic]]&lt;/div&gt;</summary>
		<author><name>MLengl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Bleichenbacher_Attack&amp;diff=5576</id>
		<title>Bleichenbacher Attack</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Bleichenbacher_Attack&amp;diff=5576"/>
		<updated>2020-12-21T20:17:25Z</updated>

		<summary type="html">&lt;p&gt;MLengl: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Description == &lt;br /&gt;
&lt;br /&gt;
The popular RSA asymmetric encryption has a deterministic nature. Therefore PKCS was added to RSA which uses padding to remove the deterministic and add two functionalities. This two are the signature and the encryption of packets and each of those are indicated at the second MSB. Following is a picture of a valid PKCS 1.5 packet (bytes are displayed as hex):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:pkcs-paket.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this picture you see a 0 Byte as MSB followed by a &amp;quot;2&amp;quot; to indicate encryption. Following is the variable length random padding with at least 8 Byte, delimited from another 0 Byte. After this delimiter you find the data you want to send or like to receive. At the sender side this paket is now encrypted with RSA and on the receiver side the data is extracted after RSA decryption. This encryption and most important decryption is only possible if the validity of such a PKCS packet is given. Therefore decrypted data is checked upon the validity.&lt;br /&gt;
&lt;br /&gt;
Daniel Bleichenbacher published a method in 1998 called the &amp;quot;Bleichenbacher Attack&amp;quot; to use this validity check to decrypt a previous packet. An attacker therefore captures a packet sent from client to server and multiplies it with a number. This number can be chosen randomly and due to the fact, that the public key of the server previously used by the client is also available to the attacker, he is able to compute a new packet and send it to the target system. This acts as an oracle and answers most likely with an error due to the invalid PKCS packet because of an unknown structure. For example there is no 0 as MSB. After receiving the first answer, the attacker computes a new packet with another number and sends it again to the oracle. This procedure is now constantly repeated until no error message is answered. The attacker now knows that his comuted packet produced a decrypted paket between:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;020000000... &amp;lt;&amp;lt; 030000000...&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
By further continuing this procedure the attacker learns more intervals and can eventually derive the originally encrypted message. Because of the amount of messages that have to be sent, this attack also is called the &amp;quot;Million Message Attack&amp;quot;. In case of SSL encryption the RSA key exchange is using PKCS 1.5  to transmit the so called pre_master_secret. If an attacker can capture and decrypt this packet, he or she can read the entire transmitted data between this client and the server within this ssl session.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
There are  a couple things which are needed for an effective Bleichenbacher Attack. Basically this attack works with RSA PKCS 1.5 but there is one important requirement: a Bleichenbacher Oracle. &lt;br /&gt;
Such an oracle is a target system which answers repeated questions concerning the validity of an PKCS paket. To create such an oracle there are basically three ways:&lt;br /&gt;
&lt;br /&gt;
* Plain Envryption: if implementation is without signature, the target system will only check the validity of the PKCS paket and sending an error message if the paket is invalid&lt;br /&gt;
* Detailed Error Messages: if encryption and signature is applied, but the target system generates specific eroors regarding the validity of an pkcs paket&lt;br /&gt;
*Timing Attack: if encryption and signature is applied in a proper way, you can still check the time between responses to generate a side channel regarding the validity of the paket&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Affected Products ==&lt;br /&gt;
There are many implementations that are vulnerable. The product list includes:&lt;br /&gt;
&lt;br /&gt;
* F5&lt;br /&gt;
* Citrix&lt;br /&gt;
* Cisco&lt;br /&gt;
* Java / JSSE&lt;br /&gt;
* IBM GSKit&lt;br /&gt;
* Bouncy Castle&lt;br /&gt;
* SSL 1.0 - 1.3&lt;br /&gt;
* TLS 1.0 - 1.2&lt;br /&gt;
&lt;br /&gt;
Implementations in TLS 1.1 and 1.2 may not be practicably vulnerable if implemented with the attack in mind. Due to the complexity of an correct implementation, this easily can be done wrong and there&#039;s still a side channel to generate an oracle. With TLS 1.3 PKCS key exchange is fully dropped regarding the encryption.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://link.springer.com/content/pdf/10.1007/BFb0055716.pdf&lt;br /&gt;
* https://robotattack.ogr&lt;br /&gt;
* https://www.usenix.org/system/files/conference/usenixsecurity18/sec18-bock.pdf&lt;br /&gt;
* https://www.hjp.at/doc/rfc/rfc2313.html&lt;br /&gt;
&lt;br /&gt;
[[Category:Basic]]&lt;/div&gt;</summary>
		<author><name>MLengl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Bleichenbacher_Attack&amp;diff=5575</id>
		<title>Bleichenbacher Attack</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Bleichenbacher_Attack&amp;diff=5575"/>
		<updated>2020-12-21T20:16:59Z</updated>

		<summary type="html">&lt;p&gt;MLengl: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Description == &lt;br /&gt;
&lt;br /&gt;
The popular RSA asymmetric encryption has a deterministic nature. Therefore PKCS was added to RSA which uses padding to remove the deterministic and add two functionalities. This two are the signature and the encryption of packets and each of those are indicated at the second MSB. Following is a picture of a valid PKCS 1.5 packet (bytes are displayed as hex):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:pkcs-paket.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this picture you see a 0 Byte as MSB followed by a &amp;quot;2&amp;quot; to indicate encryption. Following is the variable length random padding with at least 8 Byte, delimited from another 0 Byte. After this delimiter you find the data you want to send or like to receive. At the sender side this paket is now encrypted with RSA and on the receiver side the data is extracted after RSA decryption. This encryption and most important decryption is only possible if the validity of such a PKCS packet is given. Therefore decrypted data is checked upon the validity.&lt;br /&gt;
&lt;br /&gt;
Daniel Bleichenbacher published a method in 1998 called the &amp;quot;Bleichenbacher Attack&amp;quot; to use this validity check to decrypt a previous packet. An attacker therefore captures a packet sent from client to server and multiplies it with a number. This number can be chosen randomly and due to the fact, that the public key of the server previously used by the client is also available to the attacker, he is able to compute a new packet and send it to the target system. This acts as an oracle and answers most likely with an error due to the invalid PKCS packet because of an unknown structure. For example there is no 0 as MSB. After receiving the first answer, the attacker computes a new packet with another number and sends it again to the oracle. This procedure is now constantly repeated until no error message is answered. The attacker now knows that his comuted packet produced a decrypted paket between:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;020000000... &amp;lt;&amp;lt; 030000000...&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
By further continuing this procedure the attacker learns more intervals and can eventually derive the originally encrypted message. Because of the amount of messages that have to be sent, this attack also is called the &amp;quot;Million Message Attack&amp;quot;. In case of SSL encryption the RSA key exchange is using PKCS 1.5  to transmit the so called pre_master_secret. If an attacker can capture and decrypt this packet, he or she can read the entire transmitted data between this client and the server within this ssl session.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
There are  a couple things which are needed for an effective Bleichenbacher Attack. Basically this attack works with RSA PKCS 1.5 but there is one important requirement: a Bleichenbacher Oracle. &lt;br /&gt;
Such an oracle is a target system which answers repeated questions concerning the validity of an PKCS paket. To create such an oracle there are basically three ways:&lt;br /&gt;
&lt;br /&gt;
* Plain Envryption: if implementation is without signature, the target system will only check the validity of the PKCS paket and sending an error message if the paket is invalid&lt;br /&gt;
* Detailed Error Messages: if encryption and signature is applied, but the target system generates specific eroors regarding the validity of an pkcs paket&lt;br /&gt;
*Timing Attack: if encryption and signature is applied in a proper way, you can still check the time between responses to generate a side channel regarding the validity of the paket&lt;br /&gt;
&lt;br /&gt;
== Affected Products ==&lt;br /&gt;
There are many implementations that are vulnerable. The product list includes:&lt;br /&gt;
&lt;br /&gt;
* F5&lt;br /&gt;
* Citrix&lt;br /&gt;
* Cisco&lt;br /&gt;
* Java / JSSE&lt;br /&gt;
* IBM GSKit&lt;br /&gt;
* Bouncy Castle&lt;br /&gt;
* SSL 1.0 - 1.3&lt;br /&gt;
* TLS 1.0 - 1.2&lt;br /&gt;
&lt;br /&gt;
Implementations in TLS 1.1 and 1.2 may not be practicably vulnerable if implemented with the attack in mind. Due to the complexity of an correct implementation, this easily can be done wrong and there&#039;s still a side channel to generate an oracle. With TLS 1.3 PKCS key exchange is fully dropped regarding the encryption.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://link.springer.com/content/pdf/10.1007/BFb0055716.pdf&lt;br /&gt;
* https://robotattack.ogr&lt;br /&gt;
* https://www.usenix.org/system/files/conference/usenixsecurity18/sec18-bock.pdf&lt;br /&gt;
* https://www.hjp.at/doc/rfc/rfc2313.html&lt;br /&gt;
&lt;br /&gt;
[[Category:Basic]]&lt;/div&gt;</summary>
		<author><name>MLengl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Bleichenbacher_Attack&amp;diff=5567</id>
		<title>Bleichenbacher Attack</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Bleichenbacher_Attack&amp;diff=5567"/>
		<updated>2020-12-21T20:09:08Z</updated>

		<summary type="html">&lt;p&gt;MLengl: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Description == &lt;br /&gt;
&lt;br /&gt;
The popular RSA asymmetric encryption has a deterministic nature. Therefore PKCS was added to RSA which uses padding to remove the deterministic and add two functionalities. This two are the signature and the encryption of packets and each of those are indicated at the second MSB. Following is a picture of a valid PKCS 1.5 packet:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:pkcs-paket.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this picture you see a 0 Byte as MSB followed by a &amp;quot;2&amp;quot; to indicate encryption. Following is the variable length random padding with at least 8 Byte, delimited from another 0 Byte. After this delimiter you find the data you want to send or like to receive. At the sender side this paket is now encrypted with RSA and on the receiver side the data is extracted after RSA decryption. This encryption and most important decryption is only possible if the validity of such a PKCS packet is given. Therefore decrypted data is checked upon the validity.&lt;br /&gt;
&lt;br /&gt;
Daniel Bleichenbacher published a method in 1998 called the &amp;quot;Bleichenbacher Attack&amp;quot; to use this validity check to decrypt a previous packet. An attacker therefore captures a packet sent from client to server and multiplies it with a number. This number can be chosen randomly and due to the fact, that the public key of the server previously used by the client is also available to the attacker, he is able to compute a new packet and send it to the target system. This acts as an oracle and answers most likely with an error due to the invalid PKCS packet because of an unknown structure. For example there is no 0 as MSB. After receiving the first answer, the attacker computes a new packet with another number and sends it again to the oracle. This procedure is now constantly repeated until no error message is answered. The attacker now knows that his comuted packet produced a decrypted paket between:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;020000000... &amp;lt;&amp;lt; 030000000...&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
By further continuing this procedure the attacker learns more intervals and can eventually derive the originally encrypted message. Because of the amount of messages that have to be sent, this attack also is called the &amp;quot;Million Message Attack&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
There are  a couple things which are needed for an effective Bleichenbacher Attack. Basically this attack works with RSA PKCS 1.5 but there is one important requirement: a Bleichenbacher Oracle. &lt;br /&gt;
Such an oracle is a target system which answers repeated questions concerning the validity of an PKCS paket. To create such an oracle there are basically three ways:&lt;br /&gt;
&lt;br /&gt;
* Plain Envryption: if implementation is without signature, the target system will only check the validity of the PKCS paket and sending an error message if the paket is invalid&lt;br /&gt;
* Detailed Error Messages: if encryption and signature is applied, but the target system generates specific eroors regarding the validity of an pkcs paket&lt;br /&gt;
*Timing Attack: if encryption and signature is applied in a proper way, you can still check the time between responses to generate a side channel regarding the validity of the paket&lt;br /&gt;
&lt;br /&gt;
== Affected Products ==&lt;br /&gt;
There are many implementations that are vulnerable. The product list includes:&lt;br /&gt;
&lt;br /&gt;
* F5&lt;br /&gt;
* Citrix&lt;br /&gt;
* Cisco&lt;br /&gt;
* Java / JSSE&lt;br /&gt;
* IBM GSKit&lt;br /&gt;
* Bouncy Castle&lt;br /&gt;
* SSL 1.0 - 1.3&lt;br /&gt;
* TLS 1.0 - 1.2&lt;br /&gt;
&lt;br /&gt;
Implementations in TLS 1.1 and 1.2 may not be practicably vulnerable if implemented with the attack in mind. Due to the complexity of an correct implementation, this easily can be done wrong and there&#039;s still a side channel to generate an oracle. With TLS 1.3 PKCS key exchange is fully dropped regarding the encryption.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://link.springer.com/content/pdf/10.1007/BFb0055716.pdf&lt;br /&gt;
* https://robotattack.ogr&lt;br /&gt;
* https://www.usenix.org/system/files/conference/usenixsecurity18/sec18-bock.pdf&lt;br /&gt;
* https://www.hjp.at/doc/rfc/rfc2313.html&lt;br /&gt;
&lt;br /&gt;
[[Category:Basic]]&lt;/div&gt;</summary>
		<author><name>MLengl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Bleichenbacher_Attack&amp;diff=5546</id>
		<title>Bleichenbacher Attack</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Bleichenbacher_Attack&amp;diff=5546"/>
		<updated>2020-12-21T19:38:22Z</updated>

		<summary type="html">&lt;p&gt;MLengl: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Description == &lt;br /&gt;
&lt;br /&gt;
The popular RSA asymmetric encryption has a deterministic nature. Therefore PKCS was added to RSA which uses padding to remove the deterministic and add two functionalities. This two are the signature and the encryption of packets and each of those are indicated at the second MSB. Following is a picture of a valid PKCS 1.5 packet:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:pkcs-paket.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this picture you see a 0 Byte as MSB followed by a &amp;quot;2&amp;quot; to indicate encryption. Following is the variable padding with at least 8 Byte, delimited from another 0 Byte. &lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
There are  a couple things which are needed for an effective Bleichenbacher Attack. Basically this attack works with RSA PKCS 1.5 but there is one important requirement: a Bleichenbacher Oracle. &lt;br /&gt;
Such an oracle is a target system which answers repeated questions concerning the validity of an PKCS paket. To create such an oracle there are basically three ways:&lt;br /&gt;
* Plain Envryption: if implementation is without signature, the target system will only check the validity of the PKCS paket and sending an error message if the paket is invalid&lt;br /&gt;
* Detailed Error Messages: if encryption and signature is applied, but the target system generates specific eroors regarding the validity of an pkcs paket&lt;br /&gt;
*Timing Attack: if encryption and signature is applied in a proper way, you can still check the time between responses to generate a side channel regarding the validity of the paket&lt;br /&gt;
&lt;br /&gt;
== Affected Products ==&lt;br /&gt;
There are many implementations that are vulnerable. The product list includes:&lt;br /&gt;
&lt;br /&gt;
* F5&lt;br /&gt;
* Citrix&lt;br /&gt;
* Cisco&lt;br /&gt;
* Java / JSSE&lt;br /&gt;
* IBM GSKit&lt;br /&gt;
* Bouncy Castle&lt;br /&gt;
* SSL 1.0 - 1.3&lt;br /&gt;
* TLS 1.0 - 1.2&lt;br /&gt;
&lt;br /&gt;
Implementations in TLS 1.1 and 1.2 may not be practicably vulnerable if implemented with the attack in mind. Due to the complexity of an correct implementation, this easily can be done wrong and there&#039;s still a side channel to generate an oracle. With TLS 1.3 PKCS key exchange is fully dropped regarding the encryption.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://link.springer.com/content/pdf/10.1007/BFb0055716.pdf&lt;br /&gt;
* https://robotattack.ogr&lt;br /&gt;
* https://www.usenix.org/system/files/conference/usenixsecurity18/sec18-bock.pdf&lt;br /&gt;
* https://www.hjp.at/doc/rfc/rfc2313.html&lt;br /&gt;
&lt;br /&gt;
[[Category:Basic]]&lt;/div&gt;</summary>
		<author><name>MLengl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=File:Pkcs-paket.png&amp;diff=5544</id>
		<title>File:Pkcs-paket.png</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=File:Pkcs-paket.png&amp;diff=5544"/>
		<updated>2020-12-21T19:37:13Z</updated>

		<summary type="html">&lt;p&gt;MLengl: MLengl uploaded a new version of File:Pkcs-paket.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>MLengl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Bleichenbacher_Attack&amp;diff=5543</id>
		<title>Bleichenbacher Attack</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Bleichenbacher_Attack&amp;diff=5543"/>
		<updated>2020-12-21T19:36:31Z</updated>

		<summary type="html">&lt;p&gt;MLengl: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Description == &lt;br /&gt;
&lt;br /&gt;
The popular RSA asymmetric encryption has a deterministic nature. Therefore PKCS was added to RSA which uses padding to remove the deterministic and add two functionalities. This two are the signature and the encryption of packets and each of those are indicated at the second MSB. Following is a picture of a valid PKCS 1.5 packet:&lt;br /&gt;
[[File:pkcs-paket.png]]&lt;br /&gt;
In this picture you see a 0 Byte as MSB followed by a &amp;quot;2&amp;quot; to indicate encryption. Following is the variable padding with at least 8 Byte, delimited from another 0 Byte. &lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
There are  a couple things which are needed for an effective Bleichenbacher Attack. Basically this attack works with RSA PKCS 1.5 but there is one important requirement: a Bleichenbacher Oracle. &lt;br /&gt;
Such an oracle is a target system which answers repeated questions concerning the validity of an PKCS paket. To create such an oracle there are basically three ways:&lt;br /&gt;
* Plain Envryption: if implementation is without signature, the target system will only check the validity of the PKCS paket and sending an error message if the paket is invalid&lt;br /&gt;
* Detailed Error Messages: if encryption and signature is applied, but the target system generates specific eroors regarding the validity of an pkcs paket&lt;br /&gt;
*Timing Attack: if encryption and signature is applied in a proper way, you can still check the time between responses to generate a side channel regarding the validity of the paket&lt;br /&gt;
&lt;br /&gt;
== Affected Products ==&lt;br /&gt;
There are many implementations that are vulnerable. The product list includes:&lt;br /&gt;
&lt;br /&gt;
* F5&lt;br /&gt;
* Citrix&lt;br /&gt;
* Cisco&lt;br /&gt;
* Java / JSSE&lt;br /&gt;
* IBM GSKit&lt;br /&gt;
* Bouncy Castle&lt;br /&gt;
* SSL 1.0 - 1.3&lt;br /&gt;
* TLS 1.0 - 1.2&lt;br /&gt;
&lt;br /&gt;
Implementations in TLS 1.1 and 1.2 may not be practicably vulnerable if implemented with the attack in mind. Due to the complexity of an correct implementation, this easily can be done wrong and there&#039;s still a side channel to generate an oracle. With TLS 1.3 PKCS key exchange is fully dropped regarding the encryption.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://link.springer.com/content/pdf/10.1007/BFb0055716.pdf&lt;br /&gt;
* https://robotattack.ogr&lt;br /&gt;
* https://www.usenix.org/system/files/conference/usenixsecurity18/sec18-bock.pdf&lt;br /&gt;
* https://www.hjp.at/doc/rfc/rfc2313.html&lt;br /&gt;
&lt;br /&gt;
[[Category:Basic]]&lt;/div&gt;</summary>
		<author><name>MLengl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Bleichenbacher_Attack&amp;diff=5542</id>
		<title>Bleichenbacher Attack</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Bleichenbacher_Attack&amp;diff=5542"/>
		<updated>2020-12-21T19:30:51Z</updated>

		<summary type="html">&lt;p&gt;MLengl: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Description == &lt;br /&gt;
&lt;br /&gt;
The popular RSA asymmetric encryption has a deterministic nature. Therefore PKCS was added to RSA which uses padding to remove the deterministic and add two functionalities. This two are the signature and the encryption of packets and each of those are indicated at the second MSB. Following is a picture of a valid PKCS 1.5 packet:&lt;br /&gt;
[[File:pkcs-paket.png]]&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
There are  a couple things which are needed for an effective Bleichenbacher Attack. Basically this attack works with RSA PKCS 1.5 but there is one important requirement: a Bleichenbacher Oracle. &lt;br /&gt;
Such an oracle is a target system which answers repeated questions concerning the validity of an PKCS paket. To create such an oracle there are basically three ways:&lt;br /&gt;
* Plain Envryption: if implementation is without signature, the target system will only check the validity of the PKCS paket and sending an error message if the paket is invalid&lt;br /&gt;
* Detailed Error Messages: if encryption and signature is applied, but the target system generates specific eroors regarding the validity of an pkcs paket&lt;br /&gt;
*Timing Attack: if encryption and signature is applied in a proper way, you can still check the time between responses to generate a side channel regarding the validity of the paket&lt;br /&gt;
&lt;br /&gt;
== Affected Products ==&lt;br /&gt;
There are many implementations that are vulnerable. The product list includes:&lt;br /&gt;
&lt;br /&gt;
* F5&lt;br /&gt;
* Citrix&lt;br /&gt;
* Cisco&lt;br /&gt;
* Java / JSSE&lt;br /&gt;
* IBM GSKit&lt;br /&gt;
* Bouncy Castle&lt;br /&gt;
* SSL 1.0 - 1.3&lt;br /&gt;
* TLS 1.0 - 1.2&lt;br /&gt;
&lt;br /&gt;
Implementations in TLS 1.1 and 1.2 may not be practicably vulnerable if implemented with the attack in mind. Due to the complexity of an correct implementation, this easily can be done wrong and there&#039;s still a side channel to generate an oracle. With TLS 1.3 PKCS key exchange is fully dropped regarding the encryption.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://link.springer.com/content/pdf/10.1007/BFb0055716.pdf&lt;br /&gt;
* https://robotattack.ogr&lt;br /&gt;
* https://www.usenix.org/system/files/conference/usenixsecurity18/sec18-bock.pdf&lt;br /&gt;
* https://www.hjp.at/doc/rfc/rfc2313.html&lt;br /&gt;
&lt;br /&gt;
[[Category:Basic]]&lt;/div&gt;</summary>
		<author><name>MLengl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=File:Pkcs-paket.png&amp;diff=5541</id>
		<title>File:Pkcs-paket.png</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=File:Pkcs-paket.png&amp;diff=5541"/>
		<updated>2020-12-21T19:30:31Z</updated>

		<summary type="html">&lt;p&gt;MLengl: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>MLengl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Bleichenbacher_Attack&amp;diff=5540</id>
		<title>Bleichenbacher Attack</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Bleichenbacher_Attack&amp;diff=5540"/>
		<updated>2020-12-21T19:29:02Z</updated>

		<summary type="html">&lt;p&gt;MLengl: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Description == &lt;br /&gt;
&lt;br /&gt;
The popular RSA asymmetric encryption has a deterministic nature. Therefore PKCS was added to RSA which uses padding to remove the deterministic and add two functionalities. This two are the signature and the encryption of packets and each of those are indicated at the second MSB. Following is a picture of a valid PKCS 1.5 packet:&lt;br /&gt;
[[File:pkcs-paket.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
There are  a couple things which are needed for an effective Bleichenbacher Attack. Basically this attack works with RSA PKCS 1.5 but there is one important requirement: a Bleichenbacher Oracle. &lt;br /&gt;
Such an oracle is a target system which answers repeated questions concerning the validity of an PKCS paket. To create such an oracle there are basically three ways:&lt;br /&gt;
* Plain Envryption: if implementation is without signature, the target system will only check the validity of the PKCS paket and sending an error message if the paket is invalid&lt;br /&gt;
* Detailed Error Messages: if encryption and signature is applied, but the target system generates specific eroors regarding the validity of an pkcs paket&lt;br /&gt;
*Timing Attack: if encryption and signature is applied in a proper way, you can still check the time between responses to generate a side channel regarding the validity of the paket&lt;br /&gt;
&lt;br /&gt;
== Affected Products ==&lt;br /&gt;
There are many implementations that are vulnerable. The product list includes:&lt;br /&gt;
&lt;br /&gt;
* F5&lt;br /&gt;
* Citrix&lt;br /&gt;
* Cisco&lt;br /&gt;
* Java / JSSE&lt;br /&gt;
* IBM GSKit&lt;br /&gt;
* Bouncy Castle&lt;br /&gt;
* SSL 1.0 - 1.3&lt;br /&gt;
* TLS 1.0 - 1.2&lt;br /&gt;
&lt;br /&gt;
Implementations in TLS 1.1 and 1.2 may not be practicably vulnerable if implemented with the attack in mind. Due to the complexity of an correct implementation, this easily can be done wrong and there&#039;s still a side channel to generate an oracle. With TLS 1.3 PKCS key exchange is fully dropped regarding the encryption.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://link.springer.com/content/pdf/10.1007/BFb0055716.pdf&lt;br /&gt;
* https://robotattack.ogr&lt;br /&gt;
* https://www.usenix.org/system/files/conference/usenixsecurity18/sec18-bock.pdf&lt;br /&gt;
* https://www.hjp.at/doc/rfc/rfc2313.html&lt;br /&gt;
&lt;br /&gt;
[[Category:Basic]]&lt;/div&gt;</summary>
		<author><name>MLengl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Bleichenbacher_Attack&amp;diff=5526</id>
		<title>Bleichenbacher Attack</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Bleichenbacher_Attack&amp;diff=5526"/>
		<updated>2020-12-21T19:00:12Z</updated>

		<summary type="html">&lt;p&gt;MLengl: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Description == &lt;br /&gt;
&lt;br /&gt;
Description what this documentation is about&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
There are  a couple things which are needed for an effective Bleichenbacher Attack. Basically this attack works with RSA PKCS 1.5 but there is one important requirement: a Bleichenbacher Oracle. &lt;br /&gt;
Such an oracle is a target system which answers repeated questions concerning the validity of an PKCS paket. To create such an oracle there are basically three ways:&lt;br /&gt;
* Plain Envryption: if implementation is without signature, the target system will only check the validity of the PKCS paket and sending an error message if the paket is invalid&lt;br /&gt;
* Detailed Error Messages: if encryption and signature is applied, but the target system generates specific eroors regarding the validity of an pkcs paket&lt;br /&gt;
*Timing Attack: if encryption and signature is applied in a proper way, you can still check the time between responses to generate a side channel regarding the validity of the paket&lt;br /&gt;
&lt;br /&gt;
== Affected Products ==&lt;br /&gt;
There are many implementations that are vulnerable. The product list includes:&lt;br /&gt;
&lt;br /&gt;
* F5&lt;br /&gt;
* Citrix&lt;br /&gt;
* Cisco&lt;br /&gt;
* Java / JSSE&lt;br /&gt;
* IBM GSKit&lt;br /&gt;
* Bouncy Castle&lt;br /&gt;
* SSL 1.0 - 1.3&lt;br /&gt;
* TLS 1.0 - 1.2&lt;br /&gt;
&lt;br /&gt;
Implementations in TLS 1.1 and 1.2 may not be practicably vulnerable if implemented with the attack in mind. Due to the complexity of an correct implementation, this easily can be done wrong and there&#039;s still a side channel to generate an oracle. With TLS 1.3 PKCS key exchange is fully dropped regarding the encryption.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://link.springer.com/content/pdf/10.1007/BFb0055716.pdf&lt;br /&gt;
* https://robotattack.ogr&lt;br /&gt;
&lt;br /&gt;
[[Category:Basic]]&lt;/div&gt;</summary>
		<author><name>MLengl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Bleichenbacher_Attack&amp;diff=5513</id>
		<title>Bleichenbacher Attack</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Bleichenbacher_Attack&amp;diff=5513"/>
		<updated>2020-12-21T18:44:06Z</updated>

		<summary type="html">&lt;p&gt;MLengl: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Description == &lt;br /&gt;
&lt;br /&gt;
Description what this documentation is about&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
There are  a couple things which are needed for an effective Bleichenbacher Attack. Basically this attack works with RSA PKCS 1.5 but there is one important requirement: a Bleichenbacher Oracle. &lt;br /&gt;
Such an oracle is a target system which answers repeated questions concerning the validity of an PKCS paket. To create such an oracle there are basically three ways:&lt;br /&gt;
* Plain Envryption: if implementation is without signature, the target system will only check the validity of the PKCS paket and sending an error message if the paket is invalid&lt;br /&gt;
* Detailed Error Messages: if encryption and signature is applied, but the target system generates specific eroors regarding the validity of an pkcs paket&lt;br /&gt;
*Timing Attack: if encryption and signature is applied in a proper way, you can still check the time between responses to generate a side channel regarding the validity of the paket&lt;br /&gt;
&lt;br /&gt;
== Affected Protocols ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://link.springer.com/content/pdf/10.1007/BFb0055716.pdf&lt;br /&gt;
* https://robotattack.org&lt;br /&gt;
&lt;br /&gt;
[[Category:Basic]]&lt;/div&gt;</summary>
		<author><name>MLengl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Bleichenbacher_Attack&amp;diff=5341</id>
		<title>Bleichenbacher Attack</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Bleichenbacher_Attack&amp;diff=5341"/>
		<updated>2020-12-20T22:49:04Z</updated>

		<summary type="html">&lt;p&gt;MLengl: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Description == &lt;br /&gt;
&lt;br /&gt;
Description what this documentation is about&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
There are  a couple things which are needed for an effective Bleichenbacher Attack. Basically this attack works with RSA PKCS 1.5 but there is one important requirement: a Bleichenbacher Oracle. &lt;br /&gt;
Such an oracle answers repeated questions concerning the validity of an PKCS paket. To create such an oracle there are basically three ways:&lt;br /&gt;
* &lt;br /&gt;
&lt;br /&gt;
== Affected Protocols ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://link.springer.com/content/pdf/10.1007/BFb0055716.pdf&lt;br /&gt;
* https://robotattack.org&lt;br /&gt;
&lt;br /&gt;
[[Category:Basic]]&lt;/div&gt;</summary>
		<author><name>MLengl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Bleichenbacher_Attack&amp;diff=5338</id>
		<title>Bleichenbacher Attack</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Bleichenbacher_Attack&amp;diff=5338"/>
		<updated>2020-12-20T22:37:19Z</updated>

		<summary type="html">&lt;p&gt;MLengl: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Description == &lt;br /&gt;
&lt;br /&gt;
Description what this documentation is about&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
* Operating system: Ubuntu 18.04 bionic amd64&lt;br /&gt;
* Packages: git emacs&lt;br /&gt;
&lt;br /&gt;
In order to complete these steps, you must have followed [[Some Other Documentation]] before.&lt;br /&gt;
&lt;br /&gt;
== Affected Protocols ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://wikipedia.org&lt;br /&gt;
* https://google.com&lt;br /&gt;
&lt;br /&gt;
[[Category:Basic]]&lt;/div&gt;</summary>
		<author><name>MLengl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Category:Basics&amp;diff=5231</id>
		<title>Category:Basics</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Category:Basics&amp;diff=5231"/>
		<updated>2020-12-20T09:47:45Z</updated>

		<summary type="html">&lt;p&gt;MLengl: MLengl moved page Category:Basics to Bleichenbacher Attack over redirect: Move didn&amp;#039;t work, moving back to Documentations&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Bleichenbacher Attack]]&lt;/div&gt;</summary>
		<author><name>MLengl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Bleichenbacher_Attack&amp;diff=5230</id>
		<title>Bleichenbacher Attack</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Bleichenbacher_Attack&amp;diff=5230"/>
		<updated>2020-12-20T09:47:45Z</updated>

		<summary type="html">&lt;p&gt;MLengl: MLengl moved page Category:Basics to Bleichenbacher Attack over redirect: Move didn&amp;#039;t work, moving back to Documentations&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary == &lt;br /&gt;
&lt;br /&gt;
Description what this documentation is about&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
* Operating system: Ubuntu 18.04 bionic amd64&lt;br /&gt;
* Packages: git emacs&lt;br /&gt;
&lt;br /&gt;
In order to complete these steps, you must have followed [[Some Other Documentation]] before.&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
=== Step 1 ===&lt;br /&gt;
&lt;br /&gt;
Enter these commands in the shell&lt;br /&gt;
&lt;br /&gt;
 echo foo&lt;br /&gt;
 echo bar&lt;br /&gt;
&lt;br /&gt;
=== Step 2 ===&lt;br /&gt;
&lt;br /&gt;
Make sure to read&lt;br /&gt;
&lt;br /&gt;
* War and Peace&lt;br /&gt;
* Lord of the Rings&lt;br /&gt;
* The Baroque Cycle&lt;br /&gt;
&lt;br /&gt;
== Used Hardware ==&lt;br /&gt;
&lt;br /&gt;
[[Device to be used with this documentation]]&lt;br /&gt;
[[Maybe another device to be used with this documentation]]&lt;br /&gt;
&lt;br /&gt;
== Courses ==&lt;br /&gt;
&lt;br /&gt;
* [[A course where this documentation was used]] (2017, 2018)&lt;br /&gt;
* [[Another one]] (2018)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://wikipedia.org&lt;br /&gt;
* https://google.com&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>MLengl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Bleichenbacher_Attack&amp;diff=5228</id>
		<title>Bleichenbacher Attack</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Bleichenbacher_Attack&amp;diff=5228"/>
		<updated>2020-12-20T09:45:25Z</updated>

		<summary type="html">&lt;p&gt;MLengl: MLengl moved page Bleichenbacher Attack to Category:Basics: Cannot write into Basics, but can write to Documentations. Trying now to move Page to Basics Category&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary == &lt;br /&gt;
&lt;br /&gt;
Description what this documentation is about&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
* Operating system: Ubuntu 18.04 bionic amd64&lt;br /&gt;
* Packages: git emacs&lt;br /&gt;
&lt;br /&gt;
In order to complete these steps, you must have followed [[Some Other Documentation]] before.&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
=== Step 1 ===&lt;br /&gt;
&lt;br /&gt;
Enter these commands in the shell&lt;br /&gt;
&lt;br /&gt;
 echo foo&lt;br /&gt;
 echo bar&lt;br /&gt;
&lt;br /&gt;
=== Step 2 ===&lt;br /&gt;
&lt;br /&gt;
Make sure to read&lt;br /&gt;
&lt;br /&gt;
* War and Peace&lt;br /&gt;
* Lord of the Rings&lt;br /&gt;
* The Baroque Cycle&lt;br /&gt;
&lt;br /&gt;
== Used Hardware ==&lt;br /&gt;
&lt;br /&gt;
[[Device to be used with this documentation]]&lt;br /&gt;
[[Maybe another device to be used with this documentation]]&lt;br /&gt;
&lt;br /&gt;
== Courses ==&lt;br /&gt;
&lt;br /&gt;
* [[A course where this documentation was used]] (2017, 2018)&lt;br /&gt;
* [[Another one]] (2018)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://wikipedia.org&lt;br /&gt;
* https://google.com&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>MLengl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Bleichenbacher_Attack&amp;diff=5227</id>
		<title>Bleichenbacher Attack</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Bleichenbacher_Attack&amp;diff=5227"/>
		<updated>2020-12-20T09:39:20Z</updated>

		<summary type="html">&lt;p&gt;MLengl: Created page with &amp;quot;== Summary ==   Description what this documentation is about  == Requirements ==  * Operating system: Ubuntu 18.04 bionic amd64 * Packages: git emacs  In order to complete the...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary == &lt;br /&gt;
&lt;br /&gt;
Description what this documentation is about&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
* Operating system: Ubuntu 18.04 bionic amd64&lt;br /&gt;
* Packages: git emacs&lt;br /&gt;
&lt;br /&gt;
In order to complete these steps, you must have followed [[Some Other Documentation]] before.&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
=== Step 1 ===&lt;br /&gt;
&lt;br /&gt;
Enter these commands in the shell&lt;br /&gt;
&lt;br /&gt;
 echo foo&lt;br /&gt;
 echo bar&lt;br /&gt;
&lt;br /&gt;
=== Step 2 ===&lt;br /&gt;
&lt;br /&gt;
Make sure to read&lt;br /&gt;
&lt;br /&gt;
* War and Peace&lt;br /&gt;
* Lord of the Rings&lt;br /&gt;
* The Baroque Cycle&lt;br /&gt;
&lt;br /&gt;
== Used Hardware ==&lt;br /&gt;
&lt;br /&gt;
[[Device to be used with this documentation]]&lt;br /&gt;
[[Maybe another device to be used with this documentation]]&lt;br /&gt;
&lt;br /&gt;
== Courses ==&lt;br /&gt;
&lt;br /&gt;
* [[A course where this documentation was used]] (2017, 2018)&lt;br /&gt;
* [[Another one]] (2018)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://wikipedia.org&lt;br /&gt;
* https://google.com&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>MLengl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Install_c%27t%27-Raspion_on_Raspberry_PI&amp;diff=4105</id>
		<title>Install c&#039;t&#039;-Raspion on Raspberry PI</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Install_c%27t%27-Raspion_on_Raspberry_PI&amp;diff=4105"/>
		<updated>2020-06-03T19:43:45Z</updated>

		<summary type="html">&lt;p&gt;MLengl: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Requirements ==&lt;br /&gt;
* Raspberry PI with Raspbian OS&lt;br /&gt;
* Internet connection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
=== Step 1: System Update ===&lt;br /&gt;
&lt;br /&gt;
In the command line interface enter:&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade&lt;br /&gt;
&lt;br /&gt;
=== Step 2: Download ===&lt;br /&gt;
Download the latest version of Raspion:&lt;br /&gt;
&lt;br /&gt;
 wget ct.de/s/x5Pm -O raspion.zip &lt;br /&gt;
&lt;br /&gt;
=== Step 3: Installation ===&lt;br /&gt;
Unzip:&lt;br /&gt;
 unzip raspion.zip&lt;br /&gt;
&lt;br /&gt;
Install:&lt;br /&gt;
 cd raspion&lt;br /&gt;
 ./install.sh or bash install.sh&lt;br /&gt;
&lt;br /&gt;
[[File:Install_Raspion.png]]&lt;br /&gt;
&lt;br /&gt;
At the end of the installation there is the wifi name and password of the c&#039;t-Raspion.&lt;br /&gt;
&lt;br /&gt;
=== Launch c&#039;t-Raspion web interface ===&lt;br /&gt;
Atfer connecting to the wifi of the c&#039;t&#039;-Raspion go to http://&amp;lt;ip-address of your Raspberry-PI&amp;gt;:81&lt;br /&gt;
&lt;br /&gt;
[[File:Raspion_webinterface.png]]&lt;br /&gt;
&lt;br /&gt;
== Services of the c&#039;t-Raspion ==&lt;br /&gt;
&lt;br /&gt;
=== Pi-hole ===&lt;br /&gt;
Pi-hole shows DNS-Requests. They can also be blocked.&lt;br /&gt;
&lt;br /&gt;
=== ntopng ===&lt;br /&gt;
They include the&lt;br /&gt;
involved communication partners, the network protocol and information on duration and volume. ntopng does not show the contents of the packages. But it analyses the flows and provides information about which application is communicating, such as Skype, BitTorrent etc., and provides statistics.&lt;br /&gt;
&lt;br /&gt;
=== Wireshark ===&lt;br /&gt;
Wireshark offers a deeper analysis of the network traffic as ntopng.  The program allows recording and analyzing network traffic down to the last bit and can be operated via browser as a special feature of c&#039;t-Raspion. The recorded network traffic will be saved in pcap-files.&lt;br /&gt;
 &lt;br /&gt;
=== mitmproxy ===&lt;br /&gt;
The mitm-Proxy can loop into the communication between the local and remote devices by the c&#039;t-Raspion redirecting all access from the internal network on TCP ports 80 and 443 to the mitm-Proxy. It takes the redirected accesses to port&lt;br /&gt;
8080 towards. The redirection is handled by firewall rules, which  can be activated and deactivated as required by clicking in the c&#039;t-Raspion web interface.&lt;br /&gt;
&lt;br /&gt;
== Ikea Tradfri Setup Sniff ==&lt;br /&gt;
For testing purposes an iphone was cleaned as far as possible. All uninstalable services were erased and synchronization plans were deactivated.&lt;br /&gt;
However iphones are not that good for this kind of tests because after all cleaning there were still some connections to apple servers.&lt;br /&gt;
&lt;br /&gt;
To use pihole for capturing the dns queries of the Tradfri Gateway itself you may use an USB networkadapter or an external router as wifi bride. Otherwise you cannot use the Tradfri Gateway due to the lack of connection possibilities. As an workaround outside the Raspion software package classic arpspoofing was used.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Preliminary overview IP addressess:&lt;br /&gt;
&lt;br /&gt;
[[File:ip-config.png|900px]]&lt;br /&gt;
&lt;br /&gt;
Immediately after power on the app is sending dns requests to get ip addresses for fw.ota.homesmart.ikea.net. In the dns answer the ip&#039;s to d262cmbxmzphsu.cloudfront.net were included which is an address belonging to amazons aws.&lt;br /&gt;
&lt;br /&gt;
[[File:wireshark-cap1.png|700px]]&lt;br /&gt;
[[File:wireshark-cap2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
Also an http get request can be found:&lt;br /&gt;
[[File:wireshark-cap-http.png|600px]]&lt;br /&gt;
&lt;br /&gt;
The data from fw.ota.homesmart.ikea.net/feed/version_info.json are not that spectacular. As the name implies it only consists of version information.&lt;br /&gt;
&lt;br /&gt;
As soon as the Ikea Smart Home App starts the setup it tries to find a Tradfri Gateway with mDNS queries.&lt;br /&gt;
&lt;br /&gt;
[[File:wireshark-cap-mDNS.png|550px]]&lt;br /&gt;
&lt;br /&gt;
The mDNS queries are not forwarded through our pihole setup so this technique finding the Tradfri Gateway fails. The app itself provides another way to find the Tradfri Gateway by entering the ip address directly. After submitting the input the app finds the gateway and asks you to scan the QR code on the bottom side of the divce or to enter the security code which can be found near the QR code.&lt;br /&gt;
&lt;br /&gt;
The QR code contains the security code which is used as the pre shared key of the DTLS connection. As soon as the app gets the security code the app and the gateway are initiating the DTLS connection. All applicationdata is send over this encrypted connection.&lt;br /&gt;
&lt;br /&gt;
[[File:wireshark-cap-dtls.png|550px]]&lt;br /&gt;
&lt;br /&gt;
Same implies to connections of additional smart home devices: All data is sent over the encrypted connection.&lt;br /&gt;
&lt;br /&gt;
[[File:wireshark-cap-dtls-snap.png|550px]]&lt;br /&gt;
&lt;br /&gt;
As far as the initial setup goes there are only a few connections to the internet. This connections are all from app to some aws cloud addresses. It seems this is relating to the setup of a new device:&lt;br /&gt;
&lt;br /&gt;
[[File:wireshark-cap-aws.png|550px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Data Transmission when using TRADFRI ==&lt;br /&gt;
&lt;br /&gt;
The IKEA TRADFRI Gateway was connected via LAN cable while the mobile phone running the IKEA app was connected wirelessly to the same network.&lt;br /&gt;
Overview of IP addresses used:&lt;br /&gt;
&lt;br /&gt;
[[File:ip_overview_muzik.png|550px]]&lt;br /&gt;
&lt;br /&gt;
Wireshark was used to record the traffic (using arpspoof because the IKEA TRADFRI Gateway requires a LAN connection so it is not possible to just monitor the Raspion WiFi) which was then filtered.&lt;br /&gt;
&lt;br /&gt;
It turns out that TRADFRI is rather well-behaved when it comes to sending data.&lt;br /&gt;
&lt;br /&gt;
For the most part it uses encrypted (DTLS) communication internally between the Gateway and the mobile phone. To initially find the Gateway after opening the mobile app, an MDNS request is sent out via multicast (224.x.x.x).&lt;br /&gt;
&lt;br /&gt;
However, 2 external connections or destinations could also be found:&lt;br /&gt;
&lt;br /&gt;
* IP address 13.227.156.82 / privacypolicy.config.homesmart.ikea.net (as the url indicates, this has the current policy one has to agree to before using the app)&lt;br /&gt;
* IP address 13.227.156.50 / supportdetails.config.homesmart.ikea.net (this is where the secure certificates are located, apparently).&lt;br /&gt;
&lt;br /&gt;
=== Wireshark caps ===&lt;br /&gt;
privacypolicy.config.homesmart.ikea.net Client Hello:&lt;br /&gt;
&lt;br /&gt;
[[File:Ikea-privacy policy-clientHello.png|700px]]&lt;br /&gt;
&lt;br /&gt;
supportdetails.config.homesmart.ikea.net ServerHello:&lt;br /&gt;
&lt;br /&gt;
[[File:Ikea-supportdetails-serverHello.png|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Certificate Information ===&lt;br /&gt;
The Server Hello contains the information regarding the .cer and .crl:&lt;br /&gt;
 http://ocsp.rootca1.amazontrust.com&lt;br /&gt;
 http://crt.rootca1.amazontrust.com/rootca1.cer&lt;br /&gt;
 http://crl.rootca1.amazontrust.com/rootca1.crl&lt;br /&gt;
Starfield Technologies, Inc.; Starfield Services Root Certificate Authority&lt;br /&gt;
&lt;br /&gt;
Also:&lt;br /&gt;
 http://crl.sca1b.amazontrust.com/sca1b.crl&lt;br /&gt;
 http://ocsp.sca1b.amazontrust.com&lt;br /&gt;
 http://crt.sca1b.amazontrust.com/sca1b.crt &lt;br /&gt;
&lt;br /&gt;
That&#039;s pretty much it. We couldn&#039;t find any unwanted connections.&lt;br /&gt;
&lt;br /&gt;
The app also checks for updates for the used devices, this is also indicated in the app when it happens, so this is very transparent. It is indicated in the app when an update is happening or when the app is checking for new updates as can be seen in the screenshot below. If a device happens to be unavailable, e.g. because it is currently disconnected/turned off, then the app does not report back the current version but instead says the device is unreachable (&#039;Nicht erreichbar&#039;)&lt;br /&gt;
&lt;br /&gt;
[[File:Ikea-tradfri-update.png|360px]]&lt;br /&gt;
&lt;br /&gt;
== Kommunikation entschlüsseln ==&lt;br /&gt;
Bei diesem Versuch wird geschaut ob es möglich ist die Kommunikation, zwischen der IKEA App und dem IKEA Gateway mitzuhören. Nur mit einem Packet Sniffer ist dies nicht möglich, da die Kommunikation per DTLS verschlüsselt wird. Es kam zum Einsatz der MITM Proxy, welcher bei dem c’t-Raspion dabei ist.&lt;br /&gt;
&lt;br /&gt;
IP overview:&lt;br /&gt;
&lt;br /&gt;
[[File:mitm_findings.png|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Aufbau ===&lt;br /&gt;
[[File:mitm-top.png|800px]]&lt;br /&gt;
&lt;br /&gt;
Android kann als eine Virtuelle Maschine betrieben werden, oder es kann auch ein Smart Phone benutzt werden welches die IKEA Smarthome App installiert hat. Wenn es als Virtuelle Maschine betrieben wird, ist drauf zu achten, dass der Bridge Mode benutzt wird, da dann die VM eine eigene IP erhält. Dies hat den Vorteil, dass man nur den Traffic analysieren muss, welcher von Android erzeugt wird und nicht dem des Host Systems.&lt;br /&gt;
Um den MITM benutzten zu können, müssen die Zertifikaten zu dem Key-Store hinzugefügt werden. Dies kann getan werden in dem man die Website mitm.it ansurft. Ist man in dem richtigen Netzwerk sieht man folgendes Fenster.&lt;br /&gt;
&lt;br /&gt;
[[File:mitmproxy-cert.png|800px]]&lt;br /&gt;
&lt;br /&gt;
Hier wählt man das richtige Betriebssystem und lädt die Zertifikate herunter.&lt;br /&gt;
&lt;br /&gt;
Die offizielle Dokumentation findet man hier[https://docs.mitmproxy.org/stable/concepts-certificates/#quick-setup].&lt;br /&gt;
&lt;br /&gt;
=== Findings ===&lt;br /&gt;
Beim Starten der App kann man in Wireshark stehen, dass der Handshake für die DTLS Verbindung durchgeführt wird. &lt;br /&gt;
&lt;br /&gt;
[[File:wireshark-dtls.png]]&lt;br /&gt;
&lt;br /&gt;
Ebenso kann man beobachten, dass mehrere Verbindungen mit verschiedenen Servern nach draußen aufgebaut werden.&lt;br /&gt;
&lt;br /&gt;
[[File:wireshark-tls.png]]&lt;br /&gt;
&lt;br /&gt;
Die Nachrichten zu diesen Servern können durch den MITM entschlüsselt werden.&lt;br /&gt;
&lt;br /&gt;
[[File:mitm-sniff.png]]&lt;br /&gt;
&lt;br /&gt;
Beide Nachrichten beinhalten eine JSON-Datei. &lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;descriptionText&amp;quot;: &amp;quot;That’s why we have updated the terms and conditions. Please agree below in order to continue. You can find the updated legal information in Settings or you can read more below.&amp;quot;,&lt;br /&gt;
    &amp;quot;lastUpdatedTimestampCookie&amp;quot;: 1568799375000,&lt;br /&gt;
    &amp;quot;lastUpdatedTimestampPP&amp;quot;: 1568798738000,&lt;br /&gt;
    &amp;quot;lastUpdatedTimestampTnC&amp;quot;: 1568798786000,&lt;br /&gt;
    &amp;quot;titleText&amp;quot;: &amp;quot;We’ve changed the name of our app! &amp;quot;&lt;br /&gt;
}&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;versionCode&amp;quot;: &amp;quot;44&amp;quot;,&lt;br /&gt;
    &amp;quot;versionName&amp;quot;: &amp;quot;1.11.3&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Im debug log kann beobachtet werden, dass weitere TLS Verbindung aufgebaut werden jedoch nicht entschlüsselt werden können.&lt;br /&gt;
&lt;br /&gt;
	192.168.24.241:59332: Client Handshake failed. The client may not trust the proxy&#039;s certificate for data.logentries.com.&lt;br /&gt;
	192.168.24.241:59332: ClientHandshakeException(&#039;Cannot establish TLS with client (sni: data.logentries.com): TlsException(&amp;quot;(-1, \&#039;Unexpected EOF\&#039;)&amp;quot;)&#039;)&lt;br /&gt;
	::ffff:192.168.24.241:58971: serverdisconnect&lt;br /&gt;
	  -&amp;gt; (&#039;99.86.243.4&#039;, 443)&lt;br /&gt;
	192.168.24.241:59332: clientdisconnect&lt;br /&gt;
	::ffff:192.168.24.241:40204: serverdisconnect&lt;br /&gt;
	  -&amp;gt; (&#039;99.86.243.50&#039;, 443)&lt;br /&gt;
	192.168.24.241:58971: clientdisconnect&lt;br /&gt;
	192.168.24.241:40204: clientdisconnect&lt;br /&gt;
	192.168.24.241:41657: clientconnect&lt;br /&gt;
	::ffff:192.168.24.241:41657: Establish TLS with client&lt;br /&gt;
	192.168.24.241:50453: clientconnect&lt;br /&gt;
	::ffff:192.168.24.241:50453: serverconnect&lt;br /&gt;
	  -&amp;gt; (&#039;99.86.243.36&#039;, 443)&lt;br /&gt;
	192.168.24.241:42222: clientconnect&lt;br /&gt;
	::ffff:192.168.24.241:42222: serverconnect&lt;br /&gt;
	  -&amp;gt; (&#039;99.86.243.4&#039;, 443)&lt;br /&gt;
	::ffff:192.168.24.241:42222: Establish TLS with server&lt;br /&gt;
	::ffff:192.168.24.241:50453: Establish TLS with server&lt;br /&gt;
	::ffff:192.168.24.241:42222: ALPN selected by server: -&lt;br /&gt;
	::ffff:192.168.24.241:42222: Establish TLS with client&lt;br /&gt;
	::ffff:192.168.24.241:50453: ALPN selected by server: -&lt;br /&gt;
	::ffff:192.168.24.241:50453: Establish TLS with client&lt;br /&gt;
	::ffff:192.168.24.241:42222: ALPN for client: b&#039;http/1.1&#039;&lt;br /&gt;
	::ffff:192.168.24.241:50453: ALPN for client: b&#039;http/1.1&#039;&lt;br /&gt;
	::ffff:192.168.24.241:50453: request&lt;br /&gt;
	  -&amp;gt; Request(GET /US/en/getPolicyUpdate/?deviceType=android)&lt;br /&gt;
	::ffff:192.168.24.241:42222: request&lt;br /&gt;
	  -&amp;gt; Request(GET /AppDetails)&lt;br /&gt;
	::ffff:192.168.24.241:42222: response&lt;br /&gt;
	  -&amp;gt; Response(200 OK, application/json, 44b)&lt;br /&gt;
	::ffff:192.168.24.241:50453: response&lt;br /&gt;
	  -&amp;gt; Response(200 OK, application/json, 374b)&lt;br /&gt;
&lt;br /&gt;
Die DTLS Verbindung zwischen der App und dem Gateway, erscheint jedoch nicht in dem Log des MITM.&lt;/div&gt;</summary>
		<author><name>MLengl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Install_c%27t%27-Raspion_on_Raspberry_PI&amp;diff=4104</id>
		<title>Install c&#039;t&#039;-Raspion on Raspberry PI</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Install_c%27t%27-Raspion_on_Raspberry_PI&amp;diff=4104"/>
		<updated>2020-06-03T19:00:01Z</updated>

		<summary type="html">&lt;p&gt;MLengl: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Requirements ==&lt;br /&gt;
* Raspberry PI with Raspbian OS&lt;br /&gt;
* Internet connection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
=== Step 1: System Update ===&lt;br /&gt;
&lt;br /&gt;
In the command line interface enter:&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade&lt;br /&gt;
&lt;br /&gt;
=== Step 2: Download ===&lt;br /&gt;
Download the latest version of Raspion:&lt;br /&gt;
&lt;br /&gt;
 wget ct.de/s/x5Pm -O raspion.zip &lt;br /&gt;
&lt;br /&gt;
=== Step 3: Installation ===&lt;br /&gt;
Unzip:&lt;br /&gt;
 unzip raspion.zip&lt;br /&gt;
&lt;br /&gt;
Install:&lt;br /&gt;
 cd raspion&lt;br /&gt;
 ./install.sh or bash install.sh&lt;br /&gt;
&lt;br /&gt;
[[File:Install_Raspion.png]]&lt;br /&gt;
&lt;br /&gt;
At the end of the installation there is the wifi name and password of the c&#039;t-Raspion.&lt;br /&gt;
&lt;br /&gt;
=== Launch c&#039;t-Raspion web interface ===&lt;br /&gt;
Atfer connecting to the wifi of the c&#039;t&#039;-Raspion go to http://&amp;lt;ip-address of your Raspberry-PI&amp;gt;:81&lt;br /&gt;
&lt;br /&gt;
[[File:Raspion_webinterface.png]]&lt;br /&gt;
&lt;br /&gt;
== Services of the c&#039;t-Raspion ==&lt;br /&gt;
&lt;br /&gt;
=== Pi-hole ===&lt;br /&gt;
Pi-hole shows DNS-Requests. They can also be blocked.&lt;br /&gt;
&lt;br /&gt;
=== ntopng ===&lt;br /&gt;
They include the&lt;br /&gt;
involved communication partners, the network protocol and information on duration and volume. ntopng does not show the contents of the packages. But it analyses the flows and provides information about which application is communicating, such as Skype, BitTorrent etc., and provides statistics.&lt;br /&gt;
&lt;br /&gt;
=== Wireshark ===&lt;br /&gt;
Wireshark offers a deeper analysis of the network traffic as ntopng.  The program allows recording and analyzing network traffic down to the last bit and can be operated via browser as a special feature of c&#039;t-Raspion. The recorded network traffic will be saved in pcap-files.&lt;br /&gt;
 &lt;br /&gt;
=== mitmproxy ===&lt;br /&gt;
The mitm-Proxy can loop into the communication between the local and remote devices by the c&#039;t-Raspion redirecting all access from the internal network on TCP ports 80 and 443 to the mitm-Proxy. It takes the redirected accesses to port&lt;br /&gt;
8080 towards. The redirection is handled by firewall rules, which  can be activated and deactivated as required by clicking in the c&#039;t-Raspion web interface.&lt;br /&gt;
&lt;br /&gt;
== Ikea Tradfri Setup Sniff ==&lt;br /&gt;
For testing purposes an iphone was cleaned as far as possible. All uninstalable services were erased and synchronization plans were deactivated.&lt;br /&gt;
However iphones are not that good for this kind of tests because after all cleaning there were still some connections to apple servers.&lt;br /&gt;
&lt;br /&gt;
To use pihole for capturing the dns queries of the Tradfri Gateway itself you may use an USB networkadapter or an external router as wifi bride. Otherwise you cannot use the Tradfri Gateway due to the lack of connection possibilities. As an workaround outside the Raspion software package classic arpspoofing was used.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Preliminary overview IP addressess:&lt;br /&gt;
&lt;br /&gt;
[[File:ip-config.png|900px]]&lt;br /&gt;
&lt;br /&gt;
Immediately after power on the app is s&lt;br /&gt;
Direkt beim Einschalten (cap power_on_gateway) werden von der App einige DNS anfragen gestellt um IPs von fw.ota.homesmart.ikea.net zu erhalten. In den DNS Antworten sind ebenfalls IPs zu d262cmbxmzphsu.cloudfront.net enthalten. Ikea nutzt dabei AWS.&lt;br /&gt;
&lt;br /&gt;
[[File:wireshark-cap1.png|700px]]&lt;br /&gt;
[[File:wireshark-cap2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
Weiters findet man eine http Verbindung:&lt;br /&gt;
&lt;br /&gt;
[[File:wireshark-cap-http.png|600px]]&lt;br /&gt;
&lt;br /&gt;
Die unter fw.ota.homesmart.ikea.net/feed/version_info.json vorhandenen Daten sind nicht allzu spektakulär: Es sind lediglich Versionsinfos.&lt;br /&gt;
&lt;br /&gt;
Sobald über die Ikea Smart Home App das Setup gestarted wird versucht die App mit mDNS queries den Tradfri Gateway zu finden.&lt;br /&gt;
&lt;br /&gt;
[[File:wireshark-cap-mDNS.png|550px]]&lt;br /&gt;
&lt;br /&gt;
Bei dem verwendeten Setup schlägt dies natürlich fehl, jedoch bietet die App direkt die option eine IP manuell einzugeben. Nach Eingabe der IP muss entweder der QR Code auf der Rückseite des Gerätes gescannt werden oder der Sicherheitscode eingegeben werden der sich ebenfalls auf der Rückseite des Geräts befindet.&lt;br /&gt;
&lt;br /&gt;
Der Sicherheitscode ist dabei der PSK der DTLS Verbindung. Sobald der App der QR Code bzw der Sicherheitscode bekannt sind bauen App und Gateway eine DTLS Verbindung auf. Über diese Verbindung werden alle Applikationsdaten gesendet.&lt;br /&gt;
&lt;br /&gt;
[[File:wireshark-cap-dtls.png|550px]]&lt;br /&gt;
&lt;br /&gt;
Auch beim Verbinden von weiteren SH Geräten baut die App keine gesonderten Verbindung auf sondern kommuniziert ausschließlich über DTLS.&lt;br /&gt;
&lt;br /&gt;
[[File:wireshark-cap-dtls-snap.png|550px]]&lt;br /&gt;
&lt;br /&gt;
Einige Verbindungen zur AWS Cloud baut die App dennoch auf. Dies steht anscheinend im Zusammenhang mit dem Verbinden von Geräten da immer direkt nach dem Verbinden eines Gerätes diese Seiten abgefragt werden:&lt;br /&gt;
&lt;br /&gt;
[[File:wireshark-cap-aws.png|550px]]&lt;br /&gt;
&lt;br /&gt;
== Data Transmission when using TRADFRI ==&lt;br /&gt;
&lt;br /&gt;
The IKEA TRADFRI Gateway was connected via LAN cable while the mobile phone running the IKEA app was connected wirelessly to the same network.&lt;br /&gt;
Overview of IP addresses used:&lt;br /&gt;
&lt;br /&gt;
[[File:ip_overview_muzik.png|550px]]&lt;br /&gt;
&lt;br /&gt;
Wireshark was used to record the traffic (using arpspoof because the IKEA TRADFRI Gateway requires a LAN connection so it is not possible to just monitor the Raspion WiFi) which was then filtered.&lt;br /&gt;
&lt;br /&gt;
It turns out that TRADFRI is rather well-behaved when it comes to sending data.&lt;br /&gt;
&lt;br /&gt;
For the most part it uses encrypted (DTLS) communication internally between the Gateway and the mobile phone. To initially find the Gateway after opening the mobile app, an MDNS request is sent out via multicast (224.x.x.x).&lt;br /&gt;
&lt;br /&gt;
However, 2 external connections or destinations could also be found:&lt;br /&gt;
&lt;br /&gt;
* IP address 13.227.156.82 / privacypolicy.config.homesmart.ikea.net (as the url indicates, this has the current policy one has to agree to before using the app)&lt;br /&gt;
* IP address 13.227.156.50 / supportdetails.config.homesmart.ikea.net (this is where the secure certificates are located, apparently).&lt;br /&gt;
&lt;br /&gt;
=== Wireshark caps ===&lt;br /&gt;
privacypolicy.config.homesmart.ikea.net Client Hello:&lt;br /&gt;
&lt;br /&gt;
[[File:Ikea-privacy policy-clientHello.png|700px]]&lt;br /&gt;
&lt;br /&gt;
supportdetails.config.homesmart.ikea.net ServerHello:&lt;br /&gt;
&lt;br /&gt;
[[File:Ikea-supportdetails-serverHello.png|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Certificate Information ===&lt;br /&gt;
The Server Hello contains the information regarding the .cer and .crl:&lt;br /&gt;
 http://ocsp.rootca1.amazontrust.com&lt;br /&gt;
 http://crt.rootca1.amazontrust.com/rootca1.cer&lt;br /&gt;
 http://crl.rootca1.amazontrust.com/rootca1.crl&lt;br /&gt;
Starfield Technologies, Inc.; Starfield Services Root Certificate Authority&lt;br /&gt;
&lt;br /&gt;
Also:&lt;br /&gt;
 http://crl.sca1b.amazontrust.com/sca1b.crl&lt;br /&gt;
 http://ocsp.sca1b.amazontrust.com&lt;br /&gt;
 http://crt.sca1b.amazontrust.com/sca1b.crt &lt;br /&gt;
&lt;br /&gt;
That&#039;s pretty much it. We couldn&#039;t find any unwanted connections.&lt;br /&gt;
&lt;br /&gt;
The app also checks for updates for the used devices, this is also indicated in the app when it happens, so this is very transparent. It is indicated in the app when an update is happening or when the app is checking for new updates as can be seen in the screenshot below. If a device happens to be unavailable, e.g. because it is currently disconnected/turned off, then the app does not report back the current version but instead says the device is unreachable (&#039;Nicht erreichbar&#039;)&lt;br /&gt;
&lt;br /&gt;
[[File:Ikea-tradfri-update.png|360px]]&lt;br /&gt;
&lt;br /&gt;
== Kommunikation entschlüsseln ==&lt;br /&gt;
Bei diesem Versuch wird geschaut ob es möglich ist die Kommunikation, zwischen der IKEA App und dem IKEA Gateway mitzuhören. Nur mit einem Packet Sniffer ist dies nicht möglich, da die Kommunikation per DTLS verschlüsselt wird. Es kam zum Einsatz der MITM Proxy, welcher bei dem c’t-Raspion dabei ist.&lt;br /&gt;
&lt;br /&gt;
IP overview:&lt;br /&gt;
&lt;br /&gt;
[[File:mitm_findings.png|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Aufbau ===&lt;br /&gt;
[[File:mitm-top.png|800px]]&lt;br /&gt;
&lt;br /&gt;
Android kann als eine Virtuelle Maschine betrieben werden, oder es kann auch ein Smart Phone benutzt werden welches die IKEA Smarthome App installiert hat. Wenn es als Virtuelle Maschine betrieben wird, ist drauf zu achten, dass der Bridge Mode benutzt wird, da dann die VM eine eigene IP erhält. Dies hat den Vorteil, dass man nur den Traffic analysieren muss, welcher von Android erzeugt wird und nicht dem des Host Systems.&lt;br /&gt;
Um den MITM benutzten zu können, müssen die Zertifikaten zu dem Key-Store hinzugefügt werden. Dies kann getan werden in dem man die Website mitm.it ansurft. Ist man in dem richtigen Netzwerk sieht man folgendes Fenster.&lt;br /&gt;
&lt;br /&gt;
[[File:mitmproxy-cert.png|800px]]&lt;br /&gt;
&lt;br /&gt;
Hier wählt man das richtige Betriebssystem und lädt die Zertifikate herunter.&lt;br /&gt;
&lt;br /&gt;
Die offizielle Dokumentation findet man hier[https://docs.mitmproxy.org/stable/concepts-certificates/#quick-setup].&lt;br /&gt;
&lt;br /&gt;
=== Findings ===&lt;br /&gt;
Beim Starten der App kann man in Wireshark stehen, dass der Handshake für die DTLS Verbindung durchgeführt wird. &lt;br /&gt;
&lt;br /&gt;
[[File:wireshark-dtls.png]]&lt;br /&gt;
&lt;br /&gt;
Ebenso kann man beobachten, dass mehrere Verbindungen mit verschiedenen Servern nach draußen aufgebaut werden.&lt;br /&gt;
&lt;br /&gt;
[[File:wireshark-tls.png]]&lt;br /&gt;
&lt;br /&gt;
Die Nachrichten zu diesen Servern können durch den MITM entschlüsselt werden.&lt;br /&gt;
&lt;br /&gt;
[[File:mitm-sniff.png]]&lt;br /&gt;
&lt;br /&gt;
Beide Nachrichten beinhalten eine JSON-Datei. &lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;descriptionText&amp;quot;: &amp;quot;That’s why we have updated the terms and conditions. Please agree below in order to continue. You can find the updated legal information in Settings or you can read more below.&amp;quot;,&lt;br /&gt;
    &amp;quot;lastUpdatedTimestampCookie&amp;quot;: 1568799375000,&lt;br /&gt;
    &amp;quot;lastUpdatedTimestampPP&amp;quot;: 1568798738000,&lt;br /&gt;
    &amp;quot;lastUpdatedTimestampTnC&amp;quot;: 1568798786000,&lt;br /&gt;
    &amp;quot;titleText&amp;quot;: &amp;quot;We’ve changed the name of our app! &amp;quot;&lt;br /&gt;
}&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;versionCode&amp;quot;: &amp;quot;44&amp;quot;,&lt;br /&gt;
    &amp;quot;versionName&amp;quot;: &amp;quot;1.11.3&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Im debug log kann beobachtet werden, dass weitere TLS Verbindung aufgebaut werden jedoch nicht entschlüsselt werden können.&lt;br /&gt;
&lt;br /&gt;
	192.168.24.241:59332: Client Handshake failed. The client may not trust the proxy&#039;s certificate for data.logentries.com.&lt;br /&gt;
	192.168.24.241:59332: ClientHandshakeException(&#039;Cannot establish TLS with client (sni: data.logentries.com): TlsException(&amp;quot;(-1, \&#039;Unexpected EOF\&#039;)&amp;quot;)&#039;)&lt;br /&gt;
	::ffff:192.168.24.241:58971: serverdisconnect&lt;br /&gt;
	  -&amp;gt; (&#039;99.86.243.4&#039;, 443)&lt;br /&gt;
	192.168.24.241:59332: clientdisconnect&lt;br /&gt;
	::ffff:192.168.24.241:40204: serverdisconnect&lt;br /&gt;
	  -&amp;gt; (&#039;99.86.243.50&#039;, 443)&lt;br /&gt;
	192.168.24.241:58971: clientdisconnect&lt;br /&gt;
	192.168.24.241:40204: clientdisconnect&lt;br /&gt;
	192.168.24.241:41657: clientconnect&lt;br /&gt;
	::ffff:192.168.24.241:41657: Establish TLS with client&lt;br /&gt;
	192.168.24.241:50453: clientconnect&lt;br /&gt;
	::ffff:192.168.24.241:50453: serverconnect&lt;br /&gt;
	  -&amp;gt; (&#039;99.86.243.36&#039;, 443)&lt;br /&gt;
	192.168.24.241:42222: clientconnect&lt;br /&gt;
	::ffff:192.168.24.241:42222: serverconnect&lt;br /&gt;
	  -&amp;gt; (&#039;99.86.243.4&#039;, 443)&lt;br /&gt;
	::ffff:192.168.24.241:42222: Establish TLS with server&lt;br /&gt;
	::ffff:192.168.24.241:50453: Establish TLS with server&lt;br /&gt;
	::ffff:192.168.24.241:42222: ALPN selected by server: -&lt;br /&gt;
	::ffff:192.168.24.241:42222: Establish TLS with client&lt;br /&gt;
	::ffff:192.168.24.241:50453: ALPN selected by server: -&lt;br /&gt;
	::ffff:192.168.24.241:50453: Establish TLS with client&lt;br /&gt;
	::ffff:192.168.24.241:42222: ALPN for client: b&#039;http/1.1&#039;&lt;br /&gt;
	::ffff:192.168.24.241:50453: ALPN for client: b&#039;http/1.1&#039;&lt;br /&gt;
	::ffff:192.168.24.241:50453: request&lt;br /&gt;
	  -&amp;gt; Request(GET /US/en/getPolicyUpdate/?deviceType=android)&lt;br /&gt;
	::ffff:192.168.24.241:42222: request&lt;br /&gt;
	  -&amp;gt; Request(GET /AppDetails)&lt;br /&gt;
	::ffff:192.168.24.241:42222: response&lt;br /&gt;
	  -&amp;gt; Response(200 OK, application/json, 44b)&lt;br /&gt;
	::ffff:192.168.24.241:50453: response&lt;br /&gt;
	  -&amp;gt; Response(200 OK, application/json, 374b)&lt;br /&gt;
&lt;br /&gt;
Die DTLS Verbindung zwischen der App und dem Gateway, erscheint jedoch nicht in dem Log des MITM.&lt;/div&gt;</summary>
		<author><name>MLengl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Install_c%27t%27-Raspion_on_Raspberry_PI&amp;diff=4045</id>
		<title>Install c&#039;t&#039;-Raspion on Raspberry PI</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Install_c%27t%27-Raspion_on_Raspberry_PI&amp;diff=4045"/>
		<updated>2020-06-02T20:10:31Z</updated>

		<summary type="html">&lt;p&gt;MLengl: /* Ikea Tradfri Setup Sniff */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Requirements ==&lt;br /&gt;
* Raspberry PI with Raspbian OS&lt;br /&gt;
* Internet connection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
=== Step 1: System Update ===&lt;br /&gt;
&lt;br /&gt;
In the command line interface enter:&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade&lt;br /&gt;
&lt;br /&gt;
=== Step 2: Download ===&lt;br /&gt;
Download the latest version of Raspion:&lt;br /&gt;
&lt;br /&gt;
 wget ct.de/s/x5Pm -O raspion.zip &lt;br /&gt;
&lt;br /&gt;
=== Step 3: Installation ===&lt;br /&gt;
Unzip:&lt;br /&gt;
 unzip raspion.zip&lt;br /&gt;
&lt;br /&gt;
Install:&lt;br /&gt;
 cd raspion&lt;br /&gt;
 ./install.sh or bash install.sh&lt;br /&gt;
&lt;br /&gt;
[[File:Install_Raspion.png]]&lt;br /&gt;
&lt;br /&gt;
At the end of the installation there is the wifi name and password of the c&#039;t-Raspion.&lt;br /&gt;
&lt;br /&gt;
=== Launch c&#039;t-Raspion web interface ===&lt;br /&gt;
Atfer connecting to the wifi of the c&#039;t&#039;-Raspion go to http://&amp;lt;ip-address of your Raspberry-PI&amp;gt;:81&lt;br /&gt;
&lt;br /&gt;
[[File:Raspion_webinterface.png]]&lt;br /&gt;
&lt;br /&gt;
== Services of the c&#039;t-Raspion ==&lt;br /&gt;
&lt;br /&gt;
=== Pi-hole ===&lt;br /&gt;
Pi-hole shows DNS-Requests. They can also be blocked.&lt;br /&gt;
&lt;br /&gt;
=== ntopng ===&lt;br /&gt;
They include the&lt;br /&gt;
involved communication partners, the network protocol and information on duration and volume. ntopng does not show the contents of the packages. But it analyses the flows and provides information about which application is communicating, such as Skype, BitTorrent etc., and provides statistics.&lt;br /&gt;
&lt;br /&gt;
=== Wireshark ===&lt;br /&gt;
Wireshark offers a deeper analysis of the network traffic as ntopng.  The program allows recording and analyzing network traffic down to the last bit and can be operated via browser as a special feature of c&#039;t-Raspion. The recorded network traffic will be saved in pcap-files.&lt;br /&gt;
 &lt;br /&gt;
=== mitmproxy ===&lt;br /&gt;
The mitm-Proxy can loop into the communication between the local and remote devices by the c&#039;t-Raspion redirecting all access from the internal network on TCP ports 80 and 443 to the mitm-Proxy. It takes the redirected accesses to port&lt;br /&gt;
8080 towards. The redirection is handled by firewall rules, which  can be activated and deactivated as required by clicking in the c&#039;t-Raspion web interface.&lt;br /&gt;
&lt;br /&gt;
== Ikea Tradfri Setup Sniff ==&lt;br /&gt;
Als Testgerät wurde ein möglich leergeräumtes iPhone verwendet. Alle deinstallierbaren Services wurden entfernt, wo möglich Synchronisierung deaktiviert.&lt;br /&gt;
 Jedoch sind Apple geräte mäßig geeignet, es werden zu viele Verbindungen vom Betriebssystem hergestellt (auch von deaktivierten iOs Services). &lt;br /&gt;
&lt;br /&gt;
Um Pihole auch zur Aufzeichnung von DNS queries vom Tradfri Gateway zu nutzen muss eine USB Netzwerkadapter verwendet werden oder ein externer Router als WiFi Bridge konfiguriert werden. Ohne diese Hardwareänderungen lässt sich ein Tradfri Gateway nicht in das Raspion Netzwerk integrieren. Um dennoch Pakete mitschneiden zu können wurde arpspoofing verwendet.&lt;br /&gt;
&lt;br /&gt;
Vorab Übersicht IP config&lt;br /&gt;
&lt;br /&gt;
[[File:ip-config.png|900px]]&lt;br /&gt;
&lt;br /&gt;
Direkt beim Einschalten (cap power_on_gateway) werden von der App einige DNS anfragen gestellt um IPs von fw.ota.homesmart.ikea.net zu erhalten. In den DNS Antworten sind ebenfalls IPs zu d262cmbxmzphsu.cloudfront.net enthalten. Ikea nutzt dabei AWS.&lt;br /&gt;
&lt;br /&gt;
[[File:wireshark-cap1.png|700px]]&lt;br /&gt;
[[File:wireshark-cap2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
Weiters findet man eine http Verbindung:&lt;br /&gt;
&lt;br /&gt;
[[File:wireshark-cap-http.png|600px]]&lt;br /&gt;
&lt;br /&gt;
Die unter fw.ota.homesmart.ikea.net/feed/version_info.json vorhandenen Daten sind nicht allzu spektakulär: Es sind lediglich Versionsinfos.&lt;br /&gt;
&lt;br /&gt;
Sobald über die Ikea Smart Home App das Setup gestarted wird versucht die App mit mDNS queries den Tradfri Gateway zu finden.&lt;br /&gt;
&lt;br /&gt;
[[File:wireshark-cap-mDNS.png|550px]]&lt;br /&gt;
&lt;br /&gt;
Bei dem verwendeten Setup schlägt dies natürlich fehl, jedoch bietet die App direkt die option eine IP manuell einzugeben. Nach Eingabe der IP muss entweder der QR Code auf der Rückseite des Gerätes gescannt werden oder der Sicherheitscode eingegeben werden der sich ebenfalls auf der Rückseite des Geräts befindet.&lt;br /&gt;
&lt;br /&gt;
Der Sicherheitscode ist dabei der PSK der DTLS Verbindung. Sobald der App der QR Code bzw der Sicherheitscode bekannt sind bauen App und Gateway eine DTLS Verbindung auf. Über diese Verbindung werden alle Applikationsdaten gesendet.&lt;br /&gt;
&lt;br /&gt;
[[File:wireshark-cap-dtls.png|550px]]&lt;br /&gt;
&lt;br /&gt;
Auch beim Verbinden von weiteren SH Geräten baut die App keine gesonderten Verbindung auf sondern kommuniziert ausschließlich über DTLS.&lt;br /&gt;
&lt;br /&gt;
[[File:wireshark-cap-dtls-snap.png|550px]]&lt;br /&gt;
&lt;br /&gt;
Einige Verbindungen zur AWS Cloud baut die App dennoch auf. Dies steht anscheinend im Zusammenhang mit dem Verbinden von Geräten da immer direkt nach dem Verbinden eines Gerätes diese Seiten abgefragt werden:&lt;br /&gt;
&lt;br /&gt;
[[File:wireshark-cap-aws.png|550px]]&lt;br /&gt;
&lt;br /&gt;
== Data Transmission when using TRADFRI ==&lt;br /&gt;
&lt;br /&gt;
The IKEA TRADFRI Gateway was connected via LAN cable while the mobile phone running the IKEA app was connected wirelessly to the same network.&lt;br /&gt;
Overview of IP addresses used:&lt;br /&gt;
&lt;br /&gt;
[[File:ip_overview_muzik.png|550px]]&lt;br /&gt;
&lt;br /&gt;
Wireshark was used to record the traffic (using arpspoof because the IKEA TRADFRI Gateway requires a LAN connection so it is not possible to just monitor the Raspion WiFi) which was then filtered.&lt;br /&gt;
&lt;br /&gt;
It turns out that TRADFRI is rather well-behaved when it comes to sending data.&lt;br /&gt;
&lt;br /&gt;
For the most part it uses encrypted (DTLS) communication internally between the Gateway and the mobile phone. To initially find the Gateway after opening the mobile app, an MDNS request is sent out via multicast (224.x.x.x).&lt;br /&gt;
&lt;br /&gt;
However, 2 external connections or destinations could also be found:&lt;br /&gt;
&lt;br /&gt;
* IP address 13.227.156.82 / privacypolicy.config.homesmart.ikea.net (as the url indicates, this has the current policy one has to agree to before using the app)&lt;br /&gt;
* IP address 13.227.156.50 / supportdetails.config.homesmart.ikea.net (this is where the secure certificates are located, apparently).&lt;br /&gt;
&lt;br /&gt;
=== Wireshark caps ===&lt;br /&gt;
privacypolicy.config.homesmart.ikea.net Client Hello:&lt;br /&gt;
&lt;br /&gt;
[[File:Ikea-privacy policy-clientHello.png|700px]]&lt;br /&gt;
&lt;br /&gt;
supportdetails.config.homesmart.ikea.net ServerHello:&lt;br /&gt;
&lt;br /&gt;
[[File:Ikea-supportdetails-serverHello.png|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Certificate Information ===&lt;br /&gt;
The Server Hello contains the information regarding the .cer and .crl:&lt;br /&gt;
 http://ocsp.rootca1.amazontrust.com&lt;br /&gt;
 http://crt.rootca1.amazontrust.com/rootca1.cer&lt;br /&gt;
 http://crl.rootca1.amazontrust.com/rootca1.crl&lt;br /&gt;
Starfield Technologies, Inc.; Starfield Services Root Certificate Authority&lt;br /&gt;
&lt;br /&gt;
Also:&lt;br /&gt;
 http://crl.sca1b.amazontrust.com/sca1b.crl&lt;br /&gt;
 http://ocsp.sca1b.amazontrust.com&lt;br /&gt;
 http://crt.sca1b.amazontrust.com/sca1b.crt &lt;br /&gt;
&lt;br /&gt;
That&#039;s pretty much it. We couldn&#039;t find any unwanted connections.&lt;br /&gt;
&lt;br /&gt;
The app also checks for updates for the used devices, this is also indicated in the app when it happens, so this is very transparent. It is indicated in the app when an update is happening or when the app is checking for new updates as can be seen in the screenshot below. If a device happens to be unavailable, e.g. because it is currently disconnected/turned off, then the app does not report back the current version but instead says the device is unreachable (&#039;Nicht erreichbar&#039;)&lt;br /&gt;
&lt;br /&gt;
[[File:Ikea-tradfri-update.png|360px]]&lt;br /&gt;
&lt;br /&gt;
== Kommunikation entschlüsseln ==&lt;br /&gt;
Bei diesem Versuch wird geschaut ob es möglich ist die Kommunikation, zwischen der IKEA App und dem IKEA Gateway mitzuhören. Nur mit einem Packet Sniffer ist dies nicht möglich, da die Kommunikation per DTLS verschlüsselt wird. Es kam zum Einsatz der MITM Proxy, welcher bei dem c’t-Raspion dabei ist.&lt;br /&gt;
&lt;br /&gt;
IP overview:&lt;br /&gt;
&lt;br /&gt;
[[File:mitm_findings.png|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Aufbau ===&lt;br /&gt;
[[File:mitm-top.png|800px]]&lt;br /&gt;
&lt;br /&gt;
Android kann als eine Virtuelle Maschine betrieben werden, oder es kann auch ein Smart Phone benutzt werden welches die IKEA Smarthome App installiert hat. Wenn es als Virtuelle Maschine betrieben wird, ist drauf zu achten, dass der Bridge Mode benutzt wird, da dann die VM eine eigene IP erhält. Dies hat den Vorteil, dass man nur den Traffic analysieren muss, welcher von Android erzeugt wird und nicht dem des Host Systems.&lt;br /&gt;
Um den MITM benutzten zu können, müssen die Zertifikaten zu dem Key-Store hinzugefügt werden. Dies kann getan werden in dem man die Website mitm.it ansurft. Ist man in dem richtigen Netzwerk sieht man folgendes Fenster.&lt;br /&gt;
&lt;br /&gt;
[[File:mitmproxy-cert.png|800px]]&lt;br /&gt;
&lt;br /&gt;
Hier wählt man das richtige Betriebssystem und lädt die Zertifikate herunter.&lt;br /&gt;
&lt;br /&gt;
Die offizielle Dokumentation findet man hier[https://docs.mitmproxy.org/stable/concepts-certificates/#quick-setup].&lt;br /&gt;
&lt;br /&gt;
=== Findings ===&lt;br /&gt;
Beim Starten der App kann man in Wireshark stehen, dass der Handshake für die DTLS Verbindung durchgeführt wird. &lt;br /&gt;
&lt;br /&gt;
[[File:wireshark-dtls.png]]&lt;br /&gt;
&lt;br /&gt;
Ebenso kann man beobachten, dass mehrere Verbindungen mit verschiedenen Servern nach draußen aufgebaut werden.&lt;br /&gt;
&lt;br /&gt;
[[File:wireshark-tls.png]]&lt;br /&gt;
&lt;br /&gt;
Die Nachrichten zu diesen Servern können durch den MITM entschlüsselt werden.&lt;br /&gt;
&lt;br /&gt;
[[File:mitm-sniff.png]]&lt;br /&gt;
&lt;br /&gt;
Beide Nachrichten beinhalten eine JSON-Datei. &lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;descriptionText&amp;quot;: &amp;quot;That’s why we have updated the terms and conditions. Please agree below in order to continue. You can find the updated legal information in Settings or you can read more below.&amp;quot;,&lt;br /&gt;
    &amp;quot;lastUpdatedTimestampCookie&amp;quot;: 1568799375000,&lt;br /&gt;
    &amp;quot;lastUpdatedTimestampPP&amp;quot;: 1568798738000,&lt;br /&gt;
    &amp;quot;lastUpdatedTimestampTnC&amp;quot;: 1568798786000,&lt;br /&gt;
    &amp;quot;titleText&amp;quot;: &amp;quot;We’ve changed the name of our app! &amp;quot;&lt;br /&gt;
}&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;versionCode&amp;quot;: &amp;quot;44&amp;quot;,&lt;br /&gt;
    &amp;quot;versionName&amp;quot;: &amp;quot;1.11.3&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Im debug log kann beobachtet werden, dass weitere TLS Verbindung aufgebaut werden jedoch nicht entschlüsselt werden können.&lt;br /&gt;
&lt;br /&gt;
	192.168.24.241:59332: Client Handshake failed. The client may not trust the proxy&#039;s certificate for data.logentries.com.&lt;br /&gt;
	192.168.24.241:59332: ClientHandshakeException(&#039;Cannot establish TLS with client (sni: data.logentries.com): TlsException(&amp;quot;(-1, \&#039;Unexpected EOF\&#039;)&amp;quot;)&#039;)&lt;br /&gt;
	::ffff:192.168.24.241:58971: serverdisconnect&lt;br /&gt;
	  -&amp;gt; (&#039;99.86.243.4&#039;, 443)&lt;br /&gt;
	192.168.24.241:59332: clientdisconnect&lt;br /&gt;
	::ffff:192.168.24.241:40204: serverdisconnect&lt;br /&gt;
	  -&amp;gt; (&#039;99.86.243.50&#039;, 443)&lt;br /&gt;
	192.168.24.241:58971: clientdisconnect&lt;br /&gt;
	192.168.24.241:40204: clientdisconnect&lt;br /&gt;
	192.168.24.241:41657: clientconnect&lt;br /&gt;
	::ffff:192.168.24.241:41657: Establish TLS with client&lt;br /&gt;
	192.168.24.241:50453: clientconnect&lt;br /&gt;
	::ffff:192.168.24.241:50453: serverconnect&lt;br /&gt;
	  -&amp;gt; (&#039;99.86.243.36&#039;, 443)&lt;br /&gt;
	192.168.24.241:42222: clientconnect&lt;br /&gt;
	::ffff:192.168.24.241:42222: serverconnect&lt;br /&gt;
	  -&amp;gt; (&#039;99.86.243.4&#039;, 443)&lt;br /&gt;
	::ffff:192.168.24.241:42222: Establish TLS with server&lt;br /&gt;
	::ffff:192.168.24.241:50453: Establish TLS with server&lt;br /&gt;
	::ffff:192.168.24.241:42222: ALPN selected by server: -&lt;br /&gt;
	::ffff:192.168.24.241:42222: Establish TLS with client&lt;br /&gt;
	::ffff:192.168.24.241:50453: ALPN selected by server: -&lt;br /&gt;
	::ffff:192.168.24.241:50453: Establish TLS with client&lt;br /&gt;
	::ffff:192.168.24.241:42222: ALPN for client: b&#039;http/1.1&#039;&lt;br /&gt;
	::ffff:192.168.24.241:50453: ALPN for client: b&#039;http/1.1&#039;&lt;br /&gt;
	::ffff:192.168.24.241:50453: request&lt;br /&gt;
	  -&amp;gt; Request(GET /US/en/getPolicyUpdate/?deviceType=android)&lt;br /&gt;
	::ffff:192.168.24.241:42222: request&lt;br /&gt;
	  -&amp;gt; Request(GET /AppDetails)&lt;br /&gt;
	::ffff:192.168.24.241:42222: response&lt;br /&gt;
	  -&amp;gt; Response(200 OK, application/json, 44b)&lt;br /&gt;
	::ffff:192.168.24.241:50453: response&lt;br /&gt;
	  -&amp;gt; Response(200 OK, application/json, 374b)&lt;br /&gt;
&lt;br /&gt;
Die DTLS Verbindung zwischen der App und dem Gateway, erscheint jedoch nicht in dem Log des MITM.&lt;/div&gt;</summary>
		<author><name>MLengl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=File:Ip-config.png&amp;diff=4044</id>
		<title>File:Ip-config.png</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=File:Ip-config.png&amp;diff=4044"/>
		<updated>2020-06-02T20:09:53Z</updated>

		<summary type="html">&lt;p&gt;MLengl: MLengl uploaded a new version of File:Ip-config.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>MLengl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Install_c%27t%27-Raspion_on_Raspberry_PI&amp;diff=4043</id>
		<title>Install c&#039;t&#039;-Raspion on Raspberry PI</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Install_c%27t%27-Raspion_on_Raspberry_PI&amp;diff=4043"/>
		<updated>2020-06-02T20:03:14Z</updated>

		<summary type="html">&lt;p&gt;MLengl: /* Kommunikation entschlüsseln */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Requirements ==&lt;br /&gt;
* Raspberry PI with Raspbian OS&lt;br /&gt;
* Internet connection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
=== Step 1: System Update ===&lt;br /&gt;
&lt;br /&gt;
In the command line interface enter:&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade&lt;br /&gt;
&lt;br /&gt;
=== Step 2: Download ===&lt;br /&gt;
Download the latest version of Raspion:&lt;br /&gt;
&lt;br /&gt;
 wget ct.de/s/x5Pm -O raspion.zip &lt;br /&gt;
&lt;br /&gt;
=== Step 3: Installation ===&lt;br /&gt;
Unzip:&lt;br /&gt;
 unzip raspion.zip&lt;br /&gt;
&lt;br /&gt;
Install:&lt;br /&gt;
 cd raspion&lt;br /&gt;
 ./install.sh or bash install.sh&lt;br /&gt;
&lt;br /&gt;
[[File:Install_Raspion.png]]&lt;br /&gt;
&lt;br /&gt;
At the end of the installation there is the wifi name and password of the c&#039;t-Raspion.&lt;br /&gt;
&lt;br /&gt;
=== Launch c&#039;t-Raspion web interface ===&lt;br /&gt;
Atfer connecting to the wifi of the c&#039;t&#039;-Raspion go to http://&amp;lt;ip-address of your Raspberry-PI&amp;gt;:81&lt;br /&gt;
&lt;br /&gt;
[[File:Raspion_webinterface.png]]&lt;br /&gt;
&lt;br /&gt;
== Services of the c&#039;t-Raspion ==&lt;br /&gt;
&lt;br /&gt;
=== Pi-hole ===&lt;br /&gt;
Pi-hole shows DNS-Requests. They can also be blocked.&lt;br /&gt;
&lt;br /&gt;
=== ntopng ===&lt;br /&gt;
They include the&lt;br /&gt;
involved communication partners, the network protocol and information on duration and volume. ntopng does not show the contents of the packages. But it analyses the flows and provides information about which application is communicating, such as Skype, BitTorrent etc., and provides statistics.&lt;br /&gt;
&lt;br /&gt;
=== Wireshark ===&lt;br /&gt;
Wireshark offers a deeper analysis of the network traffic as ntopng.  The program allows recording and analyzing network traffic down to the last bit and can be operated via browser as a special feature of c&#039;t-Raspion. The recorded network traffic will be saved in pcap-files.&lt;br /&gt;
 &lt;br /&gt;
=== mitmproxy ===&lt;br /&gt;
The mitm-Proxy can loop into the communication between the local and remote devices by the c&#039;t-Raspion redirecting all access from the internal network on TCP ports 80 and 443 to the mitm-Proxy. It takes the redirected accesses to port&lt;br /&gt;
8080 towards. The redirection is handled by firewall rules, which  can be activated and deactivated as required by clicking in the c&#039;t-Raspion web interface.&lt;br /&gt;
&lt;br /&gt;
== Ikea Tradfri Setup Sniff ==&lt;br /&gt;
Als Testgerät wurde ein möglich leergeräumtes iPhone verwendet. Alle deinstallierbaren Services wurden entfernt, wo möglich Synchronisierung deaktiviert.&lt;br /&gt;
 Jedoch sind Apple geräte mäßig geeignet, es werden zu viele Verbindungen vom Betriebssystem hergestellt (auch von deaktivierten iOs Services). &lt;br /&gt;
&lt;br /&gt;
Um Pihole auch zur Aufzeichnung von DNS queries vom Tradfri Gateway zu nutzen muss eine USB Netzwerkadapter verwendet werden oder ein externer Router als WiFi Bridge konfiguriert werden. Ohne diese Hardwareänderungen lässt sich ein Tradfri Gateway nicht in das Raspion Netzwerk integrieren. Um dennoch Pakete mitschneiden zu können wurde arpspoofing verwendet.&lt;br /&gt;
&lt;br /&gt;
Vorab Übersicht IP config&lt;br /&gt;
&lt;br /&gt;
[[File:ip-config.png|800px]]&lt;br /&gt;
&lt;br /&gt;
Direkt beim Einschalten (cap power_on_gateway) werden von der App einige DNS anfragen gestellt um IPs von fw.ota.homesmart.ikea.net zu erhalten. In den DNS Antworten sind ebenfalls IPs zu d262cmbxmzphsu.cloudfront.net enthalten. Ikea nutzt dabei AWS.&lt;br /&gt;
&lt;br /&gt;
[[File:wireshark-cap1.png|700px]]&lt;br /&gt;
[[File:wireshark-cap2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
Weiters findet man eine http Verbindung:&lt;br /&gt;
&lt;br /&gt;
[[File:wireshark-cap-http.png|600px]]&lt;br /&gt;
&lt;br /&gt;
Die unter fw.ota.homesmart.ikea.net/feed/version_info.json vorhandenen Daten sind nicht allzu spektakulär: Es sind lediglich Versionsinfos.&lt;br /&gt;
&lt;br /&gt;
Sobald über die Ikea Smart Home App das Setup gestarted wird versucht die App mit mDNS queries den Tradfri Gateway zu finden.&lt;br /&gt;
&lt;br /&gt;
[[File:wireshark-cap-mDNS.png|550px]]&lt;br /&gt;
&lt;br /&gt;
Bei dem verwendeten Setup schlägt dies natürlich fehl, jedoch bietet die App direkt die option eine IP manuell einzugeben. Nach Eingabe der IP muss entweder der QR Code auf der Rückseite des Gerätes gescannt werden oder der Sicherheitscode eingegeben werden der sich ebenfalls auf der Rückseite des Geräts befindet.&lt;br /&gt;
&lt;br /&gt;
Der Sicherheitscode ist dabei der PSK der DTLS Verbindung. Sobald der App der QR Code bzw der Sicherheitscode bekannt sind bauen App und Gateway eine DTLS Verbindung auf. Über diese Verbindung werden alle Applikationsdaten gesendet.&lt;br /&gt;
&lt;br /&gt;
[[File:wireshark-cap-dtls.png|550px]]&lt;br /&gt;
&lt;br /&gt;
Auch beim Verbinden von weiteren SH Geräten baut die App keine gesonderten Verbindung auf sondern kommuniziert ausschließlich über DTLS.&lt;br /&gt;
&lt;br /&gt;
[[File:wireshark-cap-dtls-snap.png|550px]]&lt;br /&gt;
&lt;br /&gt;
Einige Verbindungen zur AWS Cloud baut die App dennoch auf. Dies steht anscheinend im Zusammenhang mit dem Verbinden von Geräten da immer direkt nach dem Verbinden eines Gerätes diese Seiten abgefragt werden:&lt;br /&gt;
&lt;br /&gt;
[[File:wireshark-cap-aws.png|550px]]&lt;br /&gt;
&lt;br /&gt;
== Data Transmission when using TRADFRI ==&lt;br /&gt;
&lt;br /&gt;
The IKEA TRADFRI Gateway was connected via LAN cable while the mobile phone running the IKEA app was connected wirelessly to the same network.&lt;br /&gt;
Overview of IP addresses used:&lt;br /&gt;
&lt;br /&gt;
[[File:ip_overview_muzik.png|550px]]&lt;br /&gt;
&lt;br /&gt;
Wireshark was used to record the traffic (using arpspoof because the IKEA TRADFRI Gateway requires a LAN connection so it is not possible to just monitor the Raspion WiFi) which was then filtered.&lt;br /&gt;
&lt;br /&gt;
It turns out that TRADFRI is rather well-behaved when it comes to sending data.&lt;br /&gt;
&lt;br /&gt;
For the most part it uses encrypted (DTLS) communication internally between the Gateway and the mobile phone. To initially find the Gateway after opening the mobile app, an MDNS request is sent out via multicast (224.x.x.x).&lt;br /&gt;
&lt;br /&gt;
However, 2 external connections or destinations could also be found:&lt;br /&gt;
&lt;br /&gt;
* IP address 13.227.156.82 / privacypolicy.config.homesmart.ikea.net (as the url indicates, this has the current policy one has to agree to before using the app)&lt;br /&gt;
* IP address 13.227.156.50 / supportdetails.config.homesmart.ikea.net (this is where the secure certificates are located, apparently).&lt;br /&gt;
&lt;br /&gt;
=== Wireshark caps ===&lt;br /&gt;
privacypolicy.config.homesmart.ikea.net Client Hello:&lt;br /&gt;
&lt;br /&gt;
[[File:Ikea-privacy policy-clientHello.png|700px]]&lt;br /&gt;
&lt;br /&gt;
supportdetails.config.homesmart.ikea.net ServerHello:&lt;br /&gt;
&lt;br /&gt;
[[File:Ikea-supportdetails-serverHello.png|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Certificate Information ===&lt;br /&gt;
The Server Hello contains the information regarding the .cer and .crl:&lt;br /&gt;
 http://ocsp.rootca1.amazontrust.com&lt;br /&gt;
 http://crt.rootca1.amazontrust.com/rootca1.cer&lt;br /&gt;
 http://crl.rootca1.amazontrust.com/rootca1.crl&lt;br /&gt;
Starfield Technologies, Inc.; Starfield Services Root Certificate Authority&lt;br /&gt;
&lt;br /&gt;
Also:&lt;br /&gt;
 http://crl.sca1b.amazontrust.com/sca1b.crl&lt;br /&gt;
 http://ocsp.sca1b.amazontrust.com&lt;br /&gt;
 http://crt.sca1b.amazontrust.com/sca1b.crt &lt;br /&gt;
&lt;br /&gt;
That&#039;s pretty much it. We couldn&#039;t find any unwanted connections.&lt;br /&gt;
&lt;br /&gt;
The app also checks for updates for the used devices, this is also indicated in the app when it happens, so this is very transparent. It is indicated in the app when an update is happening or when the app is checking for new updates as can be seen in the screenshot below. If a device happens to be unavailable, e.g. because it is currently disconnected/turned off, then the app does not report back the current version but instead says the device is unreachable (&#039;Nicht erreichbar&#039;)&lt;br /&gt;
&lt;br /&gt;
[[File:Ikea-tradfri-update.png|360px]]&lt;br /&gt;
&lt;br /&gt;
== Kommunikation entschlüsseln ==&lt;br /&gt;
Bei diesem Versuch wird geschaut ob es möglich ist die Kommunikation, zwischen der IKEA App und dem IKEA Gateway mitzuhören. Nur mit einem Packet Sniffer ist dies nicht möglich, da die Kommunikation per DTLS verschlüsselt wird. Es kam zum Einsatz der MITM Proxy, welcher bei dem c’t-Raspion dabei ist.&lt;br /&gt;
&lt;br /&gt;
IP overview:&lt;br /&gt;
&lt;br /&gt;
[[File:mitm_findings.png|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Aufbau ===&lt;br /&gt;
[[File:mitm-top.png|800px]]&lt;br /&gt;
&lt;br /&gt;
Android kann als eine Virtuelle Maschine betrieben werden, oder es kann auch ein Smart Phone benutzt werden welches die IKEA Smarthome App installiert hat. Wenn es als Virtuelle Maschine betrieben wird, ist drauf zu achten, dass der Bridge Mode benutzt wird, da dann die VM eine eigene IP erhält. Dies hat den Vorteil, dass man nur den Traffic analysieren muss, welcher von Android erzeugt wird und nicht dem des Host Systems.&lt;br /&gt;
Um den MITM benutzten zu können, müssen die Zertifikaten zu dem Key-Store hinzugefügt werden. Dies kann getan werden in dem man die Website mitm.it ansurft. Ist man in dem richtigen Netzwerk sieht man folgendes Fenster.&lt;br /&gt;
&lt;br /&gt;
[[File:mitmproxy-cert.png|800px]]&lt;br /&gt;
&lt;br /&gt;
Hier wählt man das richtige Betriebssystem und lädt die Zertifikate herunter.&lt;br /&gt;
&lt;br /&gt;
Die offizielle Dokumentation findet man hier[https://docs.mitmproxy.org/stable/concepts-certificates/#quick-setup].&lt;br /&gt;
&lt;br /&gt;
=== Findings ===&lt;br /&gt;
Beim Starten der App kann man in Wireshark stehen, dass der Handshake für die DTLS Verbindung durchgeführt wird. &lt;br /&gt;
&lt;br /&gt;
[[File:wireshark-dtls.png]]&lt;br /&gt;
&lt;br /&gt;
Ebenso kann man beobachten, dass mehrere Verbindungen mit verschiedenen Servern nach draußen aufgebaut werden.&lt;br /&gt;
&lt;br /&gt;
[[File:wireshark-tls.png]]&lt;br /&gt;
&lt;br /&gt;
Die Nachrichten zu diesen Servern können durch den MITM entschlüsselt werden.&lt;br /&gt;
&lt;br /&gt;
[[File:mitm-sniff.png]]&lt;br /&gt;
&lt;br /&gt;
Beide Nachrichten beinhalten eine JSON-Datei. &lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;descriptionText&amp;quot;: &amp;quot;That’s why we have updated the terms and conditions. Please agree below in order to continue. You can find the updated legal information in Settings or you can read more below.&amp;quot;,&lt;br /&gt;
    &amp;quot;lastUpdatedTimestampCookie&amp;quot;: 1568799375000,&lt;br /&gt;
    &amp;quot;lastUpdatedTimestampPP&amp;quot;: 1568798738000,&lt;br /&gt;
    &amp;quot;lastUpdatedTimestampTnC&amp;quot;: 1568798786000,&lt;br /&gt;
    &amp;quot;titleText&amp;quot;: &amp;quot;We’ve changed the name of our app! &amp;quot;&lt;br /&gt;
}&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;versionCode&amp;quot;: &amp;quot;44&amp;quot;,&lt;br /&gt;
    &amp;quot;versionName&amp;quot;: &amp;quot;1.11.3&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Im debug log kann beobachtet werden, dass weitere TLS Verbindung aufgebaut werden jedoch nicht entschlüsselt werden können.&lt;br /&gt;
&lt;br /&gt;
	192.168.24.241:59332: Client Handshake failed. The client may not trust the proxy&#039;s certificate for data.logentries.com.&lt;br /&gt;
	192.168.24.241:59332: ClientHandshakeException(&#039;Cannot establish TLS with client (sni: data.logentries.com): TlsException(&amp;quot;(-1, \&#039;Unexpected EOF\&#039;)&amp;quot;)&#039;)&lt;br /&gt;
	::ffff:192.168.24.241:58971: serverdisconnect&lt;br /&gt;
	  -&amp;gt; (&#039;99.86.243.4&#039;, 443)&lt;br /&gt;
	192.168.24.241:59332: clientdisconnect&lt;br /&gt;
	::ffff:192.168.24.241:40204: serverdisconnect&lt;br /&gt;
	  -&amp;gt; (&#039;99.86.243.50&#039;, 443)&lt;br /&gt;
	192.168.24.241:58971: clientdisconnect&lt;br /&gt;
	192.168.24.241:40204: clientdisconnect&lt;br /&gt;
	192.168.24.241:41657: clientconnect&lt;br /&gt;
	::ffff:192.168.24.241:41657: Establish TLS with client&lt;br /&gt;
	192.168.24.241:50453: clientconnect&lt;br /&gt;
	::ffff:192.168.24.241:50453: serverconnect&lt;br /&gt;
	  -&amp;gt; (&#039;99.86.243.36&#039;, 443)&lt;br /&gt;
	192.168.24.241:42222: clientconnect&lt;br /&gt;
	::ffff:192.168.24.241:42222: serverconnect&lt;br /&gt;
	  -&amp;gt; (&#039;99.86.243.4&#039;, 443)&lt;br /&gt;
	::ffff:192.168.24.241:42222: Establish TLS with server&lt;br /&gt;
	::ffff:192.168.24.241:50453: Establish TLS with server&lt;br /&gt;
	::ffff:192.168.24.241:42222: ALPN selected by server: -&lt;br /&gt;
	::ffff:192.168.24.241:42222: Establish TLS with client&lt;br /&gt;
	::ffff:192.168.24.241:50453: ALPN selected by server: -&lt;br /&gt;
	::ffff:192.168.24.241:50453: Establish TLS with client&lt;br /&gt;
	::ffff:192.168.24.241:42222: ALPN for client: b&#039;http/1.1&#039;&lt;br /&gt;
	::ffff:192.168.24.241:50453: ALPN for client: b&#039;http/1.1&#039;&lt;br /&gt;
	::ffff:192.168.24.241:50453: request&lt;br /&gt;
	  -&amp;gt; Request(GET /US/en/getPolicyUpdate/?deviceType=android)&lt;br /&gt;
	::ffff:192.168.24.241:42222: request&lt;br /&gt;
	  -&amp;gt; Request(GET /AppDetails)&lt;br /&gt;
	::ffff:192.168.24.241:42222: response&lt;br /&gt;
	  -&amp;gt; Response(200 OK, application/json, 44b)&lt;br /&gt;
	::ffff:192.168.24.241:50453: response&lt;br /&gt;
	  -&amp;gt; Response(200 OK, application/json, 374b)&lt;br /&gt;
&lt;br /&gt;
Die DTLS Verbindung zwischen der App und dem Gateway, erscheint jedoch nicht in dem Log des MITM.&lt;/div&gt;</summary>
		<author><name>MLengl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=File:Ip_overview_muzik.png&amp;diff=4042</id>
		<title>File:Ip overview muzik.png</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=File:Ip_overview_muzik.png&amp;diff=4042"/>
		<updated>2020-06-02T20:00:54Z</updated>

		<summary type="html">&lt;p&gt;MLengl: MLengl uploaded a new version of File:Ip overview muzik.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>MLengl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=File:Mitm_findings.png&amp;diff=4041</id>
		<title>File:Mitm findings.png</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=File:Mitm_findings.png&amp;diff=4041"/>
		<updated>2020-06-02T19:59:11Z</updated>

		<summary type="html">&lt;p&gt;MLengl: MLengl uploaded a new version of File:Mitm findings.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>MLengl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=File:Mitm_findings.png&amp;diff=4040</id>
		<title>File:Mitm findings.png</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=File:Mitm_findings.png&amp;diff=4040"/>
		<updated>2020-06-02T19:58:34Z</updated>

		<summary type="html">&lt;p&gt;MLengl: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>MLengl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Install_c%27t%27-Raspion_on_Raspberry_PI&amp;diff=4039</id>
		<title>Install c&#039;t&#039;-Raspion on Raspberry PI</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Install_c%27t%27-Raspion_on_Raspberry_PI&amp;diff=4039"/>
		<updated>2020-06-02T19:27:09Z</updated>

		<summary type="html">&lt;p&gt;MLengl: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Requirements ==&lt;br /&gt;
* Raspberry PI with Raspbian OS&lt;br /&gt;
* Internet connection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
=== Step 1: System Update ===&lt;br /&gt;
&lt;br /&gt;
In the command line interface enter:&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade&lt;br /&gt;
&lt;br /&gt;
=== Step 2: Download ===&lt;br /&gt;
Download the latest version of Raspion:&lt;br /&gt;
&lt;br /&gt;
 wget ct.de/s/x5Pm -O raspion.zip &lt;br /&gt;
&lt;br /&gt;
=== Step 3: Installation ===&lt;br /&gt;
Unzip:&lt;br /&gt;
 unzip raspion.zip&lt;br /&gt;
&lt;br /&gt;
Install:&lt;br /&gt;
 cd raspion&lt;br /&gt;
 ./install.sh or bash install.sh&lt;br /&gt;
&lt;br /&gt;
[[File:Install_Raspion.png]]&lt;br /&gt;
&lt;br /&gt;
At the end of the installation there is the wifi name and password of the c&#039;t-Raspion.&lt;br /&gt;
&lt;br /&gt;
=== Launch c&#039;t-Raspion web interface ===&lt;br /&gt;
Atfer connecting to the wifi of the c&#039;t&#039;-Raspion go to http://&amp;lt;ip-address of your Raspberry-PI&amp;gt;:81&lt;br /&gt;
&lt;br /&gt;
[[File:Raspion_webinterface.png]]&lt;br /&gt;
&lt;br /&gt;
== Services of the c&#039;t-Raspion ==&lt;br /&gt;
&lt;br /&gt;
=== Pi-hole ===&lt;br /&gt;
Pi-hole shows DNS-Requests. They can also be blocked.&lt;br /&gt;
&lt;br /&gt;
=== ntopng ===&lt;br /&gt;
They include the&lt;br /&gt;
involved communication partners, the network protocol and information on duration and volume. ntopng does not show the contents of the packages. But it analyses the flows and provides information about which application is communicating, such as Skype, BitTorrent etc., and provides statistics.&lt;br /&gt;
&lt;br /&gt;
=== Wireshark ===&lt;br /&gt;
Wireshark offers a deeper analysis of the network traffic as ntopng.  The program allows recording and analyzing network traffic down to the last bit and can be operated via browser as a special feature of c&#039;t-Raspion. The recorded network traffic will be saved in pcap-files.&lt;br /&gt;
 &lt;br /&gt;
=== mitmproxy ===&lt;br /&gt;
The mitm-Proxy can loop into the communication between the local and remote devices by the c&#039;t-Raspion redirecting all access from the internal network on TCP ports 80 and 443 to the mitm-Proxy. It takes the redirected accesses to port&lt;br /&gt;
8080 towards. The redirection is handled by firewall rules, which  can be activated and deactivated as required by clicking in the c&#039;t-Raspion web interface.&lt;br /&gt;
&lt;br /&gt;
== Ikea Tradfri Setup Sniff ==&lt;br /&gt;
Als Testgerät wurde ein möglich leergeräumtes iPhone verwendet. Alle deinstallierbaren Services wurden entfernt, wo möglich Synchronisierung deaktiviert.&lt;br /&gt;
 Jedoch sind Apple geräte mäßig geeignet, es werden zu viele Verbindungen vom Betriebssystem hergestellt (auch von deaktivierten iOs Services). &lt;br /&gt;
&lt;br /&gt;
Um Pihole auch zur Aufzeichnung von DNS queries vom Tradfri Gateway zu nutzen muss eine USB Netzwerkadapter verwendet werden oder ein externer Router als WiFi Bridge konfiguriert werden. Ohne diese Hardwareänderungen lässt sich ein Tradfri Gateway nicht in das Raspion Netzwerk integrieren. Um dennoch Pakete mitschneiden zu können wurde arpspoofing verwendet.&lt;br /&gt;
&lt;br /&gt;
Vorab Übersicht IP config&lt;br /&gt;
&lt;br /&gt;
[[File:ip-config.png|800px]]&lt;br /&gt;
&lt;br /&gt;
Direkt beim Einschalten (cap power_on_gateway) werden von der App einige DNS anfragen gestellt um IPs von fw.ota.homesmart.ikea.net zu erhalten. In den DNS Antworten sind ebenfalls IPs zu d262cmbxmzphsu.cloudfront.net enthalten. Ikea nutzt dabei AWS.&lt;br /&gt;
&lt;br /&gt;
[[File:wireshark-cap1.png|700px]]&lt;br /&gt;
[[File:wireshark-cap2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
Weiters findet man eine http Verbindung:&lt;br /&gt;
&lt;br /&gt;
[[File:wireshark-cap-http.png|600px]]&lt;br /&gt;
&lt;br /&gt;
Die unter fw.ota.homesmart.ikea.net/feed/version_info.json vorhandenen Daten sind nicht allzu spektakulär: Es sind lediglich Versionsinfos.&lt;br /&gt;
&lt;br /&gt;
Sobald über die Ikea Smart Home App das Setup gestarted wird versucht die App mit mDNS queries den Tradfri Gateway zu finden.&lt;br /&gt;
&lt;br /&gt;
[[File:wireshark-cap-mDNS.png|550px]]&lt;br /&gt;
&lt;br /&gt;
Bei dem verwendeten Setup schlägt dies natürlich fehl, jedoch bietet die App direkt die option eine IP manuell einzugeben. Nach Eingabe der IP muss entweder der QR Code auf der Rückseite des Gerätes gescannt werden oder der Sicherheitscode eingegeben werden der sich ebenfalls auf der Rückseite des Geräts befindet.&lt;br /&gt;
&lt;br /&gt;
Der Sicherheitscode ist dabei der PSK der DTLS Verbindung. Sobald der App der QR Code bzw der Sicherheitscode bekannt sind bauen App und Gateway eine DTLS Verbindung auf. Über diese Verbindung werden alle Applikationsdaten gesendet.&lt;br /&gt;
&lt;br /&gt;
[[File:wireshark-cap-dtls.png|550px]]&lt;br /&gt;
&lt;br /&gt;
Auch beim Verbinden von weiteren SH Geräten baut die App keine gesonderten Verbindung auf sondern kommuniziert ausschließlich über DTLS.&lt;br /&gt;
&lt;br /&gt;
[[File:wireshark-cap-dtls-snap.png|550px]]&lt;br /&gt;
&lt;br /&gt;
Einige Verbindungen zur AWS Cloud baut die App dennoch auf. Dies steht anscheinend im Zusammenhang mit dem Verbinden von Geräten da immer direkt nach dem Verbinden eines Gerätes diese Seiten abgefragt werden:&lt;br /&gt;
&lt;br /&gt;
[[File:wireshark-cap-aws.png|550px]]&lt;br /&gt;
&lt;br /&gt;
== Data Transmission when using TRADFRI ==&lt;br /&gt;
&lt;br /&gt;
The IKEA TRADFRI Gateway was connected via LAN cable while the mobile phone running the IKEA app was connected wirelessly to the same network.&lt;br /&gt;
Overview of IP addresses used:&lt;br /&gt;
&lt;br /&gt;
[[File:ip_overview_muzik.png|550px]]&lt;br /&gt;
&lt;br /&gt;
Wireshark was used to record the traffic (using arpspoof because the IKEA TRADFRI Gateway requires a LAN connection so it is not possible to just monitor the Raspion WiFi) which was then filtered.&lt;br /&gt;
&lt;br /&gt;
It turns out that TRADFRI is rather well-behaved when it comes to sending data.&lt;br /&gt;
&lt;br /&gt;
For the most part it uses encrypted (DTLS) communication internally between the Gateway and the mobile phone. To initially find the Gateway after opening the mobile app, an MDNS request is sent out via multicast (224.x.x.x).&lt;br /&gt;
&lt;br /&gt;
However, 2 external connections or destinations could also be found:&lt;br /&gt;
&lt;br /&gt;
* IP address 13.227.156.82 / privacypolicy.config.homesmart.ikea.net (as the url indicates, this has the current policy one has to agree to before using the app)&lt;br /&gt;
* IP address 13.227.156.50 / supportdetails.config.homesmart.ikea.net (this is where the secure certificates are located, apparently).&lt;br /&gt;
&lt;br /&gt;
=== Wireshark caps ===&lt;br /&gt;
privacypolicy.config.homesmart.ikea.net Client Hello:&lt;br /&gt;
&lt;br /&gt;
[[File:Ikea-privacy policy-clientHello.png|700px]]&lt;br /&gt;
&lt;br /&gt;
supportdetails.config.homesmart.ikea.net ServerHello:&lt;br /&gt;
&lt;br /&gt;
[[File:Ikea-supportdetails-serverHello.png|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Certificate Information ===&lt;br /&gt;
The Server Hello contains the information regarding the .cer and .crl:&lt;br /&gt;
 http://ocsp.rootca1.amazontrust.com&lt;br /&gt;
 http://crt.rootca1.amazontrust.com/rootca1.cer&lt;br /&gt;
 http://crl.rootca1.amazontrust.com/rootca1.crl&lt;br /&gt;
Starfield Technologies, Inc.; Starfield Services Root Certificate Authority&lt;br /&gt;
&lt;br /&gt;
Also:&lt;br /&gt;
 http://crl.sca1b.amazontrust.com/sca1b.crl&lt;br /&gt;
 http://ocsp.sca1b.amazontrust.com&lt;br /&gt;
 http://crt.sca1b.amazontrust.com/sca1b.crt &lt;br /&gt;
&lt;br /&gt;
That&#039;s pretty much it. We couldn&#039;t find any unwanted connections.&lt;br /&gt;
&lt;br /&gt;
The app also checks for updates for the used devices, this is also indicated in the app when it happens, so this is very transparent. It is indicated in the app when an update is happening or when the app is checking for new updates as can be seen in the screenshot below. If a device happens to be unavailable, e.g. because it is currently disconnected/turned off, then the app does not report back the current version but instead says the device is unreachable (&#039;Nicht erreichbar&#039;)&lt;br /&gt;
&lt;br /&gt;
[[File:Ikea-tradfri-update.png|360px]]&lt;br /&gt;
&lt;br /&gt;
== Kommunikation entschlüsseln ==&lt;br /&gt;
Bei diesem Versuch wird geschaut ob es möglich ist die Kommunikation, zwischen der IKEA App und dem IKEA Gateway mitzuhören. Nur mit einem Packet Sniffer ist dies nicht möglich, da die Kommunikation per DTLS verschlüsselt wird. Es kam zum Einsatz der MITM Proxy, welcher bei dem c’t-Raspion dabei ist.&lt;br /&gt;
&lt;br /&gt;
=== Aufbau ===&lt;br /&gt;
[[File:mitm-top.png|800px]]&lt;br /&gt;
&lt;br /&gt;
Android kann als eine Virtuelle Maschine betrieben werden, oder es kann auch ein Smart Phone benutzt werden welches die IKEA Smarthome App installiert hat. Wenn es als Virtuelle Maschine betrieben wird, ist drauf zu achten, dass der Bridge Mode benutzt wird, da dann die VM eine eigene IP erhält. Dies hat den Vorteil, dass man nur den Traffic analysieren muss, welcher von Android erzeugt wird und nicht dem des Host Systems.&lt;br /&gt;
Um den MITM benutzten zu können, müssen die Zertifikaten zu dem Key-Store hinzugefügt werden. Dies kann getan werden in dem man die Website mitm.it ansurft. Ist man in dem richtigen Netzwerk sieht man folgendes Fenster.&lt;br /&gt;
&lt;br /&gt;
[[File:mitmproxy-cert.png|800px]]&lt;br /&gt;
&lt;br /&gt;
Hier wählt man das richtige Betriebssystem und lädt die Zertifikate herunter.&lt;br /&gt;
&lt;br /&gt;
Die offizielle Dokumentation findet man hier[https://docs.mitmproxy.org/stable/concepts-certificates/#quick-setup].&lt;br /&gt;
&lt;br /&gt;
=== Findings ===&lt;br /&gt;
Beim Starten der App kann man in Wireshark stehen, dass der Handshake für die DTLS Verbindung durchgeführt wird. &lt;br /&gt;
&lt;br /&gt;
[[File:wireshark-dtls.png]]&lt;br /&gt;
&lt;br /&gt;
Ebenso kann man beobachten, dass mehrere Verbindungen mit verschiedenen Servern nach draußen aufgebaut werden.&lt;br /&gt;
&lt;br /&gt;
[[File:wireshark-tls.png]]&lt;br /&gt;
&lt;br /&gt;
Die Nachrichten zu diesen Servern können durch den MITM entschlüsselt werden.&lt;br /&gt;
&lt;br /&gt;
[[File:mitm-sniff.png]]&lt;br /&gt;
&lt;br /&gt;
Beide Nachrichten beinhalten eine JSON-Datei. &lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;descriptionText&amp;quot;: &amp;quot;That’s why we have updated the terms and conditions. Please agree below in order to continue. You can find the updated legal information in Settings or you can read more below.&amp;quot;,&lt;br /&gt;
    &amp;quot;lastUpdatedTimestampCookie&amp;quot;: 1568799375000,&lt;br /&gt;
    &amp;quot;lastUpdatedTimestampPP&amp;quot;: 1568798738000,&lt;br /&gt;
    &amp;quot;lastUpdatedTimestampTnC&amp;quot;: 1568798786000,&lt;br /&gt;
    &amp;quot;titleText&amp;quot;: &amp;quot;We’ve changed the name of our app! &amp;quot;&lt;br /&gt;
}&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;versionCode&amp;quot;: &amp;quot;44&amp;quot;,&lt;br /&gt;
    &amp;quot;versionName&amp;quot;: &amp;quot;1.11.3&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Im debug log kann beobachtet werden, dass weitere TLS Verbindung aufgebaut werden jedoch nicht entschlüsselt werden können.&lt;br /&gt;
&lt;br /&gt;
	192.168.24.241:59332: Client Handshake failed. The client may not trust the proxy&#039;s certificate for data.logentries.com.&lt;br /&gt;
	192.168.24.241:59332: ClientHandshakeException(&#039;Cannot establish TLS with client (sni: data.logentries.com): TlsException(&amp;quot;(-1, \&#039;Unexpected EOF\&#039;)&amp;quot;)&#039;)&lt;br /&gt;
	::ffff:192.168.24.241:58971: serverdisconnect&lt;br /&gt;
	  -&amp;gt; (&#039;99.86.243.4&#039;, 443)&lt;br /&gt;
	192.168.24.241:59332: clientdisconnect&lt;br /&gt;
	::ffff:192.168.24.241:40204: serverdisconnect&lt;br /&gt;
	  -&amp;gt; (&#039;99.86.243.50&#039;, 443)&lt;br /&gt;
	192.168.24.241:58971: clientdisconnect&lt;br /&gt;
	192.168.24.241:40204: clientdisconnect&lt;br /&gt;
	192.168.24.241:41657: clientconnect&lt;br /&gt;
	::ffff:192.168.24.241:41657: Establish TLS with client&lt;br /&gt;
	192.168.24.241:50453: clientconnect&lt;br /&gt;
	::ffff:192.168.24.241:50453: serverconnect&lt;br /&gt;
	  -&amp;gt; (&#039;99.86.243.36&#039;, 443)&lt;br /&gt;
	192.168.24.241:42222: clientconnect&lt;br /&gt;
	::ffff:192.168.24.241:42222: serverconnect&lt;br /&gt;
	  -&amp;gt; (&#039;99.86.243.4&#039;, 443)&lt;br /&gt;
	::ffff:192.168.24.241:42222: Establish TLS with server&lt;br /&gt;
	::ffff:192.168.24.241:50453: Establish TLS with server&lt;br /&gt;
	::ffff:192.168.24.241:42222: ALPN selected by server: -&lt;br /&gt;
	::ffff:192.168.24.241:42222: Establish TLS with client&lt;br /&gt;
	::ffff:192.168.24.241:50453: ALPN selected by server: -&lt;br /&gt;
	::ffff:192.168.24.241:50453: Establish TLS with client&lt;br /&gt;
	::ffff:192.168.24.241:42222: ALPN for client: b&#039;http/1.1&#039;&lt;br /&gt;
	::ffff:192.168.24.241:50453: ALPN for client: b&#039;http/1.1&#039;&lt;br /&gt;
	::ffff:192.168.24.241:50453: request&lt;br /&gt;
	  -&amp;gt; Request(GET /US/en/getPolicyUpdate/?deviceType=android)&lt;br /&gt;
	::ffff:192.168.24.241:42222: request&lt;br /&gt;
	  -&amp;gt; Request(GET /AppDetails)&lt;br /&gt;
	::ffff:192.168.24.241:42222: response&lt;br /&gt;
	  -&amp;gt; Response(200 OK, application/json, 44b)&lt;br /&gt;
	::ffff:192.168.24.241:50453: response&lt;br /&gt;
	  -&amp;gt; Response(200 OK, application/json, 374b)&lt;br /&gt;
&lt;br /&gt;
Die DTLS Verbindung zwischen der App und dem Gateway, erscheint jedoch nicht in dem Log des MITM.&lt;/div&gt;</summary>
		<author><name>MLengl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Install_c%27t%27-Raspion_on_Raspberry_PI&amp;diff=4038</id>
		<title>Install c&#039;t&#039;-Raspion on Raspberry PI</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Install_c%27t%27-Raspion_on_Raspberry_PI&amp;diff=4038"/>
		<updated>2020-06-02T19:26:23Z</updated>

		<summary type="html">&lt;p&gt;MLengl: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Requirements ==&lt;br /&gt;
* Raspberry PI with Raspbian OS&lt;br /&gt;
* Internet connection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
=== Step 1: System Update ===&lt;br /&gt;
&lt;br /&gt;
In the command line interface enter:&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade&lt;br /&gt;
&lt;br /&gt;
=== Step 2: Download ===&lt;br /&gt;
Download the latest version of Raspion:&lt;br /&gt;
&lt;br /&gt;
 wget ct.de/s/x5Pm -O raspion.zip &lt;br /&gt;
&lt;br /&gt;
=== Step 3: Installation ===&lt;br /&gt;
Unzip:&lt;br /&gt;
 unzip raspion.zip&lt;br /&gt;
&lt;br /&gt;
Install:&lt;br /&gt;
 cd raspion&lt;br /&gt;
 ./install.sh or bash install.sh&lt;br /&gt;
&lt;br /&gt;
[[File:Install_Raspion.png]]&lt;br /&gt;
&lt;br /&gt;
At the end of the installation there is the wifi name and password of the c&#039;t-Raspion.&lt;br /&gt;
&lt;br /&gt;
=== Launch c&#039;t-Raspion web interface ===&lt;br /&gt;
Atfer connecting to the wifi of the c&#039;t&#039;-Raspion go to http://&amp;lt;ip-address of your Raspberry-PI&amp;gt;:81&lt;br /&gt;
&lt;br /&gt;
[[File:Raspion_webinterface.png]]&lt;br /&gt;
&lt;br /&gt;
== Services of the c&#039;t-Raspion ==&lt;br /&gt;
&lt;br /&gt;
=== Pi-hole ===&lt;br /&gt;
Pi-hole shows DNS-Requests. They can also be blocked.&lt;br /&gt;
&lt;br /&gt;
=== ntopng ===&lt;br /&gt;
They include the&lt;br /&gt;
involved communication partners, the network protocol and information on duration and volume. ntopng does not show the contents of the packages. But it analyses the flows and provides information about which application is communicating, such as Skype, BitTorrent etc., and provides statistics.&lt;br /&gt;
&lt;br /&gt;
=== Wireshark ===&lt;br /&gt;
Wireshark offers a deeper analysis of the network traffic as ntopng.  The program allows recording and analyzing network traffic down to the last bit and can be operated via browser as a special feature of c&#039;t-Raspion. The recorded network traffic will be saved in pcap-files.&lt;br /&gt;
 &lt;br /&gt;
=== mitmproxy ===&lt;br /&gt;
The mitm-Proxy can loop into the communication between the local and remote devices by the c&#039;t-Raspion redirecting all access from the internal network on TCP ports 80 and 443 to the mitm-Proxy. It takes the redirected accesses to port&lt;br /&gt;
8080 towards. The redirection is handled by firewall rules, which  can be activated and deactivated as required by clicking in the c&#039;t-Raspion web interface.&lt;br /&gt;
&lt;br /&gt;
== Ikea Tradfri Setup Sniff ==&lt;br /&gt;
Als Testgerät wurde ein möglich leergeräumtes iPhone verwendet. Alle deinstallierbaren Services wurden entfernt, wo möglich Synchronisierung deaktiviert.&lt;br /&gt;
 Jedoch sind Apple geräte mäßig geeignet, es werden zu viele Verbindungen vom Betriebssystem hergestellt (auch von deaktivierten iOs Services). &lt;br /&gt;
&lt;br /&gt;
Um Pihole auch zur Aufzeichnung von DNS queries vom Tradfri Gateway zu nutzen muss eine USB Netzwerkadapter verwendet werden oder ein externer Router als WiFi Bridge konfiguriert werden. Ohne diese Hardwareänderungen lässt sich ein Tradfri Gateway nicht in das Raspion Netzwerk integrieren. Um dennoch Pakete mitschneiden zu können wurde arpspoofing verwendet.&lt;br /&gt;
&lt;br /&gt;
Vorab Übersicht IP config&lt;br /&gt;
&lt;br /&gt;
[[File:ip-config.png|800px]]&lt;br /&gt;
&lt;br /&gt;
Direkt beim Einschalten (cap power_on_gateway) werden von der App einige DNS anfragen gestellt um IPs von fw.ota.homesmart.ikea.net zu erhalten. In den DNS Antworten sind ebenfalls IPs zu d262cmbxmzphsu.cloudfront.net enthalten. Ikea nutzt dabei AWS.&lt;br /&gt;
&lt;br /&gt;
[[File:wireshark-cap1.png|700px]]&lt;br /&gt;
[[File:wireshark-cap2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
Weiters findet man eine http Verbindung:&lt;br /&gt;
&lt;br /&gt;
[[File:wireshark-cap-http.png|600px]]&lt;br /&gt;
&lt;br /&gt;
Die unter fw.ota.homesmart.ikea.net/feed/version_info.json vorhandenen Daten sind nicht allzu spektakulär: Es sind lediglich Versionsinfos.&lt;br /&gt;
&lt;br /&gt;
Sobald über die Ikea Smart Home App das Setup gestarted wird versucht die App mit mDNS queries den Tradfri Gateway zu finden.&lt;br /&gt;
&lt;br /&gt;
[[File:wireshark-cap-mDNS.png|550px]]&lt;br /&gt;
&lt;br /&gt;
Bei dem verwendeten Setup schlägt dies natürlich fehl, jedoch bietet die App direkt die option eine IP manuell einzugeben. Nach Eingabe der IP muss entweder der QR Code auf der Rückseite des Gerätes gescannt werden oder der Sicherheitscode eingegeben werden der sich ebenfalls auf der Rückseite des Geräts befindet.&lt;br /&gt;
&lt;br /&gt;
Der Sicherheitscode ist dabei der PSK der DTLS Verbindung. Sobald der App der QR Code bzw der Sicherheitscode bekannt sind bauen App und Gateway eine DTLS Verbindung auf. Über diese Verbindung werden alle Applikationsdaten gesendet.&lt;br /&gt;
&lt;br /&gt;
[[File:wireshark-cap-dtls.png|550px]]&lt;br /&gt;
&lt;br /&gt;
Auch beim Verbinden von weiteren SH Geräten baut die App keine gesonderten Verbindung auf sondern kommuniziert ausschließlich über DTLS.&lt;br /&gt;
&lt;br /&gt;
[[File:wireshark-cap-dtls-snap.png|550px]]&lt;br /&gt;
&lt;br /&gt;
Einige Verbindungen zur AWS Cloud baut die App dennoch auf. Dies steht anscheinend im Zusammenhang mit dem Verbinden von Geräten da immer direkt nach dem Verbinden eines Gerätes diese Seiten abgefragt werden:&lt;br /&gt;
&lt;br /&gt;
[[File:wireshark-cap-aws.png|550px]]&lt;br /&gt;
&lt;br /&gt;
== Data Transmission when using TRADFRI ==&lt;br /&gt;
&lt;br /&gt;
The IKEA TRADFRI Gateway was connected via LAN cable while the mobile phone running the IKEA app was connected wirelessly to the same network.&lt;br /&gt;
Overview of IP addresses used:&lt;br /&gt;
&lt;br /&gt;
[[File:ip_overview_muzik.png]]&lt;br /&gt;
&lt;br /&gt;
Wireshark was used to record the traffic (using arpspoof because the IKEA TRADFRI Gateway requires a LAN connection so it is not possible to just monitor the Raspion WiFi) which was then filtered.&lt;br /&gt;
&lt;br /&gt;
It turns out that TRADFRI is rather well-behaved when it comes to sending data.&lt;br /&gt;
&lt;br /&gt;
For the most part it uses encrypted (DTLS) communication internally between the Gateway and the mobile phone. To initially find the Gateway after opening the mobile app, an MDNS request is sent out via multicast (224.x.x.x).&lt;br /&gt;
&lt;br /&gt;
However, 2 external connections or destinations could also be found:&lt;br /&gt;
&lt;br /&gt;
* IP address 13.227.156.82 / privacypolicy.config.homesmart.ikea.net (as the url indicates, this has the current policy one has to agree to before using the app)&lt;br /&gt;
* IP address 13.227.156.50 / supportdetails.config.homesmart.ikea.net (this is where the secure certificates are located, apparently).&lt;br /&gt;
&lt;br /&gt;
=== Wireshark caps ===&lt;br /&gt;
privacypolicy.config.homesmart.ikea.net Client Hello:&lt;br /&gt;
&lt;br /&gt;
[[File:Ikea-privacy policy-clientHello.png|700px]]&lt;br /&gt;
&lt;br /&gt;
supportdetails.config.homesmart.ikea.net ServerHello:&lt;br /&gt;
&lt;br /&gt;
[[File:Ikea-supportdetails-serverHello.png|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Certificate Information ===&lt;br /&gt;
The Server Hello contains the information regarding the .cer and .crl:&lt;br /&gt;
 http://ocsp.rootca1.amazontrust.com&lt;br /&gt;
 http://crt.rootca1.amazontrust.com/rootca1.cer&lt;br /&gt;
 http://crl.rootca1.amazontrust.com/rootca1.crl&lt;br /&gt;
Starfield Technologies, Inc.; Starfield Services Root Certificate Authority&lt;br /&gt;
&lt;br /&gt;
Also:&lt;br /&gt;
 http://crl.sca1b.amazontrust.com/sca1b.crl&lt;br /&gt;
 http://ocsp.sca1b.amazontrust.com&lt;br /&gt;
 http://crt.sca1b.amazontrust.com/sca1b.crt &lt;br /&gt;
&lt;br /&gt;
That&#039;s pretty much it. We couldn&#039;t find any unwanted connections.&lt;br /&gt;
&lt;br /&gt;
The app also checks for updates for the used devices, this is also indicated in the app when it happens, so this is very transparent. It is indicated in the app when an update is happening or when the app is checking for new updates as can be seen in the screenshot below. If a device happens to be unavailable, e.g. because it is currently disconnected/turned off, then the app does not report back the current version but instead says the device is unreachable (&#039;Nicht erreichbar&#039;)&lt;br /&gt;
&lt;br /&gt;
[[File:Ikea-tradfri-update.png|360px]]&lt;br /&gt;
&lt;br /&gt;
== Kommunikation entschlüsseln ==&lt;br /&gt;
Bei diesem Versuch wird geschaut ob es möglich ist die Kommunikation, zwischen der IKEA App und dem IKEA Gateway mitzuhören. Nur mit einem Packet Sniffer ist dies nicht möglich, da die Kommunikation per DTLS verschlüsselt wird. Es kam zum Einsatz der MITM Proxy, welcher bei dem c’t-Raspion dabei ist.&lt;br /&gt;
&lt;br /&gt;
=== Aufbau ===&lt;br /&gt;
[[File:mitm-top.png|800px]]&lt;br /&gt;
&lt;br /&gt;
Android kann als eine Virtuelle Maschine betrieben werden, oder es kann auch ein Smart Phone benutzt werden welches die IKEA Smarthome App installiert hat. Wenn es als Virtuelle Maschine betrieben wird, ist drauf zu achten, dass der Bridge Mode benutzt wird, da dann die VM eine eigene IP erhält. Dies hat den Vorteil, dass man nur den Traffic analysieren muss, welcher von Android erzeugt wird und nicht dem des Host Systems.&lt;br /&gt;
Um den MITM benutzten zu können, müssen die Zertifikaten zu dem Key-Store hinzugefügt werden. Dies kann getan werden in dem man die Website mitm.it ansurft. Ist man in dem richtigen Netzwerk sieht man folgendes Fenster.&lt;br /&gt;
&lt;br /&gt;
[[File:mitmproxy-cert.png|800px]]&lt;br /&gt;
&lt;br /&gt;
Hier wählt man das richtige Betriebssystem und lädt die Zertifikate herunter.&lt;br /&gt;
&lt;br /&gt;
Die offizielle Dokumentation findet man hier[https://docs.mitmproxy.org/stable/concepts-certificates/#quick-setup].&lt;br /&gt;
&lt;br /&gt;
=== Findings ===&lt;br /&gt;
Beim Starten der App kann man in Wireshark stehen, dass der Handshake für die DTLS Verbindung durchgeführt wird. &lt;br /&gt;
&lt;br /&gt;
[[File:wireshark-dtls.png]]&lt;br /&gt;
&lt;br /&gt;
Ebenso kann man beobachten, dass mehrere Verbindungen mit verschiedenen Servern nach draußen aufgebaut werden.&lt;br /&gt;
&lt;br /&gt;
[[File:wireshark-tls.png]]&lt;br /&gt;
&lt;br /&gt;
Die Nachrichten zu diesen Servern können durch den MITM entschlüsselt werden.&lt;br /&gt;
&lt;br /&gt;
[[File:mitm-sniff.png]]&lt;br /&gt;
&lt;br /&gt;
Beide Nachrichten beinhalten eine JSON-Datei. &lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;descriptionText&amp;quot;: &amp;quot;That’s why we have updated the terms and conditions. Please agree below in order to continue. You can find the updated legal information in Settings or you can read more below.&amp;quot;,&lt;br /&gt;
    &amp;quot;lastUpdatedTimestampCookie&amp;quot;: 1568799375000,&lt;br /&gt;
    &amp;quot;lastUpdatedTimestampPP&amp;quot;: 1568798738000,&lt;br /&gt;
    &amp;quot;lastUpdatedTimestampTnC&amp;quot;: 1568798786000,&lt;br /&gt;
    &amp;quot;titleText&amp;quot;: &amp;quot;We’ve changed the name of our app! &amp;quot;&lt;br /&gt;
}&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;versionCode&amp;quot;: &amp;quot;44&amp;quot;,&lt;br /&gt;
    &amp;quot;versionName&amp;quot;: &amp;quot;1.11.3&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Im debug log kann beobachtet werden, dass weitere TLS Verbindung aufgebaut werden jedoch nicht entschlüsselt werden können.&lt;br /&gt;
&lt;br /&gt;
	192.168.24.241:59332: Client Handshake failed. The client may not trust the proxy&#039;s certificate for data.logentries.com.&lt;br /&gt;
	192.168.24.241:59332: ClientHandshakeException(&#039;Cannot establish TLS with client (sni: data.logentries.com): TlsException(&amp;quot;(-1, \&#039;Unexpected EOF\&#039;)&amp;quot;)&#039;)&lt;br /&gt;
	::ffff:192.168.24.241:58971: serverdisconnect&lt;br /&gt;
	  -&amp;gt; (&#039;99.86.243.4&#039;, 443)&lt;br /&gt;
	192.168.24.241:59332: clientdisconnect&lt;br /&gt;
	::ffff:192.168.24.241:40204: serverdisconnect&lt;br /&gt;
	  -&amp;gt; (&#039;99.86.243.50&#039;, 443)&lt;br /&gt;
	192.168.24.241:58971: clientdisconnect&lt;br /&gt;
	192.168.24.241:40204: clientdisconnect&lt;br /&gt;
	192.168.24.241:41657: clientconnect&lt;br /&gt;
	::ffff:192.168.24.241:41657: Establish TLS with client&lt;br /&gt;
	192.168.24.241:50453: clientconnect&lt;br /&gt;
	::ffff:192.168.24.241:50453: serverconnect&lt;br /&gt;
	  -&amp;gt; (&#039;99.86.243.36&#039;, 443)&lt;br /&gt;
	192.168.24.241:42222: clientconnect&lt;br /&gt;
	::ffff:192.168.24.241:42222: serverconnect&lt;br /&gt;
	  -&amp;gt; (&#039;99.86.243.4&#039;, 443)&lt;br /&gt;
	::ffff:192.168.24.241:42222: Establish TLS with server&lt;br /&gt;
	::ffff:192.168.24.241:50453: Establish TLS with server&lt;br /&gt;
	::ffff:192.168.24.241:42222: ALPN selected by server: -&lt;br /&gt;
	::ffff:192.168.24.241:42222: Establish TLS with client&lt;br /&gt;
	::ffff:192.168.24.241:50453: ALPN selected by server: -&lt;br /&gt;
	::ffff:192.168.24.241:50453: Establish TLS with client&lt;br /&gt;
	::ffff:192.168.24.241:42222: ALPN for client: b&#039;http/1.1&#039;&lt;br /&gt;
	::ffff:192.168.24.241:50453: ALPN for client: b&#039;http/1.1&#039;&lt;br /&gt;
	::ffff:192.168.24.241:50453: request&lt;br /&gt;
	  -&amp;gt; Request(GET /US/en/getPolicyUpdate/?deviceType=android)&lt;br /&gt;
	::ffff:192.168.24.241:42222: request&lt;br /&gt;
	  -&amp;gt; Request(GET /AppDetails)&lt;br /&gt;
	::ffff:192.168.24.241:42222: response&lt;br /&gt;
	  -&amp;gt; Response(200 OK, application/json, 44b)&lt;br /&gt;
	::ffff:192.168.24.241:50453: response&lt;br /&gt;
	  -&amp;gt; Response(200 OK, application/json, 374b)&lt;br /&gt;
&lt;br /&gt;
Die DTLS Verbindung zwischen der App und dem Gateway, erscheint jedoch nicht in dem Log des MITM.&lt;/div&gt;</summary>
		<author><name>MLengl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=File:Ip_overview_muzik.png&amp;diff=4037</id>
		<title>File:Ip overview muzik.png</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=File:Ip_overview_muzik.png&amp;diff=4037"/>
		<updated>2020-06-02T19:24:29Z</updated>

		<summary type="html">&lt;p&gt;MLengl: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>MLengl</name></author>
	</entry>
</feed>